aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-03 19:41:29 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-03 19:41:29 +0200
commit1d5c9fc6de72af81fc341fb3c9a888fc9a7d4522 (patch)
treea9f90e84f1229da0ac161d820dcc151b26e94bb2
parenteecefdf1f585aa8139d2b999f924f0557a60de53 (diff)
downloadbuildroot-test-1d5c9fc6de72af81fc341fb3c9a888fc9a7d4522.tar.gz
buildroot-test-1d5c9fc6de72af81fc341fb3c9a888fc9a7d4522.tar.bz2
web/import.inc.php: do not make the build-time.log file mandatory
Some failures happen early in the build process (such as the "XYZ is in the dependency chain of ABS" error), even before a build-time.log is generated. Currently, such build results are discarded, which isn't nice. So, let's accept results without a build-time.log, and assume their duration was 0 seconds. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--web/import.inc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/import.inc.php b/web/import.inc.php
index 7ff0054..15004d9 100644
--- a/web/import.inc.php
+++ b/web/import.inc.php
@@ -131,7 +131,6 @@ function import_result($buildid, $filename)
! file_exists($thisbuildtmpdir . "gitid") ||
! file_exists($thisbuildtmpdir . "build-end.log") ||
! file_exists($thisbuildtmpdir . "config") ||
- ! file_exists($thisbuildtmpdir . "build-time.log") ||
! file_exists($thisbuildtmpdir . "submitter")) {
system("rm -rf " . $thisbuildtmpdir);
echo "Invalid contents of the build report file\n";
@@ -185,7 +184,11 @@ function import_result($buildid, $filename)
/* Get submitter, commitid, duration */
$submitter = trim(file_get_contents($thisbuildfinaldir . "submitter", "r"));
$commitid = trim(file_get_contents($thisbuildfinaldir . "gitid", "r"));
- $duration = get_duration($thisbuildfinaldir . "build-time.log");
+ if (file_exists($thisbuildfinaldir . "build-time.log")) {
+ $duration = get_duration($thisbuildfinaldir . "build-time.log");
+ } else {
+ $duration = 0;
+ }
list($opts_set, $opts_unset) = parse_config($thisbuildfinaldir . "config");