File classes/Build.php changed (mode: 100644) (index 8dfb9d8..2f846bd) |
... |
... |
class Build |
134 |
134 |
* @param status New status string. |
* @param status New status string. |
135 |
135 |
* @param output Multiline build output. |
* @param output Multiline build output. |
136 |
136 |
*/ |
*/ |
137 |
|
public function setResult($status, $output, $exitcode) |
|
|
137 |
|
public function markAsFinished($status, $output, $exitcode) |
138 |
138 |
{ |
{ |
139 |
139 |
$output = gzdeflate($output, 9); |
$output = gzdeflate($output, 9); |
140 |
140 |
if ($output === false) { |
if ($output === false) { |
File daemon.php changed (mode: 100644) (index da451f9..933dd55) |
... |
... |
function runBuilds($builds) |
112 |
112 |
$revision = $build->revision; |
$revision = $build->revision; |
113 |
113 |
system(__DIR__ . "/vcs/checkout '" . $revision . "'", $retval); |
system(__DIR__ . "/vcs/checkout '" . $revision . "'", $retval); |
114 |
114 |
if ($retval != 0) { |
if ($retval != 0) { |
115 |
|
$build->setResult('ERROR', "Failed to checkout revision\n", |
|
116 |
|
$retval); |
|
|
115 |
|
$build->markAsFinished('ERROR', |
|
116 |
|
"Failed to checkout revision\n", |
|
117 |
|
$retval); |
117 |
118 |
$revision = ''; |
$revision = ''; |
118 |
119 |
continue; |
continue; |
119 |
120 |
} |
} |
|
... |
... |
function runBuild($build) |
149 |
150 |
$exitcode = pclose($handle); |
$exitcode = pclose($handle); |
150 |
151 |
|
|
151 |
152 |
$output = makeReport($rawOutput); |
$output = makeReport($rawOutput); |
152 |
|
$build->setResult(($exitcode == 0) ? 'OK' : 'FAIL', $output, $exitcode); |
|
|
153 |
|
$build->markAsFinished(($exitcode == 0) ? 'OK' : 'FAIL', $output, |
|
154 |
|
$exitcode); |
153 |
155 |
} |
} |
154 |
156 |
|
|
155 |
157 |
/** |
/** |