diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-07 18:06:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-08 16:01:41 +0100 |
commit | 8dc2f09ea5dd816cf0d406e346e420bbb1cffe2e (patch) | |
tree | 6b72ac06bf27cec4e1cd09ad47be4c9b9575e51f /meta/recipes-extended/gawk | |
parent | 946a8802be344ac7ef409ac687fc383c2a6a8684 (diff) | |
download | poky-8dc2f09ea5dd816cf0d406e346e420bbb1cffe2e.tar.gz |
gawk: ptest fixes
In minimal images all tests pass due to a missing dependency on make.
Add the missing dependecy.
The test list created by the run-ptest script is incorrect as it includes
entries like "fi". Simplify it and correct it.
Some tests are skipped due to mpfr not being enabled. Correctly mark these
as SKIP.
Some tests need the "../gawk" script, create a link to it so the tests
work correctly.
Also print more information in the failed test cases.
(From OE-Core rev: 8392d60e05c4eed0b08273c1a934eeea54215079)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/gawk')
-rw-r--r-- | meta/recipes-extended/gawk/gawk/run-ptest | 24 | ||||
-rw-r--r-- | meta/recipes-extended/gawk/gawk_5.0.0.bb | 3 |
2 files changed, 21 insertions, 6 deletions
diff --git a/meta/recipes-extended/gawk/gawk/run-ptest b/meta/recipes-extended/gawk/gawk/run-ptest index d23f0bf6d7..f67a95874f 100644 --- a/meta/recipes-extended/gawk/gawk/run-ptest +++ b/meta/recipes-extended/gawk/gawk/run-ptest | |||
@@ -1,10 +1,22 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | cd test | 3 | cd test |
4 | for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \ | 4 | for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do |
5 | do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \ | 5 | #LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} |
6 | make -f Maketests $i >$i.tmp 2>&1; \ | 6 | srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1 |
7 | grep -q "Error" $i.tmp; \ | 7 | if [ -e _$i ]; then |
8 | if [ $? -eq 0 ]; then echo "FAIL: $i"; \ | 8 | cat _$i |
9 | else echo "PASS: $i"; rm -f $i.tmp; fi; \ | 9 | grep -q "support not compiled in" _$i |
10 | if [ $? -eq 0 ]; then | ||
11 | echo "SKIP: $i" | ||
12 | continue | ||
13 | fi | ||
14 | fi | ||
15 | grep -q "Error" $i.tmp | ||
16 | if [ $? -eq 0 ]; then | ||
17 | echo "FAIL: $i" | ||
18 | else | ||
19 | echo "PASS: $i" | ||
20 | rm -f $i.tmp | ||
21 | fi | ||
10 | done | 22 | done |
diff --git a/meta/recipes-extended/gawk/gawk_5.0.0.bb b/meta/recipes-extended/gawk/gawk_5.0.0.bb index b1e1b212a3..578901355c 100644 --- a/meta/recipes-extended/gawk/gawk_5.0.0.bb +++ b/meta/recipes-extended/gawk/gawk_5.0.0.bb | |||
@@ -40,6 +40,7 @@ inherit ptest | |||
40 | 40 | ||
41 | do_install_ptest() { | 41 | do_install_ptest() { |
42 | mkdir ${D}${PTEST_PATH}/test | 42 | mkdir ${D}${PTEST_PATH}/test |
43 | ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk | ||
43 | for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \ | 44 | for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \ |
44 | do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ | 45 | do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ |
45 | done | 46 | done |
@@ -47,4 +48,6 @@ do_install_ptest() { | |||
47 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk | 48 | -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk |
48 | } | 49 | } |
49 | 50 | ||
51 | RDEPENDS_${PN}-ptest += "make" | ||
52 | |||
50 | BBCLASSEXTEND = "native nativesdk" | 53 | BBCLASSEXTEND = "native nativesdk" |