From patchwork Fri Feb 25 17:20:04 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: 545903 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp505342imf; Fri, 25 Feb 2022 09:41:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1uGtlysA8iYh4eHulIwIvncx9iL8qwbsS2hTEvImtlthOvD7vxQew8YT4jQJauLYwpm/D X-Received: by 2002:a25:68c5:0:b0:61d:9406:48c0 with SMTP id d188-20020a2568c5000000b0061d940648c0mr8564338ybc.122.1645810892955; Fri, 25 Feb 2022 09:41:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645810892; cv=none; d=google.com; s=arc-20160816; b=qWezUu60QCmBQOsTRfFJmMqTVK1QBTIAbQbsAGhIUBrdYWh0EqHBdtMhy29/xNNauZ buzkSkGcARO5y3n9Y2rn/D0tpPoWx6EQRCdwqaAuucVsGsjgb0+hmaEcIQ6DJcMXgXtg HoCDLv2KW3XKO92CgfYhjD9pzICSZk1Veo2hRiiYZpydwGLWrO1TsPCqnzvPHJkxyMkq osKgmbxJ55crNK94jqxRAVK4VXv5UOzukzcdEXF9fdWp5H+XTHXrSWR0afv+13BUTmiu 7y4sji7gtnTeiqU08YZWlv2qh+vnNDZiy6NPIyI0+ezasDBTe9P7KCGdK67bILpi/wyG oOzg== 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=v71m4fmS0F91ZsaDPV4GFfE4X3gNbp87d+UfrwfWQJI=; b=MShdjtwtMcu+4K0KI3hrl8QjXPfhSGdT6Jbc+ICBrAkg49kV13GmN8HnZ16veIW3OC atZKVPyyOto4isnVjpE+XiCiyvQkeJCCYkl7QGq3DJ3elWICHJFchcqj1wF6Hck1anIT KyiElWeQHXZho6Xd2o1WMiosHLGrtWbFf0KfqD3Rh27swNlvZzXnSShcVcv32mUyvuVd DXMDID4ouM/bILOfGhJOVHm6LrWyNmePel23tb/gzbH2lcvFAX4Ld2E9mupLoHZCldwD aCxsbGUfdmoIEwG6lmHMSB6/MLxNizfygs9efLlEJELdWkI7LaMHXt7tOdVU3tdskTUM sOxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hMTBUWlI; 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 f4-20020a253804000000b00624758467e7si2463557yba.215.2022.02.25.09.41.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Feb 2022 09:41:32 -0800 (PST) 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=hMTBUWlI; 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]:37702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNeay-0003sU-E5 for patch@linaro.org; Fri, 25 Feb 2022 12:41:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNeGo-0003wu-3q for qemu-devel@nongnu.org; Fri, 25 Feb 2022 12:20:42 -0500 Received: from [2a00:1450:4864:20::533] (port=35684 helo=mail-ed1-x533.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNeGg-0002LZ-4n for qemu-devel@nongnu.org; Fri, 25 Feb 2022 12:20:41 -0500 Received: by mail-ed1-x533.google.com with SMTP id bq11so8374743edb.2 for ; Fri, 25 Feb 2022 09:20:32 -0800 (PST) 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=v71m4fmS0F91ZsaDPV4GFfE4X3gNbp87d+UfrwfWQJI=; b=hMTBUWlI/+e8YIGom2CUyzDQUkKvTc+pradEPmyxzFm6+PwsQCqkEQfG7xRYZluANc 8zgLR/Xou3GwYYL6U3AxSAJo17gpvtc6zeVZVOrY6xlx2on+6Kew5916aWq8vsKElMZV gnRDW8BIkfmmoIe2i69Brt5/qb9adFcqQHYeKls7+0M1AFXIOTC/YLVfucP2kj+1R6qL 4lUm09WDMKsRCk27EAE0mf8v4CHK8rx8QF5tcDDwDcN2qxiRaue3ZnD6xglHrLjT/V1s hYbhVbXUEWWLy2se4miSkKeY3mT1v3HNZ0Js3MOr7ytWrDZOG4fwCMi5YMYR8rFpOq/q jNDQ== 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=v71m4fmS0F91ZsaDPV4GFfE4X3gNbp87d+UfrwfWQJI=; b=ojxqVo3lyujuA5+Tnsd6nfcgVi1JvaNtVMG6oJ9GJ+ZIbg7lseyxwh+CwMgYcOAvI4 +gUGhyM60Kg/wXUTBzv8TEviFpVr6WllqabCvkaIB7dZ6cCbN+32qdIjeiWoVWrVlGDf +e5OS3a9JsclydKlgCGqwC4W6hH5hmj3SxVBb921uZwXWDvP8RBmws98KAtM0hU4aWbR c6uRMZ58ch3n3NIS1WSrSkiQ3GQzCWhl2L8uDNe+l4anUcC0AT3zlCsXDTYNBvomXsKG tu5j/i+ux3r1NBS/monNFqmIWWGHs5++b0dzSfhDFfWmtj82mbzAsgNvqLv7oELnSyc9 TXoA== X-Gm-Message-State: AOAM530t6avSARLmQG6gHsc92aV6J+tShY0tb2QDlJEZ7wXRFrdj5yct t6HQdZh5DbbvfUk4+225RoCY8w== X-Received: by 2002:a05:6402:1341:b0:407:cece:49f8 with SMTP id y1-20020a056402134100b00407cece49f8mr7981811edw.152.1645809631009; Fri, 25 Feb 2022 09:20:31 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h12-20020a056402280c00b00412ca9508b7sm1667727ede.17.2022.02.25.09.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:20:27 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 13F531FFB8; Fri, 25 Feb 2022 17:20:22 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/18] tests/docker: restore TESTS/IMAGES filtering Date: Fri, 25 Feb 2022 17:20:04 +0000 Message-Id: <20220225172021.3493923-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225172021.3493923-1-alex.bennee@linaro.org> References: <20220225172021.3493923-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::533 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: fam@euphon.net, Thomas Huth , berrange@redhat.com, Beraldo Leal , sw@weilnetz.de, richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , Alex Williamson , qemu-arm@nongnu.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This was broken in the re-factor: e86c9a64f4 ("tests/docker/Makefile.include: add a generic docker-run target") Rather than unwind the changes just apply the filters to the total set of available images and tests. That way we don't inadvertently build images only not to use them later. Signed-off-by: Alex Bennée Reported-by: Alex Williamson Message-Id: <20220211160309.335014-2-alex.bennee@linaro.org> Reviewed-by: Richard Henderson --- tests/docker/Makefile.include | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index f1a0c5db7a..0ec59b2193 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -8,13 +8,19 @@ COMMA := , HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) +# These variables can be set by the user to limit the set of docker +# images and tests to a more restricted subset +TESTS ?= % +IMAGES ?= % + DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles # we don't run tests on intermediate images (used as base by another image) DOCKER_PARTIAL_IMAGES := debian10 debian11 # we don't directly build virtual images (they are used to build other images) DOCKER_VIRTUAL_IMAGES := debian-bootstrap debian-toolchain empty -DOCKER_IMAGES := $(sort $(filter-out $(DOCKER_VIRTUAL_IMAGES), $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) +__IMAGES := $(sort $(filter-out $(DOCKER_VIRTUAL_IMAGES), $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) +DOCKER_IMAGES := $(if $(IMAGES), $(filter $(IMAGES), $(__IMAGES)), $(__IMAGES)) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache @@ -23,16 +29,14 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu endif DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY)) -DOCKER_TESTS := $(notdir $(shell \ - find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f)) +__TESTS := $(notdir $(shell \ + find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f)) +DOCKER_TESTS := $(if $(TESTS), $(filter $(TESTS), $(__TESTS)), $(__TESTS)) ENGINE := auto DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE) -TESTS ?= % -IMAGES ?= % - CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$) DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME) @@ -274,8 +278,8 @@ endif @echo ' TARGET_LIST=a,b,c Override target list in builds.' @echo ' EXTRA_CONFIGURE_OPTS="..."' @echo ' Extra configure options.' - @echo ' IMAGES="a b c ..": Filters which images to build or run.' - @echo ' TESTS="x y z .." Filters which tests to run (for docker-test).' + @echo ' IMAGES="a b c ..": Restrict available images to subset.' + @echo ' TESTS="x y z .." Restrict available tests to subset.' @echo ' J=[0..9]* Overrides the -jN parameter for make commands' @echo ' (default is 1)' @echo ' DEBUG=1 Stop and drop to shell in the created container'