From patchwork Wed Apr 20 18:08:23 2022 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: 564011 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp4424470map; Wed, 20 Apr 2022 11:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSSiPr5MhNmKC8bd6dL6VBNdcYh9SPk0yV6SRnGtYesdCFEVOQw/TlZv2BE13LxA6UYr55 X-Received: by 2002:a05:690c:84:b0:2f1:9caa:e4f7 with SMTP id be4-20020a05690c008400b002f19caae4f7mr15946535ywb.384.1650480292372; Wed, 20 Apr 2022 11:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650480292; cv=none; d=google.com; s=arc-20160816; b=Y054ux7FmMXofKaQZAzikKwnRy+6YUxlb5Y7n4g1YouhVpORbP6vqOT+L6qdps/nXL eaSOFDBcLHgQPfrkWBCcA0YtIW8cRm2sPjb9kZtEToSpXFlhI5NIXQmcSW1ikXOglXhN ST5iXVDeZEVKS8GIUdXqrsvrzQejOdHZMMMA/5pxvYqs0w/NeSZKy6+pq1/aQFxJVsl7 JBCjBbnI4zTBokcKyvmykBUONKik6KT/Lqy5Q+b+Q16pT8XSGHVnVq/p+nT5DL/PrbiC HW/mSw6NWI2riQRPlFoYKkwONxdDPp2wbeNpvh3yuX4RJADGuUMnrHwDIbeHNdDAGIpL C0qw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=MrPtie6r+qr/yFRgb4nLSe75TU6uNJoD0wz3bvVh8mg=; b=z90YSK1Sf6yimCN1QYwpS0QOnwcARYuZxPBn8NnqzI90l+jbhoMoX9QZXMrHi4NIcs yASnZubILas1F8kLEfhY5EB2812615H3xUPyNfs3im4FncfKGiimcYfQzNJEtIOPP6ww EluvomnDhuBa8p2LV+TYQSdc5X9H7ANgG7i4q9jYLGI6FieH0Nr98yjhl6ai439fpCca 2rQRFVAUwfAEksVfrm4J6wqB3NySnHwVtVXVdLBX+2lU0uWxywIv4BOG5DWELMYJxpOf DtjyMEEhJnK5TqOJLuYwW7e52/dCX4BwZ2T9ClOXd5pS1CjpJ/CCKkk1CNXH0931AQ+n /qiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DAXVzX5A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id e4-20020a255004000000b00641276de4a7si696014ybb.626.2022.04.20.11.44.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Apr 2022 11:44:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DAXVzX5A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:41078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhFJr-0002jo-0j for patch@linaro.org; Wed, 20 Apr 2022 14:44:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhEl5-00029V-8Q for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:08:56 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:47098) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhEl3-0001ad-E8 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:08:54 -0400 Received: by mail-ej1-x633.google.com with SMTP id t11so5119922eju.13 for ; Wed, 20 Apr 2022 11:08:53 -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=MrPtie6r+qr/yFRgb4nLSe75TU6uNJoD0wz3bvVh8mg=; b=DAXVzX5Ai0n4rC+dQTjkfkOE1yeZeTkTqPCMgyGRwOaXAcamz+JcRg+pNXD8EwlEK5 KsTVWSw6WAOCyvPm4nId8S9PMttHarKK5XLL+QHVjEWg0S/5aOxwGxOmE8vKYrveOupb J2wPFu8Hz38Wa5Ee54oviL/W3gLCiiCuWMAQpOP37xPfdWempQuXlzjHBUbApM8Yijgt oXbXz7/LT4kH29HuNjM3rjJTje6OsRI2USwDCHLaVSi/rIz/v4E0nKt+qOM1FUOf6JNU nUmjl6iK8tt15J3rW4G4g+D9irVzk8d7zpm3zPRuhHwRJbJJuft6DVvwYQKCsRlcDo9I 6hZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MrPtie6r+qr/yFRgb4nLSe75TU6uNJoD0wz3bvVh8mg=; b=7Pksmj3DIjK517Al8u3yT9073ajOxdorSWkk8B3rrwdL3JfPfRHWKoKEAS0/Mfxv15 u6xePED/D4AB5M0rCc8B2ku9NbRyG5WGOsQSGoRKtly6QRgbpZQR/qs6k8LcAlLWyv/L yOeMvaGmNp5sdLVAI4dj/C50bBZVYvz1LJP8bV1G6D2aChHeUQv6/At4slFY+4b14i5b DcV9Ll4MND8ehPPbkxHrU/CUpF5DgCQ8R5GQcxmI7MWoK/XmbpvcPoUvNtQSX5/RxOBS H70FlStk9aVURAoe6P9wXrrlGFLvg6J8GfkObrQ6mTHrxxBNxHSmbP6NxnXdvPNajYSp 0OQA== X-Gm-Message-State: AOAM532ixb+sUZfPCPdkoCVJ5w+IQRnpsg4XmWrryvMlDXWQ3QCYGKar vr28HNyBgUatWlnF+6RL7aJ44pyfEHL0xQ== X-Received: by 2002:a17:907:d16:b0:6d6:e3b6:9cd8 with SMTP id gn22-20020a1709070d1600b006d6e3b69cd8mr19320101ejc.94.1650478132197; Wed, 20 Apr 2022 11:08:52 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d11-20020a056402400b00b00423e5bdd6e3sm4882002eda.84.2022.04.20.11.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:08:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A91B81FFC8; Wed, 20 Apr 2022 19:08:33 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Subject: [PULL 16/25] tests/tcg: list test targets in Makefile.prereqs Date: Wed, 20 Apr 2022 19:08:23 +0100 Message-Id: <20220420180832.3812543-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220420180832.3812543-1-alex.bennee@linaro.org> References: <20220420180832.3812543-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini Omit the rules altogether for targets that do not have a compiler. Makefile.qemu now is only invoked if the tests are actually built/run. Signed-off-by: Paolo Bonzini Message-Id: <20220401141326.1244422-14-pbonzini@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220419091020.3008144-17-alex.bennee@linaro.org> diff --git a/tests/Makefile.include b/tests/Makefile.include index b5d0d6bc98..091ca8513f 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -36,19 +36,16 @@ export SRC_PATH SPEED = quick -# Build up our target list from the filtered list of ninja targets -TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets))) - -include tests/tcg/Makefile.prereqs config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh tests/tcg/Makefile.prereqs: config-host.mak # Per guest TCG tests -BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS)) -CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGETS)) -RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS)) +BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TCG_TESTS_TARGETS)) +CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TCG_TESTS_TARGETS)) +RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TCG_TESTS_TARGETS)) -$(foreach TARGET,$(TARGETS), \ +$(foreach TARGET,$(TCG_TESTS_TARGETS), \ $(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.mak)) $(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if $(CONFIG_PLUGIN),test-plugins) @@ -84,6 +81,9 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES) .PHONY: check-venv check-avocado check-acceptance check-acceptance-deprecated-warning +# Build up our target list from the filtered list of ninja targets +TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets))) + TESTS_VENV_DIR=$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu index 84c8543878..cda5e5a33e 100644 --- a/tests/tcg/Makefile.qemu +++ b/tests/tcg/Makefile.qemu @@ -95,7 +95,6 @@ all: .PHONY: guest-tests -ifneq ($(GUEST_BUILD),) guest-tests: $(GUEST_BUILD) run-guest-tests: guest-tests @@ -105,16 +104,6 @@ run-guest-tests: guest-tests SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run), \ "RUN", "tests for $(TARGET_NAME)") -else -guest-tests: - $(call quiet-command, true, "BUILD", \ - "$(TARGET) guest-tests SKIPPED") - -run-guest-tests: - $(call quiet-command, true, "RUN", \ - "tests for $(TARGET) SKIPPED") -endif - # It doesn't matter if these don't exits .PHONY: clean-guest-tests clean-guest-tests: diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 904c351029..e51cd56b60 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -81,7 +81,9 @@ fi : ${cross_ld_tricore="tricore-ld"} makefile=tests/tcg/Makefile.prereqs -: > $makefile +echo "# Automatically generated by configure - do not modify" > $makefile + +tcg_tests_targets= for target in $target_list; do arch=${target%%-*} @@ -228,6 +230,7 @@ for target in $target_list; do echo "target=$target" >> $config_target_mak case $target in *-softmmu) + test -f $source_path/tests/tcg/$arch/Makefile.softmmu-target || continue qemu="qemu-system-$arch" ;; *-linux-user|*-bsd-user) @@ -235,11 +238,7 @@ for target in $target_list; do ;; esac - echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile - eval "target_compiler_cflags=\${cross_cc_cflags_$arch}" - echo "QEMU=$PWD/$qemu" >> $config_target_mak - echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak got_cross_cc=no @@ -362,8 +361,16 @@ for target in $target_list; do echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak ;; esac + got_cross_cc=yes break fi done fi + if test $got_cross_cc = yes; then + echo "QEMU=$PWD/$qemu" >> $config_target_mak + echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak + echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile + tcg_tests_targets="$tcg_tests_targets $target" + fi done +echo "TCG_TESTS_TARGETS=$tcg_tests_targets" >> $makefile