summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRadu Patriu <radu.patriu@enea.com>2014-03-26 16:38:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-30 10:10:32 +0100
commitbb3927d919be65a77d7a35257378f323d9cf0bb6 (patch)
treea152ac88059c65a0ecb277c69c9b64dbec4d1d10 /meta/recipes-devtools
parent95cd5688c67fa179204a7704b1287980672894fd (diff)
downloadpoky-bb3927d919be65a77d7a35257378f323d9cf0bb6.tar.gz
autoconf: new autotest/testsuite option to enable automake test result format
lib/autotest/general.m4: added "--am-fmt | -A" command line parameter for testsuite script to enable "RESULT: testname" output format; to be used by yocto ptest packages directly or with autoconf TESTSUITEFLAGS. (From OE-Core rev: 9d288e5afd6696cc519574470c7d47ca55403d27) Signed-off-by: Radu Patriu <radu.patriu@enea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch136
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.69.bb1
2 files changed, 137 insertions, 0 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch b/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch
new file mode 100644
index 0000000000..b5e8174efd
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch
@@ -0,0 +1,136 @@
1From a7e722f974e2529d3e564d8d94c86cc8bdbc40e7 Mon Sep 17 00:00:00 2001
2From: Radu Patriu <radu.patriu@enea.com>
3Date: Mon, 24 Mar 2014 16:33:19 +0200
4Subject: [PATCH] autotest: new testsuite option to enable automake test
5 result format
6
7* lib/autotest/general.m4: added "--am-fmt | -A" command line
8parameter for testsuite script to enable "RESULT: testname" output;
9will be used by yocto ptest packages.
10
11Upstream-Status: Pending
12
13Signed-off-by: Radu Patriu <radu.patriu@enea.com>
14---
15 lib/autotest/general.m4 | 39 +++++++++++++++++++++++++++++----------
16 1 file changed, 29 insertions(+), 10 deletions(-)
17
18diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
19index 60c0352..c1f5a9b 100644
20--- a/lib/autotest/general.m4
21+++ b/lib/autotest/general.m4
22@@ -412,6 +412,9 @@ at_recheck=
23 # Whether a write failure occurred
24 at_write_fail=0
25
26+# Automake result format "result: testname"
27+at_am_fmt=false
28+
29 # The directory we run the suite in. Default to . if no -C option.
30 at_dir=`pwd`
31 # An absolute reference to this testsuite script.
32@@ -530,6 +533,10 @@ do
33 at_check_filter_trace=at_fn_filter_trace
34 ;;
35
36+ --am-fmt | -A )
37+ at_am_fmt=:
38+ ;;
39+
40 [[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]])
41 at_fn_validate_ranges at_option
42 AS_VAR_APPEND([at_groups], ["$at_option$as_nl"])
43@@ -718,10 +725,10 @@ m4_divert_push([HELP_MODES])dnl
44 cat <<_ATEOF || at_write_fail=1
45
46 Operation modes:
47- -h, --help print the help message, then exit
48- -V, --version print version number, then exit
49- -c, --clean remove all the files this test suite might create and exit
50- -l, --list describes all the tests, or the selected TESTS
51+ -h, --help print the help message, then exit
52+ -V, --version print version number, then exit
53+ -c, --clean remove all the files this test suite might create and exit
54+ -l, --list describes all the tests, or the selected TESTS
55 _ATEOF
56 m4_divert_pop([HELP_MODES])dnl
57 m4_wrap([m4_divert_push([HELP_TUNING_BEGIN])dnl
58@@ -747,6 +754,7 @@ Execution tuning:
59 -d, --debug inhibit clean up and top-level logging
60 [ default for debugging scripts]
61 -x, --trace enable tests shell tracing
62+ -A, --am-fmt automake result format "result: testname"
63 _ATEOF
64 m4_divert_pop([HELP_TUNING_BEGIN])])dnl
65 m4_divert_push([HELP_END])dnl
66@@ -1162,7 +1170,9 @@ at_fn_group_banner ()
67 [*]) at_desc_line="$[1]: " ;;
68 esac
69 AS_VAR_APPEND([at_desc_line], ["$[3]$[4]"])
70- $at_quiet AS_ECHO_N(["$at_desc_line"])
71+ if ! $at_am_fmt; then
72+ $at_quiet AS_ECHO_N(["$at_desc_line"])
73+ fi
74 echo "# -*- compilation -*-" >> "$at_group_log"
75 }
76
77@@ -1188,42 +1198,51 @@ _ATEOF
78 case $at_xfail:$at_status in
79 yes:0)
80 at_msg="UNEXPECTED PASS"
81+ at_am_msg="XPASS"
82 at_res=xpass
83 at_errexit=$at_errexit_p
84 at_color=$at_red
85 ;;
86 no:0)
87 at_msg="ok"
88+ at_am_msg="PASS"
89 at_res=pass
90 at_errexit=false
91 at_color=$at_grn
92 ;;
93 *:77)
94 at_msg='skipped ('`cat "$at_check_line_file"`')'
95+ at_am_msg="SKIP"
96 at_res=skip
97 at_errexit=false
98 at_color=$at_blu
99 ;;
100 no:* | *:99)
101 at_msg='FAILED ('`cat "$at_check_line_file"`')'
102+ at_am_msg="FAIL"
103 at_res=fail
104 at_errexit=$at_errexit_p
105 at_color=$at_red
106 ;;
107 yes:*)
108 at_msg='expected failure ('`cat "$at_check_line_file"`')'
109+ at_am_msg="XFAIL"
110 at_res=xfail
111 at_errexit=false
112 at_color=$at_lgn
113 ;;
114 esac
115 echo "$at_res" > "$at_job_dir/$at_res"
116- # In parallel mode, output the summary line only afterwards.
117- if test $at_jobs -ne 1 && test -n "$at_verbose"; then
118- AS_ECHO(["$at_desc_line $at_color$at_msg$at_std"])
119+ if $at_am_fmt; then
120+ AS_ECHO(["$at_am_msg: $at_desc"])
121 else
122- # Make sure there is a separator even with long titles.
123- AS_ECHO([" $at_color$at_msg$at_std"])
124+ # In parallel mode, output the summary line only afterwards.
125+ if test $at_jobs -ne 1 && test -n "$at_verbose"; then
126+ AS_ECHO(["$at_desc_line $at_color$at_msg$at_std"])
127+ else
128+ # Make sure there is a separator even with long titles.
129+ AS_ECHO([" $at_color$at_msg$at_std"])
130+ fi
131 fi
132 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
133 case $at_status in
134--
1351.7.9.5
136
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index b67155bc99..a2ecd94d8a 100644
--- a/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -16,6 +16,7 @@ SRC_URI += "file://autoreconf-include.patch \
16 file://config_site.patch \ 16 file://config_site.patch \
17 file://remove-usr-local-lib-from-m4.patch \ 17 file://remove-usr-local-lib-from-m4.patch \
18 file://preferbash.patch \ 18 file://preferbash.patch \
19 file://autotest-automake-result-format.patch \
19 " 20 "
20 21
21SRC_URI[md5sum] = "82d05e03b93e45f5a39b828dc9c6c29b" 22SRC_URI[md5sum] = "82d05e03b93e45f5a39b828dc9c6c29b"