Merge ats_specialise_test_drop modification to automatically set the test-target param.
authorPat Downey <patd@symbian.org>
Wed, 12 May 2010 12:42:35 +0100
changeset 1027 8f26271e902e
parent 1025 a370015021c1 (diff)
parent 1026 9983d8eb2250 (current diff)
child 1028 11f25704ec27
Merge ats_specialise_test_drop modification to automatically set the test-target param.
common/tools/ats/ats_specialise_test_drop.pl
--- a/common/build.test.xml	Wed May 12 12:31:35 2010 +0100
+++ b/common/build.test.xml	Wed May 12 12:42:35 2010 +0100
@@ -150,21 +150,40 @@
         <echo message="INFO Creating smoketest testpackage"/>
         <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
             <arg value="smoketest.pl"/>
-            <arg value="--target=${sf.spec.test.target}"/>
+			<arg value="--target=${sf.spec.test.target}"/>
         </exec>
         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"  failonerror="false"/>
         
         <echo message="INFO Updating smoketest package with test info"/>
-        <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
-            <arg value="ats_specialise_test_drop.pl"/>
-            <arg value="--test-drop-name=Smoketest-${build.id}"/> 
-            <arg value="--host-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
-            <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
-            <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
-            <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>	
-            <arg value="--publish=${publish.dir}\ats_reports"/>
-			<arg value="--bld-drive=${build.drive}"/>
-        </exec>
+
+        <if><equals arg1="${sf.spec.test.target}" arg2="syborg"/>
+          <then>
+            <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+              <arg value="ats_specialise_test_drop.pl"/>
+              <arg value="--test-drop-name=Smoketest-${build.id}"/> 
+              <arg value="--host-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
+              <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
+              <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
+              <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>	
+              <arg value="--publish=${publish.dir}\ats_reports"/>
+              <arg value="--bld-drive=${build.drive}"/>
+              <arg value="--test-target=Syborg_stif"/>
+              <arg value="--image-path=${sf.spec.test.imagepath}"/>
+            </exec>
+          </then>
+          <else>		
+            <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+              <arg value="ats_specialise_test_drop.pl"/>
+              <arg value="--test-drop-name=Smoketest-${build.id}"/> 
+              <arg value="--host-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
+              <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
+              <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
+              <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>	
+              <arg value="--publish=${publish.dir}\ats_reports"/>
+              <arg value="--bld-drive=${build.drive}"/>
+            </exec>
+          </else>
+        </if>
         <!-- Now ready to send to ATS3 -->
     </target>   
 
@@ -197,5 +216,6 @@
         <echo message="Waiting for 10 seconds to start the ATS Worker......."/>
         <sleep seconds="10"/>
     </then>
+    </if>
     </target> 
 </project>
--- a/common/build.xml	Wed May 12 12:31:35 2010 +0100
+++ b/common/build.xml	Wed May 12 12:42:35 2010 +0100
@@ -497,7 +497,7 @@
             <istrue value="${sf.spec.dirlist.enable}"/>
             <then>
                 <echo message="Dirlist name: ${sf.currentlist.name} requested for ${sf.dir.location} excluding ${sf.dir.exclude}"/>
-                <exec executable="python" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
+                <exec executable="python" dir="${build.drive}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
                     <arg value="${sf.common.config.dir}/tools/listdir.py"/>
                     <arg value="${sf.dir.location}"/>
                     <arg value="${sf.dir.exclude}"/>
--- a/common/common_props.ant.xml	Wed May 12 12:31:35 2010 +0100
+++ b/common/common_props.ant.xml	Wed May 12 12:42:35 2010 +0100
@@ -101,7 +101,8 @@
     <property name="sf.spec.test.host.password"  value="admin"/>
     <property name="sf.spec.test.host.droppath"  value="D:\ats3_testdrop_arrivals\${env.COMPUTERNAME}"/>
     <property name="sf.spec.test.epocroot"       value="winscw_smoketest"/>
-	<property name="sf.spec.test.target"         value="winscw"/> <!-- This specifies the target on which tests will be run -->
+    <property name="sf.spec.test.target"         value="winscw"/> <!-- This specifies the target on which tests will be run -->
+    <property name="sf.spec.test.imagepath"      value="D:\epoc32\rom\syborg_tshell_ARMV5_udeb.img"/> <!-- This specifies the path to the ROM image used for testing -->
 
     <!-- ATS properties -->
     <property name="sf.spec.test.package.location"  value="\\${sf.spec.test.host.name}\ats3_testdrop_arrivals\${env.COMPUTERNAME}"/>
