Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15099462rwd; Sun, 25 Jun 2023 10:07:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kKjsNip2E88TpMA5HNwHLpdJHIHPSABuuU3GuxTpHfqrp6Ioef4U0JjofKlOXDjFTfY89 X-Received: by 2002:a17:90b:4b51:b0:25e:d727:6fb4 with SMTP id mi17-20020a17090b4b5100b0025ed7276fb4mr13022865pjb.2.1687712823083; Sun, 25 Jun 2023 10:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687712823; cv=none; d=google.com; s=arc-20160816; b=AQFNprdDSWfTzrEFaIFimx3ONKM3gea164/T4lU3nO1vmRGOIkjGAh9w+37O2jSoC5 uIUjYqKpxBJH5EdjXx2JE0DOUFT8tQj2JUw+gNGn3j34Y7OZi0mcEfg5lxXIWLpR/1Ua VZ/4VfXzL3GWCVwybUjSBniDKmPLJyCLRKUY3OA1DGourtxe91SmitwWH8kYXSbSNIo3 Gns/D1qedtH7Ewy6a7kATxMveKrKUOkmYPIoP4lW/NKuCLKQa+WcurQX3Vl7ZysnRrMn WDGMRKEtNiFW04fRXVMff7TMWiQ5qsXkY41FZGTixCdVb33XBVN8njgQCBc9211oMvJP vLwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=BuSWmQhlHabWPKw1PCxhC9sAHHgtNbA5hJ5L21GU+do=; fh=GzghTQzqgly4pZn8BwQ4U8bZ8zCadAK8Sl/utskeyEs=; b=uoTuYhgjgWe3ScYI6SHjNzgUmI9n4AKXFF3HIwgQmMCD7/hD0UVxD7G4dS8ZrO0Jes wKwthmb4Gkwmqg793rCOu3IbH5m/tcfdaDgK2aqk5z+zg19bVNaYo06eQTrb8M+IRSxh X21AMdccl/t1tksjYM2xL6+eymTM1Swon7Ca5bcBB1vxPiVJuT1a6BcqiFkZwhneeKPk IrWtOrcH3iGd8SRdvFJVJPac/E7i/eGPlntKksAEVCxR56O4J3Yg9jZGKjgVS6cKfnuA QtSPPYpC8fAytz+dw9QrO9/czIKJmNYvDO2AV4+VelG0lyj2Qt8/GrtEHzC3N6MIo3+E V+sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg16-20020a17090b301000b0025667be94f0si5653962pjb.77.2023.06.25.10.06.51; Sun, 25 Jun 2023 10:07:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230363AbjFYQoX (ORCPT + 99 others); Sun, 25 Jun 2023 12:44:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFYQoW (ORCPT ); Sun, 25 Jun 2023 12:44:22 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EB80B9; Sun, 25 Jun 2023 09:44:19 -0700 (PDT) X-QQ-mid: bizesmtp78t1687711448t7y8lnvs Received: from linux-lab-host.localdomain ( [116.30.129.193]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 00:44:07 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: 3M0okmaRx3jkxQ1nfJIDUjtpCEo7hFHklIWcIzySUOaPurOu8rwjLO/y2+NUO W93KshJtFv7+VMr/QSSxuIHeHKMJciFIpJD22TFiR/mDO7IAKpBt3Aat95kyxQPfY1k2XvN lGtpzVqYYKxbkWqZkaIKhwtf/g3AyjEUxhpw0zIZsyWJ9f+pRVx5g2Lz2H2oTc4JBITSyxk QkCRCrmVpE+12c9DWpZIGBhmzubclG5C6Jo1xwuTDZwQ6+hxClW1060y6JB3/mZK3I17r/F Q/Zlv6OAzOeFDMBEtgfzXniU4GYvqXEtMVATn0SAc44gAaFSMV5wSBx/QN6JmZd0vBE3Y4O zAsgT7eZlE8eefnLAISYwteNq3qhcqfjE3sj3S9MQNgNv54YLNyF6CGBEPhUQ== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 11520936945867067429 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 21/22] selftests/nolibc: allow run tests on all targets Date: Mon, 26 Jun 2023 00:43:48 +0800 Message-Id: <49a3c3f75e2f433f42112a246b20488bf7c9e7f4.1687706332.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This lists all of the supported architectures and allow testing for all of them. These targets are supported: - run-user-all: testing run-user for all architectures - run-all / run-default-all: testing run-default for all architectures - run-tiny-all: testing run-tiny for all architectures Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3e7e51bd7082..470923dc10e1 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -164,6 +164,18 @@ ifeq (run-default, $(MAKECMDGOALS)) AUTOCONFIG ?= defconfig endif +# allow run tests on all architectures: run-user-all, run-all (=run-default-all), run-tiny-all +ARCHS ?= $(shell sed -ne 's/^DEFCONFIG_\([^ ]*\) .*/\1/p' $(CURDIR)/Makefile) +GOALS ?= run-user run-tiny run-default +RUN_ALL ?= _t=$@; t=$${_t%-all}; [ "$$t" = "run" ] && t=run-default; \ + if echo $(GOALS) | grep -wq "$$t"; then \ + for a in $(ARCHS); do echo "Testing $$t for $${a}:"; make $$t ARCH=$$a; cp $(CURDIR)/run.out $(CURDIR)/run-$$a.out; done; \ + echo "\n\nTesting summary of $$t:\n"; \ + for a in $(ARCHS); do echo $${a}:; echo; $(REPORT) $(CURDIR)/run-$$a.out; echo; done; \ + else \ + echo "Ignoring unknown target: $$t, available targets: $(GOALS)"; \ + fi + # allow switch nolibc headers include method: 1 for sysroot, 0 for nolibc.h SYSROOT ?= 1 @@ -255,6 +267,10 @@ rerun: $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT) $(Q)$(REPORT) $(CURDIR)/run.out +# test for all architectures +%-all: + $(Q)$(RUN_ALL) + clean: $(call QUIET_CLEAN, sysroot) $(Q)rm -rf sysroot -- 2.25.1