90 <hlm:toolvarset refid="cnftool.conf.50"/> |
90 <hlm:toolvarset refid="cnftool.conf.50"/> |
91 </hlm:toolMacro> |
91 </hlm:toolMacro> |
92 </pre> |
92 </pre> |
93 --> |
93 --> |
94 <scriptdef name="toolMacro" language="beanshell" uri="http://www.nokia.com/helium"> |
94 <scriptdef name="toolMacro" language="beanshell" uri="http://www.nokia.com/helium"> |
95 <element name="toolvarset" classname="com.nokia.ant.types.VariableSet"/> |
95 <element name="toolvarset" classname="com.nokia.helium.core.ant.types.VariableSet"/> |
96 <attribute name="name"/> |
96 <attribute name="name"/> |
97 <![CDATA[ |
97 <![CDATA[ |
98 import com.nokia.ant.util.ToolsProcess; |
98 import com.nokia.ant.util.ToolsProcess; |
99 import com.nokia.tools.*; |
99 import com.nokia.tools.*; |
100 import com.nokia.ant.types.VariableSet; |
100 import com.nokia.helium.core.ant.types.VariableSet; |
101 import org.apache.tools.ant.types.Reference; |
101 import org.apache.tools.ant.types.Reference; |
102 Reference ref; |
102 Reference ref; |
103 java.lang.String toolName = attributes.get("name"); |
103 java.lang.String toolName = attributes.get("name"); |
104 confTool = ToolsProcess.getTool(toolName); |
104 confTool = ToolsProcess.getTool(toolName); |
105 varSets = elements.get("toolvarset"); |
105 varSets = elements.get("toolvarset"); |
116 throw e; |
116 throw e; |
117 } |
117 } |
118 } |
118 } |
119 ]]> |
119 ]]> |
120 </scriptdef> |
120 </scriptdef> |
|
121 |
|
122 <!-- ConE tool macro to run the command for each argument --> |
|
123 <scriptdef name="conEToolMacro" language="beanshell" uri="http://www.nokia.com/helium"> |
|
124 <element name="arg" classname="com.nokia.ant.types.Variable"/> |
|
125 <attribute name="name"/> |
|
126 <![CDATA[ |
|
127 import com.nokia.ant.util.ToolsProcess; |
|
128 import com.nokia.tools.*; |
|
129 import com.nokia.ant.types.Variable; |
|
130 conETool = ToolsProcess.getTool("ConE"); |
|
131 vars = elements.get("arg"); |
|
132 for (i = 0; i < vars.size(); ++i) { |
|
133 try { |
|
134 var = (Variable)vars.get(i); |
|
135 conETool.storeVariables(var.getName(), var.getValue()); |
|
136 } catch (Exception e) { |
|
137 self.log("Error: " + e); |
|
138 //self.log("Tool Argument Validation failure"); |
|
139 throw e; |
|
140 } |
|
141 } |
|
142 conETool.execute(project); |
|
143 ]]> |
|
144 </scriptdef> |
|
145 |
|
146 |
|
147 <!-- This macro will read the line from file which matches the regexp --> |
|
148 <scriptdef name="grepMacro" language="beanshell" uri="http://www.nokia.com/helium"> |
|
149 <attribute name="filename"/> |
|
150 <attribute name="output"/> |
|
151 <attribute name="regexp"/> |
|
152 <![CDATA[ |
|
153 import java.util.*; |
|
154 import java.io.*; |
|
155 import java.util.regex.Matcher; |
|
156 import java.util.regex.Pattern; |
|
157 |
|
158 if (attributes.get("filename") == null || attributes.get("output") == null || attributes.get("regexp") == null) |
|
159 throw new BuildException("Filename/output/regexp attribute is not set for readLineMacro"); |
|
160 |
|
161 String search = attributes.get("regexp"); |
|
162 String output = ""; |
|
163 pattern = Pattern.compile(search); |
|
164 |
|
165 BufferedReader input = new BufferedReader(new FileReader(attributes.get("filename"))); |
|
166 try { |
|
167 String line = null; |
|
168 Matcher match = null; |
|
169 while (( line = input.readLine()) != null) { |
|
170 match = pattern.matcher(line); |
|
171 if (match.find()) { |
|
172 //self.log("Line containg " + search + " is = " + line + " returned vaue = " + match.group(1)); |
|
173 output = output + match.group(1) + ","; |
|
174 } |
|
175 } |
|
176 } catch (IOException ex) { |
|
177 ex.printStackTrace(); |
|
178 } |
|
179 project.setNewProperty(attributes.get("output") , output); |
|
180 |
|
181 ]]> |
|
182 </scriptdef> |
121 |
183 |
122 <!-- This task allow to dump the content of a text file to the shell. --> |
184 <!-- This task allow to dump the content of a text file to the shell. --> |
123 <scriptdef name="echoFileMacro" language="beanshell" uri="http://www.nokia.com/helium"> |
185 <scriptdef name="echoFileMacro" language="beanshell" uri="http://www.nokia.com/helium"> |
124 <attribute name="file"/> |
186 <attribute name="file"/> |
125 <![CDATA[ |
187 <![CDATA[ |
156 <macrodef name="recordStartMacro" uri="http://www.nokia.com/helium"> |
218 <macrodef name="recordStartMacro" uri="http://www.nokia.com/helium"> |
157 <attribute name="name"/> |
219 <attribute name="name"/> |
158 <attribute name="emacsmode" default="false"/> |
220 <attribute name="emacsmode" default="false"/> |
159 <sequential> |
221 <sequential> |
160 <if> |
222 <if> |
161 <available file="${build.log}"/> |
|
162 <then> |
|
163 <record name="${build.log}" action="stop" append="true"/> |
|
164 </then> |
|
165 </if> |
|
166 <if> |
|
167 <available file="${build.log.dir}" type="dir"/> |
223 <available file="${build.log.dir}" type="dir"/> |
168 <then> |
224 <then> |
169 <record name="${build.log.dir}/@{name}" action="start" append="true" emacsmode="@{emacsmode}"/> |
225 <hlm:record name="${build.log.dir}/@{name}" action="start" append="true" emacsmode="@{emacsmode}" loglevel="${ant.loglevel}"/> |
170 </then> |
226 </then> |
171 </if> |
227 </if> |
172 </sequential> |
228 </sequential> |
173 </macrodef> |
229 </macrodef> |
174 |
230 |
178 <attribute name="name"/> |
234 <attribute name="name"/> |
179 <sequential> |
235 <sequential> |
180 <if> |
236 <if> |
181 <available file="${build.log.dir}/@{name}"/> |
237 <available file="${build.log.dir}/@{name}"/> |
182 <then> |
238 <then> |
183 <record name="${build.log.dir}/@{name}" action="stop" append="true"/> |
239 <hlm:record name="${build.log.dir}/@{name}" action="stop" append="true"/> |
184 </then> |
|
185 </if> |
|
186 <if> |
|
187 <available file="${build.log}"/> |
|
188 <then> |
|
189 <record name="${build.log}" action="start" append="true"/> |
|
190 </then> |
240 </then> |
191 </if> |
241 </if> |
192 </sequential> |
242 </sequential> |
193 </macrodef> |
243 </macrodef> |
194 |
244 |
195 |
245 |
196 <!--Macro to stop recording to the main log file (if present) and record to |
246 <!--Macro to stop recording to the main log file (if present) and record to |
197 a separate log file that is filtered after logging is stopped. --> |
247 a separate log file that is filtered after logging is stopped. --> |
198 <macrodef name="filterRecordStartMacro" uri="http://www.nokia.com/helium"> |
248 <macrodef name="filterRecordStartMacro" uri="http://www.nokia.com/helium"> |
199 <sequential> |
249 <attribute name="pattern" default=""/> |
200 <if> |
250 <attribute name="category" default=""/> |
201 <available file="${build.log}"/> |
251 <sequential> |
202 <then> |
252 <hlm:record name="${build.cache.log.dir}/temp_ant_build.log" action="start" loglevel="${ant.loglevel}"> |
203 <record name="${build.log}" action="stop" append="true"/> |
253 <hlm:recordfilter category="@{category}" regexp="@{pattern}" /> |
204 </then> |
254 </hlm:record> |
205 </if> |
|
206 <echo>Start of filtering ${build.log} for passwords</echo> |
|
207 <record name="${build.cache.log.dir}/temp_ant_build.log" action="start" loglevel="info"/> |
|
208 </sequential> |
255 </sequential> |
209 </macrodef> |
256 </macrodef> |
210 |
257 |
211 |
258 |
212 <!--Macro to stop recording the seperate filtered log file, filter the passwords |
259 <!--Macro to stop recording the seperate filtered log file, filter the passwords |
213 and start recording in main log file --> |
260 and start recording in main log file --> |
214 <macrodef name="filterRecordStopMacro" uri="http://www.nokia.com/helium"> |
261 <macrodef name="filterRecordStopMacro" uri="http://www.nokia.com/helium"> |
215 <attribute name="pattern"/> |
|
216 <attribute name="log" default="${build.log}"/> |
262 <attribute name="log" default="${build.log}"/> |
217 <attribute name="append" default="true"/> |
263 <attribute name="append" default="true"/> |
218 <sequential> |
264 <sequential> |
219 <record name="${build.cache.log.dir}/temp_ant_build.log" action="stop"/> |
265 <hlm:record name="${build.cache.log.dir}/temp_ant_build.log" action="stop"/> |
220 <concat destfile="@{log}" append="@{append}"> |
266 <concat destfile="@{log}" append="@{append}"> |
221 <filelist dir="${build.cache.log.dir}" files="temp_ant_build.log"/> |
267 <filelist dir="${build.cache.log.dir}" files="temp_ant_build.log"/> |
222 <filterchain> |
|
223 <tokenfilter> |
|
224 <replaceregex pattern="@{pattern}" replace="****" flags="gi"/> |
|
225 </tokenfilter> |
|
226 </filterchain> |
|
227 </concat> |
268 </concat> |
228 <delete file="${build.cache.log.dir}/temp_ant_build.log" failonerror="false"/> |
269 <delete file="${build.cache.log.dir}/temp_ant_build.log" failonerror="false"/> |
229 <if> |
|
230 <available file="${build.log}"/> |
|
231 <then> |
|
232 <record name="${build.log}" action="start" append="true"/> |
|
233 </then> |
|
234 </if> |
|
235 <echo>End of filtering @{log} for passwords</echo> |
270 <echo>End of filtering @{log} for passwords</echo> |
236 </sequential> |
271 </sequential> |
237 </macrodef> |
272 </macrodef> |
238 |
273 |
239 |
274 |
402 netrc_info = netrc_file.authenticators(str(attributes.get("type"))) |
437 netrc_info = netrc_file.authenticators(str(attributes.get("type"))) |
403 if netrc_info == None: |
438 if netrc_info == None: |
404 raise Exception("No entry found for Type: %s" % str(attributes.get("type"))) |
439 raise Exception("No entry found for Type: %s" % str(attributes.get("type"))) |
405 (n_username, n_account, n_password) = netrc_info |
440 (n_username, n_account, n_password) = netrc_info |
406 if attributes.get('output-prop') != None: |
441 if attributes.get('output-prop') != None: |
407 self.log("Output: %s" % attributes.get('output-prop')) |
|
408 project.setProperty(str(attributes.get('output-prop')), str(n_password)) |
442 project.setProperty(str(attributes.get('output-prop')), str(n_password)) |
409 except Exception, e: |
443 except Exception, e: |
410 result = "-1" |
444 result = "-1" |
411 print "ERROR: %s" % e |
445 print "Warning: %s" % e |
412 if attributes.get('result-prop') != None: |
446 if attributes.get('result-prop') != None: |
413 self.log("Result: %s" % attributes.get('result-prop')) |
|
414 project.setProperty(str(attributes.get('result-prop')), str(result)) |
447 project.setProperty(str(attributes.get('result-prop')), str(result)) |
415 self.log("%s: %s" % (attributes.get('result-prop'), project.getProperty(str(attributes.get('result-prop'))))) |
|
416 ]]> |
448 ]]> |
417 </scriptdef> |
449 </scriptdef> |
418 |
450 |
419 <!-- Reads user name from .netrc file for a specific type of service. --> |
451 <!-- Reads user name from .netrc file for a specific type of service. --> |
420 <scriptdef name="netrcUsernameMacro" language="jython" uri="http://www.nokia.com/helium"> |
452 <scriptdef name="netrcUsernameMacro" language="jython" uri="http://www.nokia.com/helium"> |
431 netrc_info = netrc_file.authenticators(str(attributes.get("type"))) |
463 netrc_info = netrc_file.authenticators(str(attributes.get("type"))) |
432 if netrc_info == None: |
464 if netrc_info == None: |
433 raise Exception("No entry found for Type: %s" % str(attributes.get("type"))) |
465 raise Exception("No entry found for Type: %s" % str(attributes.get("type"))) |
434 (n_username, n_account, n_password) = netrc_info |
466 (n_username, n_account, n_password) = netrc_info |
435 if attributes.get('output-prop') != None: |
467 if attributes.get('output-prop') != None: |
436 self.log("Output: %s" % attributes.get('output-prop')) |
|
437 project.setProperty(str(attributes.get('output-prop')), str(n_username)) |
468 project.setProperty(str(attributes.get('output-prop')), str(n_username)) |
438 except Exception, e: |
469 except Exception, e: |
439 result = "-1" |
470 result = "-1" |
440 print "ERROR: %s" % e |
471 print "Warning: %s" % e |
441 if attributes.get('result-prop') != None: |
472 if attributes.get('result-prop') != None: |
442 |
|
443 self.log("Result: %s" % attributes.get('result-prop')) |
|
444 project.setProperty(str(attributes.get('result-prop')), str(result)) |
473 project.setProperty(str(attributes.get('result-prop')), str(result)) |
445 self.log("%s: %s" % (attributes.get('result-prop'), project.getProperty(str(attributes.get('result-prop'))))) |
|
446 ]]> |
474 ]]> |
447 </scriptdef> |
475 </scriptdef> |
448 |
476 |
449 <!-- Check availability of synergy. --> |
477 <!-- Check availability of synergy. --> |
450 <scriptdef name="ccmAvailableMacro" language="jython" uri="http://www.nokia.com/helium"> |
478 <scriptdef name="ccmAvailableMacro" language="jython" uri="http://www.nokia.com/helium"> |
480 provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache) |
508 provider = ccm.extra.CachedSessionProvider(opener=nokia.nokiaccm.open_session, cache=cache) |
481 if database != None: |
509 if database != None: |
482 session = provider.get(username, password, database=database, reuse=False) |
510 session = provider.get(username, password, database=database, reuse=False) |
483 else: |
511 else: |
484 session = provider.get(username, password, engine, dbpath, reuse=False) |
512 session = provider.get(username, password, engine, dbpath, reuse=False) |
485 del(session) |
513 session.close() |
|
514 provider.close() |
486 except Exception, e: |
515 except Exception, e: |
487 print "ERROR: %s" % e |
516 print "ERROR: %s" % e |
488 if str(e).find("access denied") != -1: |
517 if str(e).find("access denied") != -1: |
489 result = "-2" |
518 result = "-2" |
490 else: |
519 else: |
493 project.setProperty(str(attributes.get('resultproperty')), str(result)) |
522 project.setProperty(str(attributes.get('resultproperty')), str(result)) |
494 ]]> |
523 ]]> |
495 </scriptdef> |
524 </scriptdef> |
496 |
525 |
497 <!-- Extract logs from text file and process error/warnings/components name etc |
526 <!-- Extract logs from text file and process error/warnings/components name etc |
498 into xml file.--> |
527 into xml file. |
|
528 <deprecated>Please consider using the metadata framework.</deprecated> |
|
529 --> |
499 <scriptdef name="logextract" language="jython" uri="http://www.nokia.com/helium"> |
530 <scriptdef name="logextract" language="jython" uri="http://www.nokia.com/helium"> |
500 <attribute name="file" /> |
531 <attribute name="file" /> |
501 <attribute name="outputfile" /> |
532 <attribute name="outputfile" /> |
502 <element name="fileset" type="fileset"/> |
533 <element name="fileset" type="fileset"/> |
503 <element name="logfilterset" classname="com.nokia.ant.types.LogFilterSet"/> |
534 <element name="logfilterset" classname="com.nokia.ant.types.LogFilterSet"/> |
559 a separate log file into a temporary location (doesn't need the build aread to work). --> |
590 a separate log file into a temporary location (doesn't need the build aread to work). --> |
560 <macrodef name="tempRecordStartMacro" uri="http://www.nokia.com/helium"> |
591 <macrodef name="tempRecordStartMacro" uri="http://www.nokia.com/helium"> |
561 <attribute name="name"/> |
592 <attribute name="name"/> |
562 <sequential> |
593 <sequential> |
563 <mkdir dir="${build.cache.log.dir}"/> |
594 <mkdir dir="${build.cache.log.dir}"/> |
564 <if> |
595 <hlm:record name="${build.cache.log.dir}/@{name}" action="start" loglevel="${ant.loglevel}"/> |
565 <available file="${build.log}"/> |
|
566 <then> |
|
567 <record name="${build.log}" action="stop" append="true"/> |
|
568 </then> |
|
569 </if> |
|
570 <record name="${build.cache.log.dir}/@{name}" action="start" loglevel="verbose"/> |
|
571 </sequential> |
596 </sequential> |
572 </macrodef> |
597 </macrodef> |
573 |
598 |
574 |
599 |
575 <!--Macro to restart the main log file (if present) and stop recording to |
600 <!--Macro to restart the main log file (if present) and stop recording to |
576 a separate log file into a temporary location the file is next xml summarized |
601 a separate log file into a temporary location the file is next xml summarized |
577 and potentially copied to the build area (if exists). Else those files will get copied during the |
602 and potentially copied to the build area (if exists). Else those files will get copied during the |
578 build area preparation. --> |
603 build area preparation. --> |
579 <macrodef name="tempRecordStopMacro" uri="http://www.nokia.com/helium"> |
604 <macrodef name="tempRecordStopMacro" uri="http://www.nokia.com/helium"> |
580 <attribute name="name"/> |
605 <attribute name="name"/> |
|
606 <attribute name="phase" default=""/> |
581 <attribute name="database" default="${metadata.dbfile}"/> |
607 <attribute name="database" default="${metadata.dbfile}"/> |
582 <attribute name="filterref" default="filterset.temprecord"/> |
608 <attribute name="filterref" default="filterset.temprecord"/> |
583 <sequential> |
609 <sequential> |
584 <mkdir dir="${build.cache.log.dir}"/> |
610 <mkdir dir="${build.cache.log.dir}"/> |
|
611 <mkdir dir="${build.log.dir}"/> |
585 <mkdir dir="${build.cache.log.dir}/signals"/> |
612 <mkdir dir="${build.cache.log.dir}/signals"/> |
586 <record name="${build.cache.log.dir}/@{name}" action="stop" loglevel="verbose"/> |
613 <hlm:record name="${build.cache.log.dir}/@{name}" action="stop" loglevel="${ant.loglevel}"/> |
587 <!--Temporary solution, the logextract in general |
614 <!--Temporary solution, the logextract in general |
588 needs to be handled in a better way (not all logs needs to be processed, |
615 needs to be handled in a better way (not all logs needs to be processed, |
589 logextract / counting errors could be merged and logextract should be |
616 logextract / counting errors could be merged and logextract should be |
590 executed on a need basis and not to process for all stopmacro.--> |
617 executed on a need basis and not to process for all stopmacro.--> |
591 <!-- Todo: metadata: replace logextract --> |
618 <!-- Todo: metadata: replace logextract --> |
594 <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" /> |
621 <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" /> |
595 <metadatafilterset refid="@{filterref}" /> |
622 <metadatafilterset refid="@{filterref}" /> |
596 </hlm:antmetadatainput> |
623 </hlm:antmetadatainput> |
597 </hlm:metadatarecord> |
624 </hlm:metadatarecord> |
598 <hlm:generateBuildStatus dbfile="@{database}" output-dir="${build.cache.log.dir}/signals" file="@{name}" /> |
625 <hlm:generateBuildStatus dbfile="@{database}" output-dir="${build.cache.log.dir}/signals" file="@{name}" /> |
599 <copy todir="${build.log.dir}" failonerror="false"> |
626 <if> |
600 <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" /> |
627 <isset property="@{phase}.log.dir" /> |
601 </copy> |
628 <then> |
|
629 <mkdir dir="${@{phase}.log.dir}"/> |
|
630 <copy todir="${@{phase}.log.dir}" failonerror="false"> |
|
631 <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" /> |
|
632 </copy> |
|
633 </then> |
|
634 <else> |
|
635 <copy todir="${build.log.dir}" failonerror="false"> |
|
636 <fileset casesensitive="false" file="${build.cache.log.dir}/@{name}" /> |
|
637 </copy> |
|
638 </else> |
|
639 </if> |
602 <copy todir="${build.signal.status.dir}" failonerror="false"> |
640 <copy todir="${build.signal.status.dir}" failonerror="false"> |
603 <fileset casesensitive="false" dir="${build.cache.log.dir}/signals" /> |
641 <fileset casesensitive="false" dir="${build.cache.log.dir}/signals" /> |
604 </copy> |
642 </copy> |
605 <if> |
|
606 <available file="${build.log}"/> |
|
607 <then> |
|
608 <record name="${build.log}" action="start" append="true"/> |
|
609 </then> |
|
610 </if> |
|
611 </sequential> |
643 </sequential> |
612 </macrodef> |
644 </macrodef> |
613 |
645 |
614 |
646 |
615 <macrodef name="signalMacro" uri="http://www.nokia.com/helium"> |
647 <macrodef name="signalMacro" uri="http://www.nokia.com/helium"> |
616 <attribute name="logfile"/> |
648 <attribute name="logfile"/> |
|
649 <attribute name="phase" default=""/> |
617 <attribute name="signal.input" /> |
650 <attribute name="signal.input" /> |
618 <attribute name="skip.count" default="false" /> |
651 <attribute name="skip.count" default="false" /> |
619 <attribute name="result" default="not-set"/> |
652 <attribute name="result" default="not-set"/> |
620 <sequential> |
653 <sequential> |
621 <var name="signal.errors.total" value="" unset="true"/> |
654 <var name="signal.errors.total" value="" unset="true"/> |
636 </then> |
669 </then> |
637 </if> |
670 </if> |
638 <var name="signal.errors.total" value="@{result}" /> |
671 <var name="signal.errors.total" value="@{result}" /> |
639 </else> |
672 </else> |
640 </if> |
673 </if> |
|
674 <if> |
|
675 <isset property="@{phase}.log.dir" /> |
|
676 <then> |
|
677 <var name="signal.log.dir" value="" unset="true"/> |
|
678 <property name="signal.log.dir" value="${@{phase}.log.dir}"/> |
|
679 <echo>signal.log.dir = ${signal.log.dir}</echo> |
|
680 </then> |
|
681 <else> |
|
682 <var name="signal.log.dir" value="" unset="true"/> |
|
683 <property name="signal.log.dir" value="${build.log.dir}"/> |
|
684 </else> |
|
685 </if> |
641 <hlm:generateBuildStatus output-dir="${build.signal.status.dir}/" |
686 <hlm:generateBuildStatus output-dir="${build.signal.status.dir}/" |
642 file="${base.signal.log.file}" /> |
687 file="${base.signal.log.file}" /> |
643 <!-- signal for errors --> |
688 <!-- signal for errors --> |
644 <hlm:signal name="@{signal.input}" result="${signal.errors.total}" > |
689 <hlm:signal name="@{signal.input}" result="${signal.errors.total}" > |
645 <signalNotifierInput> |
690 <signalNotifierInput> |
646 <signalInput refid="@{signal.input}" /> |
691 <signalInput refid="@{signal.input}" /> |
647 <notifierInput file = "${build.signal.status.dir}/${base.signal.log.file}.status.html" /> |
692 <notifierInput> |
|
693 <fileset dir="${build.log.dir}" > |
|
694 <include name="**/${base.signal.log.file}*" /> |
|
695 </fileset> |
|
696 </notifierInput> |
648 </signalNotifierInput> |
697 </signalNotifierInput> |
649 </hlm:signal> |
698 </hlm:signal> |
650 </sequential> |
699 </sequential> |
651 </macrodef> |
700 </macrodef> |
652 |
701 |
656 is called. --> |
705 is called. --> |
657 <macrodef name="startSpecificLogMacro"> |
706 <macrodef name="startSpecificLogMacro"> |
658 <attribute name="name"/> |
707 <attribute name="name"/> |
659 <attribute name="regexp" default=""/> |
708 <attribute name="regexp" default=""/> |
660 <attribute name="backup" default="false"/> |
709 <attribute name="backup" default="false"/> |
|
710 <attribute name="phase" default=""/> |
661 |
711 |
662 <sequential> |
712 <sequential> |
663 <if> |
713 <if> |
664 <available file="${build.log}"/> |
714 <isset property="@{phase}.log.dir" /> |
665 <then> |
715 <then> |
666 <echo>Stopping recording to main Ant build log.</echo> |
716 <mkdir dir="${@{phase}.log.dir}"/> |
667 <record name="${build.log}" action="stop" append="true"/> |
|
668 </then> |
717 </then> |
669 </if> |
718 </if> |
670 <mkdir dir="@{name}/.."/> |
719 <mkdir dir="@{name}/.."/> |
671 <hlm:logrecord name="@{name}" action="start" loglevel="verbose" regexp="@{regexp}" backup="@{backup}"/> |
720 <hlm:record name="@{name}" action="start" loglevel="verbose" > |
|
721 <hlm:recordfilter category="@{phase}" regexp="@{regexp}" /> |
|
722 </hlm:record> |
672 </sequential> |
723 </sequential> |
673 </macrodef> |
724 </macrodef> |
674 |
725 |
675 |
726 |
676 <!--Macro to restart the main log file (if present) and stop recording to |
727 <!--Macro to restart the main log file (if present) and stop recording to |
677 a separate log file. --> |
728 a separate log file. --> |
678 <macrodef name="stopSpecificLogMacro"> |
729 <macrodef name="stopSpecificLogMacro"> |
679 <attribute name="name"/> |
730 <attribute name="name"/> |
680 <sequential> |
731 <attribute name="phase" default=""/> |
681 <hlm:logrecord name="@{name}" action="stop" loglevel="verbose"/> |
732 <sequential> |
682 <if> |
733 <hlm:record name="@{name}" action="stop" loglevel="verbose"/> |
683 <available file="${build.log}"/> |
|
684 <then> |
|
685 <record name="${build.log}" action="start" append="true"/> |
|
686 <echo>Starting recording to main Ant build log again.</echo> |
|
687 </then> |
|
688 </if> |
|
689 </sequential> |
734 </sequential> |
690 </macrodef> |
735 </macrodef> |
691 |
736 |
692 <!-- Temp BMD macro --> |
737 <!-- Temp BMD macro --> |
693 <macrodef name="bmdLogExtractMacro" uri="http://www.nokia.com/helium"> |
738 <macrodef name="bmdLogExtractMacro" uri="http://www.nokia.com/helium"> |