From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTI3T-0003ch-8V for qemu-devel@nongnu.org; Thu, 27 Mar 2014 17:41:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTI3O-0005vd-EC for qemu-devel@nongnu.org; Thu, 27 Mar 2014 17:41:43 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=60274 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTI3O-0005vO-7c for qemu-devel@nongnu.org; Thu, 27 Mar 2014 17:41:38 -0400 Message-ID: <53349B04.7080804@weilnetz.de> Date: Thu, 27 Mar 2014 22:41:24 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1395930496-32284-1-git-send-email-stefanha@redhat.com> <1395930496-32284-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1395930496-32284-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/2] tests: correctly skip qtest on non-POSIX hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Paolo Bonzini , Andreas Faerber Am 27.03.2014 15:28, schrieb Stefan Hajnoczi: > 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. The causes targets to be generated for qtest test cases That causes targets ... ? > 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 > --- > tests/Makefile | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/Makefile b/tests/Makefile > index 803c8e6..679cfbc 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)) I'd keep this line unmodified after the endif, but that's just my personal style preference. > +endif > > qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a > $(check-qtest-y): $(qtest-obj-y) > My own patch also works because CONFIG_POSIX is undefined for Windows: http://repo.or.cz/w/qemu/ar7.git/patch/fb8019dc75641ce7b35d40d4836663acb9c17b8b Reviewed-by: Stefan Weil