From patchwork Tue Jan 22 20:25:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 214660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0FE022C0079 for ; Wed, 23 Jan 2013 08:01:27 +1100 (EST) Received: from localhost ([::1]:34205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxkOk-0002AI-H4 for incoming@patchwork.ozlabs.org; Tue, 22 Jan 2013 15:24:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxkNu-0008Qu-Kl for qemu-devel@nongnu.org; Tue, 22 Jan 2013 15:23:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxkNr-0000Cj-BF for qemu-devel@nongnu.org; Tue, 22 Jan 2013 15:23:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxkNr-0000C2-3T for qemu-devel@nongnu.org; Tue, 22 Jan 2013 15:23:51 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0MKNo85017927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Jan 2013 15:23:50 -0500 Received: from blackpad.lan.raisama.net (vpn1-7-132.gru2.redhat.com [10.97.7.132]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0MKNnLZ018178; Tue, 22 Jan 2013 15:23:50 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 748052015B9; Tue, 22 Jan 2013 18:25:34 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 22 Jan 2013 18:25:07 -0200 Message-Id: <1358886309-26258-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1358886309-26258-1-git-send-email-ehabkost@redhat.com> References: <1358886309-26258-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH for-1.4 qom-cpu 7/9] tests: Support target-specific unit tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org To make unit tests that depend on target-specific files, use check-unit--y and test-obj--y. Signed-off-by: Eduardo Habkost --- tests/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index d86e95a..41172d6 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -112,9 +112,21 @@ tests/fdc-test$(EXESUF): tests/fdc-test.o tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o tests/tmp105-test$(EXESUF): tests/tmp105-test.o -# 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))