Skip to contentSkip to conversation

docker: cleanup temp directory after test

PATCH Applied Peter Xu 2 participants 3 messages Oct 17, 2017 – Oct 18, 2017

lore
Share & tools
lore

Peter Xu

author
#0 lore raw

PATCH 1/1 docker: cleanup temp directory after test

There are temp directories named "docker-src.*" after doing docker tests. I don't see much point in keeping that (it only contains the qemu.tar which is exactly current tree, and the copied "run" file). Let's remove it after test finished.

CC "Alex Bennée" <[email protected]>
CC Fam Zheng <[email protected]>
CC "Philippe Mathieu-Daudé" <[email protected]>
---
 tests/docker/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/Makefile.include +2 -0
index 6f9ea196a7..c8fbd37127 100644
@@ -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:
 #
Signature · 1 line
2.13.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 30 lines · Peter Xu

There are temp directories named "docker-src.*" after doing docker tests. I don't see much point in keeping that (it only contains the qemu.tar which is exactly current tree, and the copied "run" file). Let's remove it after test finished.

CC "Alex Bennée" <[email protected]>
CC Fam Zheng <[email protected]>
CC "Philippe Mathieu-Daudé" <[email protected]>
---
 tests/docker/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/Makefile.include +2 -0
index 6f9ea196a7..c8fbd37127 100644
@@ -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:
 #
Signature · 1 line
2.13.5
Applied
#2 lore raw
In reply to Peter Xu
Quoted 30 lines · Peter Xu

There are temp directories named "docker-src.*" after doing docker tests. I don't see much point in keeping that (it only contains the qemu.tar which is exactly current tree, and the copied "run" file). Let's remove it after test finished.

CC "Alex Bennée" <[email protected]>
CC Fam Zheng <[email protected]>
CC "Philippe Mathieu-Daudé" <[email protected]>
---
 tests/docker/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/Makefile.include +2 -0
index 6f9ea196a7..c8fbd37127 100644
@@ -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:
 #
Signature · 1 line
2.13.5

Applied, thanks!

Fam