From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Christopher Li <sparse@chrisli.org>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: [PATCH 06/10] don't run sparse{c,i} tests when sparse-llvm is disabled
Date: Mon, 04 Aug 2014 19:38:24 +0100 [thread overview]
Message-ID: <53DFD320.2050903@ramsay1.demon.co.uk> (raw)
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
validation/test-suite | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/validation/test-suite b/validation/test-suite
index 3c011c6..0142701 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -7,12 +7,18 @@ default_cmd="sparse \$file"
tests_list=`find . -name '*.c' | sed -e 's#^\./\(.*\)#\1#' | sort`
prog_name=`basename $0`
+if [ ! -x "$default_path/sparse-llvm" ]; then
+ disabled_cmds="sparsec sparsei sparse-llvm"
+fi
+
# counts:
# - tests that have not been converted to test-suite format
+# - tests that are disabled
# - tests that passed
# - tests that failed
# - tests that failed but are known to fail
unhandled_tests=0
+disabled_tests=0
ok_tests=0
ko_tests=0
known_ko_tests=0
@@ -80,6 +86,7 @@ echo " help prints usage"
# - 0 if the test passed,
# - 1 if it failed,
# - 2 if it is not a "test-suite" test.
+# - 3 if the test is disabled.
do_test()
{
test_failed=0
@@ -95,8 +102,6 @@ do_test()
fi
test_name=$last_result
- echo " TEST $test_name ($file)"
-
# does the test provide a specific command ?
cmd=`eval echo $default_path/$default_cmd`
get_value "check-command" $file
@@ -104,6 +109,19 @@ do_test()
last_result=`echo $last_result | sed -e 's/^ *//'`
cmd=`eval echo $default_path/$last_result`
fi
+
+ # check for disabled commands
+ for i in $disabled_cmds; do
+ case "$cmd" in
+ *$i*)
+ disabled_tests=`expr $disabled_tests + 1`
+ return 3
+ ;;
+ esac
+ done
+
+ echo " TEST $test_name ($file)"
+
verbose "Using command : $cmd"
# grab the expected exit value
@@ -168,6 +186,9 @@ do_test_suite()
if [ "$unhandled_tests" -ne "0" ]; then
echo "$unhandled_tests tests could not be handled by $prog_name"
fi
+ if [ "$disabled_tests" -ne "0" ]; then
+ echo "$disabled_tests tests were disabled"
+ fi
}
##
--
2.0.0
next reply other threads:[~2014-08-04 18:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 18:38 Ramsay Jones [this message]
2014-09-27 4:29 ` [PATCH 06/10] don't run sparse{c,i} tests when sparse-llvm is disabled Christopher Li
2014-09-27 13:37 ` Ramsay Jones
2014-09-30 3:26 ` Christopher Li
2014-10-02 3:44 ` Christopher Li
2014-10-02 10:31 ` Ramsay Jones
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=53DFD320.2050903@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.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).