summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Qiu <zheng.qiu@windriver.com>2022-09-16 09:33:16 -0400
committerKhem Raj <raj.khem@gmail.com>2022-09-17 01:09:18 -0700
commitcaca326d97e13469bf95eb24064d9cd68aa8715d (patch)
treee4e3a86090115824a28590c7f2bda3a358f7e279
parent31eff36a190efe8349967ae3859df05117dec17f (diff)
downloadmeta-openembedded-caca326d97e13469bf95eb24064d9cd68aa8715d.tar.gz
jq: add ptest
Add run-ptest to run the 7 tests provided by jq. In do_install_ptest, add a soft link to jq in the ptest directory to avoid having to patch the jq setup script. While the jq tests can use valgrind, it is out of scope for integration testing. Signed-off-by: Zheng Qiu <zheng.qiu@windriver.com> Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/jq/jq/run-ptest11
-rw-r--r--meta-oe/recipes-devtools/jq/jq_git.bb11
2 files changed, 21 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/jq/jq/run-ptest b/meta-oe/recipes-devtools/jq/jq/run-ptest
new file mode 100644
index 0000000000..0e4c707e96
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/run-ptest
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3for test in optionaltest mantest jqtest onigtest shtest utf8test base64test; do
4 ./tests/${test}
5 if [ $? -eq 0 ]; then
6 echo "PASS: ${test}"
7 else
8 echo "FAIL: ${test}"
9 fi
10done
11
diff --git a/meta-oe/recipes-devtools/jq/jq_git.bb b/meta-oe/recipes-devtools/jq/jq_git.bb
index f69b435e51..c6634cd300 100644
--- a/meta-oe/recipes-devtools/jq/jq_git.bb
+++ b/meta-oe/recipes-devtools/jq/jq_git.bb
@@ -12,11 +12,12 @@ PV = "1.6+git${SRCPV}"
12SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \ 12SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \
13 file://0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch \ 13 file://0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch \
14 file://0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch \ 14 file://0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch \
15 file://run-ptest \
15 " 16 "
16SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8" 17SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8"
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19
19inherit autotools-brokensep 20inherit autotools-brokensep ptest
20 21
21PACKAGECONFIG ?= "oniguruma" 22PACKAGECONFIG ?= "oniguruma"
22 23
@@ -28,4 +29,12 @@ EXTRA_OECONF += " \
28 --disable-valgrind \ 29 --disable-valgrind \
29" 30"
30 31
32do_install_ptest() {
33 cp -rf ${B}/tests ${D}${PTEST_PATH}
34 cp -rf ${B}/.libs ${D}${PTEST_PATH}
35 # libjq.so.* is packaged in the main jq component, so remove it from ptest
36 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.*
37 ln -sf ${bindir}/jq ${D}${PTEST_PATH}
38}
39
31BBCLASSEXTEND = "native" 40BBCLASSEXTEND = "native"