Merge branch 'fix-make-run-xmltest-for-out-of-source-builds'

This commit is contained in:
Sebastian Pipping 2019-08-11 21:12:49 +02:00
commit 322ca04c9a
3 changed files with 22 additions and 11 deletions

View File

@ -17,6 +17,7 @@ Release x.x.x xxx xxx xx xxxx
--without-getrandom
--with-sys-getrandom
--without-sys-getrandom
Autotools: Fix "make run-xmltest" for out-of-source builds
#244 #264 CMake: Add argument -DXML_ATTR_INFO=ON
#239 #277 CMake: Add arguments
-DUSE_GETRANDOM=(ON|OFF|AUTO)

View File

@ -130,7 +130,8 @@ run-benchmark:
$(MAKE) -C tests/benchmark
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
tests/xmlts.zip:
.PHONY: download-xmlts-zip
download-xmlts-zip:
if test "$(XMLTS_ZIP)" = ""; then \
wget --output-document=tests/xmlts.zip \
https://www.w3.org/XML/Test/xmlts20080827.zip; \
@ -138,16 +139,26 @@ tests/xmlts.zip:
cp $(XMLTS_ZIP) tests/xmlts.zip; \
fi
tests/xmlconf: tests/xmlts.zip
tests/xmlts.zip:
$(MAKE) download-xmlts-zip
.PHONY: extract-xmlts-zip
extract-xmlts-zip: tests/xmlts.zip
[ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround
cd tests && unzip -q xmlts.zip
tests/xmlconf: tests/xmlts.zip
$(MAKE) extract-xmlts-zip
.PHONY: run-xmltest
run-xmltest: tests/xmlconf
if WITH_XMLWF
[ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround
$(MAKE) -C lib
$(MAKE) -C xmlwf
tests/xmltest.sh "$(PWD)/run.sh $(PWD)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee tests/xmltest.log
./fix-xmltest-log.sh tests/xmltest.log
diff -u tests/xmltest.log.expected tests/xmltest.log
$(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
$(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
else
@echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
@echo 'ERROR: Please re-configure without --without-xmlwf.' >&2

View File

@ -22,17 +22,16 @@
shopt -s nullglob
# Note: OUTPUT must terminate with the directory separator.
OUTPUT="$PWD/tests/out/"
TS="$PWD/tests/"
MYDIR="`dirname \"$0\"`"
cd "$MYDIR"
MYDIR="`pwd`"
XMLWF="${1:-`dirname \"$MYDIR\"`/xmlwf/xmlwf}"
# XMLWF=/usr/local/bin/xmlwf
TS="$MYDIR"
# OUTPUT must terminate with the directory separator.
OUTPUT="$TS/out/"
# OUTPUT=/home/tmp/xml-testsuite-out/
# Unicode-aware diff utility
DIFF="$TS/udiffer.py"
DIFF="${MYDIR}/udiffer.py"
# RunXmlwfNotWF file reldir