forked from lix-project/hydra
show evaluation errors in log of tests
This commit is contained in:
parent
5db13c92b2
commit
bf2f86d3c6
|
@ -24,7 +24,7 @@ clean :
|
||||||
chmod -R a+w nix
|
chmod -R a+w nix
|
||||||
rm -rf db.sqlite data nix git-repo hg-repo svn-repo svn-checkout svn-checkout-repo bzr-repo bzr-checkout-repo
|
rm -rf db.sqlite data nix git-repo hg-repo svn-repo svn-checkout svn-checkout-repo bzr-repo bzr-checkout-repo
|
||||||
|
|
||||||
$(TESTS) : db.sqlite dirs
|
$(TESTS) : db.sqlite repos
|
||||||
|
|
||||||
db.sqlite : $(top_srcdir)/src/sql/hydra-sqlite.sql
|
db.sqlite : $(top_srcdir)/src/sql/hydra-sqlite.sql
|
||||||
sqlite3 db.sqlite < $(top_srcdir)/src/sql/hydra-sqlite.sql
|
sqlite3 db.sqlite < $(top_srcdir)/src/sql/hydra-sqlite.sql
|
||||||
|
|
|
@ -38,6 +38,8 @@ sub createJobsetWithOneSCMInput {
|
||||||
|
|
||||||
$jobsetinput = $jobset->jobsetinputs->create({name => "src", type => $type});
|
$jobsetinput = $jobset->jobsetinputs->create({name => "src", type => $type});
|
||||||
$jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => $uri});
|
$jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => $uri});
|
||||||
|
|
||||||
|
return $jobset;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub evalSucceeds {
|
sub evalSucceeds {
|
||||||
|
@ -57,8 +59,10 @@ ok( nrBuildsForJobset("tests", "basic") == 3 , "Evaluating jobs/basic.nix should
|
||||||
|
|
||||||
my @scminputs = ("svn", "svn-checkout", "git", "bzr", "bzr-checkout", "hg");
|
my @scminputs = ("svn", "svn-checkout", "git", "bzr", "bzr-checkout", "hg");
|
||||||
foreach my $scm (@scminputs) {
|
foreach my $scm (@scminputs) {
|
||||||
createJobsetWithOneSCMInput($scm, "$scm-input.nix", $scm, "$jobsBaseUri/$scm-repo");
|
$jobset = createJobsetWithOneSCMInput($scm, "$scm-input.nix", $scm, "$jobsBaseUri/$scm-repo");
|
||||||
ok(evalSucceeds("tests", $scm), "Evaluating jobs/$scm-input.nix should exit with return code 0.");
|
ok(evalSucceeds("tests", $scm), "Evaluating jobs/$scm-input.nix should exit with return code 0.");
|
||||||
ok(nrBuildsForJobset("tests", $scm) == 1, "Evaluating jobs/$scm-input.nix should result in 1 build")
|
print STDERR "Evaluation errors for jobset tests:$scm: \n".$jobset->errormsg."\n" if $jobset->errormsg;
|
||||||
|
|
||||||
|
ok(nrBuildsForJobset("tests", $scm) == 1, "Evaluating jobs/$scm-input.nix should result in 1 build");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue