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
This commit is contained in:
parent
6e733da676
commit
c81585130e
@ -114,10 +114,8 @@ docker-run-%: docker-qemu-src
|
|||||||
-e CCACHE_DIR=/var/tmp/ccache \
|
-e CCACHE_DIR=/var/tmp/ccache \
|
||||||
-v $$(realpath $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \
|
-v $$(realpath $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \
|
||||||
-v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
|
-v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
|
||||||
-w /var/tmp/qemu \
|
|
||||||
qemu:$(IMAGE) \
|
qemu:$(IMAGE) \
|
||||||
$(if $V,/bin/bash -x ,) \
|
/var/tmp/qemu/run \
|
||||||
./run \
|
|
||||||
$(CMD); \
|
$(CMD); \
|
||||||
, " RUN $(CMD) in $(IMAGE)")))
|
, " RUN $(CMD) in $(IMAGE)")))
|
||||||
|
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
# or (at your option) any later version. See the COPYING file in
|
# or (at your option) any later version. See the COPYING file in
|
||||||
# the top-level directory.
|
# the top-level directory.
|
||||||
|
|
||||||
|
if test -n "$V"; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
BASE="$(dirname $(readlink -e $0))"
|
||||||
|
|
||||||
# Prepare the environment
|
# Prepare the environment
|
||||||
. /etc/profile || true
|
. /etc/profile || true
|
||||||
export PATH=/usr/lib/ccache:$PATH
|
export PATH=/usr/lib/ccache:$PATH
|
||||||
@ -24,10 +30,10 @@ export TEST_DIR=/tmp/qemu-test
|
|||||||
mkdir -p $TEST_DIR/{src,build,install}
|
mkdir -p $TEST_DIR/{src,build,install}
|
||||||
|
|
||||||
# Extract the source tarballs
|
# 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
|
for p in dtc pixman; do
|
||||||
if test -f $p.tgz; then
|
if test -f $BASE/$p.tgz; then
|
||||||
tar -C $TEST_DIR/src/$p -xzf $p.tgz
|
tar -C $TEST_DIR/src/$p -xzf $BASE/$p.tgz
|
||||||
export FEATURES="$FEATURES $p"
|
export FEATURES="$FEATURES $p"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user