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

Add a save_report function

parent d6115624
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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'};