[libguestfs/f14/master] Fix tests so they test the built guestfish, not /usr/bin/guestfish.

Richard W.M. Jones rjones at fedoraproject.org
Wed Sep 22 16:47:27 UTC 2010


commit a91a903af250b2891f0490f3d03281c3b97493b9
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Sep 22 17:47:15 2010 +0100

    Fix tests so they test the built guestfish, not /usr/bin/guestfish.

 libguestfs-1.5.18-test-built-guestfish.patch |   42 ++++++++++++++++++++++++++
 libguestfs.spec                              |    9 +++++-
 2 files changed, 50 insertions(+), 1 deletions(-)
---
diff --git a/libguestfs-1.5.18-test-built-guestfish.patch b/libguestfs-1.5.18-test-built-guestfish.patch
new file mode 100644
index 0000000..b146353
--- /dev/null
+++ b/libguestfs-1.5.18-test-built-guestfish.patch
@@ -0,0 +1,42 @@
+From df69543720de5bf7dd1a734c3bef6d191ceeab33 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Wed, 22 Sep 2010 17:43:34 +0100
+Subject: [PATCH] regressions: Test just-built guestfish.
+
+Instead of testing the installed /usr/bin/guestfish.
+
+This fixes commit ddda0f7bd00a37274dae38f4ce93955b8cfdf7d7.
+---
+ regressions/test-guestfish-a.sh |    2 +-
+ regressions/test-guestfish-d.sh |    3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/regressions/test-guestfish-a.sh b/regressions/test-guestfish-a.sh
+index 8e990ed..8847b85 100755
+--- a/regressions/test-guestfish-a.sh
++++ b/regressions/test-guestfish-a.sh
+@@ -23,6 +23,6 @@ set -e
+ rm -f test.img
+ 
+ truncate -s 10M test.img
+-guestfish -a test.img </dev/null
++../fish/guestfish -a test.img </dev/null
+ 
+ rm -f test.img
+diff --git a/regressions/test-guestfish-d.sh b/regressions/test-guestfish-d.sh
+index b97ad3d..bf5d514 100755
+--- a/regressions/test-guestfish-d.sh
++++ b/regressions/test-guestfish-d.sh
+@@ -46,7 +46,8 @@ cat > test.xml <<EOF
+ </node>
+ EOF
+ 
+-guestfish -c "test://$cwd/test.xml" --ro -d guest -x </dev/null >test.out 2>&1
++../fish/guestfish -c "test://$cwd/test.xml" --ro -d guest -x \
++  </dev/null >test.out 2>&1
+ grep -sq '^add_drive_ro.*test.img' test.out
+ 
+ rm -f test.img test.xml test.out
+-- 
+1.7.2.3
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 31d440a..b452c18 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -42,7 +42,7 @@ Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
 Version:       1.5.18
-Release:       1%{?dist}.1
+Release:       1%{?dist}.2
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://libguestfs.org/
@@ -55,6 +55,9 @@ Patch0:        libguestfs-1.0.79-no-fuse-test.patch
 # Disable test-copy.sh because of missing /dev/fd bug in mock (RHBZ#526414).
 Patch1:        libguestfs-1.5.18-disable-test-copy.patch
 
+# Fix tests so they test the built guestfish (upstream).
+Patch2:        libguestfs-1.5.18-test-built-guestfish.patch
+
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
 BuildRequires: /usr/bin/pod2text
@@ -415,6 +418,7 @@ php-%{name} contains PHP bindings for %{name}.
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 mkdir -p daemon/m4
 
@@ -744,6 +748,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Sep 22 2010 Richard Jones <rjones at redhat.com> - 1:1.5.18-1.fc14.2
+- Fix tests so they test the built guestfish, not /usr/bin/guestfish.
+
 * Wed Sep 22 2010 Richard Jones <rjones at redhat.com> - 1:1.5.18-1.fc14.1
 - Rebase test-copy patch.
 


More information about the scm-commits mailing list