]> git.proxmox.com Git - mirror_qemu.git/commitdiff
docker: Add test_fail and prep_fail
authorFam Zheng <famz@redhat.com>
Tue, 5 Sep 2017 02:56:10 +0000 (10:56 +0800)
committerFam Zheng <famz@redhat.com>
Fri, 22 Sep 2017 02:20:34 +0000 (10:20 +0800)
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

index 3b45eb91c6b7182b6cd6d720e783bae1feae5a22..87f526375705b3f6b2bf7c5ffda8074526b4de0d 100755 (executable)
@@ -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
+}