From patchwork Thu Apr 19 13:58:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133793 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp700488ljf; Thu, 19 Apr 2018 07:25:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6w0IkRY7y0rJ3rPdVnVkmrKK9lIO0tlANjGUu9Pe49WS5ar2x/J+bxMZcGA2Xjuy0RzSF X-Received: by 10.55.99.133 with SMTP id x127mr6228843qkb.182.1524147931707; Thu, 19 Apr 2018 07:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147931; cv=none; d=google.com; s=arc-20160816; b=U6NE47m8Vuy8zWmVEHIwm4SqZnrgcYkA7y2SUpkIZQtnz2dLEKtdXEyr6txMI+g6Nm 391zaI9FE2a0A8QWPB313GZycPivlUXCBw77oY1KwCywLWwRfzUW5DhZY9G8ixiyCKc6 iiAgiCKFcxika/jml5uzwsscUKT4seMbzuuyHNXPyRrpFuncWRHnQorvzCFLwcgqdLCv pQzX2x6w8GJTArTe9b/Oa6AlD7/ZZdJqSJQWmYTNbL8xVUeFc/oB7b9HkrHnxfxXyYOY VEKDfllxj+bprYL/SKC+KX5beU0x1TXpegV3TaNpdB1ABVl3029/qeX+pU0U1mH3FVeX bVgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=u+JexeW98uwVMWd49e+fXUJrFZYYOkAinPZpIL5lcAQ=; b=huEi/YjOEjJc/9mVQP1HIft0SbGDlanQPDyYdsyb6wkE8SpVT8jcU7G2UzxGJNN0tX aryEY3kh2jIafZC/LNKR3WlVaXON2Zuxw6aKZhYomE7e8H4kDZZci6T4y6xqyoA9F0hg Y1l+r1n1DxKPqeS7GykcY265Jwkut0hti5zIQbyVnL1LPZAWsF6AQKaeR8ITG7j2Gylg jTNwlSk7KsNBu4OL3WKI4gAGGHJlOzG+8Idevg2VvHhfO98EPNwOgC7O2z8+s/yB7QqQ XQ7xvA6DLhZGEOs2tdDzwcLtA/rGqwMcy6dz5xBVPjj4SjVDXZTjn8pGJ1xkFUn77KuN jNFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DlDdp6th; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i66si4711514qkc.337.2018.04.19.07.25.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:25:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DlDdp6th; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9AV9-0006Sm-2h for patch@linaro.org; Thu, 19 Apr 2018 10:25:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9ADt-0004Xq-MJ for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9ADn-0004zc-K1 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:41 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:42308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9ADn-0004yu-Ao for qemu-devel@nongnu.org; Thu, 19 Apr 2018 10:07:35 -0400 Received: by mail-wr0-x244.google.com with SMTP id s18-v6so14410621wrg.9 for ; Thu, 19 Apr 2018 07:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u+JexeW98uwVMWd49e+fXUJrFZYYOkAinPZpIL5lcAQ=; b=DlDdp6thl8tEMkTzH12uBScEWV7vbuOKPQ8rz4VncbSRzxsZNyuZVYGvo5nDgk4KMQ vMnAgEi5EjXqz6dlS8g5fsZDf5Bv3MU9cOsvmr6jA476Uy6bJXaJ+6uK+pcOXG/eR+/Q oqHKV/w80/pU/KPZrYIIaXICsbEF4hy2ePx5A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u+JexeW98uwVMWd49e+fXUJrFZYYOkAinPZpIL5lcAQ=; b=U7hYuUPiiOZ2YrDUblXWtLRl4PQV4L6jnSLJUl+Ik4LO6PkJkFluVoS+7DYxIp/YRI Je45ChQHNDsenw7cklOYNLfMtSqj7qkgpaglOg0JqSXv+sM8SojcDtIZ2733p25io3qx ugDX4+gucVqalEsVAt1GkwJgQWvQdNvT1eQw5m4MFXmP65W9iV1bpVi8NXiCq6Qesf0A HyWwCt5ZBkThU5JMbMbA8kHKAWj2c8FhFbbpBM73kcpRnHGe+0tv1y+DkKSb6YlSzGXv GdIEThd5Ai6xuKtdjbgmMthPe33LC5TMSiitqBxwSRdcvqkdDLeuxQSzvXIJcxMy689G oRBg== X-Gm-Message-State: ALQs6tCWtZU5ucL8mC7Q3/q9i6JzJCtp9HmJMfWNS2/0v3A4TjA1WXH2 NUL8aNk3YC5Oq0cTYUmOFL/vXQ== X-Received: by 10.28.196.139 with SMTP id u133mr5044721wmf.161.1524146853535; Thu, 19 Apr 2018 07:07:33 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v6-v6sm3836322wrd.54.2018.04.19.07.07.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:07:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 537133E0968; Thu, 19 Apr 2018 14:59:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Thu, 19 Apr 2018 14:58:55 +0100 Message-Id: <20180419135901.30035-38-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419135901.30035-1-alex.bennee@linaro.org> References: <20180419135901.30035-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This will ensure all linux-user targets build their guest test programs. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - use -include instead of complex macro stuff - also include TARGET_BASE_ARCH/Makefile --- tests/Makefile.include | 19 ++++++++++++++++++- tests/tcg/Makefile.include | 33 +++++++++++++++------------------ 2 files changed, 33 insertions(+), 19 deletions(-) -- 2.17.0 diff --git a/tests/Makefile.include b/tests/Makefile.include index 3d2f0458ab..c402de901e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -10,6 +10,7 @@ check-help: @echo " $(MAKE) check-speed Run qobject speed tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" + @echo " $(MAKE) check-tcg Run TCG tests" @echo " $(MAKE) check-report.html Generates an HTML test report" @echo " $(MAKE) check-clean Clean the tests" @echo @@ -916,6 +917,23 @@ check-report.xml: $(patsubst %,check-report-qtest-%.xml, $(QTEST_TARGETS)) check check-report.html: check-report.xml $(call quiet-command,gtester-report $< > $@,"GEN","$@") +# Per guest TCG tests + +LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_LIST)) +BUILD_TCG_TARGET_RULES=$(patsubst %,tcg-tests-%, $(LINUX_USER_TARGETS)) +CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARGETS)) + +tcg-tests-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" guest-tests,) + +clean-tcg-tests-%: + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" clean-guest-tests,) + +.PHONY: check-tcg +check-tcg: $(BUILD_TCG_TARGET_RULES) + +.PHONY: clean-tcg +clean-tcg: $(CLEAN_TCG_TARGET_RULES) # Other tests @@ -958,7 +976,6 @@ check-speed: $(patsubst %,check-%, $(check-speed-y)) check-block: $(patsubst %,check-%, $(check-block-y)) check: check-qapi-schema check-unit check-qtest check-decodetree check-clean: - $(MAKE) -C tests/tcg clean rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y)) rm -f tests/test-qapi-gen-timestamp diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include index cb8bb36026..d82f4d32fb 100644 --- a/tests/tcg/Makefile.include +++ b/tests/tcg/Makefile.include @@ -8,19 +8,14 @@ # guest compiler or calling one of our docker images to do it for us. # -# The per ARCH makefile, if it exists holds extra information about -# useful docker images or alternative compiler flags. Include it if it -# exists +# The per ARCH makefile, if it exists, holds extra information about +# useful docker images or alternative compiler flags. -ARCH_MAKEFILE=$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include -CHECK_INCLUDE=$(wildcard $(ARCH_MAKEFILE)) - -ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE)) -include $(ARCH_MAKEFILE) -endif +-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include +-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include GUEST_BUILD= - +TCG_MAKE=$(SRC_PATH)/tests/tcg/Makefile # Support installed Cross Compilers ifdef CROSS_CC_GUEST @@ -28,10 +23,10 @@ ifdef CROSS_CC_GUEST .PHONY: cross-build-guest-tests cross-build-guest-tests: $(call quiet-command, \ - (mkdir -p tests && cd tests && \ - make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(CROSS_CC_GUEST)), \ - "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)") - + (mkdir -p tests && cd tests && \ + make -f $(TCG_MAKE) CC=$(CROSS_CC_GUEST) \ + EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)") GUEST_BUILD=cross-build-guest-tests @@ -54,9 +49,10 @@ DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE) .PHONY: docker-build-guest-tests docker-build-guest-tests: $(DOCKER_PREREQ) $(call quiet-command, \ - (mkdir -p tests && cd tests && \ - make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(DOCKER_COMPILE_CMD)), \ - "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") + (mkdir -p tests && cd tests && \ + make -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \ + EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \ + "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") GUEST_BUILD=docker-build-guest-tests @@ -70,7 +66,8 @@ ifneq ($(GUEST_BUILD),) guest-tests: $(GUEST_BUILD) else guest-tests: - $(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tests SKIPPED") + $(call quiet-command, /bin/true, "CROSS-BUILD", \ + "$(TARGET_NAME) guest-tests SKIPPED") endif # It doesn't mater if these don't exits