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 c4f159e8 authored by boklm's avatar boklm

Add a make_report action

parent 5c9bdf9d
......@@ -144,6 +144,10 @@ following actions are available:
reports_index::
Create an index page listing the tests reports.
make_report::
Regenerate the html report of a test run. You should use the
--name option to select the test run.
list_tests::
List available tests and their descriptions.
......@@ -2,6 +2,7 @@
use strict;
use Data::Dump qw/dd/;
use File::Path qw(make_path);
use YAML;
use TBBTestSuite::Common qw(exit_error);
use TBBTestSuite::Options qw($options);
use TBBTestSuite::Reports;
......@@ -26,10 +27,20 @@ sub run_tests {
TBBTestSuite::Reports::make_reports_index;
}
sub make_report {
exit_error "--name is not set" unless $options->{name};
my $report = { options => $options };
TBBTestSuite::Reports::set_report_dir($report);
$report = YAML::LoadFile("$options->{'report-dir'}/report.yml");
$report->{options} = { %{$report->{options}}, %$options };
TBBTestSuite::Reports::make_report($report);
}
my %actions = (
run_tests => \&run_tests,
list_tests => \&TBBTestSuite::Tests::list_tests,
reports_index => \&TBBTestSuite::Reports::make_reports_index,
make_report => \&make_report,
);
exit_error "Unknow action $options->{action}" unless $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