Fixed merging of BRAG elements so that the collated results should appear in time order, and hence in phase/step order as well. PDK_3.0.3
authorSimon Howkins <simonh@symbian.org>
Thu, 14 Oct 2010 16:55:23 +0100
changeset 1304 26a71d6a561e
parent 1303 77ff148fa4d2
child 1305 6b0239b30250
Fixed merging of BRAG elements so that the collated results should appear in time order, and hence in phase/step order as well.
common/build.postbuild.xml
common/tools/mergeXML.pl
--- 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);