aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/soltest.sh
blob: 00f484a14372cb50d4a6ddc53ab2e9bdefbf0a41 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash

set -e

REPO_ROOT="$(dirname "$0")"/..
USE_DEBUGGER=0
DEBUGGER="gdb --args"
BOOST_OPTIONS=
SOLTEST_OPTIONS=

while [ $# -gt 0 ]
do
    case "$1" in
        --debugger)
            shift
            DEBUGGER="$1"
            USE_DEBUGGER=1
            ;;
        --debug)
            USE_DEBUGGER=1
            ;;
        --boost-options)
            shift
            BOOST_OPTIONS="${BOOST_OPTIONS} $1"
            ;;
        -t)
            shift
            BOOST_OPTIONS="${BOOST_OPTIONS} -t $1"
            ;;
        --show-progress | -p)
            BOOST_OPTIONS="${BOOST_OPTIONS} $1"
            ;;
        *)
            SOLTEST_OPTIONS="${SOLTEST_OPTIONS} $1"
            ;;
    esac
    shift
done
if [ "$USE_DEBUGGER" -ne "0" ]; then
    DEBUG_PREFIX=${DEBUGGER}
fi

exec ${DEBUG_PREFIX} ${REPO_ROOT}/build/test/soltest ${BOOST_OPTIONS} -- --testpath ${REPO_ROOT}/test ${SOLTEST_OPTIONS}