diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-12-06 13:55:31 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-12-08 13:55:21 +0100 |
| commit | 0b49d57d362fd8e7613b10f52f86753f88de38bd (patch) | |
| tree | 85645fa55ca19db6770e0dfe372951e3fc6c514d /validation/test-suite | |
| parent | 91ae85c674645e9d7284ed48c57d41596ec28990 (diff) | |
| download | sparse-dev-0b49d57d362fd8e7613b10f52f86753f88de38bd.tar.gz | |
testsuite: add support for 'format -a'
The 'format' command create the information needed for the testcase
from the input file and output this on stdout. The developper must
then add this to the input file.
Let's do this automatically by adding an option '-a' to the 'format'
command to directly append the infos to the input file.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/test-suite')
| -rwxr-xr-x | validation/test-suite | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/validation/test-suite b/validation/test-suite index 8c045359..192fba30 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -429,6 +429,7 @@ do_format_help() { echo "Usage: $prog_name [option(s)] [--]format file [name [cmd]]" echo echo "options:" +echo " -a append the created test to the input file" echo " -f write a test known to fail" echo " -l write a test for linearized code" echo @@ -443,11 +444,14 @@ echo " cmd command to be used (defaults to 'sparse \$f do_format() { def_cmd="$default_cmd" + append=0 linear=0 fail=0 while [ $# -gt 1 ] ; do case "$1" in + -a) + append=1 ;; -f) fail=1 ;; -l) @@ -474,6 +478,7 @@ do_format() cmd=`eval echo $default_path/$fcmd` $cmd 1> $file.output.got 2> $file.error.got fexit_value=$? + [ "append" != 0 ] && exec >> $file cat <<_EOF /* |
