qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Straub <lukasstraub2@web.de>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: [PATCH v4 2/6] boot_linux.py: Use pick_qemu_util
Date: Sun, 7 Feb 2021 16:55:23 +0100	[thread overview]
Message-ID: <cff831492e743dbe4791e51f6d7f5598a4f3ef28.1612712637.git.lukasstraub2@web.de> (raw)
In-Reply-To: <cover.1612712637.git.lukasstraub2@web.de>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

Replace duplicate code with pick_qemu_util.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
 tests/acceptance/boot_linux.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
index 1da4a53d6a..38029f8c70 100644
--- a/tests/acceptance/boot_linux.py
+++ b/tests/acceptance/boot_linux.py
@@ -31,15 +31,8 @@ class BootLinuxBase(Test):
     def download_boot(self):
         self.log.debug('Looking for and selecting a qemu-img binary to be '
                        'used to create the bootable snapshot image')
-        # If qemu-img has been built, use it, otherwise the system wide one
-        # will be used.  If none is available, the test will cancel.
-        qemu_img = os.path.join(BUILD_DIR, 'qemu-img')
-        if not os.path.exists(qemu_img):
-            qemu_img = find_command('qemu-img', False)
-        if qemu_img is False:
-            self.cancel('Could not find "qemu-img", which is required to '
-                        'create the bootable image')
-        vmimage.QEMU_IMG = qemu_img
+
+        vmimage.QEMU_IMG = self.pick_qemu_util("qemu-img")

         self.log.info('Downloading/preparing boot image')
         # Fedora 31 only provides ppc64le images
--
2.30.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-02-07 16:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 15:54 [PATCH v4 0/6] colo: Introduce resource agent and test suite/CI Lukas Straub
2021-02-07 15:55 ` [PATCH v4 1/6] avocado_qemu: Introduce pick_qemu_util to pick qemu utility binaries Lukas Straub
2021-02-07 15:55 ` Lukas Straub [this message]
2021-02-07 15:55 ` [PATCH v4 3/6] colo: Introduce resource agent Lukas Straub
2021-02-07 15:55 ` [PATCH v4 4/6] colo: Introduce high-level test suite Lukas Straub
2021-02-07 15:55 ` [PATCH v4 5/6] configure,Makefile: Install colo resource-agent Lukas Straub
2021-02-07 15:55 ` [PATCH v4 6/6] MAINTAINERS: Add myself as maintainer for COLO resource agent Lukas Straub

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cff831492e743dbe4791e51f6d7f5598a4f3ef28.1612712637.git.lukasstraub2@web.de \
    --to=lukasstraub2@web.de \
    --cc=crosa@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).