From patchwork Tue Mar 1 09:46:58 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: 547240 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3517786imf; Tue, 1 Mar 2022 01:50:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4M2ncylVdohuNyXAIIz4JPVgt1hebOglim0c8qFjBU9tvvWsJDXGt3Mn34hzSW8pBlvrV X-Received: by 2002:a37:688d:0:b0:47c:c739:d14 with SMTP id d135-20020a37688d000000b0047cc7390d14mr13373455qkc.781.1646128259414; Tue, 01 Mar 2022 01:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128259; cv=none; d=google.com; s=arc-20160816; b=yGIMiqQRj2deinlNW62w0E20a/tgg+dhbmILYyxApFllvGdZZEzz2EtZkFO3dQaarH S9BeFjsYWYRV+h0D7yF4BrnaVBKFgpMFYK4Hd7MUhZOgIjO2CRtgcsW2oyU2QTSbA2Sr RDmEZy/I3eJc8TCWv/xuec2LXE77rv1DvreplMS4I7RQNOG+LBa0gsJkJhkrZnEvzAoM tSXrbyX6hdnIrm1/s6MHHCITlpID6oaijNIaEx292g7nN9Q25hLo6J4jq3hSrFFyToye 5fHFK99nuRcx/ZTa0zaUK0YbZ2l1UbylCM1IIxoZjx5lVecn2VUtkSp1P3y+uFJa2osf nyTw== 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=Oo9DRbZoIDPeCuEDR0VO57zAdlBhs+L621CLCEIHwtk=; b=z5tK94UJ3kqVc/2Z5zSz8vZL7v+BaJAhYPRcNs/X55oUx9ML4sdLl6lQJ+xIvRHKqw zTzeSn9cut0VqMPyh7ORfgISY6g9GGoUGY2fqaayZ4UtbIqSZzU9qj7IFdS649zu1R0V wR5YHe+Lx6Cyu9pOTiRaTSCDpZ22Nv4Yz88fmfklAytp9wnfeWF4q2L10UXgCxuZB0Yu itCtzsocB2KQ9KWBxtNTvUKex953mh7HYrQy8lf6o7h+cVrWItICnPCcOgSbmN2fYHX5 zxwNv5dK2s9kmF0fIgnAl75Jt7LahwmrxuQtkc8I1a23X5rFsYyXesBu0dr7bdUl55Fh 5aPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Zk/T2sOC"; 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 bj6-20020a05620a190600b0047bbbc9ab27si4383402qkb.350.2022.03.01.01.50.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 01:50:59 -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="Zk/T2sOC"; 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]:47300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOz9m-0004iz-UE for patch@linaro.org; Tue, 01 Mar 2022 04:50:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6G-00037B-GL for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:21 -0500 Received: from [2a00:1450:4864:20::42c] (port=42619 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6E-00073k-Pl for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:20 -0500 Received: by mail-wr1-x42c.google.com with SMTP id d17so19490802wrc.9 for ; Tue, 01 Mar 2022 01:47:18 -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=Oo9DRbZoIDPeCuEDR0VO57zAdlBhs+L621CLCEIHwtk=; b=Zk/T2sOCmJeYjBQgaYl7QNnepvHwkPOjWTdH3D3/YYRZDZ/kIeMArU5gLLZkEM5l40 WCmfbOrPZLEJ6AW/usb56+6C9nZPaQV9OtdQfFcuAf4696htt9wjMt0CazpVDF1biQln 71GKaTfy74AwaBtGygDRTltKisThhjxXd0jexFRQXdpVlNbQWXDgNE0LkHiCrV52Em9F MjvnfadcximuS9zqDkeSlwRw4UPJVpzeRKU+Z9BESqC1CZ5ewXi4ASILswgfTQwJktdy eMvnkmRkeXAW0ih+9GBgJg7mRt0IFTvEecMmB1ajDGUENI4OCJa3sIux9+7MYFc7AsA1 U7ug== 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=Oo9DRbZoIDPeCuEDR0VO57zAdlBhs+L621CLCEIHwtk=; b=xunLTl6VXwpYTsKTs1vxNogUgKgJY7fZdGNtNP5d0vRGVQ3476o1+dIeWNVV1ndGhF HQOgeQFqB6BKDcbBZK19S/wuQmA0gJJi981TtMbI/lXk6FYKIMCpE/rViVcG13t14j21 Pr237+krWQ7MkhMkiZGcUacLnqmkq9T/GTxaEh8PByev+i/8ugI+rN93H/U+KCJZI076 IsAxZwPwWlWu6XOp0HNPMZpTCudjdUVazLGWBj2N32ymFfgt/zTDGjX74zRJ8WBwUtRH pxozWQmdnIdXez4Emepa7tRxy6sYIf+rvx0tzoz6A57r/uPu66L84cc8HwKs2twdL2P5 XbIw== X-Gm-Message-State: AOAM532QJ5o2MyMJ9ldGY4Y4FfNCgYh6L3lC0VgstVPd5WYcN2RBjkzt jC2HlEiOGxcRHw2voZnB3odWTg== X-Received: by 2002:adf:d84e:0:b0:1ef:9517:c7da with SMTP id k14-20020adfd84e000000b001ef9517c7damr9546762wrl.588.1646128037123; Tue, 01 Mar 2022 01:47:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g6-20020a05600c4ec600b0037bf934bca3sm2350448wmq.17.2022.03.01.01.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 612AF1FFB8; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/18] tests/docker: restore TESTS/IMAGES filtering Date: Tue, 1 Mar 2022 09:46:58 +0000 Message-Id: <20220301094715.550871-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alex Williamson , =?utf-8?q?Alex_Benn=C3=A9e?= 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 Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-2-alex.bennee@linaro.org> 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'