tests: vm: Add vm-clean-all
diff mbox series

Message ID 20180716020008.31468-1-famz@redhat.com
State New
Headers show
Series
  • tests: vm: Add vm-clean-all
Related show

Commit Message

Fam Zheng July 16, 2018, 2 a.m. UTC
The images are big. Add a rule to clean up easily.

Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/vm/Makefile.include | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé July 17, 2018, 2:54 a.m. UTC | #1
On 07/15/2018 11:00 PM, Fam Zheng wrote:
> The images are big. Add a rule to clean up easily.

Thanks :)

> 
> Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/vm/Makefile.include | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> index 5daa2a3b73..79e7866c8b 100644
> --- a/tests/vm/Makefile.include
> +++ b/tests/vm/Makefile.include
> @@ -1,6 +1,6 @@
>  # Makefile for VM tests
>  
> -.PHONY: vm-build-all
> +.PHONY: vm-build-all vm-clean-all

Just noticed none of those are in the "vm-test" help message.

>  
>  IMAGES := ubuntu.i386 freebsd netbsd openbsd
>  IMAGE_FILES := $(patsubst %, tests/vm/%.img, $(IMAGES))
> @@ -17,6 +17,9 @@ vm-test:
>  
>  vm-build-all: $(addprefix vm-build-, $(IMAGES))
>  
> +vm-clean-all:
> +	rm -f $(IMAGE_FILES)
> +
>  tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
>  		$(SRC_PATH)/tests/vm/basevm.py \
>  		$(SRC_PATH)/tests/vm/Makefile.include
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Patch
diff mbox series

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 5daa2a3b73..79e7866c8b 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -1,6 +1,6 @@ 
 # Makefile for VM tests
 
-.PHONY: vm-build-all
+.PHONY: vm-build-all vm-clean-all
 
 IMAGES := ubuntu.i386 freebsd netbsd openbsd
 IMAGE_FILES := $(patsubst %, tests/vm/%.img, $(IMAGES))
@@ -17,6 +17,9 @@  vm-test:
 
 vm-build-all: $(addprefix vm-build-, $(IMAGES))
 
+vm-clean-all:
+	rm -f $(IMAGE_FILES)
+
 tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
 		$(SRC_PATH)/tests/vm/basevm.py \
 		$(SRC_PATH)/tests/vm/Makefile.include