Merge
authorShabe Razvi <shaber@symbian.org>
Fri, 18 Jun 2010 15:49:36 +0100
changeset 1107 9e4e5aee4e8c
parent 1096 7e7420e7272c (current diff)
parent 1106 232bce64d370 (diff)
child 1108 09255e80a1ec
Merge
--- a/build.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/build.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -7,9 +7,6 @@
   <property name="sf.project.location" value="${sf.config.dir}/../build/config/${sf.subproject.path}"/>
   <property name="sf.project.name" value="job"/>
   
-  <!-- import job properties -->
-  <import file="${sf.project.location}/${sf.project.name}_props.ant.xml" optional="yes"/>
-  
   <!-- Override Helium defaults to allow winscw builds without RVCT -->
   <target name="check-env-arm-license"/>
   <target name="get-arm-license"/>
@@ -18,6 +15,15 @@
   <!-- import helium task definitions to allow usage of ant-contrib tasks -->
   <import file="${helium.dir}/helium_preinclude.ant.xml"/>
    
+  <!-- import job properties -->
+  <if><isfalse value="${sf.production.build}"/>
+    <then>
+      <echo message="INFO Using Public properties defined in ${sf.project.location}/public_override_props.ant.xml"/>
+      <import file="${sf.project.location}/public_override_props.ant.xml" optional="yes"/>
+    </then>
+  </if>
+  <import file="${sf.project.location}/${sf.project.name}_props.ant.xml" optional="yes"/>
+  
   <!-- set sf.spec.job.name and sf.spec.job.codeline if they are not specified in the project's job_props.ant.xml -->
   <propertyregex override="yes" property="jobname" input="${sf.subproject.path}" regexp=".*[\\/]([^\\^/]+)" replace="\1"/>
   <property name="jobname" value="${sf.subproject.path}"/>
--- a/common/build.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/common/build.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -119,7 +119,11 @@
           <hlm:signalInput id="signalRunQMakeInput" failbuild="never">
             <hlm:notifierListRef refid="defaultFailNotifier" />
           </hlm:signalInput>
-
+          
+           <!-- allow use of a release_metadata.xml without all referenced files being present -->
+          <hlm:signalInput id="getenvSignalInput" failbuild="never">
+              <hlm:notifierListRef refid="defaultFailNotifier" />
+          </hlm:signalInput>
       </then>
     </if>
     
@@ -144,6 +148,9 @@
         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
 
         <runtarget target="sf-check-env"/>
+        
+        <!-- create zips folder for use later -->
+        <mkdir dir="${build.drive}/output/zips"/>
         <stopwatch name="sf-prep" action="elapsed"/>
     </target>
 
@@ -155,7 +162,7 @@
     <target name="sf-check-env">
         <echo message="Create report on environment info"/>
         <!-- Dario's environment dumper -->
-    	  <if>
+        <if>
             <isset property="sf.spec.baseline.location"/>
             <then>
                 <exec executable="perl" dir="${build.drive}/utilities/envinfo">
@@ -248,26 +255,6 @@
         <!-- Delete build directory -->
         <delete dir="${prep.build.dir}"/>
     </target>
-    
-    <!-- Note: Not used from Helium 7 onwards -->
-    <target name="generate-layers">
-       <echo message="canno-file:${canonical.sysdef.file}"/>
-       <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
-
-       <!-- All we want is a sysdef with the config name appended, so just copy it -->
-       <echo message="INFO: Skip GenXML and copy sysdef to sysdef+config name"/>
-       <copy file="${canonical.sysdef.file}" tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
-
-        <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml" tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml">
-        <filterchain>
-            <linecontainsregexp negate="true">
-                <regexp pattern="^\s*$"/>
-            </linecontainsregexp>
-        </filterchain>
-        </copy>
-        <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" todir="${build.log.dir}/BOM/"/>
-        <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
-    </target>
 
     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
     <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-envinfo,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom">
@@ -348,11 +335,11 @@
             <arg value="identify"/>
             <arg value="-i"/>
         </exec>
-	<echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
+        <echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
     </target>
     
     <target name="sf-get-utils">
-    	<stopwatch name="sf-get-utils"/>
+      <stopwatch name="sf-get-utils"/>
         <echo message="Cloning utilities repository to ${build.drive}/utilities"/>
         <exec executable="hg">
             <arg value="clone"/>
@@ -361,7 +348,7 @@
             <arg value="http://developer.symbian.org/oss/MCL/sftools/fbf/utilities"/>
             <arg value="${build.drive}/utilities"/>
         </exec>
-    	<stopwatch name="sf-get-utils" action="elapsed"/>
+      <stopwatch name="sf-get-utils" action="elapsed"/>
     </target>
 
     <target name="sf-getenvs">
