diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-08-10 02:19:35 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-16 10:40:26 +0200 |
| commit | ca83186b3bc5ee4392c5a3135aaf319c2ad83730 (patch) | |
| tree | 1f46d3a906ae89e6548578c0c8b9516d76cd8fcc /validation | |
| parent | c00124017a3963d76e3dcea55aba4fb0135ee285 (diff) | |
| download | sparse-dev-ca83186b3bc5ee4392c5a3135aaf319c2ad83730.tar.gz | |
testsuite: allow to test a few cases at once
Sometimes we want to only launch a few tests, not the whole
testsuite. the 'single' option allow to test a single case
but it's too restrictive.
Changes this by allowing arbirary arguments as files to be tested.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rwxr-xr-x | validation/test-suite | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/validation/test-suite b/validation/test-suite index 53cd3019..9e30ed93 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -6,7 +6,7 @@ cd $(dirname "$0") default_path=".." default_cmd="sparse \$file" -tests_list=`find . -name '*.c' | sed -e 's#^\./\(.*\)#\1#' | sort` +tests_list="" prog_name=`basename $0` if [ ! -x "$default_path/sparse-llvm" ]; then @@ -156,6 +156,7 @@ echo "Usage: $prog_name [command] [command arguments]" echo echo "commands:" echo " none runs the whole test suite" +echo " file ... runs the test suite on the given file(s)" echo " single file runs the test in 'file'" echo " format file [name [cmd]] helps writing a new test case using cmd" echo @@ -370,8 +371,14 @@ arg_file() case "$1" in '') + tests_list=`find . -name '*.c' | sed -e 's#^\./\(.*\)#\1#' | sort` do_test_suite ;; + *.c) + tests_list="$@" + do_test_suite + ;; + single) arg_file "$2" do_test "$2" |
