[master] ff65c2f Test the fail/skip exit codes of varnishtest
Poul-Henning Kamp
phk at FreeBSD.org
Fri Jan 20 20:59:04 CET 2017
commit ff65c2f4e5585e6ac3506ccc97165552c32e28e4
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Jan 20 19:57:59 2017 +0000
Test the fail/skip exit codes of varnishtest
diff --git a/bin/varnishtest/tests/a00000.vtc b/bin/varnishtest/tests/a00000.vtc
index 8c3c17c..2fc2b9f 100644
--- a/bin/varnishtest/tests/a00000.vtc
+++ b/bin/varnishtest/tests/a00000.vtc
@@ -25,3 +25,17 @@ shell -expect {__=barf} {
echo __=`cat __`
}
+# Test a test failure
+shell -exit 2 -expect {TEST _.vtc FAILED} {
+ echo varnishtest foo > _.vtc
+ echo 'shell {false}' >> _.vtc
+ exec varnishtest -v _.vtc || true
+}
+
+# Test a test skip
+shell -exit 77 -expect {TEST _.vtc skipped} {
+ echo varnishtest foo > _.vtc
+ echo 'feature cmd false' >> _.vtc
+ exec varnishtest -v _.vtc || true
+}
+
More information about the varnish-commit
mailing list