bash_tap: Implement mechanism to mark a test as expected failure
Test author can now mark a bash tap test as expected failure by setting EXPFAIL environment variable to a non-zero value.
This commit is contained in:
@@ -7,7 +7,14 @@ function bashtap_on_error {
|
|||||||
# A command in the parent script failed, interpret this as a test failure.
|
# A command in the parent script failed, interpret this as a test failure.
|
||||||
# $bashtap_line contains the last executed line, or an error.
|
# $bashtap_line contains the last executed line, or an error.
|
||||||
echo -n "$bashtap_output"
|
echo -n "$bashtap_output"
|
||||||
echo "not ok 1 - ${bashtap_line}"
|
|
||||||
|
# Determine if this failure was expected
|
||||||
|
if [[ ! -z "$EXPFAIL" ]]
|
||||||
|
then
|
||||||
|
todo_suffix=" # TODO"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "not ok 1 - ${bashtap_line}${todo_suffix}"
|
||||||
bashtap_clean_tmpdir
|
bashtap_clean_tmpdir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user