xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local
@ 2015-09-18 15:34 Ian Campbell
  2015-09-22 15:41 ` Ian Jackson
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-09-18 15:34 UTC (permalink / raw)
  To: ian.jackson, xen-devel; +Cc: Ian Campbell

Older Xen's installed in /usr by default, so we need to check where
qemu-img if we want these tests to work on those versions.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
Only tested with perl -c.

See
http://logs.test-lab.xenproject.org/osstest/logs/61955/test-amd64-amd64-xl-qcow2/info.html
for a current instance of this failure with 4.2
---
 Osstest/TestSupport.pm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 2ded693..efe138f 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1616,7 +1616,16 @@ sub make_vhd ($$$) {
 sub make_qcow2 ($$$) {
     my ($ho, $gho, $disk_mb) = @_;
     # upstream qemu's version. Seems preferable to qemu-xen-img from qemu-trad.
-    my $qemu_img = "/usr/local/lib/xen/bin/qemu-img";
+    my $qemu_img;
+    foreach (qw(/usr/local /usr)) {
+	my $try = "$_/lib/xen/bin/qemu-img";
+        if (target_file_exists($ho, $try)) {
+            $qemu_img=$try;
+            last;
+        }
+    }
+    die "no qemu-img" unless $qemu_img;
+
     target_cmd_root($ho, "$qemu_img create -f qcow2 $gho->{Rootimg} ${disk_mb}M");
 }
 sub make_raw ($$$) {
-- 
2.5.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-23 18:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 15:34 [PATCH OSSTEST] make_qcow2: Look for qemu-img under /usr as well as /usr/local Ian Campbell
2015-09-22 15:41 ` Ian Jackson
2015-09-22 15:58   ` Ian Campbell
2015-09-22 16:06     ` Ian Jackson
2015-09-22 21:36       ` Stefano Stabellini
2015-09-23  8:25         ` Ian Campbell
2015-09-23 18:18           ` Stefano Stabellini

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).