645
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_ca-bc.ant.xml
|
|
5 |
Part of : Helium AntLib
|
|
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-ca-bc" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>Helium antlib Quality Compatibility Analyser related tests.</description>
|
|
25 |
|
|
26 |
|
|
27 |
<taskdef resource="com/nokia/helium/quality/ant/antlib.xml" uri="http://www.nokia.com/helium" />
|
|
28 |
<!--place the output is written to-->
|
|
29 |
<property name="ca.output.dir" location="./output"/>
|
|
30 |
<!-- add the Ca folder to the output dir-->
|
|
31 |
<property name="build.log.dir" location="${ca.output.dir}/ca"/>
|
|
32 |
<!-- location and name of the bc.config file used by checkbc.py-->
|
|
33 |
<property name="bc.config.file" location="${build.log.dir}/bc.config" />
|
|
34 |
<!-- name of the parsed config file-->
|
|
35 |
<property name="prep.ca.conf.parsed" location="${build.log.dir}/ca.cfg.xml.parsed" />
|
|
36 |
<!--name of the ant CA config file-->
|
|
37 |
<property name="ca.ant.config.file" location="ca-ant-config.xml" />
|
|
38 |
<!-- used by the compatibility analyser to define the build log that is to be
|
|
39 |
scanned and the output used for the comparison-->
|
|
40 |
<property name="log.file.to.scan" location="${build.log.dir}/compile/${build.id}_armv5_compile.log" />
|
|
41 |
|
|
42 |
<!--setup property so can be tested - location of the FMPP template file-->
|
|
43 |
<property name="ca.template.file" location="./../../../common/templates/log/ca_content.txt.ftl" />
|
|
44 |
|
|
45 |
<property name="template.macro" location="./../../../common/templates/macro" />
|
|
46 |
|
|
47 |
|
|
48 |
<!--import the file under test-->
|
|
49 |
<import file="./../compatibility.ant.xml" />
|
|
50 |
|
|
51 |
<!-- is called prior to the test -->
|
|
52 |
<target name="setUp">
|
|
53 |
<delete dir="${build.log.dir}" failonerror="false" />
|
|
54 |
<mkdir dir="${build.log.dir}" />
|
|
55 |
|
|
56 |
</target>
|
|
57 |
|
|
58 |
<!-- is called after the test, even if that caused an error -->
|
|
59 |
<target name="tearDown">
|
|
60 |
<delete dir="${build.log.dir}" failonerror="false" />
|
|
61 |
</target>
|
|
62 |
|
|
63 |
<!-- tests part of the CA code that parses the input file-->
|
|
64 |
<target name="test-ca-parse-config" depends="parse-ca-config">
|
|
65 |
|
|
66 |
<au:assertFileExists file="${prep.ca.conf.parsed}" />
|
|
67 |
<au:assertFileExists file="${bc.config.file}" />
|
|
68 |
<loadfile property="ca.one.id" srcfile="${bc.config.file}">
|
|
69 |
<filterchain>
|
|
70 |
<replaceregex pattern="\\(:|\\)" replace="\1" flags="g" />
|
|
71 |
</filterchain>
|
|
72 |
</loadfile>
|
|
73 |
<echo>${ca.one.id}</echo>
|
|
74 |
<au:assertTrue message="file not parsed correctly">
|
|
75 |
<contains string="${ca.one.id}"
|
|
76 |
substring="BASELINE_NAME='SDK 3rd Edition'" />
|
|
77 |
</au:assertTrue>
|
|
78 |
<delete file="${prep.ca.conf.parsed}" quiet="true" />
|
|
79 |
<delete dir="${ca.output.dir}" quiet="true" />
|
|
80 |
</target>
|
|
81 |
|
|
82 |
|
|
83 |
<!--tests the scanning of the whatlog NOT WORKING YET-->
|
|
84 |
<!--target name="test_ftl_file_header">
|
|
85 |
<echo> helium dir = ${helium.dir} </echo>
|
|
86 |
<var name="check.type" value="header" />
|
|
87 |
<var name="bc.db.output.file" value="${build.log.dir}/ca_headers.txt" />
|
|
88 |
<runtarget target="get-whatlogentry-contents-for-ca" />
|
|
89 |
<au:assertFileExists file="${bc.db.output.file}"/>
|
|
90 |
</target>
|
|
91 |
|
|
92 |
<target name="test_ftl_file_lib">
|
|
93 |
<echo> helium dir = ${helium.dir} </echo>
|
|
94 |
<var name="check.type" value="lib" />
|
|
95 |
<var name="bc.db.output.file" value="${build.log.dir}/ca_libraries.txt" />
|
|
96 |
<runtarget target="get-whatlogentry-contents-for-ca" />
|
|
97 |
<au:assertFileExists file="${bc.db.output.file}"/>
|
|
98 |
</target-->
|
|
99 |
|
|
100 |
</project> |