Skip to content

Commit

Permalink
Fix reruns of full stack tests on specified temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
okurz committed Feb 23, 2022
1 parent f985ad8 commit 823aa4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/lib/OpenQA/Test/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,15 @@ sub setup_share_dir {
return $sharedir;
}

sub _test_dir () {
return tempdir unless $ENV{OPENQA_FULLSTACK_TEMP_DIR};
my $dir = path($ENV{OPENQA_FULLSTACK_TEMP_DIR});
return $dir->remove_tree({keep_root => 1});
}

sub setup_fullstack_temp_dir {
my ($test_name) = @_;
my $tempdir = $ENV{OPENQA_FULLSTACK_TEMP_DIR} ? path($ENV{OPENQA_FULLSTACK_TEMP_DIR}) : tempdir;
my $tempdir = _test_dir();
my $basedir = $tempdir->child($test_name);
my $configdir = path($basedir, 'config')->make_path;
my $datadir = path($FindBin::Bin, 'data');
Expand Down

0 comments on commit 823aa4b

Please sign in to comment.