OSDN Git Service

iotests: Add casenotrun report to bash tests
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Wed, 4 Sep 2019 09:11:21 +0000 (12:11 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 13 Sep 2019 10:18:37 +0000 (12:18 +0200)
The new function _casenotrun() is to be invoked if a test case cannot
be run for some reason. The user will be notified by a message passed
to the function. It is the caller's responsibility to make skipped a
particular test.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/common.rc

index 51c57db..e45cdfa 100644 (file)
@@ -455,6 +455,15 @@ _notrun()
     exit
 }
 
+# bail out, setting up .casenotrun file
+# The function _casenotrun() is used as a notifier. It is the
+# caller's responsibility to make skipped a particular test.
+#
+_casenotrun()
+{
+    echo "    [case not run] $*" >>"$OUTPUT_DIR/$seq.casenotrun"
+}
+
 # just plain bail out
 #
 _fail()