tests: add jobsdir and testdir to ctx hash

[?]
Mar 5, 2021, 1:22 AM
YIZWKGFIITUYV2TW5RGMXY4IGHHIKHJWJ3ZG53LWW3GBYHR4LW4QC

Dependencies

  • [2] F7WJVMRV tests/input-types: split out scminputs into individual tests
  • [3] 4QI6G7YB tests: replace the flat list of contexts with a hash
  • [4] HENEI752 evaluate-dependent-jobsets: clean up test to be more clear
  • [5] E4TV6NH6 RunCommand: pass homepage, description, license, system, and nixname
  • [6] UIA3ULNU Give each test its own Nix directories
  • [7] OWRS526H Create an ephemeral PostgreSQL database per test
  • [8] HX4QYOYA add first evaluations tests
  • [9] 5SMQ2PLK Fix tests
  • [10] FAIJDQKZ
  • [11] SBKX3YH2 cleanup
  • [12] QIW2WZKW Fix indentation
  • [13] VU2OLHD2 Move most of AddBuilds to hydra-eval-jobset
  • [14] PY5GVGC7 Implemented quoted strings support in hydra-build-products to allow file names with spaces + testcase
  • [15] 3PNG7NIB Remove trailing whitespace
  • [16] 3AKZKWCR RunCommand: Test
  • [17] 3G475GRT Split out dependent tests in to its own .t
  • [18] ZTYKNDOL Move tests for SCM inputs in to its own .t

