tests: switch to config.sh for xmllint

Instead of generating test scripts from configure with the path of
xmllint, export that path in config.sh, so the tests can be static
scripts again.
This commit is contained in:
Pino Toscano
2019-12-16 11:19:00 +01:00
parent 54a9d04f72
commit 68f5c27ada
6 changed files with 5 additions and 12 deletions

3
.gitignore vendored
View File

@@ -309,9 +309,6 @@ Makefile.in
/haskell/Guestfs.hs
/inspector/actual-*.xml
/inspector/stamp-virt-inspector.pod
/inspector/test-virt-inspector.sh
/inspector/test-virt-inspector-luks.sh
/inspector/test-xmllint.sh
/inspector/virt-inspector
/inspector/virt-inspector.1
/installcheck.sh

View File

@@ -18,3 +18,5 @@
# This shell script contains the results of some configure checks,
# mostly used in other shell scripts.
export XMLLINT="@XMLLINT@"

View File

@@ -197,12 +197,6 @@ mkdir -p \
dnl http://www.mail-archive.com/automake@gnu.org/msg10204.html
AC_CONFIG_FILES([appliance/libguestfs-make-fixed-appliance],
[chmod +x,-w appliance/libguestfs-make-fixed-appliance])
AC_CONFIG_FILES([inspector/test-xmllint.sh],
[chmod +x,-w inspector/test-xmllint.sh])
AC_CONFIG_FILES([inspector/test-virt-inspector.sh],
[chmod +x,-w inspector/test-virt-inspector.sh])
AC_CONFIG_FILES([inspector/test-virt-inspector-luks.sh],
[chmod +x,-w inspector/test-virt-inspector-luks.sh])
AC_CONFIG_FILES([installcheck.sh],
[chmod +x,-w installcheck.sh])
AC_CONFIG_FILES([ocaml-dep.sh],

View File

@@ -35,7 +35,7 @@ if [ -s "$f" ]; then
echo FEDORA |
$VG virt-inspector --keys-from-stdin --format=raw -a "$f" > "actual-$b.xml"
# Check the generated output validate the schema.
@XMLLINT@ --noout --relaxng "$srcdir/virt-inspector.rng" "actual-$b.xml"
$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"

View File

@@ -31,7 +31,7 @@ for f in ../test-data/phony-guests/{debian,fedora,ubuntu,archlinux,coreos,window
b=$(basename "$f" .xml)
$VG virt-inspector --format=raw -a "$f" > "actual-$b.xml"
# Check the generated output validate the schema.
@XMLLINT@ --noout --relaxng "$srcdir/virt-inspector.rng" "actual-$b.xml"
$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"

View File

@@ -22,5 +22,5 @@ $TEST_FUNCTIONS
skip_if_skipped
for f in $srcdir/example-*.xml; do
@XMLLINT@ --noout --relaxng $srcdir/virt-inspector.rng $f
$XMLLINT --noout --relaxng $srcdir/virt-inspector.rng $f
done