From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH] testsuite: allow default args from environment for test commands
Date: Sun, 17 Dec 2017 16:03:46 +0100 [thread overview]
Message-ID: <20171217150346.9240-1-luc.vanoostenryck@gmail.com> (raw)
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
reply other threads:[~2017-12-17 15:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171217150346.9240-1-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).