Catchup of Shabe's Helium7 work.
authorMattD <mattd@symbian.org>
Fri, 05 Mar 2010 19:30:00 +0000
changeset 919 25854ab85b4e
parent 912 5a63512dfd19 (diff)
parent 914 e4c5389160b3 (current diff)
child 920 3f238c627274
Catchup of Shabe's Helium7 work.
common/build.postbuild.xml
--- a/common/build.postbuild.xml	Thu Mar 04 18:54:21 2010 +0000
+++ b/common/build.postbuild.xml	Fri Mar 05 19:30:00 2010 +0000
@@ -237,7 +237,7 @@
                 <property name="sf.epoc32.exclusions.file" value="nul:"/>
                 <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
                     <arg value="a"/>
-                    <arg value="-tzip"/>
+                    <arg value="-t${sf.spec.package.zip.format}"/>
                     <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
                     <arg value="-x@${sf.epoc32.exclusions.file}"/>
                     <arg value="-x!epoc32\gcc"/>
@@ -256,7 +256,7 @@
                 <then>
                     <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_sdk.log">
                         <arg value="a"/>
-                        <arg value="-tzip"/>
+                        <arg value="-t${sf.spec.package.zip.format}"/>
                         <arg value="-i@${sf.sdk.header.list.file}"/>
                         <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
                         <arg value="${build.drive}/output/zips/release/binaries_epoc_sdk.zip"/>
@@ -276,23 +276,59 @@
                 </then>
             </if>
             
-            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw.log">
+            <!-- WinsCW binaries, by udeb/urel/lib -->
+            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_udeb.log">
                 <arg value="a"/>
-                <arg value="-tzip"/>
+                <arg value="-t${sf.spec.package.zip.format}"/>
                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
                 <arg value="-xr!*.sym"/>
-                <arg value="${build.drive}/output/zips/release/binaries_winscw.zip"/>
-                <arg value="epoc32\release\winscw\"/>
+                <arg value="-xr!*.lib"/>
+                <arg value="${build.drive}/output/zips/release/binaries_winscw_udeb.zip"/>
+                <arg value="epoc32\release\winscw\udeb"/>
+            </exec>
+            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_urel.log">
+                <arg value="a"/>
+                <arg value="-t${sf.spec.package.zip.format}"/>
+                <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
+                <arg value="-xr!*.sym"/>
+                <arg value="-xr!*.lib"/>
+                <arg value="${build.drive}/output/zips/release/binaries_winscw_urel.zip"/>
+                <arg value="epoc32\release\winscw\urel"/>
+            </exec>
+            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_lib.log">
+                <arg value="a"/>
+                <arg value="-t${sf.spec.package.zip.format}"/>
+                <arg value="-ir!epoc32/release/winscw/*.lib"/>
+                <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
+                <arg value="${build.drive}/output/zips/release/binaries_winscw_lib.zip"/>
             </exec>
             
-            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5.log">
+            <!-- ARMv5 binaries, by udeb/urel/lib -->
+            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_udeb.log">
                 <arg value="a"/>
-                <arg value="-tzip"/>
+                <arg value="-t${sf.spec.package.zip.format}"/>
                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
                 <arg value="-xr!*.sym"/>
-                <arg value="${build.drive}/output/zips/release/binaries_armv5.zip"/>
-                <arg value="epoc32\release\armv5\"/>
+                <arg value="${build.drive}/output/zips/release/binaries_armv5_udeb.zip"/>
+                <arg value="epoc32\release\armv5\udeb"/>
             </exec>
+            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_urel.log">
+                <arg value="a"/>
+                <arg value="-t${sf.spec.package.zip.format}"/>
+                <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
+                <arg value="-xr!*.sym"/>
+                <arg value="${build.drive}/output/zips/release/binaries_armv5_urel.zip"/>
+                <arg value="epoc32\release\armv5\urel"/>
+            </exec>
+            <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_lib.log">
+                <arg value="a"/>
+                <arg value="-t${sf.spec.package.zip.format}"/>
+                <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
+                <arg value="-xr!*.sym"/>
+                <arg value="${build.drive}/output/zips/release/binaries_armv5_lib.zip"/>
+                <arg value="epoc32\release\armv5\lib"/>
+            </exec>
+
         </parallel>
         <!-- Generate release_metadata entries for the above zips -->
         <antcall target="sf-zip-content">
@@ -311,7 +347,7 @@
     <target name="sf-package-tools" >
         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
             <arg value="a"/>
-            <arg value="-tzip"/>
+            <arg value="-t${sf.spec.package.zip.format}"/>
             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
             <arg value="${build.drive}/output/zips/release/tools_epoc.zip"/> 
             <arg value="epoc32/tools"/>
