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; 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.CatalystDevel
perlPackages.CatalystPluginSessionStoreFastMmap perlPackages.CatalystPluginSessionStoreFastMmap
perlPackages.CatalystPluginStackTrace perlPackages.CatalystPluginStackTrace
@ -40,5 +25,5 @@ in
perlPackages.DigestSHA1 perlPackages.DigestSHA1
perlPackages.CryptRandPasswd perlPackages.CryptRandPasswd
perlPackages.TestMore perlPackages.TestMore
nixPerl perlPackages.nixPerl
] ]

View file

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

View file

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

View file

@ -10,7 +10,7 @@ use Setup;
my $db = openHydraDB; my $db = openHydraDB;
use Test::Simple tests => 22; use Test::Simple tests => 28;
hydra_setup($db); 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(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"); 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 # Test scm inputs