qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Andreas Faerber <afaerber@suse.de>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	sw@weilnetz.de
Subject: [Qemu-devel] [PATCH v3 3/3] tests: correctly skip qtest on non-POSIX hosts
Date: Fri, 28 Mar 2014 10:55:54 +0100	[thread overview]
Message-ID: <1396000554-29501-4-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1396000554-29501-1-git-send-email-stefanha@redhat.com>

qtest test cases only work on POSIX hosts.  The following line only
defines dependencies for qtest binaries on POSIX hosts:

  check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS),$(check-qtest-$(TARGET)-y))

But the QTEST_TARGETS definition earlier in the Makefile fails to check
CONFIG_POSIX.  This causes make targets to be generated for qtest test
cases even though we don't know how to build the binaries.

The following error message is printed when trying to run gtester on a
binary that was never built:

  GLib-WARNING **: Failed to execute test binary: tests/endianness-test.exe: Failed to execute child process "tests/endianness-test.exe" (No such file or directory)

This patch makes QTEST_TARGETS empty on non-POSIX hosts.  This prevents
the targets from being generated.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 tests/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index ef286e7..0e3eb44 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -277,8 +277,10 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
 # QTest rules
 
 TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+ifeq ($(CONFIG_POSIX),y)
 QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y), $(TARGET),))
-check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
+check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
+endif
 
 qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a
 $(check-qtest-y): $(qtest-obj-y)
-- 
1.8.5.3

  parent reply	other threads:[~2014-03-28  9:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  9:55 [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-28  9:55 ` [Qemu-devel] [PATCH v3 1/3] tests: Remove unsupported tests for MinGW Stefan Hajnoczi
2014-03-28  9:55 ` [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
2014-03-28 18:21   ` Stefan Weil
2014-03-28  9:55 ` Stefan Hajnoczi [this message]
2014-03-31  7:26 ` [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-31  8:04   ` Andreas Färber
2014-03-31 20:25     ` Andreas Färber

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=1396000554-29501-4-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=afaerber@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).