# HG changeset patch # User Brendan Donegan brendand@symbian.org # Date 1254399724 -3600 # Node ID f0c8c9e2cbbd14c691923a66d7fbba68734dd942 # Parent 8018a074606b2c0d0d2a46822395df8143e60609# Parent cd084e6d144e06a6bb7f684dfcbe70ecd41cd13a merge and switch off static bc check diff -r 8018a074606b -r f0c8c9e2cbbd common/build.postbuild.xml --- a/common/build.postbuild.xml Thu Oct 01 13:19:42 2009 +0100 +++ b/common/build.postbuild.xml Thu Oct 01 13:22:04 2009 +0100 @@ -304,8 +304,8 @@ - - + + @@ -321,7 +321,6 @@ - @@ -342,7 +341,6 @@ - @@ -352,12 +350,11 @@ - - + @@ -377,6 +374,15 @@ + + + + + + + + + diff -r 8018a074606b -r f0c8c9e2cbbd common/build.test.xml --- a/common/build.test.xml Thu Oct 01 13:19:42 2009 +0100 +++ b/common/build.test.xml Thu Oct 01 13:22:04 2009 +0100 @@ -115,7 +115,7 @@ - + @@ -165,7 +165,7 @@ - + diff -r 8018a074606b -r f0c8c9e2cbbd common/common_props.ant.xml --- a/common/common_props.ant.xml Thu Oct 01 13:19:42 2009 +0100 +++ b/common/common_props.ant.xml Thu Oct 01 13:22:04 2009 +0100 @@ -97,8 +97,8 @@ - - + + diff -r 8018a074606b -r f0c8c9e2cbbd common/tools/ats/ats_specialise_test_drop.pl --- a/common/tools/ats/ats_specialise_test_drop.pl Thu Oct 01 13:19:42 2009 +0100 +++ b/common/tools/ats/ats_specialise_test_drop.pl Thu Oct 01 13:22:04 2009 +0100 @@ -11,6 +11,7 @@ # Mike Kinghan, mikek@symbian.org # # Contributors: +# Brendan Donegan, brendand@symbian.org # # Description: # This is a tool for setting the name of an ATS test drop, and/or the build id @@ -24,13 +25,13 @@ use Data::Dumper; my $test_drop_name; # Test drop name to be embedded in output XML -my $build_id; # Build ID to be embedded in output XML -my $device_name; # Device name to be embedded in output XML +my $build_id; # Build ID to be embedded in output XML +my $host_name; # Host name to be embedded in output XML my $srcfile; # Input test drop file, either .xml or .zip my $destfile; # Leafname for output file. Extension will be .xml or .zip as input. # If unspecified then the input file is updated. my $help; # Do help? -my $srctype; # Type of inpout file, .xml or .zip +my $srctype; # Type of input file, .xml or .zip my $dev_null = $^O =~ /^MSWin/ ? "nul" : "/dev/null"; # OS-dependent nul device. my $zipper; # Zip command, depending on whether zip or 7z is available. my $unzipper; # Unzip command, depending on whether [unzip or 7z is available. @@ -43,7 +44,7 @@ sub silent_command($); my %optmap = ( 'test-drop-name' => \$test_drop_name, - 'device-name' => \$device_name, + 'host-name' => \$host_name, 'build-id' => \$build_id, 'src' => \$srcfile, 'dest' => \$destfile, @@ -51,7 +52,7 @@ GetOptions(\%optmap, 'test-drop-name=s', - 'device-name=s', + 'host-name=s', 'build-id=s', 'src=s', 'dest=s', @@ -123,11 +124,11 @@ # Insert the specified build id, if any. $test_drop->{'test'}->{'buildid'}->[0] = $build_id, if $build_id; -if ($device_name) { # Also insert sepcified device name. +if ($host_name) { # Also insert specified host name my $device_properties = $test_drop->{'test'}->{'target'}->[0]->{'device'}->[0]->{'property'}; my $num_properties = @{$device_properties}; - $device_properties->[$num_properties]= { 'name' => "NAME", 'value' => "$device_name" }; + $device_properties->[$num_properties]= { 'name' => "HOST", 'value' => "$host_name" }; $test_drop->{'test'}->{'target'}->[0]->{'device'}->[0]->{'property'} = $device_properties; #print Dumper($device_properties); #exit(0); @@ -169,12 +170,12 @@ "Specify the name, build id and target device in an ATS XML test drop\n" . "synopsis:\n" . " ats_specialise_test_drop.pl --help\n" . - " ats_specialise_test_drop.pl [--test-drop-name=TESTNAME] [--build-id=BUILDID] [--device-name=DEVICENAME] [--dest=FILE] --src=FILE \n" . + " ats_specialise_test_drop.pl [--test-drop-name=TESTNAME] [--build-id=BUILDID] [--host-name=HOSTNAME] [--dest=FILE] --src=FILE \n" . "options:\n" . " --help Display this help and exit\n" . " --test-drop-name=TESTNAME TESTNAME is the desired name of the test drop. If not specified then the test drop name is not modified.\n" . " --build-id=BUILDID BUILDID is id of the build being tested. If not specified then the build id is not modified.\n" . - " --device-name=DEVICENAME DEVICENAME is the name of the device on which the test should be run. " . + " --device-name=HOSTNAME HOSTNAME is the name of the ATS worker on which the test should be run. " . "If not specified then the test device name is not modified.\n" . " --src=INFILE INFILE is the file containing the test drop XML to be modified, or else a zip file " . " containing the test drop XML in the file 'test.xml'. INFILE must have extension .xml or.zip\n" . diff -r 8018a074606b -r f0c8c9e2cbbd common/tools/ats/bctest/package_definition.xml --- a/common/tools/ats/bctest/package_definition.xml Thu Oct 01 13:19:42 2009 +0100 +++ b/common/tools/ats/bctest/package_definition.xml Thu Oct 01 13:22:04 2009 +0100 @@ -1,169 +1,350 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff -r 8018a074606b -r f0c8c9e2cbbd common/tools/brag/brag.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/brag/brag.xsl Thu Oct 01 13:22:04 2009 +0100 @@ -0,0 +1,60 @@ + + + + + + + Build Status + +

