Hydra::Helper::Nix: expose a captureStdoutStderrWithStdin, make it available in tests
This commit is contained in:
@ -5,6 +5,7 @@ package CliRunners;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(
|
||||
captureStdoutStderr
|
||||
captureStdoutStderrWithStdin
|
||||
evalFails
|
||||
evalSucceeds
|
||||
runBuild
|
||||
@ -21,6 +22,15 @@ sub captureStdoutStderr {
|
||||
return Hydra::Helper::Nix::captureStdoutStderr(@_)
|
||||
}
|
||||
|
||||
sub captureStdoutStderrWithStdin {
|
||||
# "Lazy"-load Hydra::Helper::Nix to avoid the compile-time
|
||||
# import of Hydra::Model::DB. Early loading of the DB class
|
||||
# causes fixation of the DSN, and we need to fixate it after
|
||||
# the temporary DB is setup.
|
||||
require Hydra::Helper::Nix;
|
||||
return Hydra::Helper::Nix::captureStdoutStderrWithStdin(@_)
|
||||
}
|
||||
|
||||
sub evalSucceeds {
|
||||
my ($jobset) = @_;
|
||||
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-eval-jobset", $jobset->project->name, $jobset->name));
|
||||
|
@ -13,6 +13,7 @@ use CliRunners;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(
|
||||
captureStdoutStderr
|
||||
captureStdoutStderrWithStdin
|
||||
createBaseJobset
|
||||
createJobsetWithOneInput
|
||||
evalFails
|
||||
|
Reference in New Issue
Block a user