--- a/common/templates/run-qmake.ant.xml.ftl	Wed May 12 12:31:35 2010 +0100
+++ b/common/templates/run-qmake.ant.xml.ftl	Wed May 12 12:42:35 2010 +0100
@@ -2,9 +2,82 @@
 <project name="run-qmake-${ant['sysdef.configuration']}" default="all">
 
     <target name="all">
+
+	        <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>
+                <if>
+                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
+                    <then>
+                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
+                            <arg value="/C"/>
+                            <arg line="sbs -c tools2 -j 4 --logfile=${r'$'}{build.drive}/output/logs/${ant['build.id']}_compile_qmake.log"/>
+                        </exec>
+                    </then>
+                    <else>
+                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
+                       <fail message="Unit /sf/mw/qt/src/s60installs/deviceconfiguration is in the model, but not present on disk. Cannot build qmake!"/>
+                    </else>
+                </if>          
+	      </#if>
+    </#list>			
+			</sequential>
+
+	        <sequential>
+
+	<#list data["//unit/@bldFile/.."] as unit>
+          <#if (unit.@bldFile=="/sf/mw/qtextensions/group")>
+                <echo>INFO: Configuring qtextensions for ${unit.@bldFile}</echo>
+                <if>
+                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
+                    <then>
+                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
+                            <arg value="/C"/>
+                            <arg line="sbs -c tools2 -j 4 --logfile=${r'$'}{build.drive}/output/logs/${ant['build.id']}_compile_qtextensions.log"/>
+                        </exec>
+                    </then>
+                    <else>
+                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
+                    </else>
+                </if>          
+	      </#if>
+    </#list>			
+			</sequential>
+			
+            <sequential>
+    <#list data["//unit/@proFile/.."] as unit>
+          <#if (unit.@proFile=="hb.pro")>
+                <echo>Running configure.py for ${unit.@bldFile}/${unit.@proFile}</echo>
+                <if>
+                    <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
+                    <then>
+                        <exec executable="cmd" dir="${r'$'}{build.drive}/${unit.@bldFile}" failonerror="false">
+                            <arg value="/C"/>
+                            <arg value="python"/>
+                            <arg line ="configure.py --qmake-bin=\epoc32\tools\qmake.bat --qmake-spec=symbian-sbsv2 --platform=symbian --qmake-options=MMP_RULES+=EXPORTUNFROZEN"/>
+                        </exec>
+                    </then>
+                    <else>
+                       <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
+                    </else>
+                </if>
+                <echo>INFO: Exporting Orbit mkspecs to epoc32\tools for ${unit.@bldFile}/${unit.@proFile}</echo>
+
+                <copy file="${r'$'}{build.drive}/${unit.@bldFile}/hb_install.prf" todir="${r'$'}{build.drive}/epoc32/tools/qt/mkspecs/features" overwrite="true"/>
+                <copy file="${r'$'}{build.drive}/${unit.@bldFile}/hb.prf"         todir="${r'$'}{build.drive}/epoc32/tools/qt/mkspecs/features" overwrite="true"/>
+	  </#if>
+    </#list>
+
+            </sequential>
+
         <parallel threadCount="${r'$'}{number.of.threads}">
     <#list data["//unit/@proFile/.."] as unit>
             <sequential>
+
+          <#if (unit.@proFile!="hb.pro")>
+
                 <echo>Running qmake for ${unit.@bldFile}/${unit.@proFile}</echo>
                 <if>
                     <available file="${r'$'}{build.drive}/${unit.@bldFile}" type="dir"/>
@@ -24,10 +97,14 @@
                     <else>
                        <echo message="ERROR: Directory ${r'$'}{build.drive}/${unit.@bldFile} doesn't exist."/>
                     </else>
-                </if>
+                </if>          
+	  </#if>
+
+
             </sequential>
     </#list>
         </parallel>
+
     </target>
     
 </project>
