diff mbox

qemu-kvm tests: Create make target for install tests

Message ID 1277422191-13424-1-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues June 24, 2010, 11:29 p.m. UTC
None
diff mbox

Patch

diff --git a/kvm/test/Makefile b/kvm/test/Makefile
index 18e25c6..456ceae 100644
--- a/kvm/test/Makefile
+++ b/kvm/test/Makefile
@@ -1,7 +1,7 @@ 
 
 include config.mak
 
-DESTDIR :=
+DESTDIR := $(PREFIX)/share/qemu/tests
 
 .PHONY: arch_clean clean
 
@@ -56,5 +56,9 @@  $(libcflat): $(cflatobjs)
 
 -include .*.d
 
+install:
+	mkdir -p $(DESTDIR)
+	install $(tests_and_config) $(DESTDIR)
+
 clean: arch_clean
 	$(RM) kvmctl kvmtrace *.o *.a .*.d $(libcflat) $(cflatobjs)
diff --git a/kvm/test/config-x86-common.mak b/kvm/test/config-x86-common.mak
index 0e1ccce..689e6b4 100644
--- a/kvm/test/config-x86-common.mak
+++ b/kvm/test/config-x86-common.mak
@@ -27,6 +27,8 @@  tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
                $(TEST_DIR)/realmode.flat $(TEST_DIR)/msr.flat \
                $(TEST_DIR)/hypercall.flat $(TEST_DIR)/sieve.flat
 
+tests_and_config = $(tests-common) $(TEST_DIR)/unittests.cfg
+
 test_cases: $(tests-common) $(tests)
 
 $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I lib -I lib/x86
diff --git a/kvm/test/x86/unittests.cfg b/kvm/test/x86/unittests.cfg
new file mode 100644
index 0000000..4a40989
--- /dev/null
+++ b/kvm/test/x86/unittests.cfg
@@ -0,0 +1,52 @@ 
+# Define your new unittest following the convention:
+# [unittest_name]
+# file = foo.flat # Name of the flat file to be used
+# smp = 2 # Number of processors the VM will use during this test
+# extra_params = -cpu qemu64,+x2apic # Additional parameters used
+
+[apic]
+file = apic.flat
+smp = 2
+extra_params: -cpu qemu64,+x2apic
+
+[smptest]
+file = smptest.flat
+smp = 2
+
+[smptest3]
+file = smptest.flat
+smp = 3
+
+[vmexit]
+file = vmexit.flat
+smp = 2
+
+[access]
+file = access.flat
+
+[emulator]
+file = emulator.flat
+
+[hypercall]
+file = hypercall.flat
+
+[idt_test]
+file = idt_test.flat
+
+[msr]
+file = msr.flat
+
+[port80]
+file = port80.flat
+
+[realmode]
+file = realmode.flat
+
+[sieve]
+file = sieve.flat
+
+[tsc]
+file = tsc.flat
+
+[xsave]
+file = xsave.flat