diff options
| author | Fam Zheng | 2017-09-05 04:56:10 +0200 |
|---|---|---|
| committer | Fam Zheng | 2017-09-22 04:20:34 +0200 |
| commit | 82659e844a0cdf5e250f9cdaa31780a5a2dfc781 (patch) | |
| tree | 269276c33dcd2655809c3007ceeadeecbff8870e /tests/docker | |
| parent | docker: Fix return code of build_qemu() (diff) | |
| download | qemu-82659e844a0cdf5e250f9cdaa31780a5a2dfc781.tar.gz qemu-82659e844a0cdf5e250f9cdaa31780a5a2dfc781.tar.xz qemu-82659e844a0cdf5e250f9cdaa31780a5a2dfc781.zip | |
docker: Add test_fail and prep_fail
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
Diffstat (limited to 'tests/docker')
| -rwxr-xr-x | tests/docker/common.rc | 12 |
1 files changed, 12 insertions, 0 deletions
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 +} |
