From patchwork Mon Aug 17 14:35:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276334 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46ED5C433E1 for ; Mon, 17 Aug 2020 14:40:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11A8C20729 for ; Mon, 17 Aug 2020 14:40:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GHwJzBhL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11A8C20729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7gJD-00007P-8T for qemu-devel@archiver.kernel.org; Mon, 17 Aug 2020 10:40:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7gGY-00038Y-7p for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:37:38 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7gGW-000624-Pi for qemu-devel@nongnu.org; Mon, 17 Aug 2020 10:37:37 -0400 Received: by mail-wr1-x443.google.com with SMTP id a15so15232147wrh.10 for ; Mon, 17 Aug 2020 07:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rQj9GTIn5cWLBAfzKEFV9zDy5qEmbI6P53ZkPnnFQjI=; b=GHwJzBhLxvN6UcWH4Z8oI1fTPJYlHL9yj8yKmbOUmxdVPmaRI0y/9CeX3cP5b5eYaR ZdOFCsYe+6NFs9xlK7Js49B2wDN90OKmurqQpNdLOnJDOYN+6lvOvRzpVrqgGb89kKHJ FEndBsK3ZNf2A3SHIMc9rf3A/ERmMzYznX02MufEM2+b3Xkj0i/ZbFJpRN+5Kes4p2U4 Yj8nmH9+JdqRuZ27YjAxUdTnSnPAy/RYvQpS5XF25hXFViPIoHRnbd2XuiGbOWZbbved 7TgO7iZhCWzLyWPyeBE+6y5G8sdxZvV+DDQkMChmFezYRHZ+sSSZAj+1AxMV7BFwzMIi nUHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rQj9GTIn5cWLBAfzKEFV9zDy5qEmbI6P53ZkPnnFQjI=; b=i56p+z+RCCht2K6HyOaJRi6xlDQSSZBJB73velTAIETfkBD8fRYTwhc6X/GEaTgHOL Cal2neGTFv0qs7YIX1GaLA/wPTvdppT3BTD5Rfwdg7jnt9MI67wH7cC/ie+WGo5ib3fT VCugmk8I8Bn6J4mpfag8S5zO+7xJLc40aGALHxNg9MFrsQubgXJuMmOkjCPzNjlW2zg3 i1UrFwAjawTs/ct+yUBpWutTrk+6vfTBmVkgyTEPLYl+X6P8/ysBXZJ0Un+xRZ1+9m33 jEd6KMncjZJ+2P+f9X+tODWhwvUhQ+1e1Jny/nHOa+uSj5P0ErlDzk0jF7daGlCjRZTV vsCA== X-Gm-Message-State: AOAM530PbXzY4lqGQIKwdViViSlaShv0yiuxIoOoYctwTdVNodXLZfyE ZxpWyGTsnTpDeynKTpUk1u7adbv0Vgk= X-Google-Smtp-Source: ABdhPJxPip/B2KuRuh3proc42ILhNhX0/nMSkFfT4RMnIkN1xKw5RPayaBWnyfTvKlZpGkZMEWLZhg== X-Received: by 2002:adf:fb87:: with SMTP id a7mr16895687wrr.390.1597675055246; Mon, 17 Aug 2020 07:37:35 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:a0d1:fc42:c610:f977]) by smtp.gmail.com with ESMTPSA id i22sm34966603wrb.45.2020.08.17.07.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 07:37:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 008/150] tests/vm: check for Python YAML parser in the Makefile Date: Mon, 17 Aug 2020 16:35:01 +0200 Message-Id: <20200817143723.343284-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817143723.343284-1-pbonzini@redhat.com> References: <20200817143723.343284-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" No need to do it in the configure file if it is only used for a help message. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure | 9 --------- tests/vm/Makefile.include | 4 +++- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 1c17a0f27f..625c14c500 100755 --- a/configure +++ b/configure @@ -959,13 +959,6 @@ do fi done -# Check for existence of python3 yaml, needed to -# import yaml config files into vm-build. -python_yaml="no" -if $(python3 -c "import yaml" 2> /dev/null); then - python_yaml="yes" -fi - : ${smbd=${SMBD-/usr/sbin/smbd}} # Default objcc to clang if available, otherwise use CC @@ -6844,7 +6837,6 @@ if test "$docs" != "no"; then echo "sphinx-build $sphinx_build" fi echo "genisoimage $genisoimage" -echo "python_yaml $python_yaml" echo "slirp support $slirp $(echo_version $slirp $slirp_version)" if test "$slirp" != "no" ; then echo "smbd $smbd" @@ -7945,7 +7937,6 @@ echo "PYTHON=$python" >> $config_host_mak echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak -echo "PYTHON_YAML=$python_yaml" >> $config_host_mak echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=$iasl" >> $config_host_mak diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index a599d1994d..257e2edbb3 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -17,6 +17,8 @@ IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES)) .PRECIOUS: $(IMAGE_FILES) +HAVE_PYTHON_YAML = $(shell $(PYTHON) -c "import yaml" 2> /dev/null && echo yes) + # 'vm-help' target was historically named 'vm-test' vm-help vm-test: @echo "vm-help: Test QEMU in preconfigured virtual machines" @@ -56,7 +58,7 @@ endif @echo " QEMU_LOCAL=1 - Use QEMU binary local to this build." @echo " QEMU=/path/to/qemu - Change path to QEMU binary" @echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool" -ifeq ($(PYTHON_YAML),yes) +ifeq ($(HAVE_PYTHON_YAML),yes) @echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file." else @echo " (install python3-yaml to enable support for yaml file to configure a VM.)"