common/build.xml
changeset 142 247e27021cd0
parent 141 228f8b438c19
child 150 15726eb85364
--- a/common/build.xml	Thu Jun 04 16:08:42 2009 +0100
+++ b/common/build.xml	Mon Jun 08 15:58:51 2009 +0100
@@ -24,7 +24,7 @@
     <property name="build.system" value="${sf.spec.build.system}"/>
     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
-    
+
     <!-- import all core HELIUM targets -->
     <import file="${helium.dir}/helium.ant.xml" />
     
@@ -189,7 +189,21 @@
             <arg value="echo"/>
             <arg value="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
         </exec>
-        
+
+        <!-- tools baseline must come before epoc baseline to allow clean listing -->
+        <if>
+            <istrue value="${sf.spec.toolsbaseline.enable}" />
+            <then>
+                <!-- wrapper around preparation-getenv but with diff params -->
+                <runtarget target="sf-getenv-tools"/>
+                
+                <echo message="INFO Getting tools environment listing"/>
+                <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_toolsbaseline.log">
+                    <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
+                    <arg value="${build.drive}/epoc32"/>
+                </exec>
+            </then>
+        </if>        
         <if>
             <istrue value="${sf.spec.baseline.enable}" />
             <then>
@@ -211,7 +225,7 @@
                 <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
             </else>
         </if>
-        
+
         <if>
             <istrue value="${sf.spec.sourcesync.enable}" />
             <then>
@@ -269,6 +283,7 @@
         
         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
             <then>
+                <runtarget target="sf-build-smoketestpkg"/>
                 <runtarget target="sf-send-testpkg"/>
             </then>
         </if>
@@ -295,6 +310,13 @@
         </if>
     </target>
 
+    <target name="sf-getenv-tools">
+        <antcall target="preparation-getenv" inheritAll="false">
+            <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
+            <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
+        </antcall>
+    </target>
+
     <!-- package all logs into zipfile before publish -->
     <target name="sf-zip-logs">
         <if>
@@ -541,12 +563,47 @@
             <arg value="--host=${sf.spec.test.host.name}"/>
             <arg value="--username=${sf.spec.test.host.username}"/>
             <arg value="--password=${sf.spec.test.host.password}"/>
-            <arg value="--local-test-pkg=${sf.spec.test.package.name}"/>
+            <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
             <arg value="--local-drop-path=${sf.spec.test.package.droppath}"/>
             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
         </exec>
     </target>
-  
+
+    <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
+        <delete dir  ="${build.drive}/smoketest"/>
+        <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
+        
+        <echo message="INFO Copy smoketest source to EPOCROOT"/>
+        
+        <copy todir="${build.drive}/smoketest">
+            <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
+        </copy>
+        
+        <echo message="INFO Building smoketest"/>
+        <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+            <arg value="/c"/>
+            <arg value="sbs -b bld.inf -c winscw.test"/>
+        </exec>
+
+        <echo message="INFO Creating smoketest testpackage"/>
+        <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+            <arg value="/c"/>
+            <arg value="smoketest.pl"/>
+        </exec>
+        <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
+        
+        <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="--device-name=ATSINTERFACE EMULATOR on ${env.COMPUTERNAME}"/>
+            <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
+            <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
+
+        </exec>
+        <!-- Now ready to send to ATS3 -->
+    </target>   
+
     <!-- runs analysis of missing bins and source -->
     <target name="sf-run-analysis">
         <mkdir dir="${build.log.dir}/analysis"/>