[Qemu-devel] [PATCH v4 2/6] docker: Add test_fail and prep_fail

Fam Zheng posted 6 patches 8 years, 5 months ago
[Qemu-devel] [PATCH v4 2/6] docker: Add test_fail and prep_fail
Posted by Fam Zheng 8 years, 5 months ago
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>
---
 tests/docker/common.rc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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