Fixed merging of BRAG elements so that the collated results should appear in time order, and hence in phase/step order as well.
--- a/common/build.postbuild.xml Thu Oct 14 16:29:33 2010 +0100
+++ b/common/build.postbuild.xml Thu Oct 14 16:55:23 2010 +0100
@@ -887,6 +887,7 @@
<arg value="${sf.common.config.dir}/tools/mergeXML.pl"/>
<arg value="--xsl=brag.xsl"/>
<arg value="--merge=buildStatus,phase(name),step(name),failures(level)"/>
+ <arg value="--sortByTime"/>
<arg value="${build.log.dir}/summary/*?_BRAG.xml"/>
</exec>
</target>
--- a/common/tools/mergeXML.pl Thu Oct 14 16:29:33 2010 +0100
+++ b/common/tools/mergeXML.pl Thu Oct 14 16:55:23 2010 +0100
@@ -26,10 +26,12 @@
# Read option arguments
my $howtoString;
my $xslLink;
+my $sortByTime;
my $help;
GetOptions((
'xsl=s' => \$xslLink,
'merge=s' => \$howtoString,
+ 'sortByTime!' => \$sortByTime,
'help!' => \$help,
));
@@ -59,6 +61,11 @@
# Expand wildcards
@ARGV = map { glob $_ } @ARGV;
+if ($sortByTime)
+{
+ # Sort by creation time (this helps the BRAG merging put the phases & steps in the right build sequence)
+ @ARGV = sort { (stat($a))[10] <=> (stat($b))[10] } @ARGV;
+}
# Merge all the trees together
my $outTree = mergeMultipleTrees($mergeTags, @ARGV);