WFJ3ZPRMZ52NFPPGRJTVNLYLFFN2DYP3JHNTPVRQAEULEF7VCGGAC
W6J4PVRPLX2IBH2KO4A5DSZBJUJYFJ3LYBSP4YKJIDFBXYVD2DWQC
JRVI4XTV4OXAVYJYJ5MQHJ5YITOUI2VAUVEL6XXO5HME54IUC5LAC
DCHQR576HACO3R27EVIMYAWSK4ZOOFGPMHLCVEFOVO6SYDVBAXXAC
WHS5RMPOJIHWRANRNCI2PQQQ5FXF3OOYN7BC23EBPY5QIU74KK6AC
G2ZB6464XGPBIMSZIPSB24EIXSCCGV4XWC3IWPS2CXYPDSUZSU5QC
HX4QYOYAKKFKK4KF6SZ6FQCM5ZF7ZFDTQUR4GS5WPPTYZASYZZUAC
7RO7CINMZYA7TMACQEERL6MIQO7LZRKHVVW7FTQIS4TMJPYYLOHAC
svn-checkout-repo :
ln -s svn-repo svn-checkout-repo
bzr-checkout-repo :
ln -s bzr-repo bzr-checkout-repo
my $jobset = $project->jobsets->create({name => "basic", nixexprinput => "input", nixexprpath => "basic.nix", emailoverride => ""});
my $jobsetinput = $jobset->jobsetinputs->create({name => "input", type => "path"});
sub nrBuildsForJobset {
my ($project, $jobset) = @_;
return $db->resultset('Builds')->search({ project => $project, jobset => $jobset},{})->count ;
}
sub createJobsetWithOneSCMInput {
my ($jobsetName, $nixexprpath, $type, $uri) = @_;
my $jobset = $project->jobsets->create({name => $jobsetName, nixexprinput => "jobs", nixexprpath => $nixexprpath, emailoverride => ""});
my $jobsetinput;
my $jobsetinputals;
$jobsetinput = $jobset->jobsetinputs->create({name => "jobs", type => "path"});
$jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => getcwd."/jobs"});
$jobsetinput = $jobset->jobsetinputs->create({name => "src", type => $type});
$jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => $uri});
}
sub evalSucceeds {
my ($project, $jobset) = @_;
return captureStdoutStderr(60, ("../src/script/hydra_evaluator.pl", $project, $jobset));
}
my $jobset = $project->jobsets->create({name => "basic", nixexprinput => "jobs", nixexprpath => "basic.nix", emailoverride => ""});
my $jobsetinput = $jobset->jobsetinputs->create({name => "jobs", type => "path"});
my @scminputs = ("svn", "svn-checkout", "git", "bzr", "bzr-checkout", "hg");
foreach my $scm (@scminputs) {
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(nrBuildsForJobset("tests", $scm) == 1, "Evaluating jobs/$scm-input.nix should result in 1 build")
}
{ src }:
{
copy =
derivation {
name = "bzr-checkout-input";
system = builtins.currentSystem;
builder = ./scm-builder.sh;
};
}
{ src }:
{
copy =
derivation {
name = "bzr-input";
system = builtins.currentSystem;
builder = ./scm-builder.sh;
};
}
{ src }:
{
copy =
derivation {
name = "git-input";
system = builtins.currentSystem;
builder = ./scm-builder.sh;
};
}
{ src }:
{
copy =
derivation {
name = "hg-input";
system = builtins.currentSystem;
builder = ./scm-builder.sh;
};
}
mkdir $out
cp -v $src/* $out/
{ src }:
{
copy =
derivation {
name = "bzr-checkout-input";
system = builtins.currentSystem;
builder = ./scm-builder.sh;
};
}
{ src }:
{
copy =
derivation {
name = "svn-input";
system = builtins.currentSystem;
builder = ./scm-builder.sh;
};
}