aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-09-11 08:36:09 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-11-08 10:51:02 +0100
commit9f7b44c9967d7bebe87fc729836e3a5ffc1dfaf7 (patch)
tree4a271bee091e894c0d543decf4f9dc48cebeccd7
parentc39d6cae94f82b15305db495447dae8e21ebfbf8 (diff)
downloadsparse-dev-9f7b44c9967d7bebe87fc729836e3a5ffc1dfaf7.tar.gz
testsuite: add support for 'format -f'
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-xvalidation/test-suite14
1 files changed, 12 insertions, 2 deletions
diff --git a/validation/test-suite b/validation/test-suite
index 0ded178e..c23c5913 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -435,7 +435,10 @@ do_test_suite()
##
do_format_help() {
-echo "Usage: $prog_name [--]format file [name [cmd]]"
+echo "Usage: $prog_name [option(s)] [--]format file [name [cmd]]"
+echo
+echo "options:"
+echo " -f write a test known to fail"
echo
echo "argument(s):"
echo " file file containing the test case(s)"
@@ -444,11 +447,15 @@ echo " cmd command to be used (defaults to 'sparse \$f
}
##
-# do_format(file[, name[, cmd]]) - helps a test writer to format test-suite tags
+# do_format([options,] file[, name[, cmd]]) - helps a test writer to format test-suite tags
do_format()
{
+ fail=0
+
while [ $# -gt 1 ] ; do
case "$1" in
+ -f)
+ fail=1 ;;
help|-*)
do_format_help
return 0
@@ -481,6 +488,9 @@ _EOF
if [ "$fexit_value" -ne "0" ]; then
echo " * check-exit-value: $fexit_value"
fi
+ if [ $fail != 0 ]; then
+ echo " * check-known-to-fail"
+ fi
for stream in output error; do
if [ -s "$file.$stream.got" ]; then
echo " *"