Unverified Commit b4536a1a authored by boklm's avatar boklm
Browse files

Add a save_report function

parent d6115624
......@@ -19,7 +19,7 @@ our (@ISA, @EXPORT_OK);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(load_report report_dir report_path);
@EXPORT_OK = qw(load_report report_dir report_path save_report);
}
my %template_functions = (
......@@ -207,4 +207,9 @@ sub load_report {
return YAML::LoadFile($reportfile);
}
sub save_report {
my ($report) = @_;
YAML::DumpFile(report_path($report, 'report.yml'), $report);
}
1;
......@@ -7,7 +7,7 @@ use File::Path qw(make_path);
use YAML;
use TBBTestSuite::Common qw(exit_error run_alone rm_pidfile);
use TBBTestSuite::Options qw($options);
use TBBTestSuite::Reports qw(report_dir report_path);
use TBBTestSuite::Reports qw(report_dir report_path save_report);
use TBBTestSuite::Reports::Receive;
use TBBTestSuite::Reports::Send;
use TBBTestSuite::Tests;
......@@ -50,8 +50,8 @@ sub run_tests {
TBBTestSuite::Tests::test_start($report, $tbbinfos);
}
set_report_success($report);
save_report($report);
print 'Report directory: ', report_dir($report), "\n";
YAML::DumpFile(report_path($report, 'report.yml'), $report);
TBBTestSuite::Reports::make_report($report);
TBBTestSuite::Reports::make_reports_index;
TBBTestSuite::Reports::Send::send_report if $options->{'upload-to'};
......
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