[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--ignore-exit]
[--diagnostic-string=STRING] [--merge|--no-merge]
- [--comments|--no-comments] [--] TEST-COMMAND
+ [--comments|--no-comments] [--post-script] [--] TEST-COMMAND
The '--test-name', '-log-file' and '--trs-file' options are mandatory.
END
}
test_name= # Used for reporting.
log_file= # Where to save the result and output of the test script.
trs_file= # Where to save the metadata of the test run.
+post_script= # Script to be run after the test.
expect_failure=0
color_tests=0
merge=0
--comments) comments=1;;
--no-comments) comments=0;;
--diagnostic-string) diag_string=$2; shift;;
+ --post-script) post_script=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
esac
msg = msg " " details
# Output on console might be colorized.
print decorate_result(result) msg
+ # Flush stdout after each test result, this is useful when stdout
+ # is buffered, for example in a CI system.
+ fflush()
# Log the result in the log file too, to help debugging (this is
# especially true when said result is a TAP error or "Bail out!").
print result msg | "cat >&3";
test $? -eq 0 || fatal "I/O or internal error"
+if test ! -z $post_script ; then
+ $post_script
+ test $? -eq 0 || fatal "Post script returned an error. See $log_file"
+fi
+
# Local Variables:
# mode: shell-script
# sh-indentation: 2