From 93efae0c2323e42d8e016a5606889163f517defd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Mar 2012 21:13:50 +0100 Subject: [PATCH] Fix "make check" --- tests/Setup.pm | 2 +- tests/evaluation-tests.pl | 6 +++--- tests/query-all-tables.pl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Setup.pm b/tests/Setup.pm index c005e1c4..87d1f28a 100644 --- a/tests/Setup.pm +++ b/tests/Setup.pm @@ -21,7 +21,7 @@ sub nrBuildsForJobset { sub queuedBuildsForJobset { my ($jobset) = @_; - return $jobset->builds->search({},{ join => 'schedulingInfo' }); + return $jobset->builds->search({finished => 0}); } sub nrQueuedBuildsForJobset { diff --git a/tests/evaluation-tests.pl b/tests/evaluation-tests.pl index d24a1c8b..fff89c3f 100755 --- a/tests/evaluation-tests.pl +++ b/tests/evaluation-tests.pl @@ -30,7 +30,7 @@ for my $build (queuedBuildsForJobset($jobset)) { ok(runBuild($build), "Build '".$build->job->name."' from jobs/basic.nix should exit with code 0"); my $newbuild = $db->resultset('Builds')->find($build->id); my $expected = $build->job->name eq "fails" ? 1 : 0; - ok($newbuild->buildresultinfo->buildstatus == $expected, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus $expected"); + ok($newbuild->finished == 1 && $newbuild->buildstatus == $expected, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus $expected"); } # Test jobset with 2 jobs, one has parameter of succeeded build of the other @@ -41,7 +41,7 @@ ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-inpu for my $build (queuedBuildsForJobset($jobset)) { ok(runBuild($build), "Build '".$build->job->name."' from jobs/basic.nix should exit with code 0"); my $newbuild = $db->resultset('Builds')->find($build->id); - ok($newbuild->buildresultinfo->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0"); + ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0"); } ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix for second time should exit with return code 0"); @@ -49,7 +49,7 @@ ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-inpu for my $build (queuedBuildsForJobset($jobset)) { ok(runBuild($build), "Build '".$build->job->name."' from jobs/basic.nix should exit with code 0"); my $newbuild = $db->resultset('Builds')->find($build->id); - ok($newbuild->buildresultinfo->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0"); + ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/basic.nix should have buildstatus 0"); } diff --git a/tests/query-all-tables.pl b/tests/query-all-tables.pl index 55c42713..1475f173 100755 --- a/tests/query-all-tables.pl +++ b/tests/query-all-tables.pl @@ -7,7 +7,7 @@ my $db = openHydraDB; my @sources = $db->sources; my $nrtables = scalar(@sources); -use Test::Simple tests => 44; +use Test::Simple tests => 42; foreach my $source (@sources) { my $title = "Basic select query for $source";