fix(t/evaluator/evaluate-oom): use test_context to get path to ./t/jobs instead of relative paths

This commit is contained in:
Kayla Firestack 2022-05-02 15:14:46 -04:00
parent 013a1dcabc
commit 87f610e7c1

View file

@ -21,6 +21,8 @@ eval {
}; };
if ($sd_res != 0) { skip_all("`systemd-run` returned non-zero when executing `true` (expected 0)"); } if ($sd_res != 0) { skip_all("`systemd-run` returned non-zero when executing `true` (expected 0)"); }
my $ctx = test_context();
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ( my ($res, $stdout, $stderr) = captureStdoutStderr(60, (
"systemd-run", "systemd-run",
"--user", "--user",
@ -31,11 +33,11 @@ my ($res, $stdout, $stderr) = captureStdoutStderr(60, (
"--", "--",
"hydra-eval-jobs", "hydra-eval-jobs",
"-I", "/dev/zero", "-I", "/dev/zero",
"-I", "./t/jobs", "-I", $ctx->jobsdir,
"./t/jobs/oom.nix" ($ctx->jobsdir . "/oom.nix")
)); ));
isnt($res, 0, "hydra-eval-jobs exits non-zero"); isnt($res, 0, "`hydra-eval-jobs` exits non-zero");
ok(utf8::decode($stderr), "Stderr output is UTF8-clean"); ok(utf8::decode($stderr), "Stderr output is UTF8-clean");
like( like(
$stderr, $stderr,