aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-10-20 12:45:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-10-20 12:45:56 +0100
commit27825bc954f832a8e1137ceb45b52f7bb3f8f9cd (patch)
tree87dcfeb38779cc007e9b79ba8c0a54667f58bebd /tests
parente67277f8f32d56c64c7993163f41bb4338aec566 (diff)
parent6a2e11974fa6c4eaee6b2b156b1b4e03ca983bab (diff)
Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging
# gpg: Signature made Fri 20 Oct 2017 07:30:45 BST # gpg: using RSA key 0xCA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/docker-pull-request: docker: Fix PATH for ccache docker: fix out-of-tree 'make docker-test-build@debian-powerpc-cross' docker: allow running from srcdir != builddir build docker: cleanup temp directory after test docker: Don't allocate tty unless DEBUG=1 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/docker/Makefile.include12
-rwxr-xr-xtests/docker/run2
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 6f9ea196a7..f1a398e9fa 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -18,11 +18,11 @@ TESTS ?= %
IMAGES ?= %
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
-DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
+DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
$(DOCKER_SRC_COPY):
@mkdir $@
- $(call quiet-command, $(SRC_PATH)/scripts/archive-source.sh $@/qemu.tar, \
+ $(call quiet-command, cd $(SRC_PATH) && scripts/archive-source.sh $@/qemu.tar, \
"GEN", "$@/qemu.tar")
$(call quiet-command, cp $(SRC_PATH)/tests/docker/run $@/run, \
"COPY","RUNNER")
@@ -44,7 +44,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
"BUILD","$*")
-docker-image-debian-powerpc-cross: EXTRA_FILES:=tests/docker/dockerfiles/debian-apt-fake.sh
+docker-image-debian-powerpc-cross: EXTRA_FILES:=$(SRC_PATH)/tests/docker/dockerfiles/debian-apt-fake.sh
# Enforce dependancies for composite images
docker-image-debian: docker-image-debian9
@@ -134,10 +134,10 @@ docker-run: docker-qemu-src
" COPYING $(EXECUTABLE) to $(IMAGE)"))
$(call quiet-command, \
$(SRC_PATH)/tests/docker/docker.py run \
- $(if $(NOUSER),,-u $(shell id -u)) -t \
+ $(if $(NOUSER),,-u $(shell id -u)) \
--security-opt seccomp=unconfined \
$(if $V,,--rm) \
- $(if $(DEBUG),-i,) \
+ $(if $(DEBUG),-ti,) \
$(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
-e TARGET_LIST=$(TARGET_LIST) \
-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
@@ -151,6 +151,8 @@ docker-run: docker-qemu-src
$(IMAGE) \
/var/tmp/qemu/run \
$(TEST), " RUN $(TEST) in ${IMAGE}")
+ $(call quiet-command, rm -r $(DOCKER_SRC_COPY), \
+ " CLEANUP $(DOCKER_SRC_COPY)")
# Run targets:
#
diff --git a/tests/docker/run b/tests/docker/run
index 642084bcb8..9dd362bb98 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -18,7 +18,7 @@ fi
BASE="$(dirname $(readlink -e $0))"
# Prepare the environment
-export PATH=/usr/lib/ccache:$PATH
+export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
if test -n "$J"; then
export MAKEFLAGS="$MAKEFLAGS -j$J"