587
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_common.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_common" xmlns:au="antlib:org.apache.ant.antunit"
|
|
24 |
xmlns:ivy="antlib:org.apache.ivy.ant"
|
|
25 |
xmlns:hlm="http://www.nokia.com/helium">
|
|
26 |
<description>
|
|
27 |
Testing targets
|
|
28 |
</description>
|
|
29 |
<property environment="env"/>
|
|
30 |
<taskdef resource="com/nokia/ant/antlib.xml" uri="http://www.nokia.com/helium" />
|
|
31 |
|
|
32 |
<target name="setUp">
|
|
33 |
<delete file="../test_helium_data_model.xml_parsed" failonerror="false"/>
|
|
34 |
</target>
|
|
35 |
|
|
36 |
<target name="tearDown">
|
|
37 |
<delete file="../test_helium_data_model.xml_parsed" failonerror="false"/>
|
|
38 |
</target>
|
|
39 |
|
|
40 |
<!-- Test parsemodel -->
|
|
41 |
<target name="test-parsemodel-description">
|
|
42 |
<hlm:parsemodel output="../test_helium_data_model.xml_parsed" input="../data/datamodel/data_model_validation_test.xml"/>
|
|
43 |
<!-- Check if parsed file exist -->
|
|
44 |
<au:assertFileExists file="../test_helium_data_model.xml_parsed" />
|
|
45 |
</target>
|
|
46 |
|
|
47 |
|
|
48 |
<target name="test-exec">
|
|
49 |
<au:expectfailure>
|
|
50 |
<hlm:exec executable="123"/>
|
|
51 |
</au:expectfailure>
|
|
52 |
<hlm:exec executable="perl" outputproperty="testexec">
|
|
53 |
<arg value="-e"/>
|
|
54 |
<arg value="print 'hi'"/>
|
|
55 |
</hlm:exec>
|
|
56 |
<au:assertPropertyEquals name="testexec" value="hi"/>
|
|
57 |
</target>
|
|
58 |
|
|
59 |
</project>
|
|
60 |
|