diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-13 21:21:17 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-13 23:57:09 +0800 |
commit | c032a7ded1371c67aac2a1721bf522760c4d41a4 (patch) | |
tree | cbf621cd498b836699f6476293cb6beb51c1e06b /scripts/soltest.sh | |
parent | 6bab7a4cce26e922029769e7193636cfc2fe3752 (diff) | |
download | dexon-solidity-c032a7ded1371c67aac2a1721bf522760c4d41a4.tar.gz dexon-solidity-c032a7ded1371c67aac2a1721bf522760c4d41a4.tar.zst dexon-solidity-c032a7ded1371c67aac2a1721bf522760c4d41a4.zip |
Add soltest.sh script that invokes soltest with the correct --testpath.
Diffstat (limited to 'scripts/soltest.sh')
-rwxr-xr-x | scripts/soltest.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/soltest.sh b/scripts/soltest.sh new file mode 100755 index 00000000..00f484a1 --- /dev/null +++ b/scripts/soltest.sh @@ -0,0 +1,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} |