--- a/common/tools/listdir.py	Wed May 12 12:31:35 2010 +0100
+++ b/common/tools/listdir.py	Wed May 12 12:42:35 2010 +0100
@@ -26,9 +26,9 @@
   if(len(sys.argv)>2):
     x_dirs = string.lower(sys.argv[2])
     exclude_dirs = re.split(',', x_dirs)
-  scandir(directory, exclude_dirs,directory)
+  scandir(directory, exclude_dirs)
 
-def scandir(top, exclude_dirs,directory):
+def scandir(top, exclude_dirs):
     fixpath = re.compile('\\\\')    
     fixroot = re.compile('^%s\\\\' % top)
     for root, dirs, files in os.walk(top, topdown=True):
@@ -38,6 +38,6 @@
         for name in files:
             filename = os.path.join(root, name)
             fn = string.lower(fixpath.sub('/',fixroot.sub('',filename)))
-            print fn.strip(directory)
+            print top+"/"+fn
 
 main()
--- a/sf-platform/compile.ant.xml	Wed May 12 12:31:35 2010 +0100
+++ b/sf-platform/compile.ant.xml	Wed May 12 12:42:35 2010 +0100
@@ -22,11 +22,23 @@
   
   <!-- compile sbs.tools.config and sbs.config. tools built only if its not being unpacked first.
        note: must be called from sf-os/s60-compile targets, as sys model input needed -->
-  <target name="sf-do-compile" depends="sf-do-full-export">
+  <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">
+      <param name="qmake.enabled" value="true"/>
+      <param name="sysdef.configuration" value="${sysdef.configurations.list}"/>
+    </antcall>
+
+
+    <!-- perform initial exports -->
+    <antcall target="sf-do-full-export" inheritAll="false" inheritRefs="true">
+        <param name="sf.export.stage.name" value="full_export"/>
+    </antcall>	  
+	
     <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}"/>
@@ -39,14 +51,13 @@
         <!-- sf.spec.sbs.tools.config param used. do-target-build will decide to build sequentially/together -->
         <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
             <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.tools.config}" />           
-            <param name="qmake.enabled"        value="false"/> <!-- ensure qmake is not run, before its available -->
         </antcall>
       </then>
       <else>
         <echo message="INFO Skipping tools build, tools were unpacked from ${sf.spec.baseline.location}"/>        
       </else>
       </if>
-      
+      	  	  
       <!-- sf.spec.sbs.config param used. do-target-build will decide to build sequentially/together -->
       <antcall target="sf-do-target-compile" inheritAll="false" inheritRefs="true">
           <param name="i.sf.spec.sbs.config" value="${sf.spec.sbs.config}" />
@@ -63,8 +74,8 @@
             <arg line="-k" />
             <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
             <arg line="-t ${sf.spec.sbs.retry.limit}"/>
-            <arg name="--logfile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_full_export.log" />
-            <arg name="--makefile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_full_export_Makefile" />
+            <arg name="--logfile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_${sf.export.stage.name}.log" />
+            <arg name="--makefile" value="${compile.log.dir}/${build.id}_${sf.spec.os.sysdef.clean.configurations.list}_compile_${sf.export.stage.name}_Makefile" />
             <arg line="--export-only"/>
         </sbsOptions>
     </hlm:sbsinput>
@@ -74,7 +85,6 @@
     <antcall target="compile-main" inheritAll="false" inheritRefs="true">
         <param name="build.system" value="${sf.spec.build.system}" />
         <param name="sbs.inputs.list" value="sf.export"/>
-        <param name="qmake.enabled"   value="false"/> <!-- ensure qmake is not run, before its available -->
     </antcall> 
   </target>
 
--- a/sf-tools/build.xml	Wed May 12 12:31:35 2010 +0100
+++ b/sf-tools/build.xml	Wed May 12 12:42:35 2010 +0100
@@ -48,8 +48,8 @@
 
     <echo message="INFO Getting bootstrap environment listing"/>
     <antcall target="sf-list-dir" inheritAll="false">
-      <param name="sf.dir.location" value="${build.drive}/"/> 
-      <param name="sf.dir.exclude"  value="${build.drive}/epoc32/build"/>     
+      <param name="sf.dir.location" value="epoc32"/> 
+      <param name="sf.dir.exclude"  value="epoc32/build"/>     
       <param name="sf.list.name" value="bootstrap"/>
     </antcall>    
   </target>