From patchwork Mon Jun 7 14:33:02 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: 455298 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp2803771jae; Mon, 7 Jun 2021 07:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6D4njIYOujtZTtzoxSV1Zbcn2zKMruE+ItZazM/Q3vVmnYeUPpiKGWE/S8fk1Qo56496+ X-Received: by 2002:a05:6122:a09:: with SMTP id 9mr8237226vkn.10.1623076671121; Mon, 07 Jun 2021 07:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623076671; cv=none; d=google.com; s=arc-20160816; b=sqyNgAxO0WG3oJy1vBVASEsAaoptcT6IsOIj4ZhftuqzKcrh6HfUlaX+0TvA17VuMw 4+cTQV7ha2TDGgTyK9MXIC0wI5rEg6UpmUMMaeMIbKaqji8rkHli9WP+fl8Xf7YwU2E4 Lg31QC6CQyDPn1aYWKujOJoJgNJ1G5cUN75jxniwmAor/I8OSa8Ou7B+jhnGFv+orv/d S4F4upZLd6CR/whl0QoRqPhZZvox/YqZ9YXEw/TTJblLUWoep9ZvELqN6/DJOaLjrSaz ajDfIKNSZAUbvDX4AZoXau4lBYYYzjFOWDX8L7V8+r24rBkkY6FN6fLNdYW5y/a2nBm6 8QFA== 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=DI4OcJA29QFIm91G7GUTHfaKFnWUsXmcsMW7JjhiiL0=; b=Ep3WNdk30oXX6lqLuohXAdhEFhM4icmd4Q/Cl/v2ZezH7OE/HLhs5E8q91WvJeybVU ONlE1IQpnlWTttvN/l2Ms9BTTrGPNfQidxjnaMhS2wLoedXZubNWdeXCn8Y0r9d43jDQ QSEjwxhtE7Qt9tOOLkoGhcWrDBh7KmJkfzxO96nizizlII4XWQ8/xf/H6kBGBRts9qN/ t22hAjiYUFH5qYQoL4p8tWA+HZ450pfiDy6UToXtR62YBRB831n3NdpTCwEDEGiUUwJZ c+lPcvWoRNzKrr7C8PXF9CkyQCvjv4mfPkI3fKM+EShz6HOgt5lQbGVTDLJs8XANtmYs cWnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XZaQ9JIT; 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 o3si4432616vsn.285.2021.06.07.07.37.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jun 2021 07:37:51 -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=XZaQ9JIT; 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]:52802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqGNy-0005r1-Hf for patch@linaro.org; Mon, 07 Jun 2021 10:37:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqGJc-0003Il-35 for qemu-devel@nongnu.org; Mon, 07 Jun 2021 10:33:20 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqGJa-0000Q0-7N for qemu-devel@nongnu.org; Mon, 07 Jun 2021 10:33:19 -0400 Received: by mail-wr1-x42a.google.com with SMTP id a11so16015171wrt.13 for ; Mon, 07 Jun 2021 07:33:17 -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=DI4OcJA29QFIm91G7GUTHfaKFnWUsXmcsMW7JjhiiL0=; b=XZaQ9JITFfEeH2sW9kODOEAjm6BeVcmWgNvH1CMlcGimSsPcyvJ7YNn5+9fTVyhyk6 c5tMBlcDtmnGTA6CdvQoJGAHY+fK2/+kR+pbB12C1SRrLUxHZR/hbRDYwVFDB30ItQ0q EE8GtQErBLN5kKe8cGjkDRON/u4xnNMh/diwlslyisEOIZJJERHZqMNRw7jIR/qDbFVU 4WXLRAmDmHgsommvjqeDqhbgZ+SZ0UevlBzexKcpo0+JE0mjWSKr08iETll1h0QptOrB YFjyfFK9co2vs50Pmup/A7dHJgxqVa62MVJ6H4iKPqh5SLw3GjK47YXf/nvyW8zRyzjL XeqQ== 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=DI4OcJA29QFIm91G7GUTHfaKFnWUsXmcsMW7JjhiiL0=; b=a5Rti5O39IryB/zLyr0PDawVWBjpxwHoX1cl3uE62ScRbNAZuA+0DhqtzmL7qimYIU k7FxGdIUeRrsRsgGGVvbFjE3rtNX5KFuto0PpJCt4rW8rt4EY3Vgr2xaJPTUUvnKWVcA HMCaThfEW36v0CgHlyNeHYCdvfxoXT1/Ocd7CnPq45uYn34zsaM8uyFa1V33cEUDn8rB TNjx7Jf5XeacZEzQiEZJ7L29F4QpZeKWdepT05SaWg3JiLy0KqKvTO28SSJQzjjsqHVy OClovd1zFsdIzeQpnOg3J34IAYip/v+dRbgykm/aPsi5EFHJAoENgKtBcxb9t04ShKhV BnRw== X-Gm-Message-State: AOAM533MgDn9/SGeVqgBII7AomscdFTc6uJmI90S/4WfeuyOmNoIFWFw n99ZV8DwbUIYUvsSkohy+qEFGA== X-Received: by 2002:a5d:4903:: with SMTP id x3mr16588057wrq.376.1623076396909; Mon, 07 Jun 2021 07:33:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h6sm7760970wrt.20.2021.06.07.07.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 07:33:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3AB241FF93; Mon, 7 Jun 2021 15:33:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 7/8] tests/vm: expose --source-path to scripts to find extra files Date: Mon, 7 Jun 2021 15:33:02 +0100 Message-Id: <20210607143303.28572-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210607143303.28572-1-alex.bennee@linaro.org> References: <20210607143303.28572-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Currently the centos8 image expects to run an in-src build to find the kick starter file. Fix this. Signed-off-by: Alex Bennée Message-Id: <20210602103527.32021-1-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index e94d95ec54..f3a3a1c751 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -84,6 +84,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ $(if $(LOG_CONSOLE),--log-console) \ + --source-path $(SRC_PATH) \ --image "$@" \ --force \ --build-image $@, \ diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 0f2e436ed3..254e11c932 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -96,6 +96,7 @@ def __init__(self, args, config=None): self._genisoimage = args.genisoimage self._build_path = args.build_path self._efi_aarch64 = args.efi_aarch64 + self._source_path = args.source_path # Allow input config to override defaults. self._config = DEFAULT_CONFIG.copy() if config != None: @@ -591,6 +592,9 @@ def get_default_jobs(): parser.add_argument("--build-path", default=None, help="Path of build directory, "\ "for using build tree QEMU binary. ") + parser.add_argument("--source-path", default=None, + help="Path of source directory, "\ + "for finding additional files. ") parser.add_argument("--interactive", "-I", action="store_true", help="Interactively run command") parser.add_argument("--snapshot", "-s", action="store_true", diff --git a/tests/vm/centos.aarch64 b/tests/vm/centos.aarch64 index e687b93e52..81c3004c3c 100755 --- a/tests/vm/centos.aarch64 +++ b/tests/vm/centos.aarch64 @@ -64,7 +64,7 @@ class CentosAarch64VM(basevm.BaseVM): def create_kickstart(self): """Generate the kickstart file used to generate the centos image.""" # Start with the template for the kickstart. - ks_file = "../tests/vm/centos-8-aarch64.ks" + ks_file = self._source_path + "/tests/vm/centos-8-aarch64.ks" subprocess.check_call("cp {} ./ks.cfg".format(ks_file), shell=True) # Append the ssh keys to the kickstart file # as the post processing phase of installation.