From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [RFC 05/15] tests: Add rules to non-gtester qtest test cases
Date: Mon, 21 Nov 2016 23:12:03 -0200 [thread overview]
Message-ID: <1479777133-23567-6-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1479777133-23567-1-git-send-email-ehabkost@redhat.com>
Today, simple non-gtester binaries can be run easily by a single
Makefile rule (e.g. check-tests/qemu-iotest-quick.sh), but we
don't have anything to help us automatically run the same test
binary for multiple architectures.
This add check-simpleqtest-* rules that will help us run binaries
present in $(check-simpleqtest-*-y).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
tests/Makefile.include | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index e98d3b6..eb1031b 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -791,6 +791,40 @@ check-report.html: check-report.xml
$(call quiet-command,gtester-report $< > $@,"GEN","$@")
+# rules for non-gtester qtest tests:
+
+SIMPLETEST_OPTIONS = $(if $(V),--verbose,--quiet)
+
+# rule dependencies are:
+# check-simpleqtest: check-simpleqtest-$(ARCH) for each ARCH in QTEST_ARCH
+# check-simpleqtest-$(ARCH): check-simpleqtest-$(TEST)-$(ARCH) for each
+# TEST in $(check-simpleqtest-$(ARCH)-y)
+# (generated by qtest_target macro)
+# check-simpleqtest-$(TEST)-$(ARCH): runs test with $(SIMPLETEST_OPTIONS)
+# (generated by qtest_target macro)
+#
+# $(check-simpleqtest-$(ARCH)-y) automatically includes
+# $(check-simpleqtest-generic-y)
+
+define qtest-target =
+
+check-simpleqtest-$(1)-y += $$(check-simpleqtest-generic-y)
+
+.PHONY: $$(patsubst %, check-simpleqtest-%-$(1), $$(check-simpleqtest-$(1)-y))
+$$(patsubst %, check-simpleqtest-%-$(1), $$(check-simpleqtest-$(1)-y)): check-simpleqtest-%-$(1): %
+ $$(call quiet-command,QTEST_QEMU_BINARY=$(1)-softmmu/qemu-system-$(1) \
+ QTEST_QEMU_IMG=qemu-img$$(EXESUF) \
+ MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \
+ $$< $$(SIMPLETEST_OPTIONS),"QTEST", "$$<")
+
+.PHONY: check-simpleqtest-$(1)
+check-simpleqtest-$(1): $$(patsubst %, check-simpleqtest-%-$(1), $$(check-simpleqtest-$(1)-y))
+
+endef
+
+$(foreach TARGET,$(QTEST_TARGETS),$(eval $(call qtest-target,$(TARGET))))
+
+
# Other tests
QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
@@ -818,7 +852,8 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
.PHONY: check-qapi-schema check-qtest check-unit check check-clean
check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y))
-check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
+check-simpleqtest: $(patsubst %,check-simpleqtest-%, $(QTEST_TARGETS))
+check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) check-simpleqtest
check-unit: $(patsubst %,check-%, $(check-unit-y))
check-block: $(patsubst %,check-%, $(check-block-y))
check: check-qapi-schema check-unit check-qtest
--
2.7.4
next prev parent reply other threads:[~2016-11-22 1:13 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 1:11 [Qemu-devel] [RFC 00/15] qmp: Report supported device types on 'query-machines' Eduardo Habkost
2016-11-22 1:11 ` [Qemu-devel] [RFC 01/15] qemu.py: Make logging optional Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 02/15] qtest.py: Support QTEST_LOG environment variable Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 03/15] qtest.py: make logging optional Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 04/15] qtest.py: Make 'binary' parameter optional Eduardo Habkost
2016-11-22 1:12 ` Eduardo Habkost [this message]
2016-11-22 13:34 ` [Qemu-devel] [RFC 05/15] tests: Add rules to non-gtester qtest test cases Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 06/15] qdev: Add device_type field to BusClass Eduardo Habkost
2016-11-24 16:48 ` Cornelia Huck
2016-11-24 17:37 ` Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 07/15] machine: Add MachineClass::default_buses field Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 08/15] qmp: Add 'supported-device-types' field to 'query-machines' Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 09/15] pci: Introduce INTERFACE_PCIE_DEVICE interface name Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 10/15] pc: Initialize default bus lists Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 11/15] s390x: " Eduardo Habkost
2016-12-05 15:24 ` David Hildenbrand
2016-12-05 16:03 ` Cornelia Huck
2016-12-05 16:38 ` Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 12/15] arm: " Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 13/15] mips: " Eduardo Habkost
2016-11-22 1:12 ` [Qemu-devel] [RFC 14/15] ppc: " Eduardo Habkost
2016-11-23 3:42 ` Alexey Kardashevskiy
2016-11-22 1:12 ` [Qemu-devel] [RFC 15/15] qdev: Add device_class_set_bus_type() function Eduardo Habkost
2016-11-22 1:34 ` [Qemu-devel] [RFC 00/15] qmp: Report supported device types on 'query-machines' no-reply
2016-11-22 1:36 ` no-reply
2016-11-22 8:18 ` David Hildenbrand
2016-11-22 13:09 ` Eduardo Habkost
2016-11-22 22:34 ` Eduardo Habkost
2016-11-23 17:10 ` [Qemu-devel] -nodefaults and available buses (was Re: [RFC 00/15] qmp: Report supported device types on 'query-machines') Eduardo Habkost
2016-11-24 1:51 ` David Gibson
2016-11-24 16:30 ` Cornelia Huck
2016-11-24 17:42 ` Eduardo Habkost
2016-11-24 13:39 ` Markus Armbruster
2016-11-23 16:43 ` [Qemu-devel] [RFC 00/15] qmp: Report supported device types on 'query-machines' Marcel Apfelbaum
2016-11-23 17:35 ` Eduardo Habkost
2016-11-24 9:34 ` Marcel Apfelbaum
2016-11-24 13:34 ` Markus Armbruster
2016-11-24 14:12 ` Eduardo Habkost
2016-11-24 14:55 ` Markus Armbruster
2016-11-24 14:22 ` Marcel Apfelbaum
2016-11-24 15:41 ` Markus Armbruster
2016-11-24 16:31 ` Marcel Apfelbaum
2016-11-25 8:03 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479777133-23567-6-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).