diff options
Diffstat (limited to 'meta-oe/recipes-devtools')
| -rwxr-xr-x[-rw-r--r--] | meta-oe/recipes-devtools/jq/jq/run-ptest | 28 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/jq/jq_git.bb | 11 |
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 | ||
| 3 | JQ_LIB=@libdir@/jq | ||
| 4 | LOG="${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 | ||
| 7 | echo "" > ${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 | |||
| 3 | for test in optionaltest mantest jqtest onigtest shtest utf8test base64test; do | 16 | for 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 |
| 10 | done | 25 | done |
| 11 | 26 | ||
| 27 | passed=`grep PASS: ${LOG}|wc -l` | ||
| 28 | failed=`grep FAIL: ${LOG}|wc -l` | ||
| 29 | skipped=`grep SKIP: ${LOG}|wc -l` | ||
| 30 | all=$((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" | |||
| 24 | PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native" | 24 | PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native" |
| 25 | PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native" | 25 | PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native" |
| 26 | PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig" | 26 | PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig" |
| 27 | 27 | # enable if you want ptest running under valgrind | |
| 28 | EXTRA_OECONF += " \ | 28 | PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" |
| 29 | --disable-valgrind \ | ||
| 30 | " | ||
| 31 | 29 | ||
| 32 | do_install_ptest() { | 30 | do_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 | ||
| 40 | BBCLASSEXTEND = "native" | 43 | BBCLASSEXTEND = "native" |
