common/tools/ats/update_brag_status.pl
author Brendan Donegan <brendand@symbian.org>
Thu, 24 Jun 2010 17:30:25 +0100
changeset 1123 e0554eb36cb5
parent 1090 46b3578a07ad
child 1118 abbcac685ab1
permissions -rw-r--r--
Use package definition NOT bld.inf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     1
#!/usr/bin/perl
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     2
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     3
# Copyright (c) 2009 Symbian Foundation Ltd
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     4
# This component and the accompanying materials are made available
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     6
# which accompanies this distribution, and is available
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     8
#
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     9
# Initial Contributors:
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    10
# Symbian Foundation Ltd - initial contribution.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    11
#	Maciej Seroka, maciejs@symbian.org
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    12
#
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    13
# Description:
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    14
#   This is a tool for updating BRAG status with test results.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    15
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    16
use strict;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    17
use Getopt::Long;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    18
use XML::Simple;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    19
use Tie::File;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    20
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    21
my $brag_file;
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    22
my $ats3_report;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    23
my $ats4_report;
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    24
my $test_report;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    25
my $help;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    26
my $line;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    27
my $auto_tests_total;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    28
my $auto_tests_passed;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    29
my $auto_tests_failed;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    30
my $auto_tests_notrun;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    31
my $man_tests_total;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    32
my $man_tests_passed;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    33
my $man_tests_failed;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    34
my $man_tests_notrun;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    35
my $temp_path;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    36
my $detailshref;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    37
my $xml_report;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    38
my $test_case;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    39
my $test_brag_xml;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    40
my $existing_results;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    41
my $n;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    42
my $m;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    43
my @lines;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    44
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    45
sub usage($);
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    46
sub help();
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    47
sub usage_error();
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    48
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    49
my %optmap = (  'brag-file' => \$brag_file,
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    50
			    'ats3-report' => \$ats3_report,
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    51
				'ats4-report' => \$ats4_report,
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    52
			    'test-report' => \$test_report,
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    53
				'help' => \$help);
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    54
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    55
GetOptions(\%optmap,
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    56
          'brag-file=s',
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    57
          'ats3-report=s',
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    58
          'ats4-report=s',
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    59
          'test-report=s',
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    60
		  'help!') 
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    61
          or usage_error();
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    62
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    63
if ($help) {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    64
	help();
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    65
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    66
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    67
# --brag-file is mandatory.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    68
usage_error(), unless (defined($brag_file));
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    69
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    70
# --ats3-report/ats4-report is mandatory.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    71
usage_error(), unless ((defined($ats3_report)) || (defined($ats4_report)));
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    72
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    73
if (defined($ats3_report)) { # Get ATS3 Smoketest results.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    74
	open (FILE, "<$ats3_report") or die ("Couldn't open $ats3_report for reading: $!\n");
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    75
	my $read_flag = -1;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    76
	print "Reading $ats3_report... ";
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    77
	while ($line = <FILE>) {
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    78
		chomp $line;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    79
		if ($read_flag >= 0) { $read_flag++ }
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    80
		if ($read_flag == 1) { # Get Total number of tests.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    81
			$auto_tests_total = $line;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    82
			# Remove td tags.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    83
			$auto_tests_total =~ s/^.*\">//;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    84
			$auto_tests_total =~ s/<.*//;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    85
		}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    86
		if ($read_flag == 4) { # Get number of Passed tests.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    87
			($auto_tests_passed) = split /\//,$line;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    88
			$auto_tests_passed =~ s/^.*\">//; # Remove opening td tag.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    89
		}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    90
		if ($read_flag == 5) { # Get number of Failed tests.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    91
			($auto_tests_failed) = split /\//,$line;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    92
			$auto_tests_failed =~ s/^.*\">//; # Remove opening td tag.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    93
		}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    94
		if ($read_flag == 7) { # Get number of Not run tests.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    95
			($auto_tests_notrun) = split /\//,$line;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    96
			$auto_tests_notrun =~ s/^.*\">//; # Remove opening td tag.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    97
		}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    98
		if ($line eq "<td class=\"tableData\">Nested tests<\/td>") { # Set flag for reading results.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
    99
			$read_flag = 0;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   100
		}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   101
		if (($line eq "<\/tr>") && ($read_flag >= 0)) { # Exit loop.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   102
			last;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   103
		};
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   104
	}
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   105
	close FILE;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   106
}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   107
if (defined($ats4_report)) { # Get ATS4 Smoketest results.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   108
	$auto_tests_total = 0;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   109
	$auto_tests_passed = 0;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   110
	$auto_tests_failed = 0;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   111
	$auto_tests_notrun = 0;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   112
	open (FILE, "<$ats4_report") or die ("Couldn't open $ats4_report for reading: $!\n");
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   113
	my $read_flag = -1;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   114
	print "Reading $ats4_report... ";
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   115
	while ($line = <FILE>) {
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   116
		chomp $line;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   117
		if ($read_flag >= 0) { $read_flag++ }
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   118
		if ($read_flag == 3) { # Get status.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   119
			$auto_tests_total++;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   120
			if ($line =~ "PASSED") { $auto_tests_passed++ }
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   121
			if ($line =~ "FAILED") { $auto_tests_failed++ }
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   122
			if (($line =~ "SKIPPED") || ($line =~ "NOT_AVAILABLE")) { $auto_tests_notrun++ }
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   123
			# Re-set flag.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   124
			$read_flag = -1;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   125
		}
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   126
		if ($line eq "<result type=\"TestCaseResult\">") { # Set flag for reading results.
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   127
			$read_flag = 0;
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   128
		}
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   129
	}
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   130
	close FILE;
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   131
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   132
print "complete\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   133
print "Total number of tests: $auto_tests_total\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   134
print "Passed tests: $auto_tests_passed\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   135
print "Failed tests: $auto_tests_failed\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   136
print "Not run tests: $auto_tests_notrun\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   137
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   138
# Define detailshref attribute.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   139
$temp_path = $brag_file;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   140
$temp_path =~ s/\\/\//g; # Replace \ with /
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   141
$temp_path =~ s/\/summary\/.*//;
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   142
if (defined($ats3_report)) { $detailshref = $ats3_report };
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   143
if (defined($ats4_report)) { $detailshref = $ats4_report };
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   144
$detailshref =~ s/\\/\//g; # Replace \ with /
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   145
$detailshref =~ s/($temp_path)/../;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   146
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   147
if (defined($test_report)) { # Get manual Smoketest results.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   148
	print "Parsing " . $test_report . "... ";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   149
	$xml_report = XMLin("$test_report", keeproot => 1, forcearray => [ 'test-set', 'test-case' ], keyattr => [] );
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   150
	print "complete \n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   151
	$man_tests_total = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   152
	$man_tests_passed = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   153
	$man_tests_failed = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   154
	$man_tests_notrun = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   155
	foreach $test_case (@{$xml_report->{'test-report'}->{'test-set'}->[0]->{'test-case'}}) {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   156
		if (lc($test_case->{'result'}) eq "passed") { $man_tests_passed++ }
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   157
		if (lc($test_case->{'result'}) eq "failed") { $man_tests_failed++ }
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   158
		if (lc($test_case->{'result'}) eq "not run") { $man_tests_notrun++ }
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   159
		$man_tests_total++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   160
	}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   161
	print "Total number of tests: $man_tests_total\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   162
	print "Passed tests: $man_tests_passed\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   163
	print "Failed tests: $man_tests_failed\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   164
	print "Not run tests: $man_tests_notrun\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   165
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   166
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   167
# Check for Smoketest results in BRAG file.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   168
open (FILE, "<$brag_file") or die ("Couldn't open $brag_file for reading: $!\n");
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   169
$existing_results = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   170
$n = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   171
while ($line = <FILE>)
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   172
{
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   173
	chomp $line;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   174
	if ($line =~ "<phase name=\"Test\">") {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   175
		$existing_results = 1;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   176
		last;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   177
	}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   178
	$n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   179
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   180
close FILE;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   181
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   182
tie @lines, 'Tie::File', $brag_file or die ("Couldn't tie file $brag_file: $!\n");
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   183
if ($existing_results) { # Delete existing Test Results from BRAG file.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   184
	$m = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   185
	do {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   186
		$m++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   187
	} while (@lines[$n+$m] !~ "<\/phase>");
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   188
	splice @lines, $n, $m+1;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   189
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   190
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   191
# Insert (New) Test Results to BRAG file.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   192
$n = 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   193
foreach ( @lines )
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   194
{
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   195
	if (lc(@lines[$n]) =~ "<\/buildstatus>") {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   196
		last;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   197
	}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   198
	$n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   199
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   200
splice @lines, $n, 0, "<phase name=\"Test\">"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   201
splice @lines, $n, 0, "<step detailshref=\"$detailshref\" name=\"Smoketest - automated tests\">"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   202
splice @lines, $n, 0, "<nestedtests count=\"$auto_tests_total\" property=\"total\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   203
splice @lines, $n, 0, "<nestedtests count=\"$auto_tests_passed\" property=\"passed\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   204
splice @lines, $n, 0, "<nestedtests count=\"$auto_tests_failed\" property=\"failed\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   205
splice @lines, $n, 0, "<nestedtests count=\"$auto_tests_notrun\" property=\"not run\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   206
splice @lines, $n, 0, "<\/step>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   207
if (defined($test_report)) {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   208
	splice @lines, $n, 0, "<step name=\"Smoketest - manual tests\">"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   209
	splice @lines, $n, 0, "<nestedtests count=\"$man_tests_total\" property=\"total\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   210
	splice @lines, $n, 0, "<nestedtests count=\"$man_tests_passed\" property=\"passed\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   211
	splice @lines, $n, 0, "<nestedtests count=\"$man_tests_failed\" property=\"failed\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   212
	splice @lines, $n, 0, "<nestedtests count=\"$man_tests_notrun\" property=\"not run\"/>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   213
	splice @lines, $n, 0, "<\/step>"; $n++;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   214
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   215
splice @lines, $n, 0, "<\/phase>";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   216
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   217
untie @lines;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   218
print "$brag_file updated\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   219
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   220
# Create Test_BRAG.xml
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   221
$test_brag_xml = $temp_path . "\/summary\/" . "Test_BRAG.xml";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   222
if (-e $test_brag_xml) { # Delete the file if exists.
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   223
	unlink($test_brag_xml);
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   224
	print "$test_brag_xml deleted\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   225
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   226
open (FILE, "> $test_brag_xml") or die ("Couldn't open $test_brag_xml for writing: $!\n");
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   227
print FILE "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   228
print FILE "<?xml-stylesheet type='text/xsl' href='brag.xsl'?>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   229
print FILE "<buildStatus>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   230
print FILE "<phase name=\"Test\">\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   231
print FILE "<step detailshref=\"$detailshref\" name=\"Smoketest - automated tests\">\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   232
print FILE "<nestedtests count=\"$auto_tests_total\" property=\"total\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   233
print FILE "<nestedtests count=\"$auto_tests_passed\" property=\"passed\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   234
print FILE "<nestedtests count=\"$auto_tests_failed\" property=\"failed\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   235
print FILE "<nestedtests count=\"$auto_tests_notrun\" property=\"not run\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   236
print FILE "<\/step>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   237
if (defined($test_report)) {
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   238
	print FILE "<step name=\"Smoketest - manual tests\">\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   239
	print FILE "<nestedtests count=\"$man_tests_total\" property=\"total\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   240
	print FILE "<nestedtests count=\"$man_tests_passed\" property=\"passed\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   241
	print FILE "<nestedtests count=\"$man_tests_failed\" property=\"failed\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   242
	print FILE "<nestedtests count=\"$man_tests_notrun\" property=\"not run\"/>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   243
	print FILE "<\/step>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   244
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   245
print FILE "<\/phase>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   246
print FILE "</buildStatus>\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   247
close FILE;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   248
print "$test_brag_xml saved\n";
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   249
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   250
exit 0;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   251
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   252
sub usage($)
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   253
{
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   254
    my $error = shift;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   255
    my $fh = $error == 0 ? *STDOUT : *STDERR;
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   256
    print $fh "update_brag_status.pl\n" .
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   257
            "Specify the BRAG xml file and ATS report\n" .
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   258
            "synopsis:\n" .
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   259
            "  update_brag_status.pl --help\n" .
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   260
            "  update_brag_status.pl [--brag-file=XML_FILE] [--ats3-report=HTML_REPORT] [--ats4-report=SIMPLELOGGER_REPORT] [--test-report=XML_REPORT] \n" .
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   261
            "options:\n" .
1090
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   262
            "  --help                            Display this help and exit.\n" .
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   263
            "  --brag-file=XML_FILE              XML_FILE is the full path to the file containing BRAG summary.\n" .
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   264
            "  --ats3-report=HTML_REPORT         HTML_REPORT is the full path to the ATS3 report.\n" .
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   265
            "  --ats4-report=SIMPLELOGGER_REPORT SIMPLELOGGER_REPORT is the full path to the ATS4 report.\n" .
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   266
            "  --test-report=XML_REPORT          XML_REPORT is the name of the test report for manually executed tests.\n" .
46b3578a07ad Modified update_brag_status to handle ATS4 reports
Maciej Seroka <maciejs@symbian.org>
parents: 1040
diff changeset
   267
			"                                    If not specified only automated tests results will be taken into account.\n";
1040
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   268
    exit $error;            
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   269
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   270
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   271
sub help()
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   272
{
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   273
    usage(0);
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   274
}
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   275
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   276
sub usage_error()
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   277
{
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   278
    usage(1);
f1f85b34a96f Added script for updating BRAG status with test results
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   279
}