summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools')
-rwxr-xr-x[-rw-r--r--]meta-oe/recipes-devtools/jq/jq/run-ptest28
-rw-r--r--meta-oe/recipes-devtools/jq/jq_git.bb11
2 files changed, 34 insertions, 5 deletions
diff --git a/meta-oe/recipes-devtools/jq/jq/run-ptest b/meta-oe/recipes-devtools/jq/jq/run-ptest
index 0e4c707e96..a813958b5a 100644..100755
--- a/meta-oe/recipes-devtools/jq/jq/run-ptest
+++ b/meta-oe/recipes-devtools/jq/jq/run-ptest
@@ -1,11 +1,37 @@
1#!/bin/sh 1#!/bin/sh
2 2
3JQ_LIB=@libdir@/jq
4LOG="${JQ_LIB}/ptest/jq_ptest_$(date +%Y%m%d-%H%M%S).log"
5
6# clean up the log file to avoid a file has the same name and has existing content
7echo "" > ${LOG}
8
9# The purpose of ptest is doing intergration test, so disable valgrind by default
10# change PACKAGECOFIG to enable valgrind.
11#export NO_VALGRIND=1
12# The --enable-valgrind configure option for jq only can be used within Makefiles,
13# and it cannot be utilized here since it also checks compile, which cannot be avoid
14# Requested enhancement to jq: https://github.com/stedolan/jq/issues/2493
15
3for test in optionaltest mantest jqtest onigtest shtest utf8test base64test; do 16for test in optionaltest mantest jqtest onigtest shtest utf8test base64test; do
4 ./tests/${test} 17 ./tests/${test} >> ${LOG} 2>> ${LOG}
5 if [ $? -eq 0 ]; then 18 if [ $? -eq 0 ]; then
6 echo "PASS: ${test}" 19 echo "PASS: ${test}"
20 echo "PASS: ${test}" >> ${LOG}
7 else 21 else
8 echo "FAIL: ${test}" 22 echo "FAIL: ${test}"
23 echo "FAIL: ${test}" >> ${LOG}
9 fi 24 fi
10done 25done
11 26
27passed=`grep PASS: ${LOG}|wc -l`
28failed=`grep FAIL: ${LOG}|wc -l`
29skipped=`grep SKIP: ${LOG}|wc -l`
30all=$((passed + failed + skipped))
31
32( echo "=== Test Summary ==="
33 echo "TOTAL: ${all}"
34 echo "PASSED: ${passed}"
35 echo "FAILED: ${failed}"
36 echo "SKIPPED: ${skipped}"
37) | tee -a /${LOG}
diff --git a/meta-oe/recipes-devtools/jq/jq_git.bb b/meta-oe/recipes-devtools/jq/jq_git.bb
index c6634cd300..4fa98aa44f 100644
--- a/meta-oe/recipes-devtools/jq/jq_git.bb
+++ b/meta-oe/recipes-devtools/jq/jq_git.bb
@@ -24,10 +24,8 @@ PACKAGECONFIG ?= "oniguruma"
24PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native" 24PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native"
25PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native" 25PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native"
26PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig" 26PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig"
27 27# enable if you want ptest running under valgrind
28EXTRA_OECONF += " \ 28PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
29 --disable-valgrind \
30"
31 29
32do_install_ptest() { 30do_install_ptest() {
33 cp -rf ${B}/tests ${D}${PTEST_PATH} 31 cp -rf ${B}/tests ${D}${PTEST_PATH}
@@ -35,6 +33,11 @@ do_install_ptest() {
35 # libjq.so.* is packaged in the main jq component, so remove it from ptest 33 # libjq.so.* is packaged in the main jq component, so remove it from ptest
36 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.* 34 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.*
37 ln -sf ${bindir}/jq ${D}${PTEST_PATH} 35 ln -sf ${bindir}/jq ${D}${PTEST_PATH}
36 if [ "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'true', 'false', d)}" = "false" ]; then
37 sed -i 's:#export NO_VALGRIND=1:export NO_VALGRIND=1:g' ${D}${PTEST_PATH}/run-ptest
38 fi
39 # handle multilib
40 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
38} 41}
39 42
40BBCLASSEXTEND = "native" 43BBCLASSEXTEND = "native"