Add <sf-getenv-tools> target to unpack tools baseline and also <sf-build-smoketestpkg> to create smoketest package to be sent to ATS3 server
--- 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"/>
--- a/common/common_props.ant.xml Thu Jun 04 16:08:42 2009 +0100
+++ b/common/common_props.ant.xml Mon Jun 08 15:58:51 2009 +0100
@@ -42,6 +42,7 @@
<property name="sf.spec.baseline.getenv_options" value="-i emu"/>
<property name="sf.spec.toolsbaseline.enable" value="true"/>
<property name="sf.spec.toolsbaseline.select" value="auto"/>
+ <property name="sf.spec.toolsbaseline.getenv_options" value="-i tools"/>
<property name="sf.spec.publish.enable" value="true"/>
<property name="sf.spec.publish.unpackagedartefacts.enable" value="true"/>
@@ -80,7 +81,8 @@
<property name="sf.spec.test.epocroot" value="D:\ATS3\winscw_smoketest"/>
<!-- ATS local properties -->
- <property name="sf.spec.test.package.name" value="D:\ATS3\smoketest_package\9.zip"/>
+ <property name="sf.spec.test.package.location" value="D:\ATS3\smoketest_package"/>
+ <property name="sf.spec.test.package.name" value="Smoketest-${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}.zip"/> <!-- build.id not available at this point, so construct it from component parts -->
<property name="sf.spec.test.package.droppath" value="D:\ATS3\TestDrops"/>
<!-- BC check properties -->