Author: rob
Date: Wed Dec 22 14:55:05 2010
New Revision: 25242
URL: https://svn.nixos.org/websvn/nix/?rev=25242&sc=1
Log:
hydra: add support for succeedOnFailure feature in stdenv
Modified:
hydra/trunk/src/root/common.tt
hydra/trunk/src/script/hydra_build.pl.in
Modified: hydra/trunk/src/root/common.tt
==============================================================================
--- hydra/trunk/src/root/common.tt Wed Dec 22 14:52:04 2010 (r25241)
+++ hydra/trunk/src/root/common.tt Wed Dec 22 14:55:05 2010 (r25242)
@@ -217,6 +217,8 @@
<img src="/static/images/error_[% size %].png"
alt="Failed" />
[% ELSIF build.resultInfo.buildstatus == 5 %]
<img src="/static/images/error_[% size %].png"
alt="Failed" />
+ [% ELSIF build.resultInfo.buildstatus == 6 %]
+ <img src="/static/images/error_[% size %].png"
alt="Failed (with result)" />
[% ELSE %]
<img src="/static/images/error_[% size %].png"
alt="Failed" />
[% END %]
@@ -246,6 +248,9 @@
<span class="error">Build inhibited because a
dependency previously failed to build</span>
[% failedDep = build.resultInfo.failedDep %]
(namely, <a href="[% c.uri_for('/build'
failedDep.build.id 'nixlog' failedDep.stepnr) %]"><tt>[% failedDep.outpath
%]</tt></a>)
+ [% ELSIF build.resultInfo.buildstatus == 6 %]
+ <img src="/static/images/failure.gif" alt="Failed
(with result)" />
+ <span class="error">Build failed (with result)</span>
[% ELSE %]
<img src="/static/images/failure.gif" alt="Failed" />
<span class="error">Build failed</span>
Modified: hydra/trunk/src/script/hydra_build.pl.in
==============================================================================
--- hydra/trunk/src/script/hydra_build.pl.in Wed Dec 22 14:52:04 2010
(r25241)
+++ hydra/trunk/src/script/hydra_build.pl.in Wed Dec 22 14:55:05 2010
(r25242)
@@ -279,7 +279,14 @@
my $drvPathStep = $1;
txn_do($db, sub {
my $step = $build->buildsteps->find({stepnr =>
$buildSteps{$drvPathStep}}) or die;
- $step->update({busy => 0, status => 0, stoptime => time});
+ my $stepOutpath = $step->outpath;
+ my $stepStatus = 0;
+
+ # when $out/nix-support/failed exists, build actually
failed, exit code is in the file, status code for such builds is 6
+ $stepStatus = 6 if -f "$stepOutpath/nix-support/failed";
+ $thisBuildFailed = 1 if ($drvPath eq $drvPathStep &&
$stepStatus == 6);
+
+ $step->update({busy => 0, status => $stepStatus, stoptime
=> time});
});
}
@@ -358,6 +365,8 @@
if ($thisBuildFailed) { $buildStatus = 1; }
elsif ($someBuildFailed) { $buildStatus = 2; }
else { $buildStatus = 3; }
+ } else {
+ $buildStatus = 6 if $thisBuildFailed;
}
# Only store the output of running Nix if we have a miscellaneous
error.
@@ -402,7 +411,7 @@
, releasename => $releaseName
});
- if ($buildStatus == 0) {
+ if ($buildStatus == 0 || $buildStatus == 6) {
addBuildProducts($db, $build);
}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits