Unverified Commit 6ff52990 authored by boklm's avatar boklm
Browse files

Add a --no-cleanup option

Add an option to disable cleanup of tmp directory after running the
testsuite. This can be useful for debugging.
parent 857bf7e7
......@@ -64,6 +64,7 @@ my %default_options = (
test_data_url_https => 'https://test-data.tbb.torproject.org',
test_data_dir => "$FindBin::Bin/test-data",
testsuite => undef,
cleanup => 1,
);
......@@ -74,7 +75,8 @@ sub get_options {
action=s enable-tests=s upload-to=s os=s arch=s
virustotal! email-to=s@ email-from=s email-subject=s
mozmill-dir=s reports-url=s http-proxy-port=i
xdummy! disable-tests=s testrequests_types=s testsuite=s);
xdummy! disable-tests=s testrequests_types=s testsuite=s
cleanup!);
my (%cli, %config);
Getopt::Long::GetOptionsFromArray(\@_, \%cli, @options) || exit 1;
$cli{args} = \@_ if @_;
......
......@@ -215,7 +215,8 @@ sub test_sha {
sub test_start {
my ($report, $tbbinfos) = @_;
my $oldcwd = getcwd;
my $tmpdir = File::Temp::newdir('XXXXXX', DIR => $options->{tmpdir});
my $tmpdir = File::Temp::newdir('XXXXXX', DIR => $options->{tmpdir},
CLEANUP => $options->{cleanup});
$tbbinfos->{tmpdir} = $tmpdir->dirname;
$tbbinfos->{tests} //= [ map { { %$_ } } @TBBTestSuite::TestSuite::BrowserBundleTests::tests ];
$tbbinfos->{'results-dir'} =
......
......@@ -147,6 +147,9 @@ Available options
Select the port used to start an http proxy, for tor_bootstrap
tests that require an http proxy.
--no-cleanup::
Disable cleanup of tmp directory after running the testsuite.
This can be useful for debugging.
Configuration Files
-------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment