Optimize fetch-git.
This commit is contained in:
@ -7,7 +7,7 @@ use Setup;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
|
||||
use Test::Simple tests => 28;
|
||||
use Test::Simple tests => 48;
|
||||
|
||||
hydra_setup($db);
|
||||
|
||||
@ -57,7 +57,17 @@ my @scminputs = ("svn", "svn-checkout", "git", "bzr", "bzr-checkout", "hg");
|
||||
foreach my $scm (@scminputs) {
|
||||
$jobset = createJobsetWithOneInput($scm, "$scm-input.nix", "src", $scm, "$jobsBaseUri/$scm-repo");
|
||||
|
||||
ok(evalSucceeds($jobset), "Evaluating jobs/$scm-input.nix should exit with return code 0.");
|
||||
ok(nrQueuedBuildsForJobset($jobset) == 1, "Evaluating jobs/$scm-input.nix should result in 1 build in queue");
|
||||
}
|
||||
my $c = 1;
|
||||
my $q = 1;
|
||||
do {
|
||||
# Verify that it can be fetched and queued.
|
||||
ok(evalSucceeds($jobset), "$c Evaluating jobs/$scm-input.nix should exit with return code 0."); $c++;
|
||||
ok(nrQueuedBuildsForJobset($jobset) == $q, "$c Evaluating jobs/$scm-input.nix should result in 1 build in queue"); $c++;
|
||||
|
||||
# Verify that it is deterministic and not queued again.
|
||||
ok(evalSucceeds($jobset), "$c Evaluating jobs/$scm-input.nix should exit with return code 0."); $c++;
|
||||
ok(nrQueuedBuildsForJobset($jobset) == $q, "$c Evaluating jobs/$scm-input.nix should result in $q build in queue"); $c++;
|
||||
|
||||
$q++;
|
||||
} while(updateRepository($scm, getcwd . "/jobs/$scm-update.sh", getcwd . "/$scm-repo/"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user