From e87896e4b46972e7799b9c52245b96094b4b7fce Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 Mar 2009 15:16:11 +0000 Subject: [PATCH] * eval-jobs -> hydra_eval_jobs. --- src/c/Makefile | 4 ++-- src/c/{eval-jobs.cc => hydra_eval_jobs.cc} | 0 src/root/build.tt | 4 ++-- src/root/project.tt | 14 ++++---------- src/script/hydra_scheduler.pl | 14 ++++++++------ 5 files changed, 16 insertions(+), 20 deletions(-) rename src/c/{eval-jobs.cc => hydra_eval_jobs.cc} (100%) diff --git a/src/c/Makefile b/src/c/Makefile index dfb4e512..fd5b509d 100644 --- a/src/c/Makefile +++ b/src/c/Makefile @@ -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 diff --git a/src/c/eval-jobs.cc b/src/c/hydra_eval_jobs.cc similarity index 100% rename from src/c/eval-jobs.cc rename to src/c/hydra_eval_jobs.cc diff --git a/src/root/build.tt b/src/root/build.tt index 14fafeae..a7f74409 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -136,12 +136,12 @@ [% IF build.resultInfo.stoptime %][% PROCESS renderDateTime timestamp = build.resultInfo.stoptime %][% ELSE %](cached build)[% END %] - Duration (seconds): + Duration: [% IF build.resultInfo.iscachedbuild %] (cached build) [% ELSE %] - [% build.resultInfo.stoptime - build.resultInfo.starttime %] + [% build.resultInfo.stoptime - build.resultInfo.starttime %]s [% END %] diff --git a/src/root/project.tt b/src/root/project.tt index 1e86c08b..7bd076a3 100644 --- a/src/root/project.tt +++ b/src/root/project.tt @@ -97,22 +97,16 @@ Last checked: [% IF jobset.lastcheckedtime %] - [% PROCESS renderDateTime timestamp = jobset.lastcheckedtime %] + [% PROCESS renderDateTime timestamp = jobset.lastcheckedtime -%][% IF jobset.errormsg -%], evaluation error: +
[% HTML.escape(jobset.errormsg) %]
+ [% ELSE %], no errors + [% END %] [% ELSE %] never [% END %] [% END %] - [% IF !edit && jobset.errormsg %] - - Last evaluation error: - - On [% PROCESS renderDateTime timestamp = jobset.errortime %]: -
[% HTML.escape(jobset.errormsg) %]
- - - [% END %]

Inputs

diff --git a/src/script/hydra_scheduler.pl b/src/script/hydra_scheduler.pl index 1fbe510b..f6fc6fa3 100755 --- a/src/script/hydra_scheduler.pl +++ b/src/script/hydra_scheduler.pl @@ -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); }