--- a/buildframework/helium/tools/compile/compile.antlib.xml Tue Mar 23 13:34:00 2010 +0000
+++ b/buildframework/helium/tools/compile/compile.antlib.xml Thu Mar 25 11:35:53 2010 +0000
@@ -20,13 +20,14 @@
============================================================================
-->
+<!--* @package compile -->
<antlib xmlns:hlm="http://www.nokia.com/helium">
<!-- This task transfer the log file into html format -->
<macrodef name="compileHtmlscanlogMacro" uri="http://www.nokia.com/helium">
<attribute name="input"/>
<attribute name="output"/>
<sequential>
- <exec dir="${build.drive}/" executable="perl" failonerror="${failonerror}">
+ <exec executable="perl" dir="${build.drive}/" failonerror="${failonerror}">
<arg value="${epocroot}epoc32/tools/htmlscanlog.pl"/>
<arg value="-v"/>
<arg value="-v"/>
@@ -47,8 +48,8 @@
<isset property="skip.diamonds"/>
</not>
<then>
- <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/faults_metadata.ftl"
- outputfile="${build.log.dir}/compile-main.xml">
+ <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/faults_metadata_orm.ftl"
+ outputfile="${diamonds.build.output.dir}/compile-main.xml">
<data expandProperties="yes">
dbPath: ${metadata.dbfile}
logpath: @{logfile}
@@ -63,7 +64,9 @@
<macrodef name="compileLogSignalMacro" uri="http://www.nokia.com/helium">
<attribute name="compile.summary.file"/>
<attribute name="error.limit"/>
+ <attribute name="phase" default="compile"/>
<sequential>
+ <hlm:calculateErrorsFromLog logfile="@{compile.summary.file}" />
<hlm:metadataCountSeverity severity="ERROR" log="@{compile.summary.file}"
db="${metadata.dbfile}"
property="build.errors.total"/>
@@ -74,9 +77,8 @@
<if>
<scriptcondition language="jython" value="false">
errorsTotal = project.getProperty("build.errors.total")
-errorsLimit = project.getProperty("build.errors.limit")
-if int(errorsLimit) > -1:
- if int(errorsTotal) > int(errorsLimit):
+if int(r'@{error.limit}') > -1:
+ if int(errorsTotal) > int(r'@{error.limit}'):
self.setValue(1)
</scriptcondition>
<then>
@@ -88,7 +90,8 @@
</if>
<echo message="compile result:${compile.result}" />
<hlm:signalMacro skip.count="true" result="${compile.result}"
- logfile="@{compile.summary.file}"
+ logfile="@{compile.summary.file}"
+ phase="@{phase}"
signal.input="${compile.signal.input}" />
</sequential>
</macrodef>
@@ -148,11 +151,18 @@
<macrodef name="compileGenxmlMergeMacro" uri="http://www.nokia.com/helium">
<attribute name="input"/>
<attribute name="output"/>
+ <attribute name="logfile"/>
<sequential>
+ <basename property="base.merge.log" file="@{logfile}"/>
+ <hlm:tempRecordStartMacro name="${base.merge.log}"/>
+ <echo message="input:@{input}" />
+ <echo message="output:@{output}" />
+ <mkdir dir="${compile.log.dir}"/>
+ <mkdir dir="${temp.build.dir}"/>
<copy todir="${build.drive}/" verbose="true">
<fileset dir="${helium.dir}/tools/common/dtd" includes="*.dtd"/>
</copy>
- <preset.exec executable="perl" dir="${build.drive}/" failonerror="${failonerror}" output="${build.log.dir}/${build.id}.sysdef_GenxmlMerge.log">
+ <preset.exec executable="perl" dir="${build.drive}/" failonerror="${failonerror}">
<arg value="${epocroot}epoc32/tools/build/genxml.pl"/>
<arg value="-s"/>
<arg value="${epocroot}"/>
@@ -160,33 +170,11 @@
<arg value="@{output}"/>
<arg line="@{input}"/>
</preset.exec>
- <if>
- <not>
- <available file="@{output}"/>
- </not>
- <then>
- <!-- Todo: metadata: Make sure that logfilter is added to the filterset -->
- <hlm:metadatarecord database="${metadata.dbfile}">
- <hlm:textmetadatainput>
- <fileset casesensitive="false" file="${build.log.dir}/${build.id}.sysdef_GenxmlMerge.log" />
- <metadatafilterset>
- <metadatafilter priority="ERROR" regex="^ERROR:" description="genxml error" />
- <metadatafilter priority="ERROR" regex="^Context:" description="genxml context error" />
- </metadatafilterset>
- <metadatafilterset refid="filterset.genxml.merge" />
- </hlm:textmetadatainput>
- </hlm:metadatarecord>
- <hlm:generateBuildStatus file="${build.id}.sysdef_GenxmlMerge.log" />
- <hlm:signal name="canonicalSysDefFailSignal" result="1" >
- <signalNotifierInput>
- <signalInput refid="canonicalSysDefFailSignalInput" />
- <notifierInput file = "${build.signal.status.dir}/${build.id}.sysdef_GenxmlMerge.log.status.html" />
- </signalNotifierInput>
- </hlm:signal>
- </then>
- </if>
-
- <hlm:assertFileExists file="@{output}"/>
+ <hlm:tempRecordStopMacro name="${base.merge.log}" phase="compile" filterref="filterset.genxml.merge"/>
+ <hlm:signalMacro
+ logfile="${build.cache.log.dir}/${base.merge.log}"
+ phase="compile"
+ signal.input="canonicalSysDefFailSignalInput" />
</sequential>
</macrodef>
@@ -233,7 +221,8 @@
<attribute name="dir"/>
<attribute name="annodetail"/>
<attribute name="root"/>
- <attribute name="failonerror"/>
+ <attribute name="failonerror"/>
+ <attribute name="phase"/>
self.setTaskName("emake");
// check attributes
if (attributes.get("name") == null)
@@ -244,6 +233,7 @@
self.log("Makefile: " + attributes.get("makefile"));
String target = "all";
String custom = "";
+ String annofileDir = "";
if (attributes.get("target") != null)
target = attributes.get("target");
self.log("Target: " + target);
@@ -253,10 +243,12 @@
root = attributes.get("root");
else
root = "";
+
self.log("Custom: " + custom);
// Create and configure exec target
org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask();
+ task.setProject(self.getProject());
task.setTaskName(self.getTaskName());
String emake = com.nokia.ant.util.Helper.getProperty(project, "ec.emake");
task.setExecutable(emake);
@@ -285,9 +277,15 @@
self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root);
}
task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root);
+ if (attributes.get("phase") != null) {
+ annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase");
+ }
+ else {
+ annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir");
+ }
if (attributes.get("annodetail") != null) {
task.createArg().setValue("--emake-annodetail=" + attributes.get("annodetail"));
- task.createArg().setValue("--emake-annofile=" + com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + buildId + "-" + attributes.get("name") + ".anno.xml");
+ task.createArg().setValue("--emake-annofile=" + annofileDir + "/" + buildId + "-" + attributes.get("name") + ".emake.anno.xml");
}
task.createArg().setLine(custom);
task.createArg().setLine("-f " + attributes.get("makefile"));