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.
20 BASE
="$(dirname $(readlink -e $0))"
22 # Prepare the environment
23 .
/etc
/profile || true
24 export PATH
=/usr
/lib
/ccache
:$PATH
27 export MAKEFLAGS
="$MAKEFLAGS -j$J"
30 # We are in the container so the whole file system belong to us
31 export TEST_DIR
=/tmp
/qemu-test
32 mkdir
-p $TEST_DIR/{src
,build
,install}
34 # Extract the source tarballs
35 tar -C $TEST_DIR/src
-xzf $BASE/qemu.tgz
36 for p
in dtc pixman
; do
37 if test -f $BASE/$p.tgz
; then
38 tar -C $TEST_DIR/src
/$p -xzf $BASE/$p.tgz
39 export FEATURES
="$FEATURES $p"
43 export QEMU_SRC
="$TEST_DIR/src"
45 cd "$QEMU_SRC/tests/docker"
47 CMD
="$QEMU_SRC/tests/docker/$@"
49 if test -n "$DEBUG"; then
50 echo "* Prepared to run command:"
52 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
59 elif test -n "$DEBUG"; then
60 echo "* Command failed:"
62 echo "* Hit Ctrl-D to exit"
64 # Force error after shell exits