diff options
author | Fam Zheng <famz@redhat.com> | 2017-09-05 10:12:01 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2017-09-22 14:51:43 +0800 |
commit | b7f404201e45e99da23b9764dec27ce5f965cdcd (patch) | |
tree | d3d5e1ff24921d614e1428e39ad01a7920404446 /tests | |
parent | d72c55c3a5e05bbc9fded1483e18fd3ba1977bfb (diff) |
docker: Use archive-source.py
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/docker/Makefile.include | 14 | ||||
-rwxr-xr-x | 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 |