[Libguestfs] [PATCH] tests: rename $SRCDIR to $srcdir

Pino Toscano ptoscano at redhat.com
Wed Oct 22 15:30:50 UTC 2014


No functional changes to the tests.
---
 tests/guests/Makefile.am                   | 12 ++++++------
 tests/guests/guest-aux/make-debian-img.sh  |  6 +++---
 tests/guests/guest-aux/make-fedora-img.pl  | 10 +++++-----
 tests/guests/guest-aux/make-ubuntu-img.sh  |  4 ++--
 tests/guests/guest-aux/make-windows-img.sh |  6 +++---
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am
index 62f5d14..88e0f57 100644
--- a/tests/guests/Makefile.am
+++ b/tests/guests/Makefile.am
@@ -75,7 +75,7 @@ fedora.img: guest-aux/make-fedora-img.pl \
 		guest-aux/fedora-journal.tar.xz \
 		guest-aux/fedora-name.db \
 		guest-aux/fedora-packages.db
-	SRCDIR=$(srcdir) LAYOUT=partitions $(top_builddir)/run --test $<
+	srcdir=$(srcdir) LAYOUT=partitions $(top_builddir)/run --test $<
 
 # Make a (dummy) Fedora image using md devices
 fedora-md1.img fedora-md2.img: stamp-fedora-md.img
@@ -85,27 +85,27 @@ stamp-fedora-md.img: guest-aux/make-fedora-img.pl \
 		guest-aux/fedora-name.db \
 		guest-aux/fedora-packages.db
 	rm -f $@
-	SRCDIR=$(srcdir) LAYOUT=partitions-md $(top_builddir)/run --test $<
+	srcdir=$(srcdir) LAYOUT=partitions-md $(top_builddir)/run --test $<
 	touch $@
 
 fedora-btrfs.img: guest-aux/make-fedora-img.pl \
 		guest-aux/fedora-journal.tar.xz \
 		guest-aux/fedora-name.db \
 		guest-aux/fedora-packages.db
-	SRCDIR=$(srcdir) LAYOUT=btrfs $(top_builddir)/run --test $<
+	srcdir=$(srcdir) LAYOUT=btrfs $(top_builddir)/run --test $<
 
 # Make a (dummy) Debian image.
 debian.img: guest-aux/make-debian-img.sh
-	SRCDIR=$(srcdir) $(top_builddir)/run --test $<
+	srcdir=$(srcdir) $(top_builddir)/run --test $<
 
 # Make a (dummy) Ubuntu image.
 ubuntu.img: guest-aux/make-ubuntu-img.sh
-	SRCDIR=$(srcdir) $(top_builddir)/run --test $<
+	srcdir=$(srcdir) $(top_builddir)/run --test $<
 
 # Make a (dummy) Windows image.
 windows.img: guest-aux/make-windows-img.sh \
 	     guest-aux/windows-software guest-aux/windows-system
-	SRCDIR=$(srcdir) $(top_builddir)/run --test $<
+	srcdir=$(srcdir) $(top_builddir)/run --test $<
 
 guests-all-good.xml: guest-aux/make-guests-all-good.pl $(disk_images)
 	rm -f $@ $@-t
diff --git a/tests/guests/guest-aux/make-debian-img.sh b/tests/guests/guest-aux/make-debian-img.sh
index 95228ab..a86d939 100755
--- a/tests/guests/guest-aux/make-debian-img.sh
+++ b/tests/guests/guest-aux/make-debian-img.sh
@@ -82,11 +82,11 @@ upload fstab.tmp.$$ /etc/fstab
 write /etc/debian_version "5.0.1"
 write /etc/hostname "debian.invalid"
 
-upload $SRCDIR/guest-aux/debian-packages /var/lib/dpkg/status
+upload $srcdir/guest-aux/debian-packages /var/lib/dpkg/status
 
-upload $SRCDIR/../data/bin-x86_64-dynamic /bin/ls
+upload $srcdir/../data/bin-x86_64-dynamic /bin/ls
 
-upload $SRCDIR/guest-aux/debian-syslog /var/log/syslog
+upload $srcdir/guest-aux/debian-syslog /var/log/syslog
 
 mkdir /boot/grub
 touch /boot/grub/grub.conf
