summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/gawk
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-12-21 17:09:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-22 23:11:45 +0000
commita84b8d683b4b3f4d30999eac987790896d21eba6 (patch)
tree34ce0c030fc0d7eaca1dd4058f3ad90577cafb75 /meta/recipes-extended/gawk
parent65e8df66d9579b609791deb74d8e1b9ec17c1115 (diff)
downloadpoky-a84b8d683b4b3f4d30999eac987790896d21eba6.tar.gz
gawk: remove load-sensitive tests
The time and timeout tests are sensitive to system load, and as we run these on build machines they fail randomly. [ YOCTO #14371 ] (From OE-Core rev: d2b62913a5771169265171129fe972c8e252fe04) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/gawk')
-rw-r--r--meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch24
-rw-r--r--meta/recipes-extended/gawk/gawk/test-time.patch22
-rw-r--r--meta/recipes-extended/gawk/gawk_5.1.1.bb19
3 files changed, 36 insertions, 29 deletions
diff --git a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch b/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
new file mode 100644
index 0000000000..167c0787ee
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
@@ -0,0 +1,24 @@
1These tests require an unloaded host as otherwise timing sensitive tests can fail
2https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
3
4Upstream-Status: Inappropriate
5Signed-off-by: Ross Burton <ross.burton@arm.com>
6
7--- a/test/Maketests~
8+++ b/test/Maketests
9@@ -2069,7 +2069,2 @@
10
11-timeout:
12- @echo $@ $(ZOS_FAIL)
13- @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
14- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
15-
16 typedregex1:
17@@ -2297,7 +2292,2 @@
18 @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
19-
20-time:
21- @echo $@
22- @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
23- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
24
diff --git a/meta/recipes-extended/gawk/gawk/test-time.patch b/meta/recipes-extended/gawk/gawk/test-time.patch
deleted file mode 100644
index 05a68c5faf..0000000000
--- a/meta/recipes-extended/gawk/gawk/test-time.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1The test time.awk does a sleep() and checks that the real sleep duration is
2close to the expected duration.
3
4As currently our tests can run on a heavily loaded system, increase the range of
5a passing duration.
6
7Upstream-Status: Inappropriate
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9
10diff --git a/test/time.awk b/test/time.awk
11index 517377e2..ca81d92d 100644
12--- a/test/time.awk
13+++ b/test/time.awk
14@@ -16,7 +16,7 @@ BEGIN {
15 printf "sleep(%s) = %s\n",delta,sleep(delta)
16 t1 = timecheck()
17 slept = t1-t0
18- if ((slept < 0.9*delta) || (slept > 1.3*delta))
19+ if ((slept < 0.5*delta) || (slept > 2*delta))
20 printf "Warning: tried to sleep %.2f secs, but slept for %.2f secs\n",
21 delta,slept
22 }
diff --git a/meta/recipes-extended/gawk/gawk_5.1.1.bb b/meta/recipes-extended/gawk/gawk_5.1.1.bb
index 215ac8c860..8990253c5e 100644
--- a/meta/recipes-extended/gawk/gawk_5.1.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.1.1.bb
@@ -16,8 +16,8 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
16PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" 16PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
17 17
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ 18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://remove-sensitive-tests.patch \
19 file://run-ptest \ 20 file://run-ptest \
20 file://test-time.patch \
21 " 21 "
22 22
23SRC_URI[sha256sum] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd" 23SRC_URI[sha256sum] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd"
@@ -41,19 +41,24 @@ inherit ptest
41do_install_ptest() { 41do_install_ptest() {
42 mkdir ${D}${PTEST_PATH}/test 42 mkdir ${D}${PTEST_PATH}/test
43 ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk 43 ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk
44 for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests inclib.awk; \ 44 # The list of tests is all targets in Maketests, apart from the dummy Gt-dummy
45 do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ 45 TESTS=$(awk -F: '$1 == "Gt-dummy" { next } /[[:alnum:]]+:$/ { print $1 }' ${S}/test/Maketests)
46 for i in $TESTS Maketests inclib.awk; do
47 cp ${S}/test/$i* ${D}${PTEST_PATH}/test
46 done 48 done
47 sed -i -e 's|/usr/local/bin|${bindir}|g' \ 49 sed -i -e 's|/usr/local/bin|${bindir}|g' \
48 -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk 50 -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk
49 51
50 sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests 52 sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests
53
54 # These tests require an unloaded host as otherwise timing sensitive tests can fail
55 # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
56 rm -f ${D}${PTEST_PATH}/test/time.*
57 rm -f ${D}${PTEST_PATH}/test/timeout.*
51} 58}
52 59
53RDEPENDS:${PN}-ptest += "make" 60RDEPENDS:${PN}-ptest += "make"
54 61
55RDEPENDS:${PN}-ptest:append:libc-glibc = "\ 62RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1"
56 locale-base-en-us.iso-8859-1 \
57"
58 63
59BBCLASSEXTEND = "native nativesdk" 64BBCLASSEXTEND = "native nativesdk"