# HG changeset patch # User Simon Howkins # Date 1254414092 -3600 # Node ID 5af7cc0d44a1e7109c5f293bf7e8c4fe48cbf435 # Parent a1d3b0c3227b4609d1e763eb33866d05daa99aac Adfjusted XML format used, so there's a document-level tag - which can wrap multiple tags. diff -r a1d3b0c3227b -r 5af7cc0d44a1 common/tools/brag/brag.xsl --- a/common/tools/brag/brag.xsl Fri Oct 02 12:17:26 2009 +0100 +++ b/common/tools/brag/brag.xsl Thu Oct 01 17:21:32 2009 +0100 @@ -2,20 +2,20 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"> - - + + - + Build Status

Build Status

- - - - + + + +

Overall BRAG staus: @@ -34,15 +34,15 @@ Major Minor Unknown - Grand total + Grand total -

Breakdown by stage/step

+

Breakdown by phase/step

- + - + @@ -60,12 +60,12 @@
Stage: Phase:
- +

Breakdown by package

- + diff -r a1d3b0c3227b -r 5af7cc0d44a1 common/tools/brag/raptorToBRAG.pl --- a/common/tools/brag/raptorToBRAG.pl Fri Oct 02 12:17:26 2009 +0100 +++ b/common/tools/brag/raptorToBRAG.pl Thu Oct 01 17:21:32 2009 +0100 @@ -37,9 +37,23 @@ # 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"]; +my $buildStatus = +[ + bless + { + Kids => + [ + $xmlNewline, + bless + { + name => "build", + Kids => [ $xmlNewline ] + }, "phase", + ] + }, "buildStatus" +]; # Get a shortcut reference to the bit we will use a lot -my $buildStage = $data->[0]; +my $buildPhase = $buildStatus->[0]->{Kids}->[-1]; # READ SUMMARY.CSV FILE open(CSV, $raptorSummary); @@ -83,7 +97,7 @@ # Look through the steps to see if we already have one to match this config my $step; - foreach (@{$buildStage->{Kids}}) + foreach (@{$buildPhase->{Kids}}) { next unless ref $_ eq "step"; if ($_->{name} eq $failure->{config}) @@ -96,7 +110,7 @@ { # First item found in this step - create step entry $step = bless { name => $failure->{config}, Kids => [ $xmlNewline ] }, "step"; - push @{$buildStage->{Kids}}, $step, $xmlNewline; + push @{$buildPhase->{Kids}}, $step, $xmlNewline; # Also create empty tags with severities in a sensible order foreach my $severity (qw{critical major minor}) { @@ -140,7 +154,7 @@ # Print XML print "\n"; print "\n"; -printTree($data->[0]); +printTree($buildStatus->[0]); print "\n"; exit(0);
PackageTotal failures