[PATCH] Do a better job reporting failures from kickstart_tests.
Vratislav Podzimek
vpodzime at redhat.com
Fri Aug 21 06:11:40 UTC 2015
On Thu, 2015-08-20 at 10:58 -0400, Chris Lumens wrote:
> When the failure message is a line from anaconda's logs, it starts with
> a timestamp. Those include colons, so because I am splitting on colons
> we get an unhelpful explanation like "03". Thus, just grab the first
> bunch of characters from the log line and display that instead. It
> won't give the complete reaon (which could be very long) but it is a
typo^
> whole lot more helpful than just a number.
> ---
> tests/kickstart_tests/run_report.sh | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kickstart_tests/run_report.sh b/tests/kickstart_tests/run_report.sh
> index 6c27cb9..b62b128 100755
> --- a/tests/kickstart_tests/run_report.sh
> +++ b/tests/kickstart_tests/run_report.sh
> @@ -2,7 +2,7 @@
>
> BEGIN {
> printf("\n\n\n%-30s | %-10s | %s\n", "TEST", "RESULT", "EXPLANATION");
> - printf("-------------------------------+------------+---------------------------------------------\n");
> + printf("-------------------------------+------------+--------------------------------------------------------\n");
> FS=":"
> }
> /^RESULT:/ { if ($4 == "Test timed out.") {
> @@ -11,9 +11,12 @@ BEGIN {
> } else if (match($0, "Traceback")) {
> result = "FAILED";
> explanation = "Traceback";
> + } else if (match($0, "SUCCESS")) {
> + result = $3;
> + explanation = "";
> } else {
> result = $3;
> - explanation = $4;
> + explanation = substr($0, index($0, $4), 55);
> }
>
> printf("%-30s | %-10s | %s\n", $2, result, explanation);
Looks good to me otherwise.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list