tests: fix srcdir references

Make sure to properly reference to files in the source directory.
This commit is contained in:
Pino Toscano
2019-12-17 15:11:04 +01:00
parent dd99b6f68d
commit 78a18b20e1
24 changed files with 37 additions and 35 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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__ \

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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__ \

View File

@@ -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=-?