Build Status

+ + + + + + + + + + + + + + + + + + + +
Stage:
Step:
Failures: Number:
+ + + + + + +

Total number of critical errors =

+

Total number of major errors =

+

Total number of minor errors =

+

Total number of unknown errors =

+ +

+ Final BRAG staus: + + BLACK + RED + AMBER + GREEN + GOLD! + +

+ + + +
+ +
+ diff -r 8018a074606b -r f0c8c9e2cbbd common/tools/brag/raptorToBRAG.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/brag/raptorToBRAG.pl Thu Oct 01 13:22:04 2009 +0100 @@ -0,0 +1,181 @@ +#!perl -w +# +# Copyright (c) 2009 Symbian Foundation Ltd +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Symbian Foundation Ltd - initial contribution. +# +# Contributors: +# +# Description: +# Generate the BRAG-compatible XML summary of the Raptor log from the CSV output of the raptor parser + +use strict; + +use Getopt::Long; +use Text::CSV; + + +my $raptorSummary; +my $help = 0; +GetOptions(( + 'raptorsummary=s' => \$raptorSummary, + 'help!' => \$help +)); + +$help = 1 if (!$raptorSummary); +if ($help) +{ + print "Generate an XML summary of the Raptor build from a summary.csv file\n"; + print "Usage: perl summarize.pl --raptorsummary=CSV\n"; + exit(0); +} + +# Start to build structure to be output as XML (same format as XML::Parser would create for us) +my $xmlNewline = bless { Text => "\n" }, "Characters"; +my $data = [bless {name => "build", Kids => [ $xmlNewline ] }, "stage"]; +# Get a shortcut reference to the bit we will use a lot +my $buildStage = $data->[0]; + +# READ SUMMARY.CSV FILE +open(CSV, $raptorSummary); +my $csv = Text::CSV->new(); +while (my $line = ) +{ + chomp $line; + + unless ($csv->parse($line)) + { + my $err = $csv->error_input(); + warn "Failed to parse $raptorSummary line line $. as CSV '$line': $err Skipping\n"; + next; + } + + my @keys = qw{category subcategory severity config component phase recipe file linenum}; + my @values = $csv->fields(); + unless (scalar @keys == scalar @keys) + { + warn "WARNING: line does not match expected format at $raptorSummary line $.. Skipping\n"; + next; + } + + my $failure = {}; + @{$failure}{@keys} = @values; + + if (!$failure->{category}) + { + warn "WARNING: summary line without a category at $raptorSummary line $.. Skipping\n"; + next; + } + + if ($failure->{category} =~ m{^recipe_failure$}i and !$failure->{component}) + { + warn "WARNING: recipe_failure with component field empty at $raptorSummary line $.. Skipping\n"; + next; + } + $failure->{subcategory} ||= 'uncategorized'; + $failure->{severity} ||= 'unknown'; + + # Look through the steps to see if we already have one to match this config + my $step; + foreach (@{$buildStage->{Kids}}) + { + next unless ref $_ eq "step"; + if ($_->{name} eq $failure->{config}) + { + $step = $_; + last; + } + } + unless ($step) + { + # First item found in this step - create step entry + $step = bless { name => $failure->{config}, Kids => [ $xmlNewline ] }, "step"; + push @{$buildStage->{Kids}}, $step, $xmlNewline; + } + + # Look through the sets of failures in this step to see if we hve one which matches this severity + my $failureSet; + foreach (@{$step->{Kids}}) + { + next unless ref $_ eq "failures"; + if ($_->{level} eq $failure->{severity}) + { + $failureSet = $_; + last; + } + } + unless ($failureSet) + { + # First item found at this severity - create failures entry + $failureSet = bless { level => $failure->{severity}, Kids => [ $xmlNewline ] }, "failures"; + push @{$step->{Kids}}, $failureSet, $xmlNewline; + } + + # Now create the failure itself, and add it to this failure set + my $failureItem = bless { href => "", Kids => [ bless { Text => $failure->{subcategory} }, "Characters" ] }, "failure"; + push @{$failureSet->{Kids}}, $failureItem, $xmlNewline; +} +close(CSV); + +# Print XML +print "\n"; +print "\n"; +printTree($data->[0]); +print "\n"; + +exit(0); + +sub printTree +{ + my $tree = shift or die; + die unless ref $tree; + + my $tagName = ref $tree; + $tagName =~ s{^main::}{}; + if ($tagName eq "Characters") + { + print $tree->{Text}; + return; + } + + print "<$tagName"; + + foreach my $attr ( + sort { + my $order = "name level start stop href"; + my $ixA = index $order, $a; + my $ixB = index $order, $b; + die "$a $b" if $ixA + $ixB == -2; + $ixA - $ixB; + } + grep { + ! ref $tree->{$_} + } + keys %$tree) + { + print " $attr=\"$tree->{$attr}\""; + } + + my $children = $tree->{Kids} || []; + if (scalar @$children) + { + print ">"; + foreach my $child (@$children) + { + printTree($child); + } + print ""; +} +