Change contents

  • replacement in tests/build-products.t at line 18
    [4.244][4.30:101]()
    my $jobset = createBaseJobset("build-products", "build-products.nix");
    [4.244]
    [4.312]
    my $jobset = createBaseJobset("build-products", "build-products.nix", $ctx{jobsdir});
  • replacement in tests/evaluate-basic.t at line 19
    [4.368][4.368:421]()
    my $jobset = createBaseJobset("basic", "basic.nix");
    [4.368]
    [4.421]
    my $jobset = createBaseJobset("basic", "basic.nix", $ctx{jobsdir});
  • replacement in tests/evaluate-basic.t at line 32
    [4.1142][4.1142:1155]()
    done_testing;
    [4.1142]
    done_testing;
  • replacement in tests/evaluate-dependent-jobsets.t at line 16
    [4.270][4.270:392]()
    my $jobset = createJobsetWithOneInput("build-output-as-input", "build-output-as-input.nix", "build1", "build", "build1");
    [4.270]
    [4.392]
    my $jobset = createJobsetWithOneInput("build-output-as-input", "build-output-as-input.nix", "build1", "build", "build1", $ctx{jobsdir});
  • replacement in tests/input-types/bzr-checkout.t at line 6
    [2.91][2.91:131]()
    (my $datadir, my $pgsql) = test_init();
    [2.91]
    [2.131]
    my %ctx = test_init();
  • replacement in tests/input-types/bzr-checkout.t at line 24
    [2.485][2.485:529]()
    datadir => $datadir,
    testdir => getcwd,
    [2.485]
    [2.529]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/bzr.t at line 6
    [2.640][2.640:680]()
    (my $datadir, my $pgsql) = test_init();
    [2.640]
    [2.680]
    my %ctx = test_init();
  • replacement in tests/input-types/bzr.t at line 24
    [2.994][2.994:1038]()
    datadir => $datadir,
    testdir => getcwd,
    [2.994]
    [2.1038]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/darcs.t at line 6
    [2.1140][2.1140:1180]()
    (my $datadir, my $pgsql) = test_init();
    [2.1140]
    [2.1180]
    my %ctx = test_init();
  • replacement in tests/input-types/darcs.t at line 24
    [2.1504][2.1504:1548]()
    datadir => $datadir,
    testdir => getcwd,
    [2.1504]
    [2.1548]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/deepgit.t at line 6
    [2.1652][2.1652:1692]()
    (my $datadir, my $pgsql) = test_init();
    [2.1652]
    [2.1692]
    my %ctx = test_init();
  • replacement in tests/input-types/deepgit.t at line 25
    [2.2046][2.2046:2090]()
    datadir => $datadir,
    testdir => getcwd,
    [2.2046]
    [2.2090]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/git-rev.t at line 6
    [2.2196][2.2196:2236]()
    (my $datadir, my $pgsql) = test_init();
    [2.2196]
    [2.2236]
    my %ctx = test_init();
  • replacement in tests/input-types/git-rev.t at line 25
    [2.2624][2.2624:2668]()
    datadir => $datadir,
    testdir => getcwd,
    [2.2624]
    [2.2668]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/git.t at line 6
    [2.2774][2.2774:2814]()
    (my $datadir, my $pgsql) = test_init();
    [2.2774]
    [2.2814]
    my %ctx = test_init();
  • replacement in tests/input-types/git.t at line 24
    [2.3128][2.3128:3172]()
    datadir => $datadir,
    testdir => getcwd,
    [2.3128]
    [2.3172]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/hg.t at line 6
    [2.3274][2.3274:3314]()
    (my $datadir, my $pgsql) = test_init();
    [2.3274]
    [2.3314]
    my %ctx = test_init();
  • replacement in tests/input-types/hg.t at line 24
    [2.3623][2.3623:3667]()
    datadir => $datadir,
    testdir => getcwd,
    [2.3623]
    [2.3667]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/svn-checkout.t at line 6
    [2.3768][2.3768:3808]()
    (my $datadir, my $pgsql) = test_init();
    [2.3768]
    [2.3808]
    my %ctx = test_init();
  • replacement in tests/input-types/svn-checkout.t at line 24
    [2.4162][2.4162:4206]()
    datadir => $datadir,
    testdir => getcwd,
    [2.4162]
    [2.4206]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/input-types/svn.t at line 6
    [2.4317][2.4317:4357]()
    (my $datadir, my $pgsql) = test_init();
    [2.4317]
    [2.4357]
    my %ctx = test_init();
  • replacement in tests/input-types/svn.t at line 24
    [2.4671][2.4671:4715]()
    datadir => $datadir,
    testdir => getcwd,
    [2.4671]
    [2.4715]
    datadir => $ctx{tmpdir},
    testdir => $ctx{testdir},
    jobsdir => $ctx{jobsdir},
  • replacement in tests/lib/Setup.pm at line 8
    [4.580][4.238:247](),[4.1315][4.238:247](),[4.238][4.238:247]()
    use Cwd;
    [4.1315]
    [4.561]
    use File::Basename;
    use Cwd qw(abs_path getcwd);
  • edit in tests/lib/Setup.pm at line 67
    [3.85]
    [3.85]
    db => $pgsql,
  • replacement in tests/lib/Setup.pm at line 69
    [3.109][3.109:130]()
    db => $pgsql
    [3.109]
    [3.130]
    testdir => abs_path(dirname(__FILE__) . "/.."),
    jobsdir => abs_path(dirname(__FILE__) . "/../jobs")
  • replacement in tests/lib/Setup.pm at line 104
    [4.252][4.358:399]()
    my ($jobsetName, $nixexprpath) = @_;
    [4.252]
    [4.37772]
    my ($jobsetName, $nixexprpath, $jobspath) = @_;
  • replacement in tests/lib/Setup.pm at line 114
    [4.827][4.827:927]()
    $jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => getcwd."/jobs"});
    [4.827]
    [4.770]
    $jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => $jobspath});
  • replacement in tests/lib/Setup.pm at line 120
    [4.823][4.949:1072]()
    my ($jobsetName, $nixexprpath, $name, $type, $uri) = @_;
    my $jobset = createBaseJobset($jobsetName, $nixexprpath);
    [4.823]
    [4.942]
    my ($jobsetName, $nixexprpath, $name, $type, $uri, $jobspath) = @_;
    my $jobset = createBaseJobset($jobsetName, $nixexprpath, $jobspath);
  • edit in tests/lib/TestScmInput.pm at line 39
    [2.6334]
    [2.6334]
    my $jobsdir = $args{jobsdir} // die "required arg 'jobsdir' missing";
  • replacement in tests/lib/TestScmInput.pm at line 53
    [2.6768][2.6768:6845]()
    my $jobset = createJobsetWithOneInput($name, $expr, 'src', $type, $uri);
    [2.6768]
    [2.6845]
    my $jobset = createJobsetWithOneInput($name, $expr, 'src', $type, $uri, $jobsdir);
  • replacement in tests/plugins/runcommand.t at line 26
    [4.1743][4.1743:1801]()
    my $jobset = createBaseJobset("basic", "runcommand.nix");
    [4.1743]
    [4.1801]
    my $jobset = createBaseJobset("basic", "runcommand.nix", $ctx{jobsdir});
  • replacement in tests/plugins/runcommand.t at line 141
    [4.6967][4.6967:6980]()
    done_testing;
    [4.6967]
    done_testing;