@@ -400,6 +387,7 @@
                 <echo message="${sf.spec.baseline.location}" file="${build.drive}/output/logs/BOM/baseline.txt"/>
                 
                 <!-- run internal target preparation-getenv -->
+                <delete file="${build.drive}/currentRelease.xml"/>        
                 <runtarget target="preparation-getenv"/>
                 <stopwatch name="sf-getenvs (baseline)" action="elapsed"/>
             </then>
@@ -431,8 +419,17 @@
     <target name="sf-get-source" depends="sf-generate-source-spec">
         <stopwatch name="sf-get-source"/>
         <!-- Get test manifest, and move resolved csv so that it doesnt conflict with source-spec.ant.xml -->
-        <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
-        <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
+        <if>
+            <istrue value="${sf.spec.smoketest.enable}"/>
+            <then>
+                <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
+                <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
+            </then>
+        </if>
+
+        <ant antfile="${temp.build.dir}/source-rnd-spec.ant.xml" />
+        <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_rnd.csv"/>
+
         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
         <stopwatch name="sf-get-source" action="elapsed"/>
     </target>
@@ -481,9 +478,11 @@
             <istrue value="${sf.spec.sourcesync.enable}" />
             <then>
                 <property name="sf.source.csv.file" value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
+                <property name="sf.source_rnd.csv.file" value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile.rnd}"/>
             </then>
         </if>
-        <property name="sf.source.csv.file" value="nul:"/>
+        <property name="sf.source.csv.file"     value="nul:"/>
+        <property name="sf.source_rnd.csv.file" value="nul:"/>
 
         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
               outputFile="${temp.build.dir}/source-spec.ant.xml">
@@ -494,15 +493,31 @@
                     ]
               </data>
         </fmpp>
+
         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
-              outputFile="${temp.build.dir}/source-test-spec.ant.xml">
+              outputFile="${temp.build.dir}/source-rnd-spec.ant.xml">
               <data expandProperties="yes">
                     ant: antProperties()
                     data: [
-                        csv(${sf.test.csv.file}, {separator:','})
+                        csv(${sf.source_rnd.csv.file}, {separator:','})
                     ]
               </data>
         </fmpp>
+
+        <if>
+            <istrue value="${sf.spec.smoketest.enable}"/>
+            <then>
+            <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
+                  outputFile="${temp.build.dir}/source-test-spec.ant.xml">
+                  <data expandProperties="yes">
+                        ant: antProperties()
+                        data: [
+                            csv(${sf.test.csv.file}, {separator:','})
+                        ]
+                  </data>
+            </fmpp>
+            </then>
+        </if>
     </target>
     
     <!-- generate dir list using passed location and name 
@@ -625,7 +640,7 @@
                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
                 toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
-                sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,type,rev,sysdef]})              
+                sources: csv(${build.drive}/output/logs/BOM/sources.csv, {separator:',',headers:[loc,dst,type,rev,sysdef]})
             </data>
         </fmpp>
         <!-- Make a copy in BOM dir -->
@@ -726,7 +741,7 @@
     
     <!-- Unpack the rnd zips ready to be used in the build -->
     <target name="sf-unpack-rnd">
-        <echo message="Unpacking any available RnD binaries"/>
+        <echo message="INFO Unpacking any available RnD binaries"/>
         <for param="rndZip">
             <fileset dir="${build.drive}/output/zips/">
                 <include name="binaries_*.zip"/> <!-- Internal rnd bins -->
@@ -740,7 +755,19 @@
                     <arg value="@{rndZip}"/>
                 </exec>
             </sequential>
-	</for>
+        </for>
+
+        <if><istrue value="${sf.spec.baseline.enable}"/>
+        <then>
+
+        <!-- also unpack any rnd bins from baseline location. may collide with package build getenv -->
+        <delete file="${build.drive}/currentRelease.xml"/>        
+        <antcall target="preparation-getenv" inheritAll="false">
+            <param name="base_release.path"           value="${sf.spec.baseline.location}"/>
+            <param name="base_release.getenv_options" value="-i rnd -k"/>
+        </antcall>
+        </then>
+        </if>
     </target>
 
   <target name="sf-compile-options">  
--- a/common/common_props.ant.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/common/common_props.ant.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -49,9 +49,16 @@
     <property name="sf.spec.sourcesync.enable" value="true"/>
     <property name="sf.spec.sourcesync.usecache" value="false"/>
     <property name="sf.spec.sourcesync.sourcespecfile" value="sources.csv"/>
+    <property name="sf.spec.sourcesync.sourcespecfile.rnd" value="sources_rnd.csv"/>
     <property name="sf.spec.sourcesync.cache.path" value="hgcache"/> <!-- Path relative to root of some drive for location of hg cache -->
     <property name="sf.spec.sourcesync.local.development.area" value="//v800008/Builds01"/> <!-- Location of a "development area" which should be cached on build machines (in addition to developer.symbian.org content) -->
     <property name="sf.spec.sources.revision" value=""/>
+
+    <!-- package builds, this is the actual file, for platform this is the dir -->
+    <property name="sf.spec.systemdefinition.location" value=""/>
+    
+    <!-- model file name relative to location (above) -->
+    <property name="sf.spec.systemdefinition.filename" value=""/>
     
     <property name="sf.spec.baseline.enable" value="true"/>
     <property name="sf.spec.baseline.select" value="auto"/> <!-- auto|explicit|location -->
--- a/common/templates/run-qmake.ant.xml.ftl	Wed Jun 16 13:25:59 2010 +0100
+++ b/common/templates/run-qmake.ant.xml.ftl	Fri Jun 18 15:49:36 2010 +0100
@@ -3,10 +3,12 @@
 
     <target name="all">
 
-    <if><not><available file="${r'$'}{build.drive}/epoc32/tools/qt/qmake.exe" type="file"/></not>
+    <!-- Qmake needs to have been built in this environment, to generate bld.infs to built Qt itself.  
+         Qmake.exe only exists in the source tree if its been built  -->
+
+    <if><not><available file="${r'$'}{build.drive}/sf/mw/qt/bin/qmake.exe" type="file"/></not>
     <then>
 	        <sequential>
-
 	<#list data["//unit/@bldFile/.."] as unit>
           <#if (unit.@bldFile=="/sf/mw/qt/src/s60installs/deviceconfiguration")>
                 <echo>INFO: Building and configuring qmake for ${unit.@bldFile}</echo>
--- a/common/templates/zip.cfg.xml.ftl.template	Wed Jun 16 13:25:59 2010 +0100
+++ b/common/templates/zip.cfg.xml.ftl.template	Fri Jun 18 15:49:36 2010 +0100
@@ -15,9 +15,9 @@
 		<!--  Metadata creation -->
 		<set name="grace.template" value="${temp.build.dir}/release_metadata_template.xml" />
 		<set name="grace.metadata" value="true" />
-		<set name="grace.service" value="${grace.service.name}" />
-		<set name="grace.product" value="${grace.product.name}" />
-		<set name="grace.release" value="${grace.release.name}" />
+		<set name="grace.service" value="" />
+		<set name="grace.product" value="${build.family}" />
+		<set name="grace.release" value="${build.version}" />
 		
 		<!-- Options that apply to all configs - don't put in any hg internals! -->
 		<set name="exclude" value="**/.hg/**"/>
@@ -121,7 +121,7 @@
 		<!-- For packaging tools builds such as "prebuilt", identified by sf.spec.job.name -->
 		<config name="bin-${sf.spec.job.name}-metadata" abstract="true">
 			<set name="archives.dir" value="${build.output.dir}/zips/release" />
-			<set name="grace.filters" value="emu"/>
+			<set name="grace.filters" value="prebuilt"/>
 			<set name="include" value="*"/>
 			<set name="exclude" value="**"/>
 			<config name="${sf.spec.job.name}">
--- a/sf-package/package_props.ant.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/sf-package/package_props.ant.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -9,7 +9,7 @@
   <property name="sf.spec.baseline.enable" value="true"/>
   <property name="sf.spec.baseline.select" value="location"/>
   <property name="sf.spec.baseline.location" value="\\v800020\Releases\PDK_2.0.e"/>
-  <property name="sf.spec.baseline.getenv_options" value="-i emu -i rnd -i tools -i info"/>
+  <property name="sf.spec.baseline.getenv_options" value="-i emu -i prebuilt -i rnd -i tools -i info"/>
   
   <property name="sf.spec.toolsbaseline.enable" value="false"/>
   
--- a/sf-platform/build.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/sf-platform/build.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -63,7 +63,13 @@
     <touch file="${build.drive}/${sf.spec.bldmefirst.s60.sbs.variant.cfg}" />
     <delete file="${build.log.dir}/${build.id}_bldmefirst-s60.log"/>
 
