OSDN Git Service

tests: Add centos VM testing
[qmiga/qemu.git] / tests / vm / Makefile.include
1 # Makefile for VM tests
2
3 .PHONY: vm-build-all
4
5 IMAGES := ubuntu.i386 freebsd netbsd openbsd centos
6 IMAGE_FILES := $(patsubst %, tests/vm/%.img, $(IMAGES))
7
8 .PRECIOUS: $(IMAGE_FILES)
9
10 vm-test:
11         @echo "vm-test: Test QEMU in preconfigured virtual machines"
12         @echo
13         @echo "  vm-build-ubuntu.i386            - Build QEMU in ubuntu i386 VM"
14         @echo "  vm-build-freebsd                - Build QEMU in FreeBSD VM"
15         @echo "  vm-build-netbsd                 - Build QEMU in NetBSD VM"
16         @echo "  vm-build-openbsd                - Build QEMU in OpenBSD VM"
17         @echo "  vm-build-centos                 - Build QEMU in CentOS VM, with Docker"
18
19 vm-build-all: $(addprefix vm-build-, $(IMAGES))
20
21 tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
22                 $(SRC_PATH)/tests/vm/basevm.py \
23                 $(SRC_PATH)/tests/vm/Makefile.include
24         $(call quiet-command, \
25                 $< \
26                 $(if $(V)$(DEBUG), --debug) \
27                 --image "$@" \
28                 --force \
29                 --build-image $@, \
30                 "  VM-IMAGE $*")
31
32
33 # Build in VM $(IMAGE)
34 vm-build-%: tests/vm/%.img
35         $(call quiet-command, \
36                 $(SRC_PATH)/tests/vm/$* \
37                 $(if $(V)$(DEBUG), --debug) \
38                 $(if $(DEBUG), --interactive) \
39                 $(if $(J),--jobs $(J)) \
40                 --image "$<" \
41                 --build-qemu $(SRC_PATH), \
42                 "  VM-BUILD $*")
43