docker: Use archive-source.py

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
Fam Zheng 2017-09-05 10:12:01 +08:00
parent d72c55c3a5
commit b7f404201e
2 changed files with 3 additions and 19 deletions

View File

@ -17,23 +17,13 @@ DOCKER_TOOLS := travis
TESTS ?= %
IMAGES ?= %
# Make archive from git repo $1 to tar.gz $2
make-archive-maybe = $(if $(wildcard $1/*), \
$(call quiet-command, \
(cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \
git archive -1 HEAD --format=tar.gz; \
else \
git archive -1 $$(git stash create) --format=tar.gz; \
fi) > $2, \
"ARCHIVE","$(notdir $2)"))
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
$(DOCKER_SRC_COPY):
@mkdir $@
$(call make-archive-maybe, $(SRC_PATH), $@/qemu.tgz)
$(call make-archive-maybe, $(SRC_PATH)/dtc, $@/dtc.tgz)
$(call quiet-command, $(SRC_PATH)/scripts/archive-source.sh $@/qemu.tar, \
"GEN", "$@/qemu.tar")
$(call quiet-command, cp $(SRC_PATH)/tests/docker/run $@/run, \
"COPY","RUNNER")

View File

@ -32,13 +32,7 @@ export TEST_DIR=/tmp/qemu-test
mkdir -p $TEST_DIR/{src,build,install}
# Extract the source tarballs
tar -C $TEST_DIR/src -xzf $BASE/qemu.tgz
for p in dtc pixman; do
if test -f $BASE/$p.tgz; then
tar -C $TEST_DIR/src/$p -xzf $BASE/$p.tgz
export FEATURES="$FEATURES $p"
fi
done
tar -C $TEST_DIR/src -xf $BASE/qemu.tar
if test -n "$SHOW_ENV"; then
if test -f /packages.txt; then