179
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : build.xml
|
|
5 |
Part of : Helium AntLib
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<project name="helium-antlib-unittest" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>Helium Antlib Logging unittests.</description>
|
|
25 |
|
|
26 |
|
|
27 |
<import file="../../test-macros.ant.xml" />
|
|
28 |
<dirname property="stages.test.dir" file="${ant.file.helium-antlib-unittest}"/>
|
|
29 |
<property name="template.dir" location="../src/templates"/>
|
|
30 |
<target name="unittest" depends="unittest-logging" />
|
|
31 |
|
|
32 |
<target name="unittest-logging">
|
|
33 |
<antunitModule name="logging" />
|
|
34 |
</target>
|
|
35 |
|
|
36 |
<property environment="env"/>
|
|
37 |
|
|
38 |
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
|
39 |
|
|
40 |
<property name="build.log.dir" location="${stages.test.dir}\logs"/>
|
|
41 |
<property name="build.log" location="${stages.test.dir}\logs\${build.id}_test.log"/>
|
|
42 |
<property name="build.cache.log.dir" location="${stages.test.dir}\logs"/>
|
|
43 |
<property name="build.id" value="ant-logging-test"/>
|
|
44 |
<property name="display" value="Message for testing"/>
|
|
45 |
<import file="stages_config.ant.xml" />
|
|
46 |
|
|
47 |
<target name="run-stages">
|
|
48 |
|
|
49 |
<echo> Before calling target </echo>
|
|
50 |
<echo>grace</echo>
|
|
51 |
|
|
52 |
<antcall target="hello-test"/>
|
|
53 |
<antcall target="compile"/>
|
|
54 |
<ant antfile="${stages.test.dir}/prep-ccm-get-input.ant.xml" target="prep-ccm-get-input"/>
|
|
55 |
|
|
56 |
<echo> After calling target </echo>
|
|
57 |
</target>
|
|
58 |
|
|
59 |
<target name="compile" depends="creatbom,get-env"/>
|
|
60 |
|
|
61 |
|
|
62 |
<hlm:recordfilterset id="recordfilter.config">
|
|
63 |
<hlm:recordfilter category="info" regexp="ERROR" />
|
|
64 |
</hlm:recordfilterset>
|
|
65 |
|
|
66 |
<target name="hello-test" depends="get-password">
|
|
67 |
|
|
68 |
<hlm:record name="${build.log.dir}/${build.id}_stagetest.log" action="start" loglevel="info">
|
|
69 |
<hlm:recordfilterset refid="recordfilter.config"/>
|
|
70 |
<hlm:recordfilter category="unix" regexp="${unix.password}" />
|
|
71 |
<hlm:recordfilter category="synergy" regexp="synergy" />
|
|
72 |
</hlm:record>
|
|
73 |
|
|
74 |
<antcall target="stagetest">
|
|
75 |
<param name="display" value="Inside stage test for first time synergy ERROR"/>
|
|
76 |
</antcall>
|
|
77 |
<antcall target="stagetest">
|
|
78 |
<param name="display" value="Inside stage test for second time grace INFO"/>
|
|
79 |
</antcall>
|
|
80 |
|
|
81 |
<hlm:record name="${build.log.dir}/${build.id}_stagetest.log" action="stop" append="true" />
|
|
82 |
<echo>unix-password = ${unix.password}</echo>
|
|
83 |
<property name="ats.password" value="password"/>
|
|
84 |
<hlm:logreplace regexp="${ats.password}"/>
|
|
85 |
<echo>ats-password = ${ats.password}</echo>
|
|
86 |
<antcall target="get-env"/>
|
|
87 |
<antcall target="hello"/>
|
|
88 |
|
|
89 |
</target>
|
|
90 |
|
|
91 |
<target name="stagetest" >
|
|
92 |
<echo>${unix.password}</echo>
|
|
93 |
<echo>synergy</echo>
|
|
94 |
<echo> Hello... inside stagetest target ${display}</echo>
|
|
95 |
</target>
|
|
96 |
|
|
97 |
<target name="creatbom">
|
|
98 |
<echo> Hello... inside creatbom target </echo>
|
|
99 |
</target>
|
|
100 |
|
|
101 |
<target name="get-env">
|
|
102 |
<echo> Hello... inside get-env target ${display} </echo>
|
|
103 |
</target>
|
|
104 |
|
|
105 |
<target name="hello">
|
|
106 |
<echo> Hello... inside hello target ${display} </echo>
|
|
107 |
</target>
|
|
108 |
|
|
109 |
<target name="get-password">
|
|
110 |
<property name="unix.password" value="something"/>
|
|
111 |
<hlm:logreplace regexp="${unix.password}"/>
|
|
112 |
</target>
|
|
113 |
|
|
114 |
</project>
|