From 30b3f11ce04bb96b0dc036c4690d2f4fda7a2b09 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 12 Aug 2013 16:17:30 -0400 Subject: [PATCH] git logs Signed-off-by: Jason Etheridge --- qa/test_output_webifier.pl | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/qa/test_output_webifier.pl b/qa/test_output_webifier.pl index 750d2b9a3..21df331bb 100755 --- a/qa/test_output_webifier.pl +++ b/qa/test_output_webifier.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl +# This script assumes git checkouts at ~/git/Evergreen and ~/git/OpenSRF that +# correspond to branches used to produce the test output being parsed. + my $state = 'skipping'; my $error_count = 0; my $subpage_count = 0; @@ -122,13 +125,27 @@ sub print_pass_or_fail { sub branch_tips { my $html = "

Current OpenSRF tip:

\n
$opensrf_tip
\n"; $html .= "

Current Evergreen tip:

\n
$evergreen_tip
\n"; - `touch prev_tips.txt`; - my $prev = `cat prev_tips.txt`; - $prev =~ s/

Current /

Previous /g; - open TIP_FILE, "> prev_tips.txt"; - print TIP_FILE $html; - close TIP_FILE; - $html .= $prev; + my $opensrf_tip_hash = ''; + if ($opensrf_tip =~ /^(\S+)\s/) { + $opensrf_tip_hash = $1; + } + my $evergreen_tip_hash = ''; + if ($evergreen_tip =~ /^(\S+)\s/) { + $evergreen_tip_hash = $1; + } + `touch prev_evergreen_tip.hash`; + `touch prev_opensrf_tip.hash`; + my $prev_opensrf_tip_hash = `cat prev_opensrf_tip.hash`; + chop $prev_opensrf_tip_hash; + my $prev_evergreen_tip_hash = `cat prev_evergreen_tip.hash`; + chop $prev_evergreen_tip_hash; + $html .= "

OpenSRF commits since last build:

\n
";
+    $html .= `cd ~/git/OpenSRF/ ; git fetch 2> /dev/null ; git log --format=oneline $prev_opensrf_tip_hash..$opensrf_tip_hash`;
+    $html .= "

Evergreen commits since last build:

\n
";
+    $html .= `cd ~/git/Evergreen/ ; git fetch 2> /dev/null ; git log --format=oneline $prev_evergreen_tip_hash..$evergreen_tip_hash`;
+    `echo $opensrf_tip_hash > prev_opensrf_tip.hash`;
+    `echo $evergreen_tip_hash > prev_evergreen_tip.hash`;
+    $html .= "
\n"; return $html; } -- 2.43.2