diff options
author | Fam Zheng <famz@redhat.com> | 2017-09-25 15:54:58 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2017-09-29 11:14:15 +0800 |
commit | 36ac78e65a0695f0e397865cceaf4ab5c4e52c64 (patch) | |
tree | 171e1c4d8583033ec3d9745f7f405a51f44f259a | |
parent | 12b25a7d96dc01fc9710c4af5942c15a51b84db1 (diff) |
docker: Don't mount ccache db if NOUSER=1
With NOUSER=1 the container runs code as root, which may create
privileged files that will not be be accssible next time. Skip ccache
dir mount in this case.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170925075458.18047-1-famz@redhat.com>
Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
-rw-r--r-- | tests/docker/Makefile.include | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 0e4f159619..6f9ea196a7 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -143,9 +143,11 @@ docker-run: docker-qemu-src -e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \ -e V=$V -e J=$J -e DEBUG=$(DEBUG) \ -e SHOW_ENV=$(SHOW_ENV) \ - -e CCACHE_DIR=/var/tmp/ccache \ + $(if $(NOUSER),, \ + -e CCACHE_DIR=/var/tmp/ccache \ + -v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \ + ) \ -v $$(readlink -e $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \ - -v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \ $(IMAGE) \ /var/tmp/qemu/run \ $(TEST), " RUN $(TEST) in ${IMAGE}") |