Unverified Commit 4461ba9d authored by boklm's avatar boklm
Browse files

Add option to select the testsuite to run

parent 8a89ad51
......@@ -63,6 +63,7 @@ my %default_options = (
test_data_url => 'http://test-data.tbb.torproject.org',
test_data_url_https => 'https://test-data.tbb.torproject.org',
test_data_dir => "$FindBin::Bin/test-data",
testsuite => undef,
);
......@@ -74,7 +75,7 @@ sub get_options {
virustotal! email-to=s@ email-from=s email-subject=s
mozmill-dir=s reports-url=s http-proxy-port=i
newlayout! mbox! xdummy! disable-tests=s
testrequests_types=s);
testrequests_types=s testsuite=s);
my (%cli, %config);
Getopt::Long::GetOptionsFromArray(\@_, \%cli, @options) || exit 1;
$cli{args} = \@_ if @_;
......
......@@ -36,4 +36,11 @@ sub testsuite_infos {
return %testsuite_infos;
}
sub new_by_type {
my ($type, $testsuite) = @_;
my %ts = testsuite_types();
return $ts{$type} ? "TBBTestSuite::TestSuite::$ts{$type}"->new($testsuite)
: undef;
}
1;
......@@ -144,6 +144,9 @@ sub tbb_filename_infos {
} else {
return undef;
}
if ($options->{testsuite}) {
return TBBTestSuite::TestSuites::new_by_type($options->{testsuite}, \%res);
}
return $options->{virustotal} ?
TBBTestSuite::TestSuite::BrowserBundleVirusTotal->new(\%res)
: TBBTestSuite::TestSuite::BrowserBundleTests->new(\%res);
......
......@@ -35,6 +35,11 @@ Available options
Select a configuration file. See the section about Configuration
Files below.
--testsuite=<type>::
Select a testsuite type to use, when a tarball is specified on
the command line. If unspecified, the default Tor Browser
testsuite is used.
--no-gpgcheck::
Disable gpg check when downloading a sha256sum.txt file.
......
Markdown is supported
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