aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-13 23:20:17 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-16 16:21:45 +0100
commitdf281cefca968ecf0485be6b46fd33feb5c903f0 (patch)
treeffbbe1356617a6404421b5c0859ea4b5e1a18c3b /validation
parent09011047682309991c1ff1ff53de71e878a0ae05 (diff)
downloadsparse-dev-df281cefca968ecf0485be6b46fd33feb5c903f0.tar.gz
testsuite: allow default args from environment for test commands
During testing it's sometimes useful to force some default arguments for all commands. An example of this is using '-m32' which essentially allow to run the tessuite on an 64bit machine as-if run a 32-bit one. Allow this by using the environment variable 'SPARSE_TEST_ARGS' to hole default arguments for the test commands. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rwxr-xr-xvalidation/test-suite3
1 files changed, 2 insertions, 1 deletions
diff --git a/validation/test-suite b/validation/test-suite
index f1d3301a..3abf69d4 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -6,6 +6,7 @@ cd $(dirname "$0")
default_path=".."
default_cmd="sparse \$file"
+default_args="$SPARSE_TEST_ARGS"
tests_list=""
prog_name=`basename $0`
@@ -320,7 +321,7 @@ do_test()
shift
# launch the test command and
# grab the actual output & exit value
- eval $pre_cmd $default_path/$base_cmd "$@" \
+ eval $pre_cmd $default_path/$base_cmd $default_args "$@" \
1> $file.output.got 2> $file.error.got
actual_exit_value=$?