ppc: POWER7 had ACOP and PID registers
[qemu/kevin.git] / tests / docker / run
blobec3d11934bba0cd43286e708f9200e77a8d06520
1 #!/bin/bash -e
3 # Docker test runner
5 # Copyright (c) 2016 Red Hat Inc.
7 # Authors:
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.
14 # Prepare the environment
15 . /etc/profile || true
16 export PATH=/usr/lib/ccache:$PATH
18 if test -n "$J"; then
19 export MAKEFLAGS="$MAKEFLAGS -j$J"
22 # We are in the container so the whole file system belong to us
23 export TEST_DIR=/tmp/qemu-test
24 mkdir -p $TEST_DIR/{src,build,install}
26 # Extract the source tarballs
27 tar -C $TEST_DIR/src -xzf qemu.tgz
28 for p in dtc pixman; do
29 if test -f $p.tgz; then
30 tar -C $TEST_DIR/src/$p -xzf $p.tgz
31 export FEATURES="$FEATURES $p"
33 done
35 export QEMU_SRC="$TEST_DIR/src"
37 cd "$QEMU_SRC/tests/docker"
39 CMD="$QEMU_SRC/tests/docker/$@"
41 if test -n "$DEBUG"; then
42 echo "* Prepared to run command:"
43 echo " $CMD"
44 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
45 echo
46 $SHELL
49 if "$CMD"; then
50 exit 0
51 elif test -n "$DEBUG"; then
52 echo "* Command failed:"
53 echo " $CMD"
54 echo "* Hit Ctrl-D to exit"
55 echo
56 # Force error after shell exits
57 $SHELL && exit 1