diff --git a/tests/guests/guest-aux/make-fedora-img.pl b/tests/guests/guest-aux/make-fedora-img.pl
index 1c23b6d..a693eed 100755
--- a/tests/guests/guest-aux/make-fedora-img.pl
+++ b/tests/guests/guest-aux/make-fedora-img.pl
@@ -44,7 +44,7 @@ my $g = Sys::Guestfs->new ();
 
 my $bootdev;
 
-foreach ('LAYOUT', 'SRCDIR') {
+foreach ('LAYOUT', 'srcdir') {
   defined ($ENV{$_}) or die "Missing environment variable: $_";
 }
 
@@ -217,12 +217,12 @@ if (-f "mdadm.tmp.$$") {
   unlink ("mdadm.tmp.$$") or die;
 }
 
-$g->upload ($ENV{SRCDIR}.'/guest-aux/fedora-name.db', '/var/lib/rpm/Name');
-$g->upload ($ENV{SRCDIR}.'/guest-aux/fedora-packages.db', '/var/lib/rpm/Packages');
+$g->upload ($ENV{srcdir}.'/guest-aux/fedora-name.db', '/var/lib/rpm/Name');
+$g->upload ($ENV{srcdir}.'/guest-aux/fedora-packages.db', '/var/lib/rpm/Packages');
 
-$g->upload ($ENV{SRCDIR}.'/../data/bin-x86_64-dynamic', '/bin/ls');
+$g->upload ($ENV{srcdir}.'/../data/bin-x86_64-dynamic', '/bin/ls');
 
-$g->txz_in ($ENV{SRCDIR}.'/guest-aux/fedora-journal.tar.xz', '/var/log/journal');
+$g->txz_in ($ENV{srcdir}.'/guest-aux/fedora-journal.tar.xz', '/var/log/journal');
 
 $g->mkdir ('/boot/grub');
 $g->touch ('/boot/grub/grub.conf');
diff --git a/tests/guests/guest-aux/make-ubuntu-img.sh b/tests/guests/guest-aux/make-ubuntu-img.sh
index 183985b..49cc9fc 100755
--- a/tests/guests/guest-aux/make-ubuntu-img.sh
+++ b/tests/guests/guest-aux/make-ubuntu-img.sh
@@ -73,9 +73,9 @@ write /etc/debian_version "5.0.1"
 upload release.tmp.$$ /etc/lsb-release
 write /etc/hostname "ubuntu.invalid"
 
-upload $SRCDIR/guest-aux/debian-packages /var/lib/dpkg/status
+upload $srcdir/guest-aux/debian-packages /var/lib/dpkg/status
 
-upload $SRCDIR/../data/bin-x86_64-dynamic /bin/ls
+upload $srcdir/../data/bin-x86_64-dynamic /bin/ls
 
 mkdir /boot/grub
 touch /boot/grub/grub.conf
diff --git a/tests/guests/guest-aux/make-windows-img.sh b/tests/guests/guest-aux/make-windows-img.sh
index 575c2ee..fa6fa09 100755
--- a/tests/guests/guest-aux/make-windows-img.sh
+++ b/tests/guests/guest-aux/make-windows-img.sh
@@ -59,10 +59,10 @@ mount /dev/sda2 /
 mkdir-p /Windows/System32/Config
 mkdir-p /Windows/System32/Drivers
 
-upload $SRCDIR/guest-aux/windows-software /Windows/System32/Config/SOFTWARE
-upload $SRCDIR/guest-aux/windows-system /Windows/System32/Config/SYSTEM
+upload $srcdir/guest-aux/windows-software /Windows/System32/Config/SOFTWARE
+upload $srcdir/guest-aux/windows-system /Windows/System32/Config/SYSTEM
 
-upload $SRCDIR/../data/bin-win32.exe /Windows/System32/cmd.exe
+upload $srcdir/../data/bin-win32.exe /Windows/System32/cmd.exe
 
 mkdir "/Program Files"
 touch /autoexec.bat
-- 
1.9.3




More information about the Libguestfs mailing list