@@ -20,6 +20,7 @@ PTESTS_FAST = "\
expect \
findutils \
flex \
+ fontconfig \
gawk \
gdbm \
gdk-pixbuf \
new file mode 100644
@@ -0,0 +1,28 @@
+Fix compile problem for ptest
+
+Change SRCDIR and FONTFILE in test/Makefile.am for ptest.
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
+
+diff -rNu a/test/Makefile.am b/test/Makefile.am
+--- a/test/Makefile.am 2023-08-03 15:10:50.830916551 +0800
++++ b/test/Makefile.am 2023-08-03 16:16:10.178859661 +0800
+@@ -76,7 +76,7 @@
+ endif
+ check_PROGRAMS += test-bz89617
+ test_bz89617_CFLAGS = \
+- -DSRCDIR="\"$(abs_srcdir)\""
++ -DSRCDIR="\"/usr/lib/fontconfig/ptest/test/\""
+
+ test_bz89617_LDADD = $(top_builddir)/src/libfontconfig.la
+ TESTS += test-bz89617
+@@ -117,7 +117,7 @@
+ -I$(top_builddir)/src \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+- -DFONTFILE='"$(abs_top_srcdir)/test/4x6.pcf"' \
++ -DFONTFILE='"/usr/lib/fontconfig/ptest/test/4x6.pcf"' \
+ -DHAVE_CONFIG_H \
+ $(NULL)
+ test_bz106632_LDADD = $(top_builddir)/src/libfontconfig.la
new file mode 100644
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+WORKDIR=@PTEST_PATH@/test/
+PROG=@PTEST_PATH@/test-driver
+LOGDIR=@PTEST_PATH@/logs/
+
+rm -rf ${LOGDIR}
+mkdir -p ${LOGDIR}
+cd ${WORKDIR}
+for file in `ls ${WORKDIR} | grep test | grep -v json`
+do
+ ${PROG} --test-name ${file} --log-file ${LOGDIR}${file}.log --trs-file ${LOGDIR}${file}.trs ${WORKDIR}${file}
+done
+
@@ -22,6 +22,8 @@ DEPENDS = "expat freetype zlib gperf-native util-linux"
SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
file://revert-static-pkgconfig.patch \
+ file://run-ptest \
+ file://ptest.patch \
"
SRC_URI[sha256sum] = "3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55"
@@ -56,7 +58,19 @@ RREPLACES:fontconfig-utils = "libfontconfig-utils"
RCONFLICTS:fontconfig-utils = "libfontconfig-utils"
DEBIAN_NOAUTONAME:fontconfig-utils = "1"
-inherit autotools pkgconfig relative_symlinks gettext
+inherit autotools pkgconfig relative_symlinks gettext ptest
+
+do_install_ptest() {
+ install ${S}/test-driver ${D}${PTEST_PATH}/
+
+ install -d ${D}${PTEST_PATH}/test/
+ find ${B}/test/.libs/ -type f -not -name "test-migration" \
+ -exec install {} ${D}${PTEST_PATH}/test/ \;
+ install ${S}/test/*.pcf ${D}${PTEST_PATH}/test
+
+ # update PTEST_PATH in run-ptest
+ sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/run-ptest
+}
FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"