--- a/common/common_props.ant.xml	Thu Mar 04 18:54:21 2010 +0000
+++ b/common/common_props.ant.xml	Fri Mar 05 19:30:00 2010 +0000
@@ -88,6 +88,7 @@
     <!-- packaging options for bin/src-->
     <property name="sf.spec.package.bin.enable"  value="false"/>
     <property name="sf.spec.package.src.enable"  value="false"/>
+    <property name="sf.spec.package.zip.format"  value="7z"/> <!-- can be 'zip' or '7z'-->
 <!--<property name="sf.sdk.header.list.file"     value=""/> --> <!-- Set this to package SDK headers separately from the rest of epoc32 -->
 
     <!-- enable creation of MD5s -->
--- a/common/templates/source-spec.ant.xml.ftl	Thu Mar 04 18:54:21 2010 +0000
+++ b/common/templates/source-spec.ant.xml.ftl	Fri Mar 05 19:30:00 2010 +0000
@@ -163,10 +163,7 @@
                 <arg value="log"/>
                 <arg value="-r"/>
                 <arg value="${dollar}{sf.sourcesync.${count}.checksum}:${dollar}{sf.previous.pdk.tag}"/>
-                <#if "${pkg_detail.type}"=="branch">
-                <arg value="-b"/>
-                <arg value="${pkg_detail.pattern}"/>
-                </#if>    
+                <arg value="-f"/>
             </exec>
     </target>
     
--- a/common/templates/zip.cfg.xml.ftl.template	Thu Mar 04 18:54:21 2010 +0000
+++ b/common/templates/zip.cfg.xml.ftl.template	Fri Mar 05 19:30:00 2010 +0000
@@ -87,12 +87,25 @@
 			<config name="core">
 				<set name="name" value="binaries_epoc"/>
 			</config>
-			<config name="armv5">
-				<set name="name" value="binaries_armv5"/>
+			<config name="armv5_udeb">
+				<set name="name" value="binaries_armv5_udeb"/>
+			</config>
+			<config name="armv5_urel">
+				<set name="name" value="binaries_armv5_urel"/>
+			</config>
+			<config name="armv5_lib">
+				<set name="name" value="binaries_armv5_lib"/>
 			</config>
-			<config name="winscw">
-				<set name="name" value="binaries_winscw"/>
+			<config name="winscw_udeb">
+				<set name="name" value="binaries_winscw_udeb"/>
 			</config>
+			<config name="winscw_urel">
+				<set name="name" value="binaries_winscw_urel"/>
+			</config>
+			<config name="winscw_lib">
+				<set name="name" value="binaries_winscw_lib"/>
+			</config>
+
 		</config>
 		<!-- "Null" SDK entry, which matches no files, but does populate the release_metadata.xml -->
 		<config name="bin-sdk-just-metadata" abstract="true">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/bc_filter.pl	Fri Mar 05 19:30:00 2010 +0000
