From patchwork Thu Jul 8 19:09:15 2021 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: 471299 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp576281jao; Thu, 8 Jul 2021 12:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpzr223j1NkwopIdElp2VY5u6RtCRIDrC6dcaAVfHTkkc0URjQH9FEBOtar2LedTL87Q2C X-Received: by 2002:a05:6402:1014:: with SMTP id c20mr40631407edu.380.1625771789248; Thu, 08 Jul 2021 12:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625771789; cv=none; d=google.com; s=arc-20160816; b=V+DuSaRNRtUrevQQXDLI2A9YqSCQuV/yBw4dtxWUhqYXwIKHnyGcp1TUCO7tZ3+UYd XU6V5/8nqUhCGKh/pePp7glFHC56YDuC2jF5SlfLdIpKVWsryhmeFzeyvItEPbM2PvVQ Sn86rxK22dZmm6/K0dp8OP2FNEN2Gzr+sCZjV0HRgrmrJWcOg6fN97o3Rqt3n9PTdFFz wWSNGxL6ki2LwHzqhUoLsnCgPRhwa6FyomJB+JigcSdTvmSbdY2GRmsnQmiWymUa57Tw s63po9Seh2JKV/5dPqcO6Cnw0wbz7nnIiQGKOLjNdnWmKNJTsdGrzfy18z9aqC8m8U0f BusA== 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=uQM582CR+pF+8YGG08VBpf08mKJ/9zGDEh5ELcyeUXY=; b=KbxK7vnu3fvwC/11S+pVetjabAD/6kfedKxHdkJdESVdFIBqBr44RZPabq1PdEJYpZ c3wFhUASqoXbEyLP/EaKJRgwIBvXz/PPUZGal/vZxMTKP9EYQifli0u+LLY4nECp6MvT 4pW2FoN2pqfU4Tal8Fhzar7oYu5rDglz0BnnInaUMGVwS7MtXwO0VCNeF0sD5WGlgfsV LKJyZN/+x1pmgA0ZAiQpRgBNuJDX8qGVT6G5va+NMDeFZkr0X+8AjnLOqIYkoG1xY4yv 9yUVkEsivDm9gpULlHn3NHYgdaFQ7LoXt5RvQ+lURKq4GLXdPVGDERvEHGGOyAbuZ/uV OTiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PtgD+aS6; 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 p8si3849064edx.277.2021.07.08.12.16.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jul 2021 12:16:29 -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=PtgD+aS6; 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]:40870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1ZVc-0006hc-51 for patch@linaro.org; Thu, 08 Jul 2021 15:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1ZPM-0003Xx-1Y for qemu-devel@nongnu.org; Thu, 08 Jul 2021 15:10:01 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:42585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1ZPJ-0004ok-N1 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 15:09:59 -0400 Received: by mail-wr1-x433.google.com with SMTP id r11so3588379wro.9 for ; Thu, 08 Jul 2021 12:09:57 -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=uQM582CR+pF+8YGG08VBpf08mKJ/9zGDEh5ELcyeUXY=; b=PtgD+aS6kopSaa5aYs2KwQVNj5hOjZtQcRnsisyxBKLHTd3E3DeGzgqAA3xw6M77uu zcexw3bpmsRox0SnIrKlZ1NXYh2E73pbShAy7kdV0WVkEaGevy6DnyuWrKP8kDjIep1z RJBWR/zUgMq2w5fYu+oyKScOC74GirvxbBs/r6G7SKUGZ/gY2OF41brl+mP0iVNt/j+i Hvr7raXutlfBiWbimvC5G9bOW0fhxcZRUv3i3Dukv+NRacf1+Z3dkgSruWlogjgoxufn WNsI7Nd7gYpUFJRYB31O9fZrbN3nMmEywEiaxt8paHtwk7lWT6tzrRnLWhW0llQFjbmy 7rNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uQM582CR+pF+8YGG08VBpf08mKJ/9zGDEh5ELcyeUXY=; b=Dp6Loi1q4Xr7aE8cZArmkiTZ9FWFxWmE+ugBuBNfg8WummUawVhGoTdZOmScIyC55c 0/AdP29VQFk2e2fCXUeprRFbX6SeqsGgHgv+fNj4womAgp5twRuBJHvCDY3aLb69ggQZ WDqAlQTXZSJRPQi4pvfI96oWypmrtmKVUbOTi/dpC7owH4aVG6G2/cmQg3gk36lqi4Nf F312rtUGRYjTh9TJQg0WwIxOvW5DoLcW1hDyJobffuqj6ls8iUkuTNFwTcMa5Mu83KUl htj8Z50Q5Y8im09KTyVBE/KXH9wLhyd9nmM/4lGDv8Nk+O0ocjyJOdxXTXP9RHrW+mGJ kdnQ== X-Gm-Message-State: AOAM5304cymCBiKmkg2k7dE4TqmxXKr61rH+BnPNeVICaJyXYJK/VEly BnIMT08u6//fucuLgTyjBFajzg== X-Received: by 2002:a5d:4912:: with SMTP id x18mr4674855wrq.310.1625771396167; Thu, 08 Jul 2021 12:09:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i12sm3263476wrp.57.2021.07.08.12.09.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 12:09:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 88DDE1FF9B; Thu, 8 Jul 2021 20:09:43 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 13/39] tests/docker: remove FEATURES env var from templates Date: Thu, 8 Jul 2021 20:09:15 +0100 Message-Id: <20210708190941.16980-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708190941.16980-1-alex.bennee@linaro.org> References: <20210708190941.16980-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , minyihh@uci.edu, berrange@redhat.com, kuhn.chenqun@huawei.com, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , f4bug@amsat.org, robhenry@microsoft.com, Willian Rampazzo , mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, Wainer dos Santos Moschetta , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, ma.mandourr@gmail.com, =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé In preparation for switching to auto-generated dockerfiles, remove the FEATURES env variable. The equivalent functionality can be achieved in most cases by just looking for existance of a binary. The cases which don't correspond to binaries are simply dropped because configure/meson will probe for any requested feature anyway. Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Reviewed-by: Alex Bennée Message-Id: <20210623142245.307776-6-berrange@redhat.com> Signed-off-by: Alex Bennée --- tests/docker/common.rc | 19 ++++++++++++++----- tests/docker/dockerfiles/debian10.docker | 2 -- .../dockerfiles/fedora-win32-cross.docker | 1 - .../dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/ubuntu.docker | 1 - tests/docker/dockerfiles/ubuntu1804.docker | 1 - tests/docker/dockerfiles/ubuntu2004.docker | 1 - tests/docker/run | 3 --- tests/docker/test-clang | 2 +- tests/docker/test-debug | 2 +- tests/docker/test-mingw | 3 ++- tests/docker/test-misc | 2 +- tests/docker/test-tsan | 2 +- 14 files changed, 20 insertions(+), 21 deletions(-) -- 2.20.1 diff --git a/tests/docker/common.rc b/tests/docker/common.rc index ebc5b97ecf..c5cc33d366 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -15,14 +15,23 @@ # overriden by TARGET_LIST if the user sets it. DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"} -requires() +requires_binary() { + found=0 for c in $@; do - if ! echo "$FEATURES" | grep -wq -e "$c"; then - echo "Prerequisite '$c' not present, skip" - exit 0 - fi + for d in /bin /usr/bin /usr/local/bin + do + if test -f "$d/$c" + then + found=1 + fi + done done + if test "$found" != "1" + then + echo "Prerequisite '$c' not present, skip" + exit 0 + fi } configure_qemu() diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/dockerfiles/debian10.docker index a27b88df55..b414af1b9f 100644 --- a/tests/docker/dockerfiles/debian10.docker +++ b/tests/docker/dockerfiles/debian10.docker @@ -35,5 +35,3 @@ RUN apt update && \ python3-sphinx \ python3-sphinx-rtd-theme \ $(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2) - -ENV FEATURES docs diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker index 9fed35f4e1..5a03e1af43 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -37,7 +37,6 @@ ENV PACKAGES \ RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt -ENV FEATURES mingw # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-w64-mingw32- diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker index fb641f6104..ff706040c4 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -33,7 +33,6 @@ ENV PACKAGES \ RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt -ENV FEATURES mingw # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- --disable-capstone diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index a506e68d33..64a413f5e0 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -117,4 +117,3 @@ ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3 RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt ENV PATH $PATH:/usr/libexec/python3-sphinx/ -ENV FEATURES mingw clang pyyaml asan docs diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index e0ff425c01..f0e0180d21 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -69,4 +69,3 @@ ENV PACKAGES \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang pyyaml sdl2 docs diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker index adcdef8244..0acdb0d9ad 100644 --- a/tests/docker/dockerfiles/ubuntu1804.docker +++ b/tests/docker/dockerfiles/ubuntu1804.docker @@ -55,7 +55,6 @@ ENV PACKAGES \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang pyyaml sdl2 docs # https://bugs.launchpad.net/qemu/+bug/1838763 ENV QEMU_CONFIGURE_OPTS --disable-libssh diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker index 78755bc2e3..88b3cfa136 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -70,7 +70,6 @@ ENV PACKAGES flex bison \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang tsan pyyaml sdl2 # Apply patch https://reviews.llvm.org/D75820 # This is required for TSan in clang-10 to compile with QEMU. diff --git a/tests/docker/run b/tests/docker/run index 8edc7026ee..421393046b 100755 --- a/tests/docker/run +++ b/tests/docker/run @@ -30,9 +30,6 @@ mkdir -p $TEST_DIR/{src,build,install} # Extract the source tarballs tar -C $TEST_DIR/src -xf $BASE/qemu.tar || { echo "Failed to untar source"; exit 2; } -if test -f $TEST_DIR/src/Makefile; then - export FEATURES="$FEATURES dtc" -fi if test -n "$SHOW_ENV"; then if test -f /packages.txt; then diff --git a/tests/docker/test-clang b/tests/docker/test-clang index 8c51ead518..b57e0119d9 100755 --- a/tests/docker/test-clang +++ b/tests/docker/test-clang @@ -13,7 +13,7 @@ . common.rc -requires clang +requires_binary clang cd "$BUILD_DIR" diff --git a/tests/docker/test-debug b/tests/docker/test-debug index c050fa0d93..f52f16328c 100755 --- a/tests/docker/test-debug +++ b/tests/docker/test-debug @@ -14,7 +14,7 @@ . common.rc -requires clang asan +requires_binary clang cd "$BUILD_DIR" diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw index c30eb654eb..0bc6d78872 100755 --- a/tests/docker/test-mingw +++ b/tests/docker/test-mingw @@ -13,7 +13,8 @@ . common.rc -requires mingw dtc +requires_binary x86_64-w64-mingw32-gcc +requires_binary i686-w64-mingw32-gcc cd "$BUILD_DIR" diff --git a/tests/docker/test-misc b/tests/docker/test-misc index cc94a738dd..2a3c2c2e1c 100755 --- a/tests/docker/test-misc +++ b/tests/docker/test-misc @@ -14,7 +14,7 @@ . common.rc -requires docs +requires_binary sphinx-build-3 sphinx-build cd "$BUILD_DIR" diff --git a/tests/docker/test-tsan b/tests/docker/test-tsan index eb40ac45b7..53d90d2f79 100755 --- a/tests/docker/test-tsan +++ b/tests/docker/test-tsan @@ -17,7 +17,7 @@ setup_tsan() { - requires clang tsan + requires_binary clang tsan_log_dir="/tmp/qemu-test/build/tsan" mkdir -p $tsan_log_dir > /dev/null || true EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-tsan \