linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] testsuite: allow default args from environment for test commands
@ 2017-12-17 15:03 Luc Van Oostenryck
  0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2017-12-17 15:03 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

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>
---
 validation/test-suite | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/validation/test-suite b/validation/test-suite
index f1d3301a6..3abf69d46 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=$?
 
-- 
2.15.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-17 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-17 15:03 [PATCH] testsuite: allow default args from environment for test commands Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).