diff mbox

docker: Inline "prep_fail" in run script

Message ID 20180326090350.30014-1-famz@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fam Zheng March 26, 2018, 9:03 a.m. UTC
We don't source common.rc where prep_fail is defined, so spell out the
commands and do what was intended.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/docker/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth March 26, 2018, 9:20 a.m. UTC | #1
On 26.03.2018 11:03, Fam Zheng wrote:
> We don't source common.rc where prep_fail is defined, so spell out the
> commands and do what was intended.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/docker/run b/tests/docker/run
> index 9dd362bb98..7aebf4b569 100755
> --- a/tests/docker/run
> +++ b/tests/docker/run
> @@ -29,7 +29,7 @@ export TEST_DIR=/tmp/qemu-test
>  mkdir -p $TEST_DIR/{src,build,install}
>  
>  # Extract the source tarballs
> -tar -C $TEST_DIR/src -xf $BASE/qemu.tar || prep_fail "Failed to untar source"
> +tar -C $TEST_DIR/src -xf $BASE/qemu.tar || { echo "Failed to untar source"; exit 2; }
>  if test -f $TEST_DIR/src/Makefile; then
>      export FEATURES="$FEATURES dtc"
>  fi

Reviewed-by: Thomas Huth <thuth@redhat.com>
Fam Zheng April 4, 2018, 6:52 a.m. UTC | #2
On Mon, 03/26 17:03, Fam Zheng wrote:
> We don't source common.rc where prep_fail is defined, so spell out the
> commands and do what was intended.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/docker/run b/tests/docker/run
> index 9dd362bb98..7aebf4b569 100755
> --- a/tests/docker/run
> +++ b/tests/docker/run
> @@ -29,7 +29,7 @@ export TEST_DIR=/tmp/qemu-test
>  mkdir -p $TEST_DIR/{src,build,install}
>  
>  # Extract the source tarballs
> -tar -C $TEST_DIR/src -xf $BASE/qemu.tar || prep_fail "Failed to untar source"
> +tar -C $TEST_DIR/src -xf $BASE/qemu.tar || { echo "Failed to untar source"; exit 2; }
>  if test -f $TEST_DIR/src/Makefile; then
>      export FEATURES="$FEATURES dtc"
>  fi
> -- 
> 2.14.3
> 

Queued, thanks!

Fam
diff mbox

Patch

diff --git a/tests/docker/run b/tests/docker/run
index 9dd362bb98..7aebf4b569 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -29,7 +29,7 @@  export TEST_DIR=/tmp/qemu-test
 mkdir -p $TEST_DIR/{src,build,install}
 
 # Extract the source tarballs
-tar -C $TEST_DIR/src -xf $BASE/qemu.tar || prep_fail "Failed to untar source"
+tar -C $TEST_DIR/src -xf $BASE/qemu.tar || { echo "Failed to untar source"; exit 2; }
 if test -f $TEST_DIR/src/Makefile; then
     export FEATURES="$FEATURES dtc"
 fi