--- a/buildframework/helium/tools/preparation/ci.ant.xml Fri Feb 05 11:59:41 2010 +0000
+++ b/buildframework/helium/tools/preparation/ci.ant.xml Thu Mar 04 15:10:37 2010 +0200
@@ -20,6 +20,7 @@
============================================================================
-->
+<!--* @package preparation -->
<project name="ci" xmlns:hlm="http://www.nokia.com/helium">
<description>
CI related targets
@@ -28,7 +29,7 @@
<!-- Delete all the folders based on configurations file inside dir-path, optional attribute pool-size's default value is 4 -->
<target name="delete-folders-from-list" if = "ci.cleanup.env.dir">
<exec osfamily="windows" executable="python" failonerror="true" outputproperty="delete.folders.drive">
- <arg value="${helium.dir}/tools/common/python/scripts/searchnextdrive.py"/>
+ <arg line="-m searchnextdrive"/>
</exec>
<hlm:deleteFoldersFromDirMacro dir-path="${ci.cleanup.env.dir}" delete-folders-drive="${delete.folders.drive}"/>
</target>
@@ -43,7 +44,8 @@
import threadpool
import subprocess
import sys
-
+from java.io import IOException
+
dir_path = str(attributes.get('dir-path'))
del_folder_drive = attributes.get('delete-folders-drive')
pool_size = attributes.get('pool-size')
@@ -70,24 +72,12 @@
# Delete all dirs based on config
for dir_ in delete_dirs:
try:
- if os.sep == '\\':
- fileutils.subst(del_folder_drive, dir_)
- self.log(str("substed for deleting folders"))
- self.log(str("Removing %s\\" % del_folder_drive))
- fileutils.rmtree("%s\\" % del_folder_drive)
- fileutils.unsubst(del_folder_drive)
- self.log(str("unsubsted substed for deleting folders"))
- else:
- self.log(str("Removing %s" % dir_))
- fileutils.rmtree(dir_)
- except Exception, e:
- if os.sep == '\\':
- try:
- fileutils.unsubst(del_folder_drive)
- self.log(str("unsubsted for deleling folders"))
- except Exception, e2:
- self.log(str("failed when unsubsting for failed deleting folders... process will continue anyway"))
- self.log(str("ERROR: %s" % e))
+ self.log(str("Removing %s" % dir_))
+ fileutils.rmtree(dir_)
+ except Exception, exc:
+ self.log(str("ERROR: %s" % exc))
+ except IOException, ioExc:
+ self.log(str("ERROR: %s" % ioExc))
# Delete all config files
for path_ in found_inputs:
@@ -197,7 +187,7 @@
config.store(open(sessionFile, 'w+'))
</scriptdef>
- <!-- Task that generates an XML configuration of the work that will be done by ccm-get-input. -->
+ <!-- Task that generates an XML configuration of the work that will be done by prep-work-area. -->
<macrodef name="findProjects" uri="http://www.nokia.com/helium">
<attribute name="delivery"/>
<attribute name="sessionfile"/>
@@ -309,7 +299,7 @@
<hlm:monitorCCMSession delivery="${prep.delivery.conf.parsed}" sessionfile="${ci.session.file}"/>
</target>
- <!-- Bootstrapper target for Cruise Control. This target output the future work that ccm-get-input will be doing. -->
+ <!-- Bootstrapper target for Cruise Control. This target output the future work that prep-work-area will be doing. -->
<target name="ci-prep-wa-create-list" depends="ci-prep-wa-create-list-validate" if="do.ci-prep-wa-create-list">
<hlm:findProjects delivery="${prep.delivery.conf.parsed}" sessionfile="${ci.session.file}" output="${ci.project.config}"/>
</target>