Merge to default branch
authorShabe Razvi <shaber@symbian.org>
Fri, 29 May 2009 17:44:49 +0100
changeset 126 d827d1eea85e
parent 125 a4079a41ca7f (current diff)
parent 124 6c171c40e012 (diff)
child 129 3b2480ba3b13
Merge to default branch
common/build.xml
--- a/common/build.xml	Fri May 29 17:44:02 2009 +0100
+++ b/common/build.xml	Fri May 29 17:44:49 2009 +0100
@@ -73,6 +73,65 @@
         </fmpp>
     </target>
     
+    <target name="sf-bc-check">
+        <!-- create BC dir -->
+        <mkdir dir="${build.log.dir}/BC"/>
+
+        <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
+        <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
+        </exec>
+        <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
+        </exec>
+        <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
+        </exec>
+        <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="CURRENT_NAME=${build.id}"/>
+        </exec>
+        <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="CURRENT_SDK_DIR=${build.drive}"/>
+        </exec>
+        <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+            <arg value="/c"/>
+            <arg value="echo"/>
+            <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
+        </exec>
+
+        <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
+        <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
+			<arg value="CheckBC.py"/>
+            <arg value="${build.log.dir}/BC/bc.config"/>
+            <arg value="-la"/>
+            <arg value="-f"/>
+            <arg value="${sf.spec.bccheck.reportid}${sf.spec.job.number}"/>
+        </exec>
+        <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
+        <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}${sf.spec.job.number}" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="true" verbose="true"/>
+
+        <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
+        <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
+			<arg value="CheckBC.py"/>
+            <arg value="${build.log.dir}/BC/bc.config"/>
+            <arg value="-ha"/>
+            <arg value="-f"/>
+            <arg value="${sf.spec.bccheck.reportid}${sf.spec.job.number}"/>
+        </exec>
+        <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
+        <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}${sf.spec.job.number}" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="true" verbose="true"/>
+    </target>
+
     <target name="sf-prebuild">
         <echo>[SF-PREBUILD]</echo>
         
@@ -199,6 +258,13 @@
 
         <runtarget target="sf-zip-logs"/>
 
+        <!-- Do BC check -->
+        <if><istrue value="${sf.spec.bccheck.enable}"/>
+            <then>
+                <runtarget target="sf-bc-check"/>
+            </then>
+        </if>
+
         <!-- PUBLISH LOGS/REPORTS -->
         <if>
             <istrue value="${sf.spec.publish.enable}" />
--- a/common/common_props.ant.xml	Fri May 29 17:44:02 2009 +0100
+++ b/common/common_props.ant.xml	Fri May 29 17:44:49 2009 +0100
@@ -14,7 +14,9 @@
     
     <property name="sf.spec.systemdefinition.assemble" value="true"/>
     <!-- property name="sf.spec.systemdefinition.file" value=""/ -->
-    
+
+    <property name="sf.spec.pdt.root" value="C:\Symbian\Tools\PDT_1.0"/>
+
     <property name="sf.spec.sbs.config" value="armv5"/>
     
     <property name="sf.spec.build.target" value="all"/>
@@ -78,6 +80,13 @@
     <property name="sf.spec.test.package.name"      value="D:\ATS3\smoketest_package\9.zip"/>
     <property name="sf.spec.test.package.droppath"  value="D:\ATS3\TestDrops"/>
 
+    <!-- BC check properties -->
+    <property name="sf.spec.bccheck.enable" value="false"/>
+    <property name="sf.spec.bccheck.baseline.name" value="SDK_3rd_Edition"/>
+    <property name="sf.spec.bccheck.baseline.skd.dir" value="C:\Symbian\9.1\S60_3rd_MR\"/>
+    <property name="sf.spec.bccheck.baseline.s60.version" value="5.1"/>
+    <property name="sf.spec.bccheck.current.s60.version" value="5.1"/>
+    <property name="sf.spec.bccheck.reportid" value="report"/>
 </project>
 
 
--- a/common/tools/analysis/merge_csv.pl	Fri May 29 17:44:02 2009 +0100
+++ b/common/tools/analysis/merge_csv.pl	Fri May 29 17:44:49 2009 +0100
@@ -17,7 +17,7 @@
 use strict;
 my $csvfile = shift @ARGV;
 my $filelist = shift @ARGV;
-
+my $zipfile = shift @ARGV;
 
 if(! -e $csvfile)
 {
@@ -29,7 +29,28 @@
 {
   die "Cannot find $filelist\n";
 }
+        my %ziptimes;
+        if(defined $zipfile)
+          {
+          open(ZIP,"7z l $zipfile 2>&1|")  or die "Error: Couldn't look in $zipfile\n";
+#          print "time,file\n";
+          while( my $line = <ZIP>)
+            {
+            if($line =~ m/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s\S{5}\s+(\d+)\s+\d+\s+(.+)$/) #ignoring packed size...
+              {
+              my $name = $3;
+              my $size = $2;
+              my $time = $1;
+              $name =~ s/\\/\//g;
+              $name = lc($name);
+              $ziptimes{$name} = $time;
+#              print "$time,$name\n";
+              }
+            }
+          close ZIP;
+          }
         my %files;
+
         open(FILES,"<$filelist") or die "Couldn't open $filelist\n";
         while(my $line = <FILES>)
         {
@@ -44,7 +65,7 @@
                 if($files{$file})
                 {
            
-                    $files{$file} = $files{$file}.",".$group;                                        
+                    $files{$file} = $files{$file}." ".$group; #Stop polluting next column                                        
                        print "Multi:$file".$files{$file}."\n";
 
                 }
@@ -61,7 +82,7 @@
         open(RESULTS,">$resultsfile") or die "Couldn't open write to $resultsfile\n";
         my $header = <CSV>;
         $header =~ s/\n//;
-        print RESULTS $header.",status\n";
+        print RESULTS $header.",status,time\n";
         my @fields = split(',',$header);
         my $targetindex = 0;
         my $counter = 0;
@@ -93,9 +114,10 @@
             {
               $bldinffiles{$bldinf} = 1;
             }
- 
+            my $found = 0; 
             if(defined $files{$target})
-                {                    
+                {
+                    $found = 1;                    
                     $line = $line.$files{$target};
                     if($files{$target} =~ m/fail/i)
                     {
@@ -105,6 +127,17 @@
                       }
                     }
                 }
+            if(defined $ziptimes{$target})
+              {
+                if($found)
+                {
+                  $line = $line.",".$ziptimes{$target};
+                }
+                else
+                {
+                  $line = $line.",,".$ziptimes{$target};
+                }
+              }     
             print RESULTS $line."\n";
             
             }