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
21 export PATH
=/usr
/lib
/ccache
:/usr
/lib64
/ccache
:$PATH
24 export MAKEFLAGS
="$MAKEFLAGS -j$J"
27 # We are in the container so the whole file system belong to us
28 export TEST_DIR
=/tmp
/qemu-test
29 mkdir
-p $TEST_DIR/{src
,build
,install}
31 # Extract the source tarballs
32 tar -C $TEST_DIR/src
-xf $BASE/qemu.
tar ||
{ echo "Failed to untar source"; exit 2; }
34 if test -n "$SHOW_ENV"; then
35 if test -f /packages.txt
; then
36 echo "Packages installed:"
40 echo "Environment variables:"
45 export QEMU_SRC
="$TEST_DIR/src"
46 export BUILD_DIR
="$TEST_DIR/build"
47 export INSTALL_DIR
="$TEST_DIR/install"
49 cd "$QEMU_SRC/tests/docker"
53 if test -z "$DEBUG"; then
58 echo "* Prepared to run command:"
60 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
62 env bash
--noprofile --norc
66 elif test -n "$DEBUG"; then
67 echo "* Command failed:"
69 echo "* Hit Ctrl-D to exit"
71 # Force error after shell exits
72 env bash
--noprofile --norc && exit 1