628
|
1 |
<!--
|
|
2 |
============================================================================
|
|
3 |
Name : test_policy_input.ant.xml
|
|
4 |
Part of : Helium
|
|
5 |
|
|
6 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
7 |
All rights reserved.
|
|
8 |
This component and the accompanying materials are made available
|
|
9 |
under the terms of the License "Eclipse Public License v1.0"
|
|
10 |
which accompanies this distribution, and is available
|
|
11 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
12 |
|
|
13 |
Initial Contributors:
|
|
14 |
Nokia Corporation - initial contribution.
|
|
15 |
|
|
16 |
Contributors:
|
|
17 |
|
|
18 |
Description:
|
|
19 |
|
|
20 |
============================================================================
|
|
21 |
-->
|
|
22 |
<project name="test-ant-input" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
23 |
<description>Helium metadata Ant input unittests.</description>
|
|
24 |
|
|
25 |
<dirname property="project.dir" file="${ant.file.test-metadata-regex}" />
|
|
26 |
<taskdef resource="com/nokia/helium/metadata/ant/antlib.xml" uri="http://www.nokia.com/helium" />
|
|
27 |
<taskdef name="fmpp" classname="fmpp.tools.AntTask" onerror="report"/>
|
|
28 |
|
|
29 |
<target name="setUp">
|
|
30 |
<echo>---=====================================---</echo>
|
|
31 |
<mkdir dir="${test.temp.dir}" />
|
|
32 |
<delete dir="${test.temp.dir}" />
|
|
33 |
<mkdir dir="${test.temp.dir}" />
|
|
34 |
</target>
|
|
35 |
|
|
36 |
<target name="tearDown">
|
|
37 |
<delete dir="${test.temp.dir}" />
|
|
38 |
<echo>---=====================================---</echo>
|
|
39 |
</target>
|
|
40 |
|
|
41 |
<hlm:metadatafilterset id="error.filterset">
|
|
42 |
<hlm:metadatafilter severity="error" regex="^ERROR: .*" description="Simple error pattern"/>
|
|
43 |
<hlm:metadatafilter severity="warning" regex="^WARNING: .*" description="Simple warning pattern"/>
|
|
44 |
</hlm:metadatafilterset>
|
|
45 |
|
|
46 |
<target name="test-policy-metadata-input">
|
|
47 |
<echo message="test-policy-metadata-input" />
|
|
48 |
|
|
49 |
<hlm:metadatarecord database="${test.temp.dir}/metadata_db">
|
|
50 |
<hlm:policymetadatainput>
|
|
51 |
<fileset file="${project.dir}/../data/policy/validate_policy.log" />
|
|
52 |
</hlm:policymetadatainput>
|
|
53 |
</hlm:metadatarecord>
|
|
54 |
|
|
55 |
<hlm:metadataCountSeverity severity="error" database="${test.temp.dir}/metadata_db"
|
|
56 |
log="${project.dir}/../data/policy/validate_policy.log" property="errors" />
|
|
57 |
<echo>${errors}</echo>
|
|
58 |
<au:assertTrue>
|
|
59 |
<equals arg1="${errors}" arg2="78" />
|
|
60 |
</au:assertTrue>
|
|
61 |
</target>
|
|
62 |
|
|
63 |
|
|
64 |
</project>
|