[PATCH 1/9] tests/docker: expose $HOME/.cache as docker volume

Alex Bennée posted 9 patches 9 months, 2 weeks ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[PATCH 1/9] tests/docker: expose $HOME/.cache as docker volume
Posted by Alex Bennée 9 months, 2 weeks ago
If you want to run functional tests we should share .cache so we don't
force containers to continually re-download images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index fa1cbb6726..56a8d9f8ff 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -224,6 +224,7 @@ docker-run: docker-qemu-src
 			$(if $(NOUSER),,				\
 				-e CCACHE_DIR=/var/tmp/ccache 		\
 				-v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
+				-v $(HOME)/.cache:$(HOME)/.cache 	\
 			)						\
 			-v $$(readlink -e $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \
 			$(IMAGE) 					\
-- 
2.39.5


Re: [PATCH 1/9] tests/docker: expose $HOME/.cache as docker volume
Posted by Thomas Huth 9 months, 2 weeks ago
On 28/04/2025 14.59, Alex Bennée wrote:
> If you want to run functional tests we should share .cache so we don't
> force containers to continually re-download images.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/Makefile.include | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index fa1cbb6726..56a8d9f8ff 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -224,6 +224,7 @@ docker-run: docker-qemu-src
>   			$(if $(NOUSER),,				\
>   				-e CCACHE_DIR=/var/tmp/ccache 		\
>   				-v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
> +				-v $(HOME)/.cache:$(HOME)/.cache 	\

Maybe better restrict it to ~/.cache/qemu ? ... to avoid sharing other 
subfolders there to the container?

  Thomas