587
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_summary_log.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_summary_log" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>
|
|
25 |
Logging testing targets
|
|
26 |
</description>
|
|
27 |
<property environment="env"/>
|
|
28 |
|
|
29 |
<property name="helium.dir" location="../../.." />
|
|
30 |
<property name="test.temp.dir" location="${helium.dir}/build/antunit/summary" />
|
|
31 |
<property name="build.drive" location="${test.temp.dir}" />
|
|
32 |
<import file="../../../helium.ant.xml"/>
|
|
33 |
|
|
34 |
<target name="setUp">
|
|
35 |
<delete dir="${test.temp.dir}" failonerror="false" />
|
|
36 |
<mkdir dir="${test.temp.dir}" />
|
|
37 |
</target>
|
|
38 |
|
|
39 |
<target name="tearDown">
|
|
40 |
<!-- delete dir="${test.temp.dir}" failonerror="false" / -->
|
|
41 |
</target>
|
|
42 |
|
|
43 |
<target name="test-render-log-summary">
|
|
44 |
<condition property="sbs.log" value="${helium.dir}/tests/data/summary_log/sbs_linux_compile.log" else="${helium.dir}/tests/data/summary_log/sbs_compile.log">
|
|
45 |
<os family="unix" />
|
|
46 |
</condition>
|
|
47 |
<hlm:metadatarecord database="${metadata.dbfile}">
|
|
48 |
<hlm:sbsmetadatainput>
|
|
49 |
<fileset casesensitive="false" file="${sbs.log}"/>
|
|
50 |
<metadatafilterset refid="filterset.sbs" />
|
|
51 |
</hlm:sbsmetadatainput>
|
|
52 |
<hlm:antmetadatainput>
|
|
53 |
<fileset casesensitive="false" file="${helium.dir}/tests/data/summary_log/prep_work_area.log"/>
|
|
54 |
<metadatafilterset refid="filterset.common" />
|
|
55 |
</hlm:antmetadatainput>
|
|
56 |
</hlm:metadatarecord>
|
|
57 |
<copy file="${helium.dir}/tests/data/summary_log/build_info.log.xml" tofile="${build.log.dir}/${build.id}_info.log.xml" />
|
|
58 |
<echo>${build.log.dir}/${build.id}_summary.html</echo>
|
|
59 |
|
|
60 |
<runtarget target="render-log-summary" />
|
|
61 |
|
|
62 |
<au:assertFileExists file="${build.log.dir}/${build.id}_summary.html" />
|
|
63 |
<loadfile property="summarylog" srcFile="${build.log.dir}/${build.id}_summary.html" />
|
|
64 |
<au:assertTrue message="Check "ERROR: Some fake error"">
|
|
65 |
<contains string="${summarylog}" substring="ERROR: Some fake error" />
|
|
66 |
</au:assertTrue>
|
|
67 |
<au:assertTrue message="Check for 24 errors">
|
|
68 |
<contains string="${summarylog}" substring=">24 errors<" />
|
|
69 |
</au:assertTrue>
|
|
70 |
<au:assertTrue message="Check for 8 errors">
|
|
71 |
<contains string="${summarylog}" substring=">8 errors<" />
|
|
72 |
</au:assertTrue>
|
|
73 |
<au:assertTrue message="Check for 16 errors">
|
|
74 |
<contains string="${summarylog}" substring=">16 errors<" />
|
|
75 |
</au:assertTrue>
|
|
76 |
<au:assertTrue message="Check for 15 errors">
|
|
77 |
<contains string="${summarylog}" substring=">15 errors<" />
|
|
78 |
</au:assertTrue>
|
|
79 |
</target>
|
|
80 |
</project>
|
|
81 |
|