diff mbox series

[PULL,21/38] docker: Add test_fail and prep_fail

Message ID 20170908095506.13594-22-famz@redhat.com
State New
Headers show
Series [PULL,01/38] docker: ensure NOUSER for travis images | expand

Commit Message

Fam Zheng Sept. 8, 2017, 9:54 a.m. UTC
They both print a message and exit, but with different status code so
distinguish real test errors from env preparation failures.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170905025614.579-3-famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Based-on: 20170905021201.25684-1-famz@redhat.com
---
 tests/docker/common.rc | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/tests/docker/common.rc b/tests/docker/common.rc
index 3b45eb91c6..87f5263757 100755
--- a/tests/docker/common.rc
+++ b/tests/docker/common.rc
@@ -32,3 +32,15 @@  build_qemu()
     echo $config_opts
     $QEMU_SRC/configure $config_opts && make $MAKEFLAGS
 }
+
+test_fail()
+{
+    echo "$@"
+    exit 1
+}
+
+prep_fail()
+{
+    echo "$@"
+    exit 2
+}