[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 16/18] tests: support target-specific unit tests
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC 16/18] tests: support target-specific unit tests |
Date: |
Wed, 3 Oct 2012 10:29:12 -0300 |
To make unit tests that depend on target-specific files, use
check-unit-<arch>-y and test-obj-<arch>-y.
Signed-off-by: Eduardo Habkost <address@hidden>
---
tests/Makefile | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 26a67ce..ce4f6f2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -40,8 +40,6 @@ test-qapi-obj-y = $(qobject-obj-y) $(qapi-obj-y)
$(tools-obj-y)
test-qapi-obj-y += tests/test-qapi-visit.o tests/test-qapi-types.o
test-qapi-obj-y += module.o
-$(test-obj-y): QEMU_INCLUDES += -Itests
-
tests/check-qint$(EXESUF): tests/check-qint.o qint.o $(tools-obj-y)
tests/check-qstring$(EXESUF): tests/check-qstring.o qstring.o $(tools-obj-y)
tests/check-qdict$(EXESUF): tests/check-qdict.o qdict.o qfloat.o qint.o
qstring.o qbool.o qlist.o $(tools-obj-y)
@@ -75,9 +73,21 @@ tests/m48t59-test$(EXESUF): tests/m48t59-test.o
$(trace-obj-y)
tests/fdc-test$(EXESUF): tests/fdc-test.o tests/libqtest.o $(trace-obj-y)
tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o tests/libqtest.o $(trace-obj-y)
-# QTest rules
+# unit test rules:
TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+
+# target-specific tests/objs:
+test-obj-y += $(foreach TARGET,$(TARGETS), $(test-obj-$(TARGET)-y))
+check-unit-y += $(foreach TARGET,$(TARGETS), $(check-unit-$(TARGET)-y))
+
+$(foreach TARGET,$(TARGETS),$(eval $(test-obj-$(TARGET)-y): QEMU_INCLUDES +=
-Itarget-$(TARGET)))
+
+
+$(test-obj-y): QEMU_INCLUDES += -Itests
+
+# QTest rules
+
QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y),
$(TARGET),))
check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS),
$(check-qtest-$(TARGET)-y))
--
1.7.11.4
[Qemu-devel] [RFC 16/18] tests: support target-specific unit tests,
Eduardo Habkost <=
[Qemu-devel] [RFC 11/18] target-i386: cpu_x86_init: allow APIC ID to be set by caller, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 07/18] kvm: create kvm_arch_vcpu_id() function, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 13/18] pc: set explicit APIC ID for CPUs, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 15/18] pc: set fw_cfg data based on APIC ID calculation (v2), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 14/18] pc: create apic_id_for_cpu() function (v3), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 18/18] pc: generate APIC IDs according to CPU topology (v3), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 08/18] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index (v2), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 17/18] target-i386: topology & APIC ID utility functions (v2), Eduardo Habkost, 2012/10/03