Commit 3941b73ad0f814116305dcbf7e2cd1cba1973dd5

Stefan Sperling 2019-05-14T11:30:38

allow cmdline tests to report test result 'xfail' (expected failure)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/regress/cmdline/common.sh b/regress/cmdline/common.sh
index a6e70b9..61ec844 100644
--- a/regress/cmdline/common.sh
+++ b/regress/cmdline/common.sh
@@ -95,6 +95,10 @@ function test_done
 	if [ "$result" == "0" ]; then
 		test_cleanup "$testroot"
 		echo "ok"
+	elif echo "$result" | grep -q "^xfail"; then
+		# expected test failure; test reproduces an unfixed bug
+		test_cleanup "$testroot"
+		echo "$result"
 	else
 		echo "test failed; leaving test data in $testroot"
 	fi