tests: move to t, allow yath test
from root
By moving the tests subdirectory to t, we gain the ability to run `yath test` with no arguments from inside `nix develop` in the root of the the repo. (`nix develop` is necessary in order to set the proper env vars for `yath` to find our test libraries.)
This commit is contained in:
28
t/input-types/bzr-checkout.t
Normal file
28
t/input-types/bzr-checkout.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a bzr checkout as input.
|
||||
testScmInput(
|
||||
type => 'bzr-checkout',
|
||||
expr => 'bzr-checkout-input.nix',
|
||||
uri => 'bzr-checkout-repo',
|
||||
update => 'jobs/bzr-checkout-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
28
t/input-types/bzr.t
Normal file
28
t/input-types/bzr.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a bzr repo as input.
|
||||
testScmInput(
|
||||
type => 'bzr',
|
||||
expr => 'bzr-input.nix',
|
||||
uri => 'bzr-repo',
|
||||
update => 'jobs/bzr-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
28
t/input-types/darcs.t
Normal file
28
t/input-types/darcs.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a darcs repo as input.
|
||||
testScmInput(
|
||||
type => 'darcs',
|
||||
expr => 'darcs-input.nix',
|
||||
uri => 'darcs-repo',
|
||||
update => 'jobs/darcs-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
29
t/input-types/deepgit.t
Normal file
29
t/input-types/deepgit.t
Normal file
@ -0,0 +1,29 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a deep git clone as input.
|
||||
testScmInput(
|
||||
type => 'git',
|
||||
name => 'deepgit',
|
||||
expr => 'deepgit-input.nix',
|
||||
uri => 'git-repo master 1',
|
||||
update => 'jobs/git-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
29
t/input-types/git-rev.t
Normal file
29
t/input-types/git-rev.t
Normal file
@ -0,0 +1,29 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a git revision as input.
|
||||
testScmInput(
|
||||
type => 'git',
|
||||
name => 'git-rev',
|
||||
expr => 'git-rev-input.nix',
|
||||
uri => 'git-repo 7f60df502b96fd54bbfa64dd94b56d936a407701',
|
||||
update => 'jobs/git-rev-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
28
t/input-types/git.t
Normal file
28
t/input-types/git.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a git repo as input.
|
||||
testScmInput(
|
||||
type => 'git',
|
||||
expr => 'git-input.nix',
|
||||
uri => 'git-repo',
|
||||
update => 'jobs/git-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
28
t/input-types/hg.t
Normal file
28
t/input-types/hg.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a hg repo as input.
|
||||
testScmInput(
|
||||
type => 'hg',
|
||||
expr => 'hg-input.nix',
|
||||
uri => 'hg-repo',
|
||||
update => 'jobs/hg-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
28
t/input-types/svn-checkout.t
Normal file
28
t/input-types/svn-checkout.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a svn checkout as input.
|
||||
testScmInput(
|
||||
type => 'svn-checkout',
|
||||
expr => 'svn-checkout-input.nix',
|
||||
uri => 'svn-checkout-repo',
|
||||
update => 'jobs/svn-checkout-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
28
t/input-types/svn.t
Normal file
28
t/input-types/svn.t
Normal file
@ -0,0 +1,28 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a svn repo as input.
|
||||
testScmInput(
|
||||
type => 'svn',
|
||||
expr => 'svn-input.nix',
|
||||
uri => 'svn-repo',
|
||||
update => 'jobs/svn-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
Reference in New Issue
Block a user