--- a/buildframework/helium/tools/common/common.ant.xml Wed Sep 29 17:48:06 2010 +0100
+++ b/buildframework/helium/tools/common/common.ant.xml Sun Oct 10 15:22:15 2010 +0300
@@ -153,7 +153,7 @@
<isset property="email.from"/>
</not>
<then>
- <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${env.USERNAME}" outputproperty="email.from" key="mail"/>
+ <hlm:ldap url="${email.ldap.server}" rootdn="${email.ldap.rootdn}" filter="uid=${env.USERNAME}" outputproperty="email.from" key="mail" failonerror="false"/>
</then>
</if>
</then>
@@ -328,12 +328,24 @@
<echo message="Helium version: ${helium.version}" />
</target>
-
- <!-- Checks the Ant configuration against a Helium data model. -->
+ <!-- Checks the Ant configuration against a Helium data model.
+ @deprecated Implementation of the feature has changed, and the target is not needed anymore. Instead use antlint target
+ -->
<target name="check">
- <hlm:antconfiglint>
- <WrongTypePropertyCheck/>
- </hlm:antconfiglint>
+ <hlm:antlint>
+ <fileset id="antlint.files" dir="${helium.dir}/tools">
+ <include name="**/*.ant.xml"/>
+ <include name="**/build.xml"/>
+ <include name="**/*.antlib.xml"/>
+ <exclude name="tests/**"/>
+ <exclude name="**/test/test_*.xml"/>
+ <exclude name="external/**"/>
+ <exclude name="**/tests/data/**"/>
+ <exclude name="build/**"/>
+ </fileset>
+ <hlm:checkPropertyTypeAndValueMismatch severity="error" />
+ <hlm:antlintConsoleReporter />
+ </hlm:antlint>
</target>
@@ -352,6 +364,11 @@
<delete dir="${helium.build.dir}/beanshell"/>
<delete file="${helium.build.dir}/test_jython.xml"/>
<mkdir dir="${helium.build.dir}/report/antlint" />
+
+ <pathconvert pathsep="${path.separator}" property="python.tools.path">
+ <fileset dir="${helium.dir}/nokia_builder" includes="tools/pylint/**/*.egg" />
+ <dirset dir="${helium.dir}/nokia_builder" includes="tools/pylint/**/*.egg" />
+ </pathconvert>
<hlm:antlint>
<fileset id="antlint.files" dir="${helium.dir}/tools">
<include name="**/*.ant.xml"/>
@@ -375,32 +392,34 @@
<hlm:checkAntCall severity="warning" />
<hlm:checkScriptSize severity="warning" />
<hlm:checkUseOfIfInTargets severity="warning" />
- <hlm:checkJythonScript severity="error" outputDir="${helium.build.dir}/jep"/>
- <hlm:checkScriptCondition severity="warning" outputDir="${helium.build.dir}/scriptcondition"/>
- <hlm:checkPythonTasks severity="warning" outputDir="${helium.build.dir}/python"/>
+ <hlm:checkJythonScript severity="error"/>
+ <hlm:checkScriptCondition severity="warning" />
<hlm:checkUseOfEqualsTask severity="warning" />
- <hlm:checkScriptDefNameAttributes severity="error" />
+ <hlm:checkScriptDefAttributes severity="error" />
<hlm:checkScriptDefStyle severity="warning" />
- <hlm:checkScriptDef severity="error" outputDir="${helium.build.dir}/beanshell"/>
+ <hlm:checkScriptDefName severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>
<hlm:checkDuplicateNames severity="warning" />
<hlm:checkTryCatchBlock severity="warning" />
+ <hlm:checkPropertyTypeAndValueMismatch severity="error" />
+ <hlm:checkVariableTask severity="error" />
+ <!-- external command executors -->
+ <hlm:checkstyleExecutor outputDir="${helium.build.dir}/beanshell" config="builder/java/config/java_checkstyle_config.xml">
+ <formatter type="plain"/>
+ </hlm:checkstyleExecutor>
+ <hlm:pylintExecutor outputDir="${helium.build.dir}/python">
+ <env key="PYTHONPATH" value="${python.tools.path}"/>
+ <arg file="${helium.dir}/nokia_builder/tools/pylint/bin/pylint-script.py"/>
+ <arg value="--output-format=parseable"/>
+ <arg line="--rcfile=${helium.dir}/nokia_builder/config/pylintrc.txt"/>
+ </hlm:pylintExecutor>
+
<!-- Reporters -->
<hlm:antlintCheckstyleReporter file="${helium.build.dir}/report/antlint/antlint_report.xml" />
<hlm:antlintConsoleReporter />
+
</hlm:antlint>
- <fileset id="jep.files" dir="${helium.build.dir}">
- <include name="jep/**/*.py"/>
- <include name="python/**/*.py"/>
- </fileset>
- <!--<antcall target="pylint" inheritRefs="true">
- <reference refid="jep.files" torefid="python.files" />
- </antcall>-->
- <cs:checkstyle config="builder/java/config/java_checkstyle_config.xml">
- <fileset dir="${helium.build.dir}/beanshell" includes="**/*.java"/>
- <formatter type="plain"/>
- </cs:checkstyle>
-
+
<for param="file">
<path>
<fileset dir="${helium.dir}">
@@ -422,7 +441,7 @@
</sequential>
</for>
</target>
-
+
<!-- This target can be use to clean up after a build finished or failed.