autobuilder: failure reason use build-time.log

Message ID 1515728616-28388-1-git-send-email-matthew.weber@rockwellcollins.com
State Superseded
Headers show
Series
  • autobuilder: failure reason use build-time.log
Related show

Commit Message

Matthew Weber Jan. 12, 2018, 3:43 a.m.
When the make output doesn't parse to provide a result and unknown
is assumed, check the build-time.log and see if the last line was
a <stamp>:start:<pkgname>.  IF so, use this pkgname instead
before declaring unknown.

This was tested against the ti-cgt-pru hang.
http://autobuild.buildroot.net/results/60e/60e11a3bb90b9f41259e4a970081b72d8b8d100b//

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 web/import.inc.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/web/import.inc.php b/web/import.inc.php
index 8eb3066..081a1cb 100644
--- a/web/import.inc.php
+++ b/web/import.inc.php
@@ -235,7 +235,12 @@  function import_result($buildid, $filename)
 	if (trim($tmp[0]))
 	  $reason = $tmp[0];
 	else
-	  $reason = "unknown";
+	  exec("tail -1 " . $thisbuildfinaldir . "build-time.log | grep :start: | cut -d':' -f4", $tmp);
+	  if (trim($tmp[0]))
+	    print "Using build-time.log for reason[".trim($tmp[0])."]";
+	    $reason = trim($tmp[0]);
+	  else
+	    $reason = "unknown";
     }
 
     $db = new db();