From: Jason Etheridge <jason@esilibrary.com> Date: Tue, 16 Jan 2018 18:10:26 +0000 (-0500) Subject: improved RSS feed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ae2bb457220a5d5068ce65f7e83a5aa175ef86b0;p=working%2Frandom.git improved RSS feed Signed-off-by: Jason Etheridge <jason@esilibrary.com> --- diff --git a/qa/test_output_webifier.pl b/qa/test_output_webifier.pl index 66aeefb3d..fdfd21093 100755 --- a/qa/test_output_webifier.pl +++ b/qa/test_output_webifier.pl @@ -166,10 +166,12 @@ sub print_pass_or_fail { #print "subpage = <$subpage> error_count = $error_count\n"; if ($error_count && $error_count != $exception{$subpage} ) { print MAIN_PAGE ' - <span class="fail">Failed</span>'; + print PASS_FAIL "Failed $subpage"; if ($exception{$subpage} > 0) { - print MAIN_PAGE " - Expected $exception{$subpage} errors but encountered $error_count." + print MAIN_PAGE " - Expected $exception{$subpage} errors but encountered $error_count."; + print PASS_FAIL " - Expected $exception{$subpage} errors but encountered $error_count."; } - print PASS_FAIL "Failed\n"; + print PASS_FAIL "\n"; } else { if ($subpage_count) { print MAIN_PAGE ' - <span class="pass">Passed</span>'; @@ -221,16 +223,32 @@ sub update_rss { </author> <id>http://testing.evergreen-ils.org/~live</id> + +^; + if (!$fail) { + print RSS_FILE q^ <entry> - <title>Test ^ . ($fail ? 'Failure' : 'Success') . q^</title> + <title>Testing Success</title> <link href="http://testing.evergreen-ils.org/~live"/> <id>http://testing.evergreen-ils.org/~live#^ . `date -Ins` . q^</id> <updated>^ . `date -Iseconds` . q^</updated> - <summary>^ . ($fail ? 'One or more tests failed' : 'All tests succeeded') . q^</summary> + <summary>All tests succeeded</summary> </entry> - - </feed> -^; + ^; + } + my $fidx = 0; + foreach my $f (split /\n/, $fail) { + print RSS_FILE q^ + <entry> + <title>^ . $f . q^</title> + <link href="http://testing.evergreen-ils.org/~live"/> + <id>http://testing.evergreen-ils.org/~live#^ . `date -Ins` . '-' . ($fidx++) . q^</id> + <updated>^ . `date -Iseconds` . q^</updated> + <summary>^ . $f . q^</summary> + </entry> + ^; + } + print RSS_FILE '</feed>'; close RSS_FILE; #} `mv pass_fail.txt pass_fail.txt.prev`;