From b7f404201e45e99da23b9764dec27ce5f965cdcd Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 5 Sep 2017 10:12:01 +0800 Subject: [PATCH] docker: Use archive-source.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fam Zheng Reviewed-by: Alex Bennée --- tests/docker/Makefile.include | 14 ++------------ tests/docker/run | 8 +------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 2bed4c0e00..0e4f159619 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -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") diff --git a/tests/docker/run b/tests/docker/run index ec2541cbd9..52b76e443d 100755 --- a/tests/docker/run +++ b/tests/docker/run @@ -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