summaryrefslogtreecommitdiffstats
path: root/meta-agl-test/recipes-graphics/fontconfig
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-test/recipes-graphics/fontconfig')
-rw-r--r--meta-agl-test/recipes-graphics/fontconfig/files/ptest.patch28
-rw-r--r--meta-agl-test/recipes-graphics/fontconfig/files/run-ptest14
-rw-r--r--meta-agl-test/recipes-graphics/fontconfig/fontconfig_2.13.1.bbappend24
3 files changed, 66 insertions, 0 deletions
diff --git a/meta-agl-test/recipes-graphics/fontconfig/files/ptest.patch b/meta-agl-test/recipes-graphics/fontconfig/files/ptest.patch
new file mode 100644
index 00000000..9033e2c5
--- /dev/null
+++ b/meta-agl-test/recipes-graphics/fontconfig/files/ptest.patch
@@ -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
diff --git a/meta-agl-test/recipes-graphics/fontconfig/files/run-ptest b/meta-agl-test/recipes-graphics/fontconfig/files/run-ptest
new file mode 100644
index 00000000..67d6c682
--- /dev/null
+++ b/meta-agl-test/recipes-graphics/fontconfig/files/run-ptest
@@ -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
+
diff --git a/meta-agl-test/recipes-graphics/fontconfig/fontconfig_2.13.1.bbappend b/meta-agl-test/recipes-graphics/fontconfig/fontconfig_2.13.1.bbappend
new file mode 100644
index 00000000..dd00646a
--- /dev/null
+++ b/meta-agl-test/recipes-graphics/fontconfig/fontconfig_2.13.1.bbappend
@@ -0,0 +1,24 @@
+# Add ptest support
+# backport of yocto
+#
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+ file://run-ptest \
+ file://ptest.patch \
+"
+
+inherit 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
+}
+