hydra: fixed and re-enabled evaluation tests

This commit is contained in:
Rob Vermaas 2011-03-24 13:45:01 +00:00
parent f3f2c5683f
commit 385b70c898
4 changed files with 19 additions and 21 deletions

View file

@ -2,21 +2,6 @@
with pkgs;
let
nixPerl = buildPerlPackage {
name = "Nix-0.15";
src = fetchsvn {
url = https://svn.nixos.org/repos/nix/nix-perl/trunk;
rev = 24774;
sha256 = "1akj695gpnbrjlnwd1gdnnnk7ppvpp1qsinjn04az7q6hjqzbm6p";
};
NIX_PREFIX = nixSqlite;
doCheck = false; # tests currently don't work
};
in
[ perlPackages.CatalystDevel
perlPackages.CatalystPluginSessionStoreFastMmap
perlPackages.CatalystPluginStackTrace
@ -40,5 +25,5 @@ in
perlPackages.DigestSHA1
perlPackages.CryptRandPasswd
perlPackages.TestMore
nixPerl
perlPackages.nixPerl
]

View file

@ -73,7 +73,7 @@ rec {
--set NIX_RELEASE ${nix.name}
done
''; # */
LOGNAME="$USER";
meta = {
description = "Build of Hydra on ${system}";
};

View file

@ -9,7 +9,7 @@ TESTS_ENVIRONMENT = \
NIX_STORE_DIR="$(abs_builddir)/nix/store" \
NIX_LOG_DIR="$(abs_builddir)/nix/var/log/nix" \
PERL5LIB="$(srcdir):$(top_srcdir)/src/lib:$$PERL5LIB" \
PATH=$(abs_top_srcdir)/src/script:$$PATH \
PATH=$(abs_top_srcdir)/src/script:$(abs_top_srcdir)/src/c:$$PATH \
perl -w
EXTRA_DIST = \
@ -18,8 +18,8 @@ EXTRA_DIST = \
$(wildcard jobs/*.sh)
TESTS = \
query-all-tables.pl
# evaluation-tests.pl
query-all-tables.pl \
evaluation-tests.pl
clean :
chmod -R a+w nix

View file

@ -10,7 +10,7 @@ use Setup;
my $db = openHydraDB;
use Test::Simple tests => 22;
use Test::Simple tests => 28;
hydra_setup($db);
@ -40,6 +40,19 @@ $jobset = createJobsetWithOneInput("build-output-as-input", "build-output-as-inp
ok(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix should exit with return code 0");
ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-input.nix for first time should result in 1 build in queue");
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(evalSucceeds($jobset), "Evaluating jobs/build-output-as-input.nix for second time should exit with return code 0");
ok(nrQueuedBuildsForJobset($jobset) == 1 , "Evaluating jobs/build-output-as-input.nix for second time after building build1 should result in 1 build in queue");
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");
}
# Test scm inputs