Make sure to properly reference to files in the source directory.
---
align/test-virt-alignment-scan-docs.sh | 2 +-
builder/templates/Makefile.am | 4 +++-
builder/templates/validate.sh | 4 ++--
builder/test-docs.sh | 4 ++--
builder/test-virt-index-validate.sh | 10 +++++-----
cat/test-docs.sh | 10 +++++-----
customize/test-virt-customize-docs.sh | 2 +-
df/test-virt-df-docs.sh | 2 +-
dib/test-virt-dib-docs.sh | 2 +-
diff/test-virt-diff-docs.sh | 2 +-
edit/test-virt-edit-docs.sh | 2 +-
fish/test-docs.sh | 2 +-
format/test-virt-format-docs.sh | 2 +-
fuse/test-docs.sh | 4 ++--
get-kernel/test-virt-get-kernel-docs.sh | 2 +-
inspector/test-virt-inspector-docs.sh | 2 +-
inspector/test-virt-inspector-luks.sh | 2 +-
inspector/test-virt-inspector.sh | 2 +-
make-fs/test-virt-make-fs-docs.sh | 2 +-
rescue/test-virt-rescue-docs.sh | 2 +-
resize/test-virt-resize-docs.sh | 2 +-
sparsify/test-virt-sparsify-docs.sh | 2 +-
sysprep/test-virt-sysprep-docs.sh | 2 +-
test-tool/test-libguestfs-test-tool-docs.sh | 2 +-
24 files changed, 37 insertions(+), 35 deletions(-)
diff --git a/align/test-virt-alignment-scan-docs.sh
b/align/test-virt-alignment-scan-docs.sh
index a47cb3fc0..6a37712bb 100755
--- a/align/test-virt-alignment-scan-docs.sh
+++ b/align/test-virt-alignment-scan-docs.sh
@@ -21,4 +21,4 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-alignment-scan.pod virt-alignment-scan
+$top_srcdir/podcheck.pl "$srcdir/virt-alignment-scan.pod" virt-alignment-scan
diff --git a/builder/templates/Makefile.am b/builder/templates/Makefile.am
index b070dba4d..5e84467fc 100644
--- a/builder/templates/Makefile.am
+++ b/builder/templates/Makefile.am
@@ -39,7 +39,9 @@ $(top_builddir)/website/download/builder/index: $(index_fragments)
@echo " gpg --clearsign --armor $@"
# Validates the index file.
-TESTS_ENVIRONMENT = $(top_builddir)/run --test
+TESTS_ENVIRONMENT = \
+ top_srcdir="$(top_srcdir)" \
+ $(top_builddir)/run --test
TESTS = validate.sh
check-valgrind:
diff --git a/builder/templates/validate.sh b/builder/templates/validate.sh
index 2796be39b..b760bbf25 100755
--- a/builder/templates/validate.sh
+++ b/builder/templates/validate.sh
@@ -24,8 +24,8 @@ fn=test-filename-for-index-validate
rm -f $fn
touch $fn
-$VG virt-index-validate ../../website/download/builder/index
-$VG virt-index-validate ../../website/download/builder/index.asc
+$VG virt-index-validate "$top_srcdir/website/download/builder/index"
+$VG virt-index-validate "$top_srcdir/website/download/builder/index.asc"
$VG virt-index-validate $fn
rm $fn
diff --git a/builder/test-docs.sh b/builder/test-docs.sh
index 7cac4fe2d..95b16961e 100755
--- a/builder/test-docs.sh
+++ b/builder/test-docs.sh
@@ -21,9 +21,9 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-builder.pod virt-builder \
+$top_srcdir/podcheck.pl "$srcdir/virt-builder.pod" virt-builder \
--insert $top_srcdir/common/mlcustomize/customize-synopsis.pod:__CUSTOMIZE_SYNOPSIS__
\
--insert $top_srcdir/common/mlcustomize/customize-options.pod:__CUSTOMIZE_OPTIONS__ \
--ignore=--check-signatures,--no-check-signatures
-$srcdir/../podcheck.pl virt-builder-repository.pod virt-builder-repository
+$srcdir/../podcheck.pl "$srcdir/virt-builder-repository.pod"
virt-builder-repository
diff --git a/builder/test-virt-index-validate.sh b/builder/test-virt-index-validate.sh
index 851285a1e..96304394f 100755
--- a/builder/test-virt-index-validate.sh
+++ b/builder/test-virt-index-validate.sh
@@ -19,8 +19,8 @@
export LANG=C
set -e
-! $VG virt-index-validate test-virt-index-validate-bad-1
-$VG virt-index-validate test-virt-index-validate-good-1
-$VG virt-index-validate test-virt-index-validate-good-2
-$VG virt-index-validate test-virt-index-validate-good-3
-$VG virt-index-validate test-virt-index-validate-good-4
+! $VG virt-index-validate "$srcdir/test-virt-index-validate-bad-1"
+$VG virt-index-validate "$srcdir/test-virt-index-validate-good-1"
+$VG virt-index-validate "$srcdir/test-virt-index-validate-good-2"
+$VG virt-index-validate "$srcdir/test-virt-index-validate-good-3"
+$VG virt-index-validate "$srcdir/test-virt-index-validate-good-4"
diff --git a/cat/test-docs.sh b/cat/test-docs.sh
index 0d6d5461a..cf6a40262 100755
--- a/cat/test-docs.sh
+++ b/cat/test-docs.sh
@@ -21,14 +21,14 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-cat.pod virt-cat \
+$top_srcdir/podcheck.pl "$srcdir/virt-cat.pod" virt-cat \
--path $top_srcdir/common/options
-$top_srcdir/podcheck.pl virt-filesystems.pod virt-filesystems \
+$top_srcdir/podcheck.pl "$srcdir/virt-filesystems.pod" virt-filesystems \
--path $top_srcdir/common/options
-$top_srcdir/podcheck.pl virt-log.pod virt-log \
+$top_srcdir/podcheck.pl "$srcdir/virt-log.pod" virt-log \
--path $top_srcdir/common/options
-$top_srcdir/podcheck.pl virt-ls.pod virt-ls \
+$top_srcdir/podcheck.pl "$srcdir/virt-ls.pod" virt-ls \
--path $top_srcdir/common/options \
--ignore=--checksums,--extra-stat,--time,--uid
-$top_srcdir/podcheck.pl virt-tail.pod virt-tail \
+$top_srcdir/podcheck.pl "$srcdir/virt-tail.pod" virt-tail \
--path $top_srcdir/common/options
diff --git a/customize/test-virt-customize-docs.sh
b/customize/test-virt-customize-docs.sh
index 9a8da5180..91ed39587 100755
--- a/customize/test-virt-customize-docs.sh
+++ b/customize/test-virt-customize-docs.sh
@@ -20,7 +20,7 @@ set -e
$TEST_FUNCTIONS
-$top_srcdir/podcheck.pl virt-customize.pod virt-customize \
+$top_srcdir/podcheck.pl "$srcdir/virt-customize.pod" virt-customize \
--path $top_srcdir/common/options \
--insert $top_srcdir/common/mlcustomize/customize-synopsis.pod:__CUSTOMIZE_SYNOPSIS__
\
--insert $top_srcdir/common/mlcustomize/customize-options.pod:__CUSTOMIZE_OPTIONS__ \
diff --git a/df/test-virt-df-docs.sh b/df/test-virt-df-docs.sh
index 94061d1a8..76a933e2b 100755
--- a/df/test-virt-df-docs.sh
+++ b/df/test-virt-df-docs.sh
@@ -20,4 +20,4 @@ set -e
$TEST_FUNCTIONS
-$top_srcdir/podcheck.pl virt-df.pod virt-df
+$top_srcdir/podcheck.pl "$srcdir/virt-df.pod" virt-df
diff --git a/dib/test-virt-dib-docs.sh b/dib/test-virt-dib-docs.sh
index 3363c9e59..2ce7223f3 100755
--- a/dib/test-virt-dib-docs.sh
+++ b/dib/test-virt-dib-docs.sh
@@ -20,4 +20,4 @@ set -e
$TEST_FUNCTIONS
-$top_srcdir/podcheck.pl virt-dib.pod virt-dib
+$top_srcdir/podcheck.pl "$srcdir/virt-dib.pod" virt-dib
diff --git a/diff/test-virt-diff-docs.sh b/diff/test-virt-diff-docs.sh
index d0d93cfd2..495befb03 100755
--- a/diff/test-virt-diff-docs.sh
+++ b/diff/test-virt-diff-docs.sh
@@ -20,6 +20,6 @@ set -e
$TEST_FUNCTIONS
-$top_srcdir/podcheck.pl virt-diff.pod virt-diff \
+$top_srcdir/podcheck.pl "$srcdir/virt-diff.pod" virt-diff \
--path $top_srcdir/common/options \
--ignore=--checksums,--dir-link,--dir-nlink,--dir-nlinks,--dir-time,--extra-stat,--time,--uid,--xattr
diff --git a/edit/test-virt-edit-docs.sh b/edit/test-virt-edit-docs.sh
index 7805d7e1d..ce26bebd1 100755
--- a/edit/test-virt-edit-docs.sh
+++ b/edit/test-virt-edit-docs.sh
@@ -20,5 +20,5 @@ set -e
$TEST_FUNCTIONS
-$top_srcdir/podcheck.pl virt-edit.pod virt-edit \
+$top_srcdir/podcheck.pl "$srcdir/virt-edit.pod" virt-edit \
--path $top_srcdir/common/options
diff --git a/fish/test-docs.sh b/fish/test-docs.sh
index 7e9f9928e..52f482906 100755
--- a/fish/test-docs.sh
+++ b/fish/test-docs.sh
@@ -21,6 +21,6 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl guestfish.pod guestfish \
+$top_srcdir/podcheck.pl "$srcdir/guestfish.pod" guestfish \
--path $srcdir --path $top_srcdir/common/options \
--ignore=-D
diff --git a/format/test-virt-format-docs.sh b/format/test-virt-format-docs.sh
index 27275f08b..866d33214 100755
--- a/format/test-virt-format-docs.sh
+++ b/format/test-virt-format-docs.sh
@@ -21,4 +21,4 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-format.pod virt-format
+$top_srcdir/podcheck.pl "$srcdir/virt-format.pod" virt-format
diff --git a/fuse/test-docs.sh b/fuse/test-docs.sh
index 0edc25658..29db079bd 100755
--- a/fuse/test-docs.sh
+++ b/fuse/test-docs.sh
@@ -21,9 +21,9 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl guestmount.pod guestmount \
+$top_srcdir/podcheck.pl "$srcdir/guestmount.pod" guestmount \
--path $top_srcdir/common/options
# guestunmount doesn't implement bash completion, so we cannot
# test it at the moment. XXX
-#$top_srcdir/podcheck.pl guestunmount.pod guestunmount
+#$top_srcdir/podcheck.pl "$srcdir/guestunmount.pod" guestunmount
diff --git a/get-kernel/test-virt-get-kernel-docs.sh
b/get-kernel/test-virt-get-kernel-docs.sh
index 40bb7334d..206ca7f24 100755
--- a/get-kernel/test-virt-get-kernel-docs.sh
+++ b/get-kernel/test-virt-get-kernel-docs.sh
@@ -21,5 +21,5 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-get-kernel.pod virt-get-kernel \
+$top_srcdir/podcheck.pl "$srcdir/virt-get-kernel.pod" virt-get-kernel \
--path $top_srcdir/common/options
diff --git a/inspector/test-virt-inspector-docs.sh
b/inspector/test-virt-inspector-docs.sh
index 11ee6518f..bbfc8ff1c 100755
--- a/inspector/test-virt-inspector-docs.sh
+++ b/inspector/test-virt-inspector-docs.sh
@@ -21,5 +21,5 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-inspector.pod virt-inspector \
+$top_srcdir/podcheck.pl "$srcdir/virt-inspector.pod" virt-inspector \
--path $top_srcdir/common/options
diff --git a/inspector/test-virt-inspector-luks.sh
b/inspector/test-virt-inspector-luks.sh
index 9cb062ec4..60aba1f08 100755
--- a/inspector/test-virt-inspector-luks.sh
+++ b/inspector/test-virt-inspector-luks.sh
@@ -38,5 +38,5 @@ if [ -s "$f" ]; then
$XMLLINT --noout --relaxng "$srcdir/virt-inspector.rng"
"actual-$b.xml"
# This 'diff' command will fail (because of -e option) if there
# are any differences.
- diff -ur $diff_ignore "expected-$b.xml" "actual-$b.xml"
+ diff -ur $diff_ignore "$srcdir/expected-$b.xml" "actual-$b.xml"
fi
diff --git a/inspector/test-virt-inspector.sh b/inspector/test-virt-inspector.sh
index 139e68e42..430b4c7bb 100755
--- a/inspector/test-virt-inspector.sh
+++ b/inspector/test-virt-inspector.sh
@@ -34,7 +34,7 @@ for f in
../test-data/phony-guests/{debian,fedora,ubuntu,archlinux,coreos,window
$XMLLINT --noout --relaxng "$srcdir/virt-inspector.rng"
"actual-$b.xml"
# This 'diff' command will fail (because of -e option) if there
# are any differences.
- diff -ur $diff_ignore "expected-$b.xml" "actual-$b.xml"
+ diff -ur $diff_ignore "$srcdir/expected-$b.xml"
"actual-$b.xml"
fi
done
diff --git a/make-fs/test-virt-make-fs-docs.sh b/make-fs/test-virt-make-fs-docs.sh
index c6df103ca..a4aa7ac51 100755
--- a/make-fs/test-virt-make-fs-docs.sh
+++ b/make-fs/test-virt-make-fs-docs.sh
@@ -21,4 +21,4 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-make-fs.pod virt-make-fs --ignore=--debug
+$top_srcdir/podcheck.pl "$srcdir/virt-make-fs.pod" virt-make-fs
--ignore=--debug
diff --git a/rescue/test-virt-rescue-docs.sh b/rescue/test-virt-rescue-docs.sh
index e5fbf26f4..8ec6c0160 100755
--- a/rescue/test-virt-rescue-docs.sh
+++ b/rescue/test-virt-rescue-docs.sh
@@ -21,5 +21,5 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-rescue.pod virt-rescue \
+$top_srcdir/podcheck.pl "$srcdir/virt-rescue.pod" virt-rescue \
--ignore=--suggest
diff --git a/resize/test-virt-resize-docs.sh b/resize/test-virt-resize-docs.sh
index 8245655e7..a9e4a4ddf 100755
--- a/resize/test-virt-resize-docs.sh
+++ b/resize/test-virt-resize-docs.sh
@@ -21,5 +21,5 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-resize.pod virt-resize \
+$top_srcdir/podcheck.pl "$srcdir/virt-resize.pod" virt-resize \
--ignore=--LVexpand,--lv-expand,--lvexpand,--dryrun
diff --git a/sparsify/test-virt-sparsify-docs.sh b/sparsify/test-virt-sparsify-docs.sh
index 6c2bd8f89..01d390c79 100755
--- a/sparsify/test-virt-sparsify-docs.sh
+++ b/sparsify/test-virt-sparsify-docs.sh
@@ -21,6 +21,6 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-sparsify.pod virt-sparsify \
+$top_srcdir/podcheck.pl "$srcdir/virt-sparsify.pod" virt-sparsify \
--path $top_srcdir/common/options \
--ignore=--inplace
diff --git a/sysprep/test-virt-sysprep-docs.sh b/sysprep/test-virt-sysprep-docs.sh
index b31e0f097..51500b5e9 100755
--- a/sysprep/test-virt-sysprep-docs.sh
+++ b/sysprep/test-virt-sysprep-docs.sh
@@ -21,7 +21,7 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-sysprep.pod virt-sysprep \
+$top_srcdir/podcheck.pl "$srcdir/virt-sysprep.pod" virt-sysprep \
--path $top_srcdir/common/options \
--insert sysprep-extra-options.pod:__EXTRA_OPTIONS__ \
--insert sysprep-operations.pod:__OPERATIONS__ \
diff --git a/test-tool/test-libguestfs-test-tool-docs.sh
b/test-tool/test-libguestfs-test-tool-docs.sh
index 234a1408f..589fe8bb0 100755
--- a/test-tool/test-libguestfs-test-tool-docs.sh
+++ b/test-tool/test-libguestfs-test-tool-docs.sh
@@ -21,5 +21,5 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl libguestfs-test-tool.pod libguestfs-test-tool \
+$top_srcdir/podcheck.pl "$srcdir/libguestfs-test-tool.pod" libguestfs-test-tool
\
--ignore=-?
--
2.23.0