|
1 <!-- |
|
2 ============================================================================ |
|
3 Name : test_ant_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-text-input" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
|
23 <description>Helium metadata text 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 |
|
47 <target name="test-text-log-metadata-input"> |
|
48 <echo message="text log metadata input validation" /> |
|
49 <property name="metadata-read-db" value="${test.temp.dir}/log_text_metadata_input_db"/> |
|
50 <echo message="database: ${metadata-read-db}" /> |
|
51 <mkdir dir="${test.temp.dir}"/> |
|
52 |
|
53 <hlm:metadatarecord database="${metadata-read-db}"> |
|
54 <hlm:textmetadatainput> |
|
55 <fileset dir="${project.dir}/../data/"> |
|
56 <include name="*_fixslashes*.log"/> |
|
57 </fileset> |
|
58 <metadatafilterset refid="error.filterset" /> |
|
59 </hlm:textmetadatainput> |
|
60 </hlm:metadatarecord> |
|
61 <au:assertTrue> |
|
62 <available type="dir" file="${metadata-read-db}" /> |
|
63 </au:assertTrue> |
|
64 <!-- TODO: Assert the number of errors. --> |
|
65 </target> |
|
66 |
|
67 </project> |