forked from lix-project/hydra
Let tests themselves intentionally leak temp dir (#1320)
* Let tests themselves intentionally leak temp dir By default Yath will clean up temporary files, so the result is the same. But `--keep-dirs` can be passed to `yath test` telling Yath to *not* clean them up instead. This is very useful for debugging. * Update t/lib/HydraTestContext.pm Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
This commit is contained in:
parent
831021808c
commit
411e4d0c24
|
@ -39,7 +39,9 @@ use Hydra::Helper::Exec;
|
|||
sub new {
|
||||
my ($class, %opts) = @_;
|
||||
|
||||
my $dir = File::Temp->newdir();
|
||||
# Cleanup will be managed by yath. By the default it will be cleaned
|
||||
# up, but can be kept to aid in debugging test failures.
|
||||
my $dir = File::Temp->newdir(CLEANUP => 0);
|
||||
|
||||
$ENV{'HYDRA_DATA'} = "$dir/hydra-data";
|
||||
mkdir $ENV{'HYDRA_DATA'};
|
||||
|
|
Loading…
Reference in a new issue