aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-30 01:15:48 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-30 01:15:48 +0200
commit6d5d9b420b2f0e86a01dc40524f31bd80f5ec3ee (patch)
tree8f2e49a6bd75bd78c40d4bc1bd7048dbb796f411
parentc089cd2dc771e5bf175a390966e454df3334955d (diff)
parent8862279754b9c6edf8e3170d30acd54410f6c760 (diff)
downloadsparse-6d5d9b420b2f0e86a01dc40524f31bd80f5ec3ee.tar.gz
Merge branch 'testsuite-extra' (early part)
* testsuite: add option '-r' to 'test-suite format'
-rwxr-xr-xvalidation/test-suite11
1 files changed, 11 insertions, 0 deletions
diff --git a/validation/test-suite b/validation/test-suite
index 1b05c75e..370cd35a 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -512,6 +512,7 @@ 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 " -r write a test for linearized code returning 1"
echo " -p write a test for pre-processing"
echo
echo "argument(s):"
@@ -528,6 +529,7 @@ do_format()
append=0
linear=0
fail=0
+ ret=''
while [ $# -gt 0 ] ; do
case "$1" in
@@ -538,6 +540,9 @@ do_format()
-l)
def_cmd='test-linearize -Wno-decl $file'
linear=1 ;;
+ -r)
+ def_cmd='test-linearize -Wno-decl $file'
+ ret=1 ;;
-p)
def_cmd='sparse -E $file' ;;
@@ -582,6 +587,12 @@ _EOF
if [ $fail != 0 ]; then
echo " * check-known-to-fail"
fi
+ if [ "$ret" != '' ]; then
+ echo ' *'
+ echo ' * check-output-ignore'
+ echo " * check-output-returns: $ret"
+ rm -f "$file.output.got"
+ fi
if [ $linear != 0 ]; then
echo ' *'
echo ' * check-output-ignore'