aboutsummaryrefslogtreecommitdiff
path: root/tests/docker/run
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-07-19 21:20:41 +0800
committerFam Zheng <famz@redhat.com>2016-07-20 19:19:43 +0800
commitc81585130e7480a8ad9fcdbc3ff712c48260cf43 (patch)
tree7b883528ebc3d2c07a1ff02d14991a7eb51226cf /tests/docker/run
parent6e733da676a5483314d86f1bcb14950a165b0e6f (diff)
docker: More sensible run script
It is very easy to figure out current directory and bash option from the execution, so do less in the Makefile invocation command line, and figure both options in the script. This makes the next patch easier. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1468934445-32183-7-git-send-email-famz@redhat.com
Diffstat (limited to 'tests/docker/run')
-rwxr-xr-xtests/docker/run12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/docker/run b/tests/docker/run
index ec3d11934b..ddfac05bd4 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -11,6 +11,12 @@
# or (at your option) any later version. See the COPYING file in
# the top-level directory.
+if test -n "$V"; then
+ set -x
+fi
+
+BASE="$(dirname $(readlink -e $0))"
+
# Prepare the environment
. /etc/profile || true
export PATH=/usr/lib/ccache:$PATH
@@ -24,10 +30,10 @@ export TEST_DIR=/tmp/qemu-test
mkdir -p $TEST_DIR/{src,build,install}
# Extract the source tarballs
-tar -C $TEST_DIR/src -xzf qemu.tgz
+tar -C $TEST_DIR/src -xzf $BASE/qemu.tgz
for p in dtc pixman; do
- if test -f $p.tgz; then
- tar -C $TEST_DIR/src/$p -xzf $p.tgz
+ if test -f $BASE/$p.tgz; then
+ tar -C $TEST_DIR/src/$p -xzf $BASE/$p.tgz
export FEATURES="$FEATURES $p"
fi
done