1From 8c0f24404bebffdaf3132d81e2b9560d34ff1677 Mon Sep 17 00:00:00 2001 2From: Ross Burton <ross.burton@intel.com> 3Date: Thu, 12 Mar 2020 17:25:45 +0000 4Subject: [PATCH 6/7] autotest-automake-result-format.patch 5 6Upstream-Status: Inappropriate [oe specific] 7--- 8 lib/autotest/general.m4 | 39 +++++++++++++++++++++++++++++---------- 9 1 file changed, 29 insertions(+), 10 deletions(-) 10 11diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 12index 0c0e3c5b..17590e96 100644 13--- a/lib/autotest/general.m4 14+++ b/lib/autotest/general.m4 15@@ -412,6 +412,9 @@ at_recheck= 16 # Whether a write failure occurred 17 at_write_fail=0 18 19+# Automake result format "result: testname" 20+at_am_fmt=false 21+ 22 # The directory we run the suite in. Default to . if no -C option. 23 at_dir=`pwd` 24 # An absolute reference to this testsuite script. 25@@ -525,6 +528,10 @@ do 26 at_check_filter_trace=at_fn_filter_trace 27 ;; 28 29+ --am-fmt | -A ) 30+ at_am_fmt=: 31+ ;; 32+ 33 [[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]]) 34 at_fn_validate_ranges at_option 35 AS_VAR_APPEND([at_groups], ["$at_option$as_nl"]) 36@@ -713,10 +720,10 @@ m4_divert_push([HELP_MODES])dnl 37 cat <<_ATEOF || at_write_fail=1 38 39 Operation modes: 40- -h, --help print the help message, then exit 41- -V, --version print version number, then exit 42- -c, --clean remove all the files this test suite might create and exit 43- -l, --list describes all the tests, or the selected TESTS 44+ -h, --help print the help message, then exit 45+ -V, --version print version number, then exit 46+ -c, --clean remove all the files this test suite might create and exit 47+ -l, --list describes all the tests, or the selected TESTS 48 _ATEOF 49 m4_divert_pop([HELP_MODES])dnl 50 m4_wrap([m4_divert_push([HELP_TUNING_BEGIN])dnl 51@@ -742,6 +749,7 @@ Execution tuning: 52 -d, --debug inhibit clean up and top-level logging 53 [ default for debugging scripts] 54 -x, --trace enable tests shell tracing 55+ -A, --am-fmt automake result format "result: testname" 56 _ATEOF 57 m4_divert_pop([HELP_TUNING_BEGIN])])dnl 58 m4_divert_push([HELP_END])dnl 59@@ -1129,7 +1137,9 @@ at_fn_group_banner () 60 [*]) at_desc_line="$[1]: " ;; 61 esac 62 AS_VAR_APPEND([at_desc_line], ["$[3]$[4]"]) 63- $at_quiet AS_ECHO_N(["$at_desc_line"]) 64+ if ! $at_am_fmt; then 65+ $at_quiet AS_ECHO_N(["$at_desc_line"]) 66+ fi 67 echo "# -*- compilation -*-" >> "$at_group_log" 68 } 69 70@@ -1155,42 +1165,51 @@ _ATEOF 71 case $at_xfail:$at_status in 72 yes:0) 73 at_msg="UNEXPECTED PASS" 74+ at_am_msg="XPASS" 75 at_res=xpass 76 at_errexit=$at_errexit_p 77 at_color=$at_red 78 ;; 79 no:0) 80 at_msg="ok" 81+ at_am_msg="PASS" 82 at_res=pass 83 at_errexit=false 84 at_color=$at_grn 85 ;; 86 *:77) 87 at_msg='skipped ('`cat "$at_check_line_file"`')' 88+ at_am_msg="SKIP" 89 at_res=skip 90 at_errexit=false 91 at_color=$at_blu 92 ;; 93 no:* | *:99) 94 at_msg='FAILED ('`cat "$at_check_line_file"`')' 95+ at_am_msg="FAIL" 96 at_res=fail 97 at_errexit=$at_errexit_p 98 at_color=$at_red 99 ;; 100 yes:*) 101 at_msg='expected failure ('`cat "$at_check_line_file"`')' 102+ at_am_msg="XFAIL" 103 at_res=xfail 104 at_errexit=false 105 at_color=$at_lgn 106 ;; 107 esac 108 echo "$at_res" > "$at_job_dir/$at_res" 109- # In parallel mode, output the summary line only afterwards. 110- if test $at_jobs -ne 1 && test -n "$at_verbose"; then 111- AS_ECHO(["$at_desc_line $at_color$at_msg$at_std"]) 112+ if $at_am_fmt; then 113+ AS_ECHO(["$at_am_msg: $at_desc"]) 114 else 115- # Make sure there is a separator even with long titles. 116- AS_ECHO([" $at_color$at_msg$at_std"]) 117+ # In parallel mode, output the summary line only afterwards. 118+ if test $at_jobs -ne 1 && test -n "$at_verbose"; then 119+ AS_ECHO(["$at_desc_line $at_color$at_msg$at_std"]) 120+ else 121+ # Make sure there is a separator even with long titles. 122+ AS_ECHO([" $at_color$at_msg$at_std"]) 123+ fi 124 fi 125 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" 126 case $at_status in 127-- 1282.25.1 129 130