|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : cone-validate.ant.xml |
|
5 Part of : Helium |
|
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 <!--* @package quality --> |
|
24 <project name="cone-validate" xmlns:hlm="http://www.nokia.com/helium"> |
|
25 <description> |
|
26 To validate confml configuration files. |
|
27 </description> |
|
28 |
|
29 <!--* @property cone.validation.enabled |
|
30 Set to true to run ConE tool to validate conml and impl files. |
|
31 @type boolean |
|
32 @editable required |
|
33 @scope public |
|
34 @since 11.0 |
|
35 --> |
|
36 |
|
37 <!--* @property internal.cone.validation.enabled |
|
38 Set to run cone validation targets if cone.validation.enabled set to true. |
|
39 @type boolean |
|
40 @scope private |
|
41 --> |
|
42 |
|
43 <!-- To enable to confml file validation --> |
|
44 <condition property="internal.cone.validation.enabled"> |
|
45 <and> |
|
46 <istrue value="${cone.validation.enabled}" /> |
|
47 <isset property="product.list"/> |
|
48 </and> |
|
49 </condition> |
|
50 |
|
51 <!-- Target to validate confml configuration files of product --> |
|
52 <target name="cone-validate" if="internal.cone.validation.enabled"> |
|
53 <mkdir dir="${post.log.dir}" /> |
|
54 <mkdir dir="${temp.build.dir}" /> |
|
55 <tempfile property="cone.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/> |
|
56 |
|
57 <fmpp sourceFile="${helium.dir}/tools/common/templates/quality/cone-validate.xml.ftl" |
|
58 outputfile="${cone.dynamic.config}"> |
|
59 <data expandProperties="yes"> |
|
60 ant: antProperties() |
|
61 os: eval('System.getProperty("os.name")') |
|
62 </data> |
|
63 </fmpp> |
|
64 |
|
65 <trycatch property="cone.validate.thrown"> |
|
66 <try> |
|
67 <ant antfile="${cone.dynamic.config}" output="${post.log.dir}/${build.id}_validate_cone.log"/> |
|
68 </try> |
|
69 <catch> |
|
70 <fail message="${cone.validate.thrown}"/> |
|
71 </catch> |
|
72 <finally> |
|
73 <hlm:metadatarecord database="${metadata.dbfile}"> |
|
74 <hlm:textmetadatainput> |
|
75 <fileset casesensitive="false" file="${post.log.dir}/${build.id}_validate_cone.log" /> |
|
76 <metadatafilterset> |
|
77 <metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" /> |
|
78 <metadatafilter priority="error" regex="\s*[1-9]\d*\s*problem\(s\).*?" description="cone validation error" /> |
|
79 <metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" /> |
|
80 <metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" /> |
|
81 </metadatafilterset> |
|
82 </hlm:textmetadatainput> |
|
83 </hlm:metadatarecord> |
|
84 <hlm:metadataCountSeverity severity="ERROR" log="${build.id}_validate_cone.log" database="${metadata.dbfile}" |
|
85 property="cone.validate.error.total"/> |
|
86 <echo>ConE error: ${cone.validate.error.total}</echo> |
|
87 <hlm:generateBuildStatus file="${build.id}_validate_cone.log" /> |
|
88 <hlm:signalMacro logfile="${build.id}_validate_cone.log" phase="post" signal.input="ConEValidateSignalInput" /> |
|
89 </finally> |
|
90 </trycatch> |
|
91 |
|
92 </target> |
|
93 |
|
94 |
|
95 </project> |