buildframework/helium/external/helium-antlib/imaker/tests/antunit/test_emakeengine.ant.xml
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
permissions -rw-r--r--
helium_7.0-r14027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
<!-- 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
============================================================================ 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
Name        : test_emakeengine.ant.xml 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
Description:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
============================================================================
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
-->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
<project name="helium-antlib-imaker-emakeengine-unittest" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
    <description>Helium Antlib imaker unittests.</description>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
    <taskdef resource="com/nokia/helium/imaker/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
    <property name="epocroot" location="${basedir}/../epocroot_task" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
    <property name="epocroot.temp" location="${epocroot}/temp" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
    <!-- is called prior to the test -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
    <target name="setUp">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
        <echo>-------------------------------------------------------------------------------</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
        <delete dir="${epocroot.temp}" failonerror="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
        <delete dir="${epocroot}/epoc32" failonerror="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
        <mkdir dir="${epocroot.temp}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
    <!-- is called after the test, even if that caused an error -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
    <target name="tearDown">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
        <delete dir="${epocroot.temp}" failonerror="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
        <delete dir="${epocroot}/epoc32" failonerror="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
        <echo>-------------------------------------------------------------------------------</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    43
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    44
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    45
    <target name="test-imaker-defaultconfig">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    46
        <hlm:emakeEngine id="imaker.ec" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    47
        <hlm:imaker epocroot="${epocroot}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    48
            output="${epocroot.temp}/output.log"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    49
            engineRefId="imaker.ec">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    50
            <hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    51
                <makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    52
                    <include name="**/product/*ui.mk" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    53
                </makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    54
                <targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    55
                    <include name="core" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    56
                    <include name="langpack_\d+" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    57
                </targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
            </hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    59
        </hlm:imaker>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    60
        <au:assertFileExists file="${epocroot.temp}/output.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    61
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    62
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    63
    <target name="test-imaker-defaultconfig-custom-args">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    64
        <hlm:emakeEngine id="imaker.ec">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    65
            <arg value="--autodepends=1" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    66
        </hlm:emakeEngine>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    67
        <hlm:imaker epocroot="${epocroot}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    68
            output="${epocroot.temp}/output.log"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    69
            engineRefId="imaker.ec"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    70
            verbose="true">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    71
            <hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    72
                <makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    73
                    <include name="**/product/*ui.mk" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    74
                </makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    75
                <targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    76
                    <include name="core" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    77
                    <include name="langpack_\d+" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    78
                </targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    79
            </hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    80
        </hlm:imaker>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    81
        <au:assertLogContains text="--autodepends=1" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    82
        <au:assertFileExists file="${epocroot.temp}/output.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    83
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    84
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    85
    <target name="test-imaker-defaultconfig-with-cust-missing-template">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    86
        <hlm:emakeEngine id="imaker.ec" template="missing.mk.ftl">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    87
            <arg value="--autodepends=1" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    88
        </hlm:emakeEngine>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    89
        <au:expectfailure message="Could not find template file:">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    90
            <hlm:imaker epocroot="${epocroot}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    91
            	output="${epocroot.temp}/output.log"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    92
                engineRefId="imaker.ec"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    93
                verbose="true">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    94
                <hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    95
                    <makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    96
                        <include name="**/product/*ui.mk" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    97
                    </makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    98
                    <targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    99
                        <include name="core" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   100
                        <include name="langpack_\d+" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   101
                    </targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   102
                </hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   103
            </hlm:imaker>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   104
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   105
        <au:assertFileDoesntExist file="${epocroot.temp}/output.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   106
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   107
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   108
    <target name="test-imaker-defaultconfig-with-cust-invalid-template">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   109
        <hlm:emakeEngine id="imaker.ec" template="../emake_data/invalid.mk.ftl">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   110
            <arg value="--autodepends=1" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   111
        </hlm:emakeEngine>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   112
        <au:expectfailure message="Error while rendering the makefile template:">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   113
            <hlm:imaker epocroot="${epocroot}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   114
                output="${epocroot.temp}/output.log"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   115
                engineRefId="imaker.ec"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   116
                verbose="true">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   117
                <hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   118
                    <makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   119
                        <include name="**/product/*ui.mk" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   120
                    </makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   121
                    <targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   122
                        <include name="core" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   123
                        <include name="langpack_\d+" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   124
                    </targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   125
                </hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   126
            </hlm:imaker>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   127
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   128
        <au:assertLogContains text="invalid.mk.ftl" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   129
        <au:assertFileDoesntExist file="${epocroot.temp}/output.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   130
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   131
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   132
    <target name="test-imaker-defaultconfig-with-cust-template">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   133
        <hlm:emakeEngine id="imaker.ec" template="../emake_data/cust.mk.ftl">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   134
            <arg value="--autodepends=1" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   135
        </hlm:emakeEngine>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   136
        <hlm:imaker epocroot="${epocroot}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   137
            output="${epocroot.temp}/output.log"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   138
            engineRefId="imaker.ec"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   139
            verbose="true">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   140
            <hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   141
                <makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   142
                    <include name="**/product/*ui.mk" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   143
                </makefileset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   144
                <targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   145
                    <include name="core" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   146
                    <include name="langpack_\d+" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   147
                </targetset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   148
            </hlm:imakerconfiguration>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   149
        </hlm:imaker>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   150
        <au:assertLogContains text="Loading template:" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   151
        <au:assertLogContains text="cust.mk.ftl" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   152
        <au:assertFileExists file="${epocroot.temp}/output.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   153
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   154
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   155
</project>