[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 10/12] tests: Support target-specific unit tests
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC 10/12] tests: Support target-specific unit tests |
Date: |
Wed, 9 Jan 2013 16:53:50 -0200 |
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 | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index b09a343..fa96d1a 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -74,8 +74,6 @@ test-qapi-obj-y = $(qobject-obj-y) $(qapi-obj-y) qemu-tool.o
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
tests/check-qstring$(EXESUF): tests/check-qstring.o qstring.o
tests/check-qdict$(EXESUF): tests/check-qdict.o qdict.o qfloat.o qint.o
qstring.o qbool.o qlist.o
@@ -111,9 +109,20 @@ 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.7
- [Qemu-devel] [RFC 06/12] fw_cfg: Remove FW_CFG_MAX_CPUS from fw_cfg_init(), (continued)
- [Qemu-devel] [RFC 06/12] fw_cfg: Remove FW_CFG_MAX_CPUS from fw_cfg_init(), Eduardo Habkost, 2013/01/09
- [Qemu-devel] [RFC 09/12] pc: Set fw_cfg data based on APIC ID calculation, Eduardo Habkost, 2013/01/09
- [Qemu-devel] [RFC 12/12] pc: Generate APIC IDs according to CPU topology, Eduardo Habkost, 2013/01/09
- [Qemu-devel] [RFC 04/12] kvm: Create kvm_arch_vcpu_id() function, Eduardo Habkost, 2013/01/09
- [Qemu-devel] [RFC 07/12] target-i386/cpu: Introduce apic_id_for_cpu() function, Eduardo Habkost, 2013/01/09
- [Qemu-devel] [RFC 10/12] tests: Support target-specific unit tests,
Eduardo Habkost <=
- [Qemu-devel] [RFC 02/12] target-i386: Don't set any KVM flag by default if KVM is disabled, Eduardo Habkost, 2013/01/09
- [Qemu-devel] [RFC 11/12] target-i386: Topology & APIC ID utility functions, Eduardo Habkost, 2013/01/09
- Re: [Qemu-devel] [RFC 00/12] target-i386: Fix APIC-ID-based topology (v4), Eduardo Habkost, 2013/01/17