From 17dcf52606b3d8c0464142e39d61eb4df8eb58ee Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 00:39:40 +0200 Subject: [PATCH 1/6] Makefile.am: Use $(srcdir) and $(*builddir) in target "run-xmltest" --- expat/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/expat/Makefile.am b/expat/Makefile.am index 2d8b66c8..04c59937 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -145,9 +145,9 @@ tests/xmlconf: tests/xmlts.zip run-xmltest: tests/xmlconf if WITH_XMLWF $(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 From ef5be9f1bbe61cccf4d7bd56891d6aa0bc22221e Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 00:48:55 +0200 Subject: [PATCH 2/6] Makefile.am: Support direct "./configure && make run-xmltest" --- expat/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/expat/Makefile.am b/expat/Makefile.am index 04c59937..4de3f41d 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -144,6 +144,7 @@ tests/xmlconf: tests/xmlts.zip .PHONY: run-xmltest run-xmltest: tests/xmlconf if WITH_XMLWF + $(MAKE) -C lib $(MAKE) -C xmlwf $(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 From dc6e29867927aba63f3250b17c1f10179d8c212f Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 00:57:18 +0200 Subject: [PATCH 3/6] xmltest.sh: Fix for out-of-source builds --- expat/tests/xmltest.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/expat/tests/xmltest.sh b/expat/tests/xmltest.sh index 2b8cb196..6d56ab52 100755 --- a/expat/tests/xmltest.sh +++ b/expat/tests/xmltest.sh @@ -22,17 +22,17 @@ 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 From 3cb24b6e5965597f8204a8a9981b9ddf3f5cfcff Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 18:15:55 +0200 Subject: [PATCH 4/6] xmltest.sh: Remove dead code --- expat/tests/xmltest.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/expat/tests/xmltest.sh b/expat/tests/xmltest.sh index 6d56ab52..3375020b 100755 --- a/expat/tests/xmltest.sh +++ b/expat/tests/xmltest.sh @@ -30,7 +30,6 @@ MYDIR="`dirname \"$0\"`" cd "$MYDIR" MYDIR="`pwd`" XMLWF="${1:-`dirname \"$MYDIR\"`/xmlwf/xmlwf}" -# XMLWF=/usr/local/bin/xmlwf # Unicode-aware diff utility DIFF="${MYDIR}/udiffer.py" From d4ed0019a9072dec0d11ecf7c2b99a9c7adb3ceb Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 18:08:44 +0200 Subject: [PATCH 5/6] Makefile.am: Make "run-xmltest" more robust Robust towards existing file $(srcdir)/tests/xmlts.zip Robust towards existing directory $(srcdir)/tests/xmlconf/ Because if make finds the in $(srcdir) and does not create them in $(builddir). --- expat/Makefile.am | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/expat/Makefile.am b/expat/Makefile.am index 4de3f41d..f5a49ea9 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -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,12 +139,21 @@ 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 $(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log From c76f2c4690b91f10c411966a96474b10cefa689a Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 18:51:46 +0200 Subject: [PATCH 6/6] Changes: Document out-of-source fix to "make run-xmltest" --- expat/Changes | 1 + 1 file changed, 1 insertion(+) diff --git a/expat/Changes b/expat/Changes index c7cd0de2..33cf7d64 100644 --- a/expat/Changes +++ b/expat/Changes @@ -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)