diff options
Diffstat (limited to 'meta/recipes-extended/gawk/gawk-4.0.2')
-rw-r--r-- | meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch | 33 | ||||
-rw-r--r-- | meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk | 32 |
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch new file mode 100644 index 0000000000..b241097571 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | test/fflush.sh: Remove hardcoded gawk path. | ||
2 | |||
3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | --- a/test/fflush.sh 2012-05-03 20:13:57.000000000 +0200 | ||
7 | +++ b/test/fflush.sh 2013-04-08 16:28:00.170796200 +0200 | ||
8 | @@ -1,16 +1,17 @@ | ||
9 | #! /bin/sh | ||
10 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' | ||
11 | +AWK=${AWK-../gawk} | ||
12 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' | ||
13 | |||
14 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat | ||
15 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat | ||
16 | |||
17 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat | ||
18 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat | ||
19 | |||
20 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
21 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
22 | |||
23 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
24 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
25 | |||
26 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
27 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
28 | |||
29 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat | ||
30 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat | ||
31 | |||
32 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat | ||
33 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat | ||
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk new file mode 100644 index 0000000000..6f651d8105 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk | |||
@@ -0,0 +1,32 @@ | |||
1 | # The awk test suite prints test names prior to running the test and shows | ||
2 | # results in the form of "make" errors. | ||
3 | # This script post-processes the output to detect failure and print PASS | ||
4 | # only if there was no subsequent error message for the test. | ||
5 | |||
6 | function print_prev() | ||
7 | { | ||
8 | if (length(testname)) | ||
9 | if (fail == 1) | ||
10 | printf "FAIL: %s\n", testname | ||
11 | else | ||
12 | printf "PASS: %s\n", testname | ||
13 | } | ||
14 | |||
15 | { | ||
16 | print $0 | ||
17 | |||
18 | if (match($0, /^(\w+)$/, result)) { | ||
19 | print_prev() | ||
20 | testname = result[1]; | ||
21 | fail = 0 | ||
22 | } | ||
23 | |||
24 | if (match($0, /^make: \[(.+?)\]/)) { | ||
25 | fail = 1 | ||
26 | } | ||
27 | |||
28 | } | ||
29 | |||
30 | END { | ||
31 | print_prev() | ||
32 | } | ||