From patchwork Fri Feb 11 16:02:59 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: 541788 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp3205430imo; Fri, 11 Feb 2022 08:07:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMCft0wADykw1r1s+DFRwfHiKwj6XJSrpgz9PXlImmZifH+T9/hEmUlrGOL8coWJoW6wTM X-Received: by 2002:a25:d141:: with SMTP id i62mr2038461ybg.86.1644595620877; Fri, 11 Feb 2022 08:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644595620; cv=none; d=google.com; s=arc-20160816; b=VDHxVNsNF38psCsQwqNYkbIIRXF19yPQmNXxH3mYftLuZaBGAHv9jpvvR0tFiVc7F1 yiEXkhMDMMIMJ0b0TyNajB8ujIC1RIZdkwIK9J4rBfpSECorpnUFZeQiMersCoDxbzWp PQ76ZAIW10IwmrNUYl69g+dpfDmTMRwNuVSlHV2O6RBQYlb8x85z94uFUFXhn8E7tsdb om+jqyysgZaEsoyMdL210AIkphwNItwar98V16m+R6pqFeMEP76jjKBnc5r2qWdt2WUl RjsNfHPiV2R40pYrsRqZ5WDX9jG/3DAonaK1mdfpSAYltf8cBZHerBoa0BHQZkKA/0yd d4xg== 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=95VUsInsBJkWydqDjFNp5aZcy3HHZ58V16PSGr8vvHk=; b=FHBK/GI01+qbwxnq1QuE8mBJGzwyJ5iJMp+1QvwiMOfvQbwhddYFA2lojDHvWCg19c g+4xC6vBmDMufZqrgRBe6ajhxn7OHPXuFZy3Qdx5nWPiwgJf6O3vd7IbUVJgnEq01xyT aadTvu0K5Ky6G1AiX9CQ6j8GZQmMyhWGjDxuxfOMFA2TBohHvnFGuG6h+5g9WQhFeHa6 EiRQijrtSRlD22MEFeOo+/+uawltOLLyIzSUWZSrOFu4MsvN/62vVB4N9YONi0WXA+iO yhWDvYCMHiRA0h1eHvHQRfVIWhDz0p3Vk/eLaWSoupaKyJ5LwkNXhVnB2EUw1q8KnL09 G6Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SWCLT1Rl; 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 bd18si25891895ywb.110.2022.02.11.08.07.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Feb 2022 08:07:00 -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=SWCLT1Rl; 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]:45346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIYRn-0008Ob-AL for patch@linaro.org; Fri, 11 Feb 2022 11:07:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIYOT-0007NK-Bn for qemu-devel@nongnu.org; Fri, 11 Feb 2022 11:03:36 -0500 Received: from [2a00:1450:4864:20::533] (port=38671 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 1nIYOK-0005AS-NO for qemu-devel@nongnu.org; Fri, 11 Feb 2022 11:03:29 -0500 Received: by mail-ed1-x533.google.com with SMTP id g7so1173183edb.5 for ; Fri, 11 Feb 2022 08:03:12 -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=95VUsInsBJkWydqDjFNp5aZcy3HHZ58V16PSGr8vvHk=; b=SWCLT1Rl8lgIhNBXbIwPNtQQyLjdUsyR8/Jk/fFedZuER+FRi/LHW94eot9qVlRFFG BD/rgKChTBgeH4CSD+4jaMY2v3migqWMbYxTpqiGugzhevXtnpD04EgUDoSJCFTw9Cu6 Bs4l8fPmYobg4Cucfe5dEpbH+ij9XlJCtbxnvgQ0X+fjvoNh4MtnU62Bkn4nO5txm7lq yy5NDzEPvODUQGmdBArG/UIkiOb4zZKE5cJ5ic4jw/1Y9NKaJ+oVVLVaDcnuaG5bWmzk uy2U+JQksJ/KOOy5r3hTq3gT/mMic+ua4xmMrOM/W+2GBCPeTuahEBoGCZ2+rXqurQU9 eGjQ== 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=95VUsInsBJkWydqDjFNp5aZcy3HHZ58V16PSGr8vvHk=; b=IxCpEEqx6O9fUz3XnsnSggts6zbVg6XoQHf/FiMpDOtqNX27+G1FteirlbkFdOVHHv hRXtLxzUYqnJWmyRoOBtGcl3PJbcOGw37Sf6qiB6jL+hFOgSfdFNTUzzfMdreczR0gJ6 53z7wHsTs/QTFAnXIMRX/W9vPAgrl13KLoHNoUWsDwWtM29wpQwnMuY+QTD6mqan84yR CPevNGA+3EFDUXzKlQLhFZ9vjq2rF8ZC+OifPGdDWLf5C3/lXumrS4NR4H5M06j9k7kZ mQSSZUa+V0/Km9uFJ2UyyTdcCzio4b3e6Ve3JG6AWHw+5fLEDZcKWFhjKAp9nL9rrm/n xk8w== X-Gm-Message-State: AOAM533oflu9hdfU3RzGYdm2NzSi2R3HmXg3Z6R1xY2K+qh2uSPrM7ex fEdgBAS/lqxhLCIqXqXKR8McQg== X-Received: by 2002:a05:6402:4c2:: with SMTP id n2mr2555589edw.247.1644595391359; Fri, 11 Feb 2022 08:03:11 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f16sm7703389eds.0.2022.02.11.08.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 08:03:10 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B25611FFB8; Fri, 11 Feb 2022 16:03:09 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/11] tests/docker: restore TESTS/IMAGES filtering Date: Fri, 11 Feb 2022 16:02:59 +0000 Message-Id: <20220211160309.335014-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220211160309.335014-1-alex.bennee@linaro.org> References: <20220211160309.335014-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: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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.001, 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 , 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 --- 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'