diff options
author | Zheng Qiu <zheng.qiu@windriver.com> | 2022-09-16 09:33:16 -0400 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-17 01:09:18 -0700 |
commit | caca326d97e13469bf95eb24064d9cd68aa8715d (patch) | |
tree | e4e3a86090115824a28590c7f2bda3a358f7e279 | |
parent | 31eff36a190efe8349967ae3859df05117dec17f (diff) | |
download | meta-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-ptest | 11 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/jq/jq_git.bb | 11 |
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 | |||
3 | for 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 | ||
10 | done | ||
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}" | |||
12 | SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \ | 12 | SRC_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 | " |
16 | SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8" | 17 | SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8" |
17 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
18 | 19 | ||
19 | inherit autotools-brokensep | 20 | inherit autotools-brokensep ptest |
20 | 21 | ||
21 | PACKAGECONFIG ?= "oniguruma" | 22 | PACKAGECONFIG ?= "oniguruma" |
22 | 23 | ||
@@ -28,4 +29,12 @@ EXTRA_OECONF += " \ | |||
28 | --disable-valgrind \ | 29 | --disable-valgrind \ |
29 | " | 30 | " |
30 | 31 | ||
32 | do_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 | |||
31 | BBCLASSEXTEND = "native" | 40 | BBCLASSEXTEND = "native" |