[PATCH] testsuite: allow default args from environment for test commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux