[Libguestfs] [PATCH 2/3] tests: fix srcdir!=builddir runs

Pino Toscano ptoscano at redhat.com
Fri May 2 10:29:08 UTC 2014


Export $(srcdir) for the tests, so a test script which invokes other
script(s) can locate them properly.
---
 tests/Makefile.am                    | 2 ++
 tests/test-binaries-exist-network.sh | 2 +-
 tests/test-build-bash-network.sh     | 2 +-
 tests/test-harder-network.sh         | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 03c97b3..dc73737 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,3 +33,5 @@ TESTS += \
 	test-binaries-exist-network.sh \
 	test-harder-network.sh
 endif
+
+TESTS_ENVIRONMENT = srcdir='$(srcdir)'
diff --git a/tests/test-binaries-exist-network.sh b/tests/test-binaries-exist-network.sh
index 19c3830..3fba38e 100755
--- a/tests/test-binaries-exist-network.sh
+++ b/tests/test-binaries-exist-network.sh
@@ -1,2 +1,2 @@
 #!/bin/sh
-USE_NETWORK=1 ./test-binaries-exist.sh
+USE_NETWORK=1 $srcdir/test-binaries-exist.sh
diff --git a/tests/test-build-bash-network.sh b/tests/test-build-bash-network.sh
index a80da4d..5c55243 100755
--- a/tests/test-build-bash-network.sh
+++ b/tests/test-build-bash-network.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-USE_NETWORK=1 ./test-build-bash.sh
+USE_NETWORK=1 $srcdir/test-build-bash.sh
diff --git a/tests/test-harder-network.sh b/tests/test-harder-network.sh
index d1c1e99..0acdabd 100755
--- a/tests/test-harder-network.sh
+++ b/tests/test-harder-network.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-USE_NETWORK=1 ./test-harder.sh
+USE_NETWORK=1 $srcdir/test-harder.sh
-- 
1.9.0




More information about the Libguestfs mailing list