GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 9d5cbfcf authored by boklm's avatar boklm

Add an --action option to select what to do

And add a reports_index option, in addition to the run_tests default
action.
parent f57b3cf2
......@@ -66,6 +66,10 @@ The <tbb-file> can be:
Available options
-----------------
--action=<name>
Select the action to be done. The default is to run the tests.
See the section about actions for details.
--config=<file>
Select a configuration file. See the section about Configuration
Files below.
......@@ -135,3 +139,17 @@ return a hash containing the configuration. The options set by the
default configuration and command line arguments are available to this
script in the $option hash reference.
Selecting action
----------------
The --action option can be used to select the action to be done. The
following actions are available:
run_tests::
Run the tests, make a report, and update the reports index page.
This is the default action.
reports_index::
Create an index page listing the tests reports.
......@@ -16,6 +16,7 @@ BEGIN {
}
my %default_options = (
action => 'run_tests',
os => 'Linux',
arch => 'x86_64',
mozmill => 1,
......@@ -35,7 +36,8 @@ my %default_options = (
sub get_options {
my @options = qw(mozmill! selenium! starttor! tor-control-port=i
tor-socks-port=i reports-dir=s gpgcheck! keyring=s
virtualenv=s xvfb! name=s download-dir=s config=s);
virtualenv=s xvfb! name=s download-dir=s config=s
action=s);
my (%cli, %config);
Getopt::Long::GetOptionsFromArray(\@_, \%cli, @options) || exit 1;
$cli{args} = \@_ if @_;
......
......@@ -23,4 +23,10 @@ sub run_tests {
TBBTestSuite::Reports::make_reports_index;
}
run_tests;
my %actions = (
run_tests => \&run_tests,
reports_index => \&TBBTestSuite::Reports::make_reports_index,
);
exit_error "Unknow action $options->{action}" unless $actions{$options->{action}};
$actions{$options->{action}}->();
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