-    <property name="sf.compile.bldmefirst.command.sbsexport" value="sbs EXPORT --ignore-os-detection --export-only"/>
+    <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
+    <propertyregex property="i.sf.spec.sbs.config.expanded"         override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
+    <propertyregex property="i.sf.spec.sbs.tools.config.expanded"   override="true" input="${sf.spec.sbs.tools.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
+
+    <echo message="INFO Target : ${i.sf.spec.sbs.config.expanded} ${i.sf.spec.sbs.tools.config.expanded}"/>
+
+    <property name="sf.compile.bldmefirst.command.sbsexport" value="sbs EXPORT --ignore-os-detection --export-only -c ${i.sf.spec.sbs.config.expanded} -c ${i.sf.spec.sbs.tools.config.expanded}"/>
     <!-- do bldmefirst stage 1-->
     <for list="${sf.spec.bldmefirst.s60.exports}" delimiter="," param="sf.spec.bldmefirst.s60.export">
       <sequential>
--- a/sf-platform/compile.ant.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/sf-platform/compile.ant.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -24,8 +24,6 @@
        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
   <target name="sf-do-compile" depends="create-canonical-sysdef-file">
     <echo message="INFO Using Helium 7+ for sf-do-compile"/>
-    
-    <propertyregex property="sf.unpack.tools" override="true" input="${sf.spec.baseline.getenv_options}" regexp="-i tools" select="true" defaultValue="false" casesensitive="false"/>
 
     <!-- explicitly run qmake once, as iterative build will repeat the step. if qmake is not unpacked already, then this step is skipped  -->
     <antcall target="run-qmake" inheritAll="false" inheritRefs="true">
@@ -46,8 +44,7 @@
 	
     <if> <!-- If tools baseline unpack has not been specified, or its not a "fast" build then try to build them -->
       <or>
-        <isfalse value="${sf.unpack.tools}"/>
-        <isfalse value="${sf.spec.baseline.enable}"/>
+        <isfalse value="${sf.spec.toolsbaseline.enable}"/>
         <isfalse value="${sf.os.compile.fast}"/>
       </or>
       <then>
@@ -59,7 +56,7 @@
         </antcall>
       </then>
       <else>
-        <echo message="INFO Skipping tools build, tools were unpacked from ${sf.spec.baseline.location}"/>        
+        <echo message="INFO Skipping tools build, tools were unpacked from ${sf.spec.toolsbaseline.location}"/>
       </else>
       </if>
       	  	  
@@ -69,13 +66,20 @@
       </antcall>
   
       <!-- Export model to BOM, as generate-layers target is no longer called from compile-main target -->
-      <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configurations.list}.xml" todir="${build.log.dir}/BOM/"/>
+      <!-- Name of file in BOM should always be system_model.xml, so that it can be predictably re-used again -->
+      <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configurations.list}.xml" tofile="${build.log.dir}/BOM/system_model.xml"/>
   </target>
 
   <!-- perform export only first to assist when parallel makefile parsing -->
   <target name="sf-do-full-export">
+  
+    <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
+    <propertyregex property="i.sf.spec.sbs.config.expanded"         override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.config}" global="true"  casesensitive="false"/>
+    <propertyregex property="i.sf.spec.sbs.tools.config.expanded"   override="true" input="${sf.spec.sbs.tools.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.tools.config}" global="true"  casesensitive="false"/>
+
     <hlm:sbsinput id="sf.export">
         <sbsOptions>
+            <arg line="-c ${i.sf.spec.sbs.config.expanded} -c ${i.sf.spec.sbs.tools.config.expanded}"/>
             <arg line="-k" />
             <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
             <arg line="-t ${sf.spec.sbs.retry.limit}"/>
--- a/sf-platform/platform_props.ant.xml	Wed Jun 16 13:25:59 2010 +0100
+++ b/sf-platform/platform_props.ant.xml	Fri Jun 18 15:49:36 2010 +0100
@@ -7,16 +7,18 @@
 
   <property name="sf.spec.bldmefirst.s60.variant" value="western" /> <!-- western|apac|japan -->
 
-  <property name="sf.spec.baseline.getenv_options" value="-I tools -k"/> <!-- Sync the tools... -->
+  <property name="sf.spec.baseline.getenv_options" value="-i prebuilt -k"/> <!-- unpack anything prebuilt from baseline -->
   <property name="sf.spec.baseline.clean"          value="false"/>
   <property name="sf.spec.baseline.select"         value="location" />
 
-  <property name="sf.spec.toolsbaseline.getenv_options" value="-i emu -k"/>
+  <property name="sf.spec.toolsbaseline.getenv_options" value="-i tools -k"/>
   <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.prebuilt.excludelist"     value="${sf.spec.job.dir}/../prebuilt_excludelist.txt"/>
 
+  <property name="sf.spec.systemdefinition.location" value="${sf.project.location}\sysdefs\"/>
+  <property name="sf.spec.systemdefinition.filename" value="system_model.xml"/>
+
   <property name="sf.spec.sourcesync.usecache"     value="true"/>
 
   <!-- generate dir list(s) of epoc32 tree -->