* eval-jobs -> hydra_eval_jobs.

This commit is contained in:
Eelco Dolstra 2009-03-09 15:16:11 +00:00
parent a74bfdf533
commit e87896e4b4
5 changed files with 16 additions and 20 deletions

View file

@ -1,5 +1,5 @@
NIX = /home/eelco/Dev/nix/inst
ATERM = /home/eelco/Dev/nix/externals/inst-aterm
eval-jobs: eval-jobs.cc
libtool --mode=link g++ -o eval-jobs eval-jobs.cc -I$(NIX)/include/nix -I$(ATERM)/include -L$(NIX)/lib/nix/ -lmain -lexpr -L$(ATERM)/lib -lATerm
hydra_eval_jobs: hydra_eval_jobs.cc
libtool --mode=link g++ -o hydra_eval_jobs hydra_eval_jobs.cc -I$(NIX)/include/nix -I$(ATERM)/include -L$(NIX)/lib/nix/ -lmain -lexpr -L$(ATERM)/lib -lATerm

View file

@ -136,12 +136,12 @@
<td>[% IF build.resultInfo.stoptime %][% PROCESS renderDateTime timestamp = build.resultInfo.stoptime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
</tr>
<tr>
<th>Duration (seconds):</th>
<th>Duration:</th>
<td>
[% IF build.resultInfo.iscachedbuild %]
<em>(cached build)</em>
[% ELSE %]
[% build.resultInfo.stoptime - build.resultInfo.starttime %]
[% build.resultInfo.stoptime - build.resultInfo.starttime %]s
[% END %]
</td>
</tr>

View file

@ -97,22 +97,16 @@
<th>Last checked:</th>
<td>
[% IF jobset.lastcheckedtime %]
[% PROCESS renderDateTime timestamp = jobset.lastcheckedtime %]
[% PROCESS renderDateTime timestamp = jobset.lastcheckedtime -%][% IF jobset.errormsg -%]<em>, evaluation error</em>:
<pre class="multiLineMsg error">[% HTML.escape(jobset.errormsg) %]</pre>
[% ELSE %], <em>no errors</em>
[% END %]
[% ELSE %]
<em>never</em>
[% END %]
</td>
</tr>
[% END %]
[% IF !edit && jobset.errormsg %]
<tr>
<th>Last evaluation error:</th>
<td>
<em>On [% PROCESS renderDateTime timestamp = jobset.errortime %]:</em>
<pre class="multiLineMsg error">[% HTML.escape(jobset.errormsg) %]</pre>
</td>
</tr>
[% END %]
</table>
<h4>Inputs</h4>

View file

@ -329,7 +329,7 @@ sub checkJobSet {
$nixExprPath .= "/" . $jobset->nixexprpath;
(my $res, my $jobsXml, my $stderr) = captureStdoutStderr(
"eval-jobs", $nixExprPath, inputsToArgs($inputInfo));
"hydra_eval_jobs", $nixExprPath, inputsToArgs($inputInfo));
die "cannot evaluate the Nix expression containing the jobs:\n$stderr" unless $res;
my $jobs = XMLin($jobsXml,
@ -338,16 +338,18 @@ sub checkJobSet {
SuppressEmpty => '')
or die "cannot parse XML output";
# Store the errors messages for jobs that failed to evaluate.
foreach my $error (@{$jobs->{error}}) {
print "error at " . $error->{location} . ": " . $error->{msg} . "\n";
}
# Schedule each successfully evaluated job.
foreach my $job (@{$jobs->{job}}) {
print "considering job " . $job->{jobName} . "\n";
checkJob($project, $jobset, $inputInfo, $job);
}
# Store the errors messages for jobs that failed to evaluate.
my $msg = "";
foreach my $error (@{$jobs->{error}}) {
$msg .= "at `" . $error->{location} . "': " . $error->{msg} . "\n";
}
setJobsetError($jobset, $msg);
}