5 # Copyright (c) 2016 Red Hat Inc.
8 # Fam Zheng <famz@redhat.com>
10 # This work is licensed under the terms of the GNU GPL, version 2
11 # or (at your option) any later version. See the COPYING file in
12 # the top-level directory.
18 BASE
="$(dirname $(readlink -e $0))"
20 # Prepare the environment
22 export PATH
=/usr
/lib
/ccache
:$PATH
25 export MAKEFLAGS
="$MAKEFLAGS -j$J"
28 # We are in the container so the whole file system belong to us
29 export TEST_DIR
=/tmp
/qemu-test
30 mkdir
-p $TEST_DIR/{src
,build
,install}
32 # Extract the source tarballs
33 tar -C $TEST_DIR/src
-xf $BASE/qemu.
tar || prep_fail
"Failed to untar source"
35 if test -n "$SHOW_ENV"; then
36 if test -f /packages.txt
; then
37 echo "Packages installed:"
41 echo "Environment variables:"
46 export QEMU_SRC
="$TEST_DIR/src"
47 export BUILD_DIR
="$TEST_DIR/build"
48 export INSTALL_DIR
="$TEST_DIR/install"
50 cd "$QEMU_SRC/tests/docker"
54 if test -z "$DEBUG"; then
59 echo "* Prepared to run command:"
61 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
67 elif test -n "$DEBUG"; then
68 echo "* Command failed:"
70 echo "* Hit Ctrl-D to exit"
72 # Force error after shell exits