Skip to contentSkip to conversation

libxml2-ptest: various fixes

PATCH New Juro Bystricky 1 participant 4 messages Sep 25, 2017

lore
Share & tools
lore
#0 lore raw

cover libxml2-ptest: various fixes

This patch-set contains three independent patches for libxml2-ptest. The first one removes all build host references from the libxml2-ptest package. While testing this patch, I noticed that some test were failing, but for unrelated reasons. I added two fixes that address two different causes of failures. With these fixes we get 133 tests passed, 0 failed. (Previously it was 36 passed 3 failed, or something like that)

Juro Bystricky (3):
libxml2-ptest: improve reproducibility
libxml2-ptest: support for encoding ISO-8859-5
libxml2-ptest: set LC_ALL=en_US.UTF-8

 meta/recipes-core/libxml/libxml2/run-ptest |  1 +
 meta/recipes-core/libxml/libxml2_2.9.4.bb  | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/3 libxml2-ptest: improve reproducibility

Remove various build host references from libxml-ptest package.

[YOCTO #11997]

---
 meta/recipes-core/libxml/libxml2_2.9.4.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta/recipes-core/libxml/libxml2_2.9.4.bb +11 -0
index 107539b..15d5e36 100644
@@ -89,6 +89,17 @@ do_install_ptest () {
 		grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
 			xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
 	fi
+	#Remove build host references from various Makefiles
+	find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+	    sed -i \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	    -e 's:${RECIPE_SYSROOT}::g' \
+	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+	    -e '/^RELDATE/d' \
+	    {} +
 }
 
 do_install_append_class-native () {
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/3 libxml2-ptest: support for encoding ISO-8859-5

In reply to Juro Bystricky

This fixes the error:

./test/errors/759398.xml:1: parser error : Unsupported encoding ISO-8859-5 <?xml version='1.0' encoding='ISO-8859-5' standalone='no'?>

                                         ^

./test/errors/759398.xml : failed to parse
FAIL: Error cases stream regression tests

---
 meta/recipes-core/libxml/libxml2_2.9.4.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/libxml/libxml2_2.9.4.bb +2 -2
index 15d5e36..ec2d25a 100644
@@ -53,11 +53,11 @@ RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'l
 
 RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
 
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
 
 export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
 
-# WARNING: zlib is require for RPM use
+# WARNING: zlib is required for RPM use
 EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
 EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
 EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/3 libxml2-ptest: set LC_ALL=en_US.UTF-8

In reply to Juro Bystricky

We need to specify UTF-8 in the environment to avoid an error such as:

UnicodeEncodeError: 'ascii' codec can't encode character '\xe4'

---
 meta/recipes-core/libxml/libxml2/run-ptest | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/libxml/libxml2/run-ptest +1 -0
index 473d0b6..c313d83 100644
@@ -1,3 +1,4 @@
 #!/bin/sh
 
+export LC_ALL=en_US.UTF-8
 make -k runtests
Signature · 1 line
2.7.4