@@ -0,0 +1,158 @@
+#!/usr/bin/perl
+
+# 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.
+#	Maciej Seroka, maciejs@symbian.org
+#
+# Description:
+#   This is a tool for filtering static BC header reports.
+#
+
+use strict;
+use XML::Simple;
+use File::Copy;
+use Tie::File;
+use Data::Dumper;
+
+my $report;
+my $header_list;
+my $destfile = "stripped_headers_report.xml";
+my $del_ok_issues = 1; # This variable determines whether to delete OK issues first.
+my $del_comp_issues = 0; # This variable determies whether to delete Compilation errors.
+my $del_boost_issues = 1; # This variable determies whether to delete issues for Boost API headers.
+
+my $n;
+my $m;
+my $file_name;
+my $delete_node;
+
+if ($ARGV[1]) {
+	$report = $ARGV[0];
+	$header_list = $ARGV[1];
+} else { 
+	die "Missing parameter(s). For example: bc_filter.pl headers_report.xml public_headers.txt"; 
+}
+
+# Parse the input XML into hashrefs.
+print "Parsing " . $report . "... ";
+my $current_report = XMLin("./$report", keeproot => 1,
+    forcearray => [ 'header', 'baselineversion', 'currentversion', 'timestamp', 'day', 'month', 'year', 'hour', 'minute', 'second', #
+	'haversion', 'formatversion', 'cmdlineparms', 'parm', 'pname', 'pvalue', 'knownissuesversion', 'os', 'version', 'buildweek', 'issuelist',#
+	'headerfile', 'filename', 'comparefilename', 'status', 'comment', 'issue', 'checksum', 'shortname', 'issueid', 'typeid', 'identityid', #
+	'identitydescription', 'typestring', 'cause', 'documentation', 'ignoreinformation', 'linenumber', 'severity', 'scseverity'], keyattr => [] );
+print "complete \n";
+
+# Load Public API definitions
+my @lines;
+tie @lines, 'Tie::File', $header_list or die ("Cannot tie file \"$header_list\". $!\n");
+
+# Get number of header files
+my $header_num = @{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}};
+print "Number of all header files with issues: $header_num \n";
+
+# Delete known issues.
+if ($del_ok_issues) {
+	$n = 0;
+	while ($n < $header_num) {
+		$file_name = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0];
+		# Delete the node if known issue.
+		if ($current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'status'}->[0] eq "OK") {
+			print "Known issue: $file_name ...deleted\n";
+			splice(@{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}},$n, 1);
+			$header_num--;
+		} else {
+#			print "Unknown issue: $file_name \n";
+			$n++;
+		}
+	}
+	# Get number of header files again
+	$header_num = @{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}};
+	print "Number of remaining header files with issues: $header_num \n";
+}
+
+# Delete compilation issues.
+# Assumption: Compilation issue is always the top issue (and probably the only one)
+if ($del_comp_issues) {
+	$n = 0;
+	while ($n < $header_num) {
+		$file_name = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0];
+		if (($current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'issue'}->[0]->{'typestring'}->[0] eq "has compilation errors") && #
+			($current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'status'}->[0] ne "OK")) { # Delete the node if compilation error.
+			print "$file_name has compilation errors \n";
+			splice(@{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}},$n, 1);
+			$header_num--;
+		} else {
+			$n++;
+		}
+	}
+	# Get number of header files again
+	$header_num = @{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}};
+	print "Number of header files with non-compilation issues: $header_num \n";
+}
+
+# Delete Boost API related issues (Boost API headers are not present in any of the Public SDK!).
+if ($del_boost_issues) {
+	$n = 0;
+	while ($n < $header_num) {
+		$file_name = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0];
+		# Delete the node if Boost API header.
+		if ($file_name =~ m/\\boost/) {
+			print "Boost API: $file_name \n";
+			splice(@{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}},$n, 1);
+			$header_num--;
+		} else {
+			$n++;
+		}
+	}
+	# Get number of header files again
+	$header_num = @{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}};
+	print "Number of non-Boost API header files: $header_num \n";
+}
+
+# Delete non-public API issues.
+$n = 0;
+while ($n < $header_num) {
+	$file_name = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0];
+	$m = 0;
+	$delete_node = 1;
+	foreach (@lines) { # Check against header list.
+		if (lc($file_name) eq lc(@lines[$m])) {	# Mark the node to NOT be deleted.
+			$delete_node = 0;
+			last;
+		}
+		$m++;
+	}
+	# Delete the node if non-public issue.
+	if ($delete_node) {
+		print "Header file: $file_name not found in Public API definition file... deleted\n";
+		splice(@{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}},$n, 1);
+		$header_num--;
+	} else {
+		$n++;
+	}
+}
+
+# Get number of header files again
+$header_num = @{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}};
+print "Final number of header files with issues: $header_num \n";
+
+# Close Public API definition file.
+untie @lines;
+
+# Write new XML to dest file.
+open OUT,">$destfile" or die("Cannot open file \"$destfile\" for writing. $!\n");
+print OUT XMLout($current_report, keeproot => 1);
+close OUT;
+
+# Insert:	<?xml version="1.0" encoding="ASCII" standalone="no" ?>
+#			<?xml-stylesheet type="text/xsl" href="BBCResults.xsl"?>
+tie @lines, 'Tie::File', $destfile or die ("Cannot tie file \"$destfile\". $!\n");
+unshift @lines, "<?xml-stylesheet type=\"text/xsl\" href=\"BBCResults.xsl\"?>";
+unshift @lines, "<?xml version=\"1.0\" encoding=\"ASCII\" standalone=\"no\" ?>";
+untie @lines;
--- a/sf-platform/platform_props.ant.xml	Thu Mar 04 18:54:21 2010 +0000
+++ b/sf-platform/platform_props.ant.xml	Fri Mar 05 19:30:00 2010 +0000
@@ -15,7 +15,7 @@
   <property name="sf.spec.toolsbaseline.select"         value="location" />
   <property name="sf.spec.toolsbaseline.location"       value="\\v800008\Builds01\PDT\PDT_b50" /> <!-- for TEF etc -->
 
-  <property name="sf.spec.syncsource.usecache"     value="true"/>
+  <property name="sf.spec.sourcesync.usecache"     value="true"/>
 
   <!-- generate dir list(s) of epoc32 tree -->
   <property name="sf.spec.dirlist.enable"  value="true"/>