|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : test_imaker_input.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 <project name="test-metadata" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description>Helium antlib metadata tests.</description> |
|
25 |
|
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="filterset.imaker"> |
|
42 <metadatafilter severity="error" regex="^\s*Total duration:\s+\d+:\d+\s+Status:\s+FAILED" description="" /> |
|
43 <metadatafilter severity="error" regex="^.+- DOESN'T EXIST" description="" /> |
|
44 </hlm:metadatafilterset> |
|
45 |
|
46 <!-- Check the parsing of a default iMaker output log --> |
|
47 <target name="test-imaker-metadata"> |
|
48 <hlm:metadatarecord database="${test.temp.dir}/metadata_db"> |
|
49 <hlm:imakermetadatainput> |
|
50 <fileset file="../data/imaker/build_roms_sample.log" /> |
|
51 <metadatafilterset refid="filterset.imaker" /> |
|
52 </hlm:imakermetadatainput> |
|
53 </hlm:metadatarecord> |
|
54 |
|
55 <fmpp sourceFile="../data/imaker/rombuild_result.ini.ftl" |
|
56 outputfile="${test.temp.dir}/result.ini"> |
|
57 <data expandProperties="yes"> |
|
58 dbPath: ${test.temp.dir}/metadata_db |
|
59 ant: antProperties() |
|
60 </data> |
|
61 </fmpp> |
|
62 |
|
63 <property file="${test.temp.dir}/result.ini" /> |
|
64 <echo>number.of.logs: ${number.of.logs}</echo> |
|
65 <echo>number.of.components: ${number.of.components}</echo> |
|
66 <echo>number.of.errors: ${number.of.errors}</echo> |
|
67 <au:assertTrue message="Invalid number of logs"> |
|
68 <equals arg1="${number.of.logs}" arg2="1" /> |
|
69 </au:assertTrue> |
|
70 <au:assertTrue message="Invalid number of components"> |
|
71 <equals arg1="${number.of.components}" arg2="5" /> |
|
72 </au:assertTrue> |
|
73 <au:assertTrue message="Invalid number of errors"> |
|
74 <equals arg1="${number.of.errors}" arg2="9" /> |
|
75 </au:assertTrue> |
|
76 </target> |
|
77 |
|
78 </project> |
|
79 |
|
80 |
|
81 |