[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [v2v PATCH 3/3] tests: fix srcdir references



Make sure to properly reference to files in the source directory.
---
 tests/rhbz1232192.sh                      | 2 +-
 tests/test-v2v-cdrom.sh                   | 4 ++--
 tests/test-v2v-floppy.sh                  | 4 ++--
 tests/test-v2v-i-ova-as-root.sh           | 2 +-
 tests/test-v2v-i-ova-bad-sha1.sh          | 2 +-
 tests/test-v2v-i-ova-bad-sha256.sh        | 2 +-
 tests/test-v2v-i-ova-formats.sh           | 4 ++--
 tests/test-v2v-i-ova-good-checksums.sh    | 2 +-
 tests/test-v2v-i-ova-gz.sh                | 4 ++--
 tests/test-v2v-i-ova-invalid-manifest1.sh | 2 +-
 tests/test-v2v-i-ova-invalid-manifest2.sh | 2 +-
 tests/test-v2v-i-ova-snapshots.sh         | 6 +++---
 tests/test-v2v-i-ova-subfolders.sh        | 6 +++---
 tests/test-v2v-i-ova-tar.sh               | 6 +++---
 tests/test-v2v-i-ova-two-disks.sh         | 6 +++---
 tests/test-v2v-i-ova.sh                   | 4 ++--
 tests/test-v2v-i-vmx.sh                   | 2 +-
 tests/test-v2v-mac.sh                     | 4 ++--
 tests/test-v2v-networks-and-bridges.sh    | 4 ++--
 tests/test-v2v-o-rhv.sh                   | 2 +-
 tests/test-v2v-o-vdsm-options.sh          | 2 +-
 tests/test-v2v-print-estimate.sh          | 2 +-
 tests/test-v2v-print-source.sh            | 4 ++--
 tests/test-v2v-sound.sh                   | 2 +-
 v2v/test-v2v-python-syntax.sh             | 4 ++--
 25 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/tests/rhbz1232192.sh b/tests/rhbz1232192.sh
index 2d4b342b..80f86003 100755
--- a/tests/rhbz1232192.sh
+++ b/tests/rhbz1232192.sh
@@ -30,4 +30,4 @@ skip_unless_phony_guest blank-disk.img
 
 export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
 
-virt-v2v -i libvirtxml rhbz1232192.xml -o null --no-copy
+virt-v2v -i libvirtxml "$srcdir/rhbz1232192.xml" -o null --no-copy
diff --git a/tests/test-v2v-cdrom.sh b/tests/test-v2v-cdrom.sh
index 0c8680df..8adc5103 100755
--- a/tests/test-v2v-cdrom.sh
+++ b/tests/test-v2v-cdrom.sh
@@ -27,7 +27,7 @@ skip_if_backend uml
 skip_unless_phony_guest windows.img
 skip_unless_phony_guest blank-disk.img
 
-libvirt_uri="test://$abs_builddir/test-v2v-cdrom.xml"
+libvirt_uri="test://$abs_srcdir/test-v2v-cdrom.xml"
 export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
 export VIRTIO_WIN="$top_srcdir/test-data/fake-virtio-win"
 
@@ -48,7 +48,7 @@ awk '/<disk /{p=1;print;next} p&&/<\/disk>/{p=0;print;next} ;p' \
     $d/windows.xml |
     grep -v '<source file' > $d/disks
 
-if ! diff -u test-v2v-cdrom.expected $d/disks; then
+if ! diff -u "$srcdir/test-v2v-cdrom.expected" $d/disks; then
     echo "$0: unexpected disk assignments"
     cat $d/disks
     exit 1
diff --git a/tests/test-v2v-floppy.sh b/tests/test-v2v-floppy.sh
index 04d63464..82e7d8a4 100755
--- a/tests/test-v2v-floppy.sh
+++ b/tests/test-v2v-floppy.sh
@@ -27,7 +27,7 @@ skip_if_backend uml
 skip_unless_phony_guest windows.img
 skip_unless_phony_guest blank-disk.img
 
-libvirt_uri="test://$abs_builddir/test-v2v-floppy.xml"
+libvirt_uri="test://$abs_srcdir/test-v2v-floppy.xml"
 
 export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
 export VIRTIO_WIN="$top_srcdir/test-data/fake-virtio-win"
@@ -49,7 +49,7 @@ awk '/<disk /{p=1;print;next} p&&/<\/disk>/{p=0;print;next} ;p' \
     $d/windows.xml |
     grep -v '<source file' > $d/disks
 
-if ! diff -u test-v2v-floppy.expected $d/disks; then
+if ! diff -u "$srcdir/test-v2v-floppy.expected" $d/disks; then
     echo "$0: unexpected disk assignments"
     cat $d/disks
     exit 1
diff --git a/tests/test-v2v-i-ova-as-root.sh b/tests/test-v2v-i-ova-as-root.sh
index 04d5d371..b7f12a7e 100755
--- a/tests/test-v2v-i-ova-as-root.sh
+++ b/tests/test-v2v-i-ova-as-root.sh
@@ -44,7 +44,7 @@ mkdir $d
 pushd $d
 
 # Create the test OVA.
-cp ../test-v2v-i-ova-as-root.ovf test.ovf
+cp "$abs_srcdir/test-v2v-i-ova-as-root.ovf" test.ovf
 cp ../windows.vmdk disk.vmdk
 
 echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf
diff --git a/tests/test-v2v-i-ova-bad-sha1.sh b/tests/test-v2v-i-ova-bad-sha1.sh
index 509cc401..bd0b02da 100755
--- a/tests/test-v2v-i-ova-bad-sha1.sh
+++ b/tests/test-v2v-i-ova-bad-sha1.sh
@@ -39,7 +39,7 @@ mkdir $d
 pushd $d
 
 # Create the test OVA.
-cp ../test-v2v-i-ova-checksums.ovf test.ovf
+cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf
 cp ../windows.vmdk disk.vmdk
 echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf
 sha1=`do_sha1 disk.vmdk | tr '0-5a-f6789' 'a-f0-58967'`
diff --git a/tests/test-v2v-i-ova-bad-sha256.sh b/tests/test-v2v-i-ova-bad-sha256.sh
index 1a19cc28..e234fd9b 100755
--- a/tests/test-v2v-i-ova-bad-sha256.sh
+++ b/tests/test-v2v-i-ova-bad-sha256.sh
@@ -39,7 +39,7 @@ mkdir $d
 pushd $d
 
 # Create the test OVA.
-cp ../test-v2v-i-ova-checksums.ovf test.ovf
+cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf
 cp ../windows.vmdk disk.vmdk
 echo "SHA256(test.ovf)=" `do_sha256 test.ovf` > test.mf
 sha256=`do_sha256 disk.vmdk | tr '0-5a-f6789' 'a-f0-58967'`
diff --git a/tests/test-v2v-i-ova-formats.sh b/tests/test-v2v-i-ova-formats.sh
index 1ade1d42..b9bab82e 100755
--- a/tests/test-v2v-i-ova-formats.sh
+++ b/tests/test-v2v-i-ova-formats.sh
@@ -41,7 +41,7 @@ pushd $d
 guestfish disk-create disk1.vmdk raw 10K
 sha=`do_sha1 disk1.vmdk`
 echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
-cp ../test-v2v-i-ova-formats.ovf .
+cp "$abs_srcdir/test-v2v-i-ova-formats.ovf" .
 
 for format in $formats; do
     case "$format" in
@@ -72,7 +72,7 @@ for format in $formats; do
     sed 's,[^ \t]*\(disk.*.vmdk\),\1,' > $d/source
 
     # Check the parsed source is what we expect.
-    diff -u test-v2v-i-ova-formats.expected $d/source
+    diff -u "$srcdir/test-v2v-i-ova-formats.expected" $d/source
 done
 
 rm -rf $d
diff --git a/tests/test-v2v-i-ova-good-checksums.sh b/tests/test-v2v-i-ova-good-checksums.sh
index 46c59d16..50c58675 100755
--- a/tests/test-v2v-i-ova-good-checksums.sh
+++ b/tests/test-v2v-i-ova-good-checksums.sh
@@ -39,7 +39,7 @@ mkdir $d
 pushd $d
 
 # Create the test OVA.
-cp ../test-v2v-i-ova-checksums.ovf test.ovf
+cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf
 cp ../windows.vmdk disk.vmdk
 
 # Test all types of checksum supported by the OVA format.
diff --git a/tests/test-v2v-i-ova-gz.sh b/tests/test-v2v-i-ova-gz.sh
index 2bf2f5ee..4498f5fb 100755
--- a/tests/test-v2v-i-ova-gz.sh
+++ b/tests/test-v2v-i-ova-gz.sh
@@ -38,7 +38,7 @@ guestfish disk-create disk1.vmdk raw 10K
 gzip disk1.vmdk
 sha=`do_sha1 disk1.vmdk.gz`
 echo -e "SHA1(disk1.vmdk.gz)= $sha\r" > disk1.mf
-cp ../test-v2v-i-ova-gz.ovf .
+cp "$abs_srcdir/test-v2v-i-ova-gz.ovf" .
 
 tar -cf test.ova test-v2v-i-ova-gz.ovf disk1.vmdk.gz disk1.mf
 popd
@@ -51,6 +51,6 @@ $VG virt-v2v --debug-gc --quiet \
 sed 's,[^ \t]*\(\.vmdk\),\1,' > $d/source
 
 # Check the parsed source is what we expect.
-diff -u test-v2v-i-ova-gz.expected $d/source
+diff -u "$srcdir/test-v2v-i-ova-gz.expected" $d/source
 
 rm -rf $d
diff --git a/tests/test-v2v-i-ova-invalid-manifest1.sh b/tests/test-v2v-i-ova-invalid-manifest1.sh
index ce54e2b4..fd9decb7 100755
--- a/tests/test-v2v-i-ova-invalid-manifest1.sh
+++ b/tests/test-v2v-i-ova-invalid-manifest1.sh
@@ -39,7 +39,7 @@ mkdir $d
 pushd $d
 
 # Create the test OVA.
-cp ../test-v2v-i-ova-checksums.ovf test.ovf
+cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf
 cp ../windows.vmdk disk.vmdk
 echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf
 echo "SHA1(disk.vmdk)=" `do_sha1 disk.vmdk` >> test.mf
diff --git a/tests/test-v2v-i-ova-invalid-manifest2.sh b/tests/test-v2v-i-ova-invalid-manifest2.sh
index efbc50b7..23936dd5 100755
--- a/tests/test-v2v-i-ova-invalid-manifest2.sh
+++ b/tests/test-v2v-i-ova-invalid-manifest2.sh
@@ -39,7 +39,7 @@ mkdir $d
 pushd $d
 
 # Create the test OVA.
-cp ../test-v2v-i-ova-checksums.ovf test.ovf
+cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf
 cp ../windows.vmdk disk.vmdk
 echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf
 echo "SHA1(disk.vmdk)=$(do_sha1 disk.vmdk)" >> test.mf
diff --git a/tests/test-v2v-i-ova-snapshots.sh b/tests/test-v2v-i-ova-snapshots.sh
index f74933ca..7c6c3950 100755
--- a/tests/test-v2v-i-ova-snapshots.sh
+++ b/tests/test-v2v-i-ova-snapshots.sh
@@ -51,7 +51,7 @@ sha=`do_sha1 disk1.vmdk.000000001`
 echo -e "SHA1(disk1.vmdk.000000001)= $sha\r" > disk1.mf
 sha=`do_sha1 disk1.vmdk.000000002`
 echo -e "SHA1(disk1.vmdk.000000002)= $sha\r" > disk1.mf
-cp ../test-v2v-i-ova-snapshots.ovf .
+cp "$abs_srcdir/test-v2v-i-ova-snapshots.ovf" .
 tar -cf test-snapshots.ova test-v2v-i-ova-snapshots.ovf disk1.vmdk.00000000? disk1.mf
 
 popd
@@ -68,11 +68,11 @@ if grep -sq json: $d/source ; then
     # Exact offset will vary because of tar.
     sed -i -e "s,\"[^\"]*/$d/,\"," \
            -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
-    diff -u test-v2v-i-ova-snapshots.expected2 $d/source
+    diff -u "$srcdir/test-v2v-i-ova-snapshots.expected2" $d/source
 else
     # normalize the output
     sed -i -e 's,[^ \t]*\(disk.*.vmdk\),\1,' $d/source
-    diff -u test-v2v-i-ova-snapshots.expected $d/source
+    diff -u "$srcdir/test-v2v-i-ova-snapshots.expected" $d/source
 fi
 
 rm -rf $d
diff --git a/tests/test-v2v-i-ova-subfolders.sh b/tests/test-v2v-i-ova-subfolders.sh
index be98d2c1..6b781460 100755
--- a/tests/test-v2v-i-ova-subfolders.sh
+++ b/tests/test-v2v-i-ova-subfolders.sh
@@ -32,7 +32,7 @@ d=test-v2v-i-ova-subfolders.d
 rm -rf $d
 mkdir -p $d/subfolder
 
-cp test-v2v-i-ova-subfolders.ovf $d/subfolder/
+cp "$srcdir/test-v2v-i-ova-subfolders.ovf" $d/subfolder/
 
 pushd $d/subfolder
 
@@ -57,11 +57,11 @@ if grep -sq json: $d/source ; then
     # Exact offset will vary because of tar.
     sed -i -e "s,\"[^\"]*/$d/,\"," \
            -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
-    diff -u test-v2v-i-ova-subfolders.expected2 $d/source
+    diff -u "$srcdir/test-v2v-i-ova-subfolders.expected2" $d/source
 else
     # normalize the output
     sed -i -e 's,[^ \t]*\(subfolder/disk.*\.vmdk\),\1,' $d/source
-    diff -u test-v2v-i-ova-subfolders.expected $d/source
+    diff -u "$srcdir/test-v2v-i-ova-subfolders.expected" $d/source
 fi
 
 rm -rf $d
diff --git a/tests/test-v2v-i-ova-tar.sh b/tests/test-v2v-i-ova-tar.sh
index 94586918..b77d3f71 100755
--- a/tests/test-v2v-i-ova-tar.sh
+++ b/tests/test-v2v-i-ova-tar.sh
@@ -39,7 +39,7 @@ pushd $d
 guestfish disk-create disk1.vmdk raw 10k
 sha=`do_sha1 disk1.vmdk`
 echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
-cp ../test-v2v-i-ova-tar.ovf .
+cp "$abs_srcdir/test-v2v-i-ova-tar.ovf" .
 tar -cf test-tar.ova test-v2v-i-ova-tar.ovf disk1.vmdk disk1.mf
 
 popd
@@ -56,11 +56,11 @@ if grep -sq json: $d/source ; then
     # Exact offset will vary because of tar.
     sed -i -e "s,\"[^\"]*/$d/,\"," \
            -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
-    diff -u test-v2v-i-ova-tar.expected2 $d/source
+    diff -u "$srcdir/test-v2v-i-ova-tar.expected2" $d/source
 else
     # normalize the output
     sed -i -e 's,[^ \t]*\(disk.*.vmdk\),\1,' $d/source
-    diff -u test-v2v-i-ova-tar.expected $d/source
+    diff -u "$srcdir/test-v2v-i-ova-tar.expected" $d/source
 fi
 
 
diff --git a/tests/test-v2v-i-ova-two-disks.sh b/tests/test-v2v-i-ova-two-disks.sh
index d5cca06a..ac09df60 100755
--- a/tests/test-v2v-i-ova-two-disks.sh
+++ b/tests/test-v2v-i-ova-two-disks.sh
@@ -43,7 +43,7 @@ echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf
 guestfish disk-create disk2.vmdk raw 100K
 sha=`do_sha1 disk2.vmdk`
 echo -e "SHA1(disk2.vmdk)= $sha\r" > disk2.mf
-cp ../test-v2v-i-ova-two-disks.ovf .
+cp "$abs_srcdir/test-v2v-i-ova-two-disks.ovf" .
 
 tar -cf test.ova test-v2v-i-ova-two-disks.ovf disk1.vmdk disk1.mf disk2.vmdk disk2.mf
 popd
@@ -61,11 +61,11 @@ if grep -sq json: $d/source ; then
     # Exact offset will vary because of tar.
     sed -i -e "s,\"[^\"]*/$d/,\"," \
            -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source
-    diff -u test-v2v-i-ova-two-disks.expected2 $d/source
+    diff -u "$srcdir/test-v2v-i-ova-two-disks.expected2" $d/source
 else
     # normalize the output
     sed -i -e 's,[^ \t]*\(disk.*.vmdk\),\1,' $d/source
-    diff -u test-v2v-i-ova-two-disks.expected $d/source
+    diff -u "$srcdir/test-v2v-i-ova-two-disks.expected" $d/source
 fi
 
 rm -rf $d
diff --git a/tests/test-v2v-i-ova.sh b/tests/test-v2v-i-ova.sh
index e36c68d0..f332f7b1 100755
--- a/tests/test-v2v-i-ova.sh
+++ b/tests/test-v2v-i-ova.sh
@@ -42,7 +42,7 @@ raw=TestOva-sda
 
 qemu-img convert $top_builddir/test-data/phony-guests/windows.img \
          -O vmdk $d/$vmdk
-cp $ovf $d/$ovf
+cp "$srcdir/$ovf" $d/$ovf
 sha1=`do_sha1 $d/$ovf`
 echo "SHA1($ovf)= $sha1" > $d/$mf
 sha256=`do_sha256 $d/$vmdk`
@@ -70,6 +70,6 @@ sed \
     < $d/TestOva.xml.old > $d/TestOva.xml
 
 # Check the libvirt XML output.
-diff -u test-v2v-i-ova.xml $d/TestOva.xml
+diff -u "$srcdir/test-v2v-i-ova.xml" $d/TestOva.xml
 
 rm -rf $d
diff --git a/tests/test-v2v-i-vmx.sh b/tests/test-v2v-i-vmx.sh
index 3822e742..0fdc99a3 100755
--- a/tests/test-v2v-i-vmx.sh
+++ b/tests/test-v2v-i-vmx.sh
@@ -43,7 +43,7 @@ for i in 1 2 3 4 5; do
     rm test-v2v-i-vmx-$i.actual.old
 
     # Check the output.
-    diff -u test-v2v-i-vmx-$i.expected test-v2v-i-vmx-$i.actual
+    diff -u "$srcdir/test-v2v-i-vmx-$i.expected" test-v2v-i-vmx-$i.actual
 done
 
 rm test-v2v-i-vmx-*.actual
diff --git a/tests/test-v2v-mac.sh b/tests/test-v2v-mac.sh
index 64198256..2ad2e43c 100755
--- a/tests/test-v2v-mac.sh
+++ b/tests/test-v2v-mac.sh
@@ -25,7 +25,7 @@ skip_if_skipped
 skip_if_backend uml
 skip_unless_phony_guest windows.img
 
-libvirt_uri="test://$abs_builddir/test-v2v-mac.xml"
+libvirt_uri="test://$abs_srcdir/test-v2v-mac.xml"
 f=$top_builddir/test-data/phony-guests/windows.img
 
 export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
@@ -52,6 +52,6 @@ sed -n '/interface/,/\/interface/p' $d/windows.xml |
   grep -v 'model type=' > $d/networks
 
 # Test that the output has mapped the networks and bridges correctly.
-diff -ur test-v2v-mac-expected.xml $d/networks
+diff -ur "$srcdir/test-v2v-mac-expected.xml" $d/networks
 
 rm -r $d
diff --git a/tests/test-v2v-networks-and-bridges.sh b/tests/test-v2v-networks-and-bridges.sh
index 5a2e645d..74aea4da 100755
--- a/tests/test-v2v-networks-and-bridges.sh
+++ b/tests/test-v2v-networks-and-bridges.sh
@@ -25,7 +25,7 @@ skip_if_skipped
 skip_if_backend uml
 skip_unless_phony_guest windows.img
 
-libvirt_uri="test://$abs_builddir/test-v2v-networks-and-bridges.xml"
+libvirt_uri="test://$abs_srcdir/test-v2v-networks-and-bridges.xml"
 f=$top_builddir/test-data/phony-guests/windows.img
 
 export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
@@ -55,6 +55,6 @@ sed -n '/interface/,/\/interface/p' $d/windows.xml |
   grep -v 'model type=' > $d/networks
 
 # Test that the output has mapped the networks and bridges correctly.
-diff -ur test-v2v-networks-and-bridges-expected.xml $d/networks
+diff -ur "$srcdir/test-v2v-networks-and-bridges-expected.xml" $d/networks
 
 rm -r $d
diff --git a/tests/test-v2v-o-rhv.sh b/tests/test-v2v-o-rhv.sh
index eb22ed95..98424732 100755
--- a/tests/test-v2v-o-rhv.sh
+++ b/tests/test-v2v-o-rhv.sh
@@ -81,6 +81,6 @@ sed -i \
   -e 's/\<ovf:vm_snapshot_id='"'$RE_UUID'/ovf:vm_snapshot_id='#UUID#'/g" \
   "$OVF"
 
-diff -u test-v2v-o-rhv.ovf.expected "$OVF"
+diff -u "$srcdir/test-v2v-o-rhv.ovf.expected" "$OVF"
 
 rm -r $d
diff --git a/tests/test-v2v-o-vdsm-options.sh b/tests/test-v2v-o-vdsm-options.sh
index e88414d0..0cabb1b8 100755
--- a/tests/test-v2v-o-vdsm-options.sh
+++ b/tests/test-v2v-o-vdsm-options.sh
@@ -90,7 +90,7 @@ sed -i \
   "$OVF"
 
 
-diff -u test-v2v-o-vdsm-options.ovf.expected \
+diff -u "$srcdir/test-v2v-o-vdsm-options.ovf.expected" \
   "$OVF"
 
 rm -r $d
diff --git a/tests/test-v2v-print-estimate.sh b/tests/test-v2v-print-estimate.sh
index a50e9a35..d3e1c864 100755
--- a/tests/test-v2v-print-estimate.sh
+++ b/tests/test-v2v-print-estimate.sh
@@ -32,7 +32,7 @@ echo "Actual:"
 du -s -B 1 ../test-data/phony-guests/windows.img
 
 $VG virt-v2v --debug-gc \
-    -i libvirtxml test-v2v-print-source.xml \
+    -i libvirtxml "$srcdir/test-v2v-print-source.xml" \
     -o local -os $(pwd) \
     --print-estimate \
     --machine-readable=file:$f
diff --git a/tests/test-v2v-print-source.sh b/tests/test-v2v-print-source.sh
index 2b3361ec..70fc2d60 100755
--- a/tests/test-v2v-print-source.sh
+++ b/tests/test-v2v-print-source.sh
@@ -29,7 +29,7 @@ rm -rf $d
 mkdir $d
 
 $VG virt-v2v --debug-gc \
-    -i libvirtxml test-v2v-print-source.xml \
+    -i libvirtxml "$srcdir/test-v2v-print-source.xml" \
     -o local -os $d \
     --print-source > $d/output
 
@@ -41,6 +41,6 @@ sed -e 's,/.*/windows.img,windows.img,' |
 grep -v '^$' \
 > $d/output
 
-diff -u test-v2v-print-source.expected $d/output
+diff -u "$srcdir/test-v2v-print-source.expected" $d/output
 
 rm -r $d
diff --git a/tests/test-v2v-sound.sh b/tests/test-v2v-sound.sh
index c31b4c46..b8e2ab78 100755
--- a/tests/test-v2v-sound.sh
+++ b/tests/test-v2v-sound.sh
@@ -25,7 +25,7 @@ skip_if_skipped
 skip_if_backend uml
 skip_unless_phony_guest windows.img
 
-libvirt_uri="test://$abs_builddir/test-v2v-sound.xml"
+libvirt_uri="test://$abs_srcdir/test-v2v-sound.xml"
 f=$top_builddir/test-data/phony-guests/windows.img
 
 export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
diff --git a/v2v/test-v2v-python-syntax.sh b/v2v/test-v2v-python-syntax.sh
index b167f461..035d92a2 100755
--- a/v2v/test-v2v-python-syntax.sh
+++ b/v2v/test-v2v-python-syntax.sh
@@ -29,7 +29,7 @@ python=python3
 
 # Checks the files are syntactically correct, but not very much else.
 for f in $files; do
-    $python -m py_compile $f
+    $python -m py_compile "$srcdir/$f"
 done
 
 # Checks the files correspond to PEP8 coding style.
@@ -40,6 +40,6 @@ if $python-pep8 --version >/dev/null 2>&1; then
         # E226 missing whitespace around arithmetic operator
         # E251 unexpected spaces around keyword / parameter equals
         # E302 expected 2 blank lines, found 1
-        $python-pep8 --ignore=E226,E251,E302 $f
+        $python-pep8 --ignore=E226,E251,E302 "$srcdir/$f"
     done
 fi
-- 
2.23.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]