buildframework/helium/tools/testing/ats/ats.ant.xml
author wbernard
Thu, 22 Jul 2010 17:08:43 +0300
branchhelium-9.0
changeset 618 df88fead2976
parent 587 85df38eb4012
permissions -rw-r--r--
helium_9.0.5-4399343f4f50
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
<!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
============================================================================ 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
Name        : ats.ant.xml 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     5
Part of     : Helium 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
This component and the accompanying materials are made available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
which accompanies this distribution, and is available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
Description:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    21
============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    22
-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    23
<!--* @package testing -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
<project name="_testing.ats" xmlns:hlm="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    <description>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    26
    ATS testing targets.
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
    </description>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    28
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    29
    <!--* @property enabled.ats
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    30
    Value must be set to execute ats-test target.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    31
    @type boolean
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    32
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    35
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    36
    <!--* @property enabled.aste
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    37
    Value must be set to execute ats-aste target.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    @type boolean
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    42
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    <!--* @property ats.product.name
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    Name of the product to be tested. For example: "PRODUCT"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    45
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    47
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
    <!--* @property ats.drop.location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    51
    Server location (UNC path) to save the ATS3Drop file, before sending to the ATS. For example: \\trwsem00\some_folder\. In case, ``ats.script.type`` is set to "import", ATS doesn't need to have access to ats.drop.location, its value can be any local folder on build machine, for example c:\temp (no network share needed).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    52
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    57
    <!--* @property ats.server
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    58
    For example: "4fio00105" or "catstresrv001.cats.noklab.net:80". Default server port is "8080", but it is not allowed between intra and Noklab. Because of this we need to define server port as 80. The host can be different depending on site and/or product.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    61
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    62
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    63
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    64
    <!--* @property ats.password
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    65
    Password for ATS. This password might be different from NOE or HTTP/UNIX password.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    66
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    67
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    68
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    69
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    70
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    71
    <!--* @property ats.username
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    72
    Username for ATS server. This is NOT the NOE or HTTP/UNIX username.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    73
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    74
    @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    75
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    76
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    77
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    78
    
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    79
    <!-- -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    80
    <fileset id="reference.ats.flash.images" dir="${release.images.dir}">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    81
        <include name="**/*.fpsx" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    82
        <include name="**/*rnd.C00" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    83
        <include name="**/*rnd.V01" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    84
    </fileset>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    85
    
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    86
    <!--* @property ats.flashfiles.minlimit
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    87
    Limit of minimum number of flash files to execute ats-test target, otherwise ATSDrop.zip will not be generated. Default value is "2" files.
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    88
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    89
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    90
    -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    91
    <condition property="ats.flashfiles.minlimit" value="0" else="2">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    92
        <istrue value="${ats.emulator.enable}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    93
    </condition>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    94
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    95
    <fileset id="reference.ats.sis.images" dir="${ats.sis.images.dir}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    96
        <include name="**/*.sis" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    97
    </fileset>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    98
    <!-- Limit of minimum number of sis files to execute matti-test target, otherwise MATTI-drop.zip will not be generated. Default value is "1" files.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    99
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   100
    @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   101
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   102
    <property name="ats.sisfiles.minlimit" value="1" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   103
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   104
    <var name="drop.file.counter" value="0" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   105
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   106
    <condition property="internal.enabled.ats">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   107
        <istrue value="${enabled.ats}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   108
    </condition>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   109
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   110
    <!-- The target creates ATSDrop.zip file which also includes test.xml file; and sends the drop to ATS.
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   111
    The layer definition, in system definition file, for tsrc directory should look like:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   112
    <pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   113
    <layer name="name_test_layer">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   114
        <module name="module_name">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   115
            <unit id="unit_id" name="unti_name" bldFile="path_of_tsrc_folder_to_be_built" filter=""/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   116
        </module>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   117
    </layer>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   118
    </pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   119
    -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   120
    <target name="ats-test" if="internal.enabled.ats">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   121
        <mkdir dir="${test.log.dir}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   122
        <hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   123
        <trycatch property="exception" reference="exception">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   124
            <try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   125
                <runtarget target="ats-delta"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   126
                <antcall target="create-canonical-sysdef-file" inheritRefs="true">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   127
                    <reference refid="ats.system.definition.files" torefid="system.definition.files" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   128
                </antcall>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   129
                <runtarget target="copy-mon-sym" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   130
                <runtarget target="ats-create-drop" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   131
            </try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   132
            <catch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   133
                <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   134
                    <istrue value="${ats.delta.enabled}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   135
                    <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   136
                        <echo message="${exception}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   137
                    </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   138
                    <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   139
                        <throw refid="exception"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   140
                    </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   141
                </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   142
            </catch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   143
        </trycatch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   144
        <hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_ats.log" append="false"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   145
        <hlm:metadatarecord database="${metadata.dbfile}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   146
            <hlm:textmetadatainput>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   147
                <fileset casesensitive="false" file="${test.log.dir}/${build.id}_ats.log" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   148
                <metadatafilterset refid="filterset.ats" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   149
            </hlm:textmetadatainput>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   150
        </hlm:metadatarecord>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   151
        <hlm:generateBuildStatus file="${build.id}_ats.log" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   152
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   153
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   154
    <!-- The target creates the ATSdrop.zip file including test.xml for ATS ASTE tests. This target is executable.-->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   155
    <target name="ats-aste" if="enabled.aste">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   156
        <mkdir dir="${test.log.dir}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   157
        <hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   158
        <runtarget target="do-ats-aste" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   159
        <hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_aste.log" append="false"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   160
        <hlm:metadatarecord database="${metadata.dbfile}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   161
            <hlm:textmetadatainput>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   162
                <fileset casesensitive="false" file="${test.log.dir}/${build.id}_aste.log" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   163
                <metadatafilterset refid="filterset.aste" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   164
            </hlm:textmetadatainput>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   165
        </hlm:metadatarecord>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   166
        <hlm:generateBuildStatus file="${build.id}_aste.log" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   167
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   168
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   169
    <!-- The target creates the MATTI_drop.zip file including test.xml for MATTI tests. This target is executable.-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   170
    <target name="matti-test" if="enabled.matti">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   171
        <mkdir dir="${test.log.dir}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   172
        <hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   173
        <runtarget target="do-ats-matti" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   174
        <hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_matti.log" append="false"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   175
        <hlm:metadatarecord database="${metadata.dbfile}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   176
            <hlm:textmetadatainput>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   177
                <fileset casesensitive="false" file="${test.log.dir}/${build.id}_matti.log" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   178
                <metadatafilterset refid="filterset.matti" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   179
            </hlm:textmetadatainput>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   180
        </hlm:metadatarecord>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   181
        <hlm:generateBuildStatus file="${build.id}_matti.log" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   182
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   183
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   184
    <!-- Sends drop file to ATS/ASTE. Please see `ats-test` for description. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   185
    <target name="do-ats-test" depends="ats-username, ats-password" unless="skip.ats.sending">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   186
        <property name="ats.sending" value="true" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   187
        <!-- Make the drop file visible to ATS. -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   188
        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   189
        <var name="ats.drop.location.file" unset="true"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   190
        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   191
            <isset property="ats.drop.location" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   192
            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   193
                <mkdir dir="${ats.drop.location}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   194
                <property name="ats.drop.location.file" location="${ats.drop.location}/${ats.drop.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   195
                <copy file="${build.output.dir}/ats/${ats.drop.file}" tofile="${ats.drop.location.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   196
            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   197
            <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   198
                <property name="ats.drop.location.file" location="${build.output.dir}/ats/${ats.drop.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   199
            </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   200
        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   201
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   202
        <trycatch property="exception">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   203
            <try>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   204
                <!-- Notify ATS about the drop. -->
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   205
                <if>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   206
                    <istrue value="${ats4.enabled}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   207
                    <then>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   208
                        <hlm:python failonerror="true">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   209
version = r'${java.version}'
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   210
if '1.6.0' in version:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   211
    assert int(version.split('_')[1]) > 6, 'Java 6 u7 required'
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   212
                        </hlm:python>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   213
                        <condition property="ats.import.arg" value="-import" else="">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   214
                            <equals arg1="${ats.script.type}" arg2="import" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   215
                        </condition>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   216
                        <condition property="ats4.libs" value="${helium.dir}/extensions/nokia/external/ats4" else="${helium.dir}/external/antlibs">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   217
                            <available type="dir" file="${helium.dir}/extensions/nokia/external/ats4"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   218
                        </condition>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   219
                        <java classname="com.nokia.ats.util.server.CommandLineClient" fork="true" maxmemory="1024m" failonerror="true">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   220
                            <classpath>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   221
                                <pathelement path="${java.class.path}"/>
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   222
                                <fileset dir="${ats4.libs}" includes="*.jar"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   223
                            </classpath>
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   224
                            <arg line="-url http://${ats.server}/ServerService -path ${ats.drop.location.file} ${ats.import.arg}"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   225
                        </java>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   226
                    </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   227
                    <else>
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   228
                        <if>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   229
                            <and>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   230
                                <equals arg1="${ats.script.type}" arg2="import" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   231
                                <available classname="com.nokia.taitei.util.TestDropImporter"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   232
                                <not>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   233
                                    <istrue value="${ats.disable.java.importer}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   234
                                </not>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   235
                            </and>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   236
                            <then>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   237
                                <java classname="com.nokia.taitei.util.TestDropImporter" fork="true" maxmemory="1024m" failonerror="true">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   238
                                    <classpath>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   239
                                        <pathelement path="${java.class.path}"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   240
                                    </classpath>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   241
                                    <arg line="${ats.server} ${ats.drop.location.file} ${ats.username} ${ats.password}"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   242
                                </java>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   243
                            </then>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   244
                            <else>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   245
                                <condition property="ats.wsh.testrun.file" value="wshTestRunImport.vbs" else="wshTestRunX.vbs">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   246
                                    <equals arg1="${ats.script.type}" arg2="import" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   247
                                </condition>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   248
                                <exec executable="cscript" dir="${build.drive}/" failonerror="true">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   249
                                    <env key="ats3.username" value="${ats.username}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   250
                                    <env key="ats3.password" value="${ats.password}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   251
                                    <env key="ats3.host" value="${ats.server}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   252
                                    <env key="ats3.pathToDrop" value="${ats.drop.location.file}"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   253
                                    <arg value="${helium.dir}/tools/testing/ats/${ats.wsh.testrun.file}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   254
                                </exec>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   255
                            </else>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   256
                        </if>             
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   257
                    </else>
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   258
                </if>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   259
            </try>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   260
            <catch>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   261
                <echo message="Error: ${exception}"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   262
            </catch>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   263
        </trycatch>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   264
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   265
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   266
    <!-- The target is dependent on "ats-test", should not be called independently. The target fetches flash files location -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   267
    <target name="ats-set-flash-image-path" unless="ats.emulator.enable">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   268
        <pathconvert pathsep="," property="ats.flash.images">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   269
            <fileset refid="reference.ats.flash.images"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   270
        </pathconvert>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   271
        <script language="jython" setbeans="false">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   272
if project.getProperty('ats.disable.iconfig') == None:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   273
    import atsant
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   274
    ic = None
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   275
    try:
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   276
        ic = atsant.IConfigATS(project.getProperty('release.images.dir'), project.getProperty('ats.product.name'))
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   277
    except Exception, ex:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   278
        print ex
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   279
    if ic:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   280
        project.setProperty('ats.flash.images', ic.findimages())
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   281
        </script>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   282
        <hlm:python failonerror="true">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   283
<![CDATA[
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   284
flashfilescount = len(r'${ats.flash.images}'.split(','))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   285
mincount = int(r'${ats.flashfiles.minlimit}')
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   286
if flashfilescount < mincount:
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   287
    raise Exception('Not enough flash files, check reference.ats.flash.images and build.id, found: ' + r'${ats.flash.images}' + ', looking in: ' + r'${release.images.dir}')
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   288
]]>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   289
        </hlm:python>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   290
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   291
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   292
    <!-- The target is dependent on "ats-test", should not be called independently. The target fetches flash files location -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   293
    <target name="ats-set-sis-flash-image-path">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   294
        <pathconvert pathsep="," property="ats.sis.images">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   295
            <fileset refid="reference.ats.sis.images"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   296
        </pathconvert>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   297
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   298
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   299
    <!-- Sets values common for ATS, this is a dependent target and shouldn't be used as an individual target -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   300
    <target name="ats-common">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   301
        <property name="ats.config.file" value="" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   302
        <property name="ats.specific.pkg" value="" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   303
        <property name="ats4.enabled" value="False" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   304
        <!-- Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   305
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   306
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   307
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   308
        <property name="ats.product.hwid" value="" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   309
        <!-- To set test commands execution time limit on ATS3 server, in seconds. Default value is "60".
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   310
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   311
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   312
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   313
        <property name="ats.test.timeout" value="60" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   314
        <!-- Sets ATS reports store location. Default location is "${publish.dir}/${publish.subdir}"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   315
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   316
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   317
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   318
        <property name="ats.report.location" value="${publish.dir}/${publish.subdir}" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   319
        <condition property="internal.ats.diamonds.arg" value="--diamonds-build-url=http://${diamonds.host}${diamonds.build.id}" else="">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   320
            <isset property="diamonds.build.url" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   321
        </condition>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   322
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   323
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   324
    <!-- Sets default values for the ATS (STIF and EUnit), this is a dependent target and shouldn't be used as an individual target -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   325
    <target name="ats-set-defaults-stifeunit" depends="ats-common,lookup-email">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   326
        <!-- Default values for the properties -->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   327
        <!-- The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon(s) ";" separated email addresses.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   328
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   329
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   330
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   331
        <property name="ats.email.list" value="${email.from}" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   332
        <!-- The default value is "data" and refers to the 'data' directory under 'tsrc' directory.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   333
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   334
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   335
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   336
        <property name="tsrc.data.dir" value="data" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   337
        <!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   338
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   339
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   340
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   341
        <property name="ats.plan.name" value="plan" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   342
        <!-- Modify the test-run name if you have understanding of test.xml file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   343
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   344
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   345
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   346
        <property name="ats.testrun.name" value="${build.id}_${ats.product.name}" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   347
        <!-- CTC host, provided by CATS used to create coverage measurement reports. MON.sym files are copied to this location, for example "10.0.0.1". If not given, code coverage reports are not created
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   348
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   349
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   350
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   351
        <property name="ats.ctc.host" value="" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   352
        <condition property="ats.version" value="4" else="3">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   353
            <istrue value="${ats4.enabled}" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   354
        </condition>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   355
        <var name="ats.drop.file" value="ATS${ats.version}Drop${drop.file.counter}.zip" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   356
        
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   357
        <!--* @property ats.target.platform
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   358
        Sets target platform for compiling test components. Default value is "armv5 urel".
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   359
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   360
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   361
        -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   362
        <condition property="ats.target.platform" value="winscw urel" else="armv5 urel">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   363
            <istrue value="${ats.emulator.enable}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   364
        </condition>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   365
        <!-- Should be "True" if tracing is needed during the tests running on ATS3. Default value is "False", the values are case-sensitive.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   366
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   367
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   368
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   369
        <property name="ats.trace.enabled" value="False" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   370
        <!-- Should be "True" if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is "False", the values are case-sensitive.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   371
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   372
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   373
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   374
        <property name="ats.ctc.enabled" value="False" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   375
        <property name="ats.multiset.enabled" value="False" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   376
        <!-- Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to "/E S60AppEnv /R Off".
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   377
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   378
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   379
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   380
        <property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   381
        <!-- If the property is set to "True", then the only test components which will have PKG files, will be included into the test.xml as a test-set. Which means, even if there's a test component (executable) but there's no PKG file, it should not be considered as a test component and hence not included into the test.xml as a separate test. By default the property value is False.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   382
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   383
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   384
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   385
        <property name="ats.obey.pkgfiles.rule" value="False" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   386
        <fail unless="ats.product.name" message="ats.product.name property not defined" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   387
        <condition property="ats.hti" value="false" else="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   388
            <istrue value="${ats.emulator.enable}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   389
        </condition>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   390
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   391
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   392
    <!-- Sets default values for the ASTE, this is a dependent target and shouldn't be used as an individual target -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   393
    <target name="ats-set-defaults-aste" depends="ats-common">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   394
        <var name="ats.drop.file" value="ATSAsteDrop.zip" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   395
        <property name="ats.aste.test.type" value="smoke" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   396
        <property name="ats.aste.testasset.caseids" value="100,101,102,103,105,106,107,108,109,110,111,112,113,114,115" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   397
        <property name="ats.aste.software.version" value="${build.id}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   398
        <property name="ats.aste.language" value="English" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   399
        <property name="ats.aste.software.release" value="${build.name}" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   400
        <!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   401
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   402
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   403
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   404
        <property name="ats.aste.plan.name" value="plan" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   405
        <!-- Modify the test-run name if you have understanding of test.xml file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   406
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   407
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   408
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   409
        <property name="ats.aste.testrun.name" value="${build.id}_${ats.product.name}_${major.version}.${minor.version}" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   410
        <!-- The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon(s) ";" separated email addresses.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   411
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   412
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   413
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   414
        <property name="ats.aste.email.list" value="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   415
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   416
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   417
    <!-- This macro fetches the tsrc paths from system definition file (layers.sysdef.xml), layer defintion should look like
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   418
    <pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   419
    <layer name="name_test_layer">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   420
        <module name="module_name">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   421
            <unit id="unit_id" name="unti_name" bldFile="path_of_tsrc_folder_to_be_built" filter="" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   422
        </module>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   423
    </layer>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   424
    </pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   425
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   426
    <scriptdef name="getModuleTsrcMacro" language="jython" uri="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   427
        <attribute name="property" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   428
        <attribute name="prefix"/>        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   429
import traceback
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   430
import os
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   431
import atsant
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   432
from com.nokia.ant.util import Helper
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   433
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   434
canonicalsysdeffile = Helper.getProperty(project, 'canonical.sysdef.file')
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   435
modules = atsant.files_to_test(canonicalsysdeffile, project.getProperty('exclude.test.layers'), project.getProperty('ido.build.filter'), project.getProperty('build.drive'))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   436
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   437
for name in modules.keys():    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   438
    if modules[name] == []:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   439
        del modules[name]
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   440
    else:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   441
        project.setProperty("%s.%s" % (attributes.get('prefix'), name), " ".join(modules[name]))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   442
        
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   443
project.setProperty(attributes.get('property'), ",".join(modules.keys()))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   444
project.setProperty('ats.drops.count', str(len(modules)))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   445
    </scriptdef>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   446
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   447
    <!-- The target is dependent on "ats-test", should not be called individually. The target creates the ATSdrop.zip file including test:xml file -->
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   448
    <target name="ats-create-drop" depends="ats-set-flash-image-path,ats-emulator-zip">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   449
        <mkdir dir="${build.output.dir}/ats" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   450
        <hlm:getModuleTsrcMacro property="module.list" prefix="module.tsrc" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   451
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   452
            <scriptcondition language="beanshell">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   453
                <![CDATA[
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   454
                    String value = project.getProperty("module.list");
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   455
                    if (value != null) {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   456
                        String[] out = value.split(",");
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   457
                        if ((out == null) || (out.length == 0) || ((out.length == 1) && (out[0].length()==0))) {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   458
                                    self.setValue(true);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   459
                            } else {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   460
                                    self.setValue(false);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   461
                            }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   462
                        } else {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   463
                            self.log("Error: module.list not defined.");
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   464
                            self.setValue(true);
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   465
                        }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   466
                            ]]>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   467
            </scriptcondition>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   468
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   469
                <echo message="Error: No test modules found!" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   470
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   471
            <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   472
                <for list="${module.list}" delimiter="," param="module">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   473
                    <sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   474
                        <runtarget target="ats-set-defaults-stifeunit" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   475
                        <echo>${ats.drop.file}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   476
                        <exec executable="python">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   477
                            <arg line="-m ats3.__init__" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   478
                            <arg value="--device-type=${ats.product.name}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   479
                            <arg value="--device-hwid=${ats.product.hwid}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   480
                            <arg value="${internal.ats.diamonds.arg}" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   481
                            <arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   482
                            <arg value="--report-email=${ats.email.list}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   483
                            <arg value="--plan-name=${ats.plan.name}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   484
                            <arg value="--testrun-name=${ats.testrun.name}_@{module}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   485
                            <arg value="--flash-images=${ats.flash.images}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   486
                            <arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   487
                            <arg value="--target-platform=${ats.target.platform}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   488
                            <arg value="--data-dir=${tsrc.data.dir}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   489
                            <arg value="--test-timeout=${ats.test.timeout}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   490
                            <arg value="--build-drive=${build.drive}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   491
                            <arg value="--trace-enabled=${ats.trace.enabled}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   492
                            <arg value="--ctc-enabled=${ats.ctc.enabled}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   493
                            <arg value="--multiset-enabled=${ats.multiset.enabled}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   494
                            <arg value="--file-store=${ats.report.location}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   495
                            <arg value="--eunitexerunner-flags=${eunitexerunner.flags}" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   496
                            <arg value="--ctc-run-process-params=${ats.ctc.host}#${ats.drop.file}#${ats.drops.count}" /> <!-- Three differnt value are combined with '#' character which is later parsed inside the script -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   497
                            <arg value="--monsym-files=${ats.ctc.monsyms}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   498
                            <arg value="--config=${ats.config.file}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   499
                            <arg value="--obey-pkgfiles=${ats.obey.pkgfiles.rule}" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   500
                            <arg value="--ats4-enabled=${ats4.enabled}" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   501
                            <arg value="--specific-pkg=${ats.specific.pkg}" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   502
                            <arg value="--hti=${ats.hti}" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   503
                            <arg value="--verbose" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   504
                            <arg line="${module.tsrc.@{module}}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   505
                        </exec>
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   506
                        <antcall target="do-ats-test" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   507
                        <math result="drop.file.counter" operand1="1" operation="+" operand2="${drop.file.counter}" datatype="int" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   508
                    </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   509
                </for>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   510
            </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   511
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   512
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   513
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   514
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   515
    <!-- Please see ats-aste for description.-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   516
    <target name="do-ats-aste" depends="ats-set-flash-image-path, ats-set-defaults-aste" if="enabled.aste">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   517
        <mkdir dir="${build.output.dir}/ats" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   518
        <exec executable="python">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   519
            <arg line="-m ats3.aste" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   520
            <arg value="--report-email=${ats.aste.email.list}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   521
            <arg value="--device-type=${ats.product.name}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   522
            <arg value="--flash-images=${ats.flash.images}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   523
            <arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   524
            <arg value="--plan-name=${ats.aste.plan.name}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   525
            <arg value="--testrun-name=${ats.aste.testrun.name}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   526
            <arg value="--device-hwid=${ats.product.hwid}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   527
            <arg value="--test-timeout=${ats.test.timeout}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   528
            <arg value="--build-drive=${build.drive}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   529
            <arg value="${internal.ats.diamonds.arg}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   530
            <arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   531
            <arg value="--test-type=${ats.aste.test.type}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   532
            <arg value="--testasset-location=${ats.aste.testasset.location}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   533
            <arg value="--testasset-caseids=${ats.aste.testasset.caseids}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   534
            <arg value="--software-version=${ats.aste.software.version}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   535
            <arg value="--device-language=${ats.aste.language}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   536
            <arg value="--software-release=${ats.aste.software.release}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   537
            <arg value="--ats4-enabled=${ats4.enabled}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   538
            <arg value="--verbose" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   539
        </exec>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   540
        <runtarget target="do-ats-test" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   541
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   542
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   543
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   544
        This target search the mon.sym files using unit information from the canonical sysdef file.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   545
        Then it copies the discovered files under the ftp server defined by ats.ctc.host.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   546
        The target url is: ftp ://[server]/ctc_helium/[diamonds_id]/mon_syms/[id]/mon.sym 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   547
    -->
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   548
    <target name="copy-mon-sym">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   549
        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   550
            <istrue value="${ats.ctc.enabled}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   551
            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   552
                <fmpp sourceFile="${helium.dir}/tools/testing/ats/templates/monsym-file-list.txt.ftl"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   553
                    outputFile="${temp.build.dir}/monsym-file-list.txt">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   554
                    <data expandProperties="yes">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   555
                        data: xml(${canonical.sysdef.file})
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   556
                        ant: antProperties()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   557
                    </data>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   558
                </fmpp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   559
                <hlm:path2file reference="mon.sym.list" file="${temp.build.dir}/monsym-file-list.txt" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   560
                <script language="jython">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   561
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   562
import ctc
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   563
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   564
if not project.getProperty('ats.ctc.host'):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   565
    raise Exception('ats.ctc.host property is not defined.')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   566
if not project.getProperty('diamonds.build.id'):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   567
    raise Exception('diamonds.build.id property is not defined.')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   568
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   569
server = project.getProperty('ats.ctc.host')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   570
diamondsid = os.path.basename(os.path.dirname(project.getProperty('diamonds.build.id')))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   571
path = project.getReference('mon.sym.list')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   572
if not path:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   573
    raise Exception('mon.sym.list reference has not been set')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   574
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   575
uploader = ctc.MonSymFTPUploader(server, path.list(), diamondsid)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   576
monsyms = uploader.upload()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   577
            
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   578
# Using ; to separate the path because the target script is running on windows
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   579
project.setNewProperty('ats.ctc.monsyms', ';'.join([ "//%s/%s" % (server, x) for x in monsyms]))
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   580
                </script>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   581
                <echo>ats.ctc.monsyms: ${ats.ctc.monsyms}</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   582
            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   583
        </if>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   584
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   585
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   586
    <!-- a dependant target please do not call directly use matti-test,
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   587
    target calls the MATTI script that creates the MATTI_drop.zip file and runs the tests
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   588
    listed in test.rb.  ats-set-flash-image-path and ats-set-sis-flash-image-path look for lists of files-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   589
    <target name="do-ats-matti" depends="ats-set-flash-image-path, ats-set-sis-flash-image-path" >
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   590
        <runtarget target="ats-set-defaults-stifeunit" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   591
        <!--need to set theseup for use by do-ats-test target-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   592
        <mkdir dir="${build.output.dir}/ats" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   593
        <var name="ats.drop.file" value="ATSMattiDrop.zip" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   594
        <if>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   595
            <!-- get the list of .sis files in the defined folder to pass as a list to the python script-->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   596
            <scriptcondition language="beanshell">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   597
                <![CDATA[
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   598
                    String sisfiles = project.getProperty("ats.sis.images");
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   599
                    String value = project.getProperty("ats.sisfiles.minlimit");
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   600
                    if (sisfiles != null && value != null) {
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   601
                        int cond = Integer.valueOf(value).intValue();
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   602
                        String[] out = sisfiles.split(",");
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   603
                        if (out.length < cond ) {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   604
                            self.setValue(true);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   605
                        } else {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   606
                            self.setValue(false);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   607
                        }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   608
                    } else {
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   609
                        self.log("Error: reference.ats.sis.images not defined.");
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   610
                        self.setValue(true);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   611
                    }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   612
                        ]]>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   613
            </scriptcondition>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   614
            <then>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   615
                <echo message="Error: Not enough sis files check reference.ats.sis.images" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   616
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   617
            <else>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   618
                <!-- execute the MattiDrops.py script with parameters-->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   619
                <exec executable="python" resultproperty="script.response">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   620
                    <arg line="-m ats3.matti.MattiDrops" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   621
                    <arg value="--build-drive=${build.drive}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   622
                    <arg value="--matti-scripts=${matti.scripts}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   623
                    <arg value="--flash-images=${ats.flash.images}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   624
                    <arg value="--harness=STIF" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   625
                    <arg value="--file-store=${ats.output.dir}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   626
                    <arg value="--testrun-name=${ats.testrun.name}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   627
                    <arg value="--device-type=${ats.product.name}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   628
                    <arg value="--device-hwid=${ats.product.hwid}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   629
                    <arg value="--diamonds-build-url=${internal.ats.diamonds.arg}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   630
                    <arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   631
                    <arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   632
                    <arg value="--plan-name=${ats.plan.name}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   633
                    <arg value="--sis-files=${ats.sis.images}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   634
                    <arg value="--template-loc=${template.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   635
                </exec>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   636
                <if> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   637
                    <not>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   638
                        <!-- if the response is not 0 then need to create the skip.ats.sending
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   639
                         flag so that do-ats-test is not run-->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   640
                        <equals arg1="${script.response}" arg2="0" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   641
                    </not>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   642
                    <then>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   643
                        <!-- Skips sending drop package file to ATS/ASTE after its creation.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   644
                        @type boolean
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   645
                        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   646
                        -->
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   647
                        <property name="skip.ats.sending" value="1" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   648
                    </then>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   649
                </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   650
                <runtarget target="do-ats-test" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   651
            </else>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   652
        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   653
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   654
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   655
    <!-- Temp dir
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   656
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   657
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   658
    -->
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   659
    <property name="ats.evalid.pre" value="${temp.build.dir}/${build.id}_atsevalidpre" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   660
    <!-- Temp dir
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   661
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   662
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   663
    -->
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   664
    <property name="ats.evalid.post" value="${temp.build.dir}/${build.id}_atsevalidpost" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   665
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   666
    <!-- Call before preperation -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   667
    <target name="find-files-pre" if="ats.delta.enabled">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   668
        <hlm:evalidMacro dir="${ats.evalid.pre}"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   669
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   670
    
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   671
    <!-- Call after preperation -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   672
    <target name="find-files-post" if="ats.delta.enabled">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   673
        <hlm:evalidMacro dir="${ats.evalid.post}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   674
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   675
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   676
    <!-- Run evalid on ido directories -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   677
    <macrodef name="evalidMacro" uri="http://www.nokia.com/helium">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   678
        <attribute name="dir"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   679
        <sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   680
            <runtarget target="ido-create-ado-mapping"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   681
            <hlm:python>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   682
import delta_zip
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   683
delta_zip.evalidAdomapping(r'${build.drive}', r'@{dir}', r'${ado.mapping.file}')
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   684
            </hlm:python>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   685
        </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   686
    </macrodef>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   687
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   688
    <!-- Generate sysdef fileset based on evalid data -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   689
    <target name="ats-delta" if="ats.delta.enabled">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   690
        <script language="jython">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   691
import ido
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   692
from com.nokia.ant.util import Helper
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   693
import delta_zip
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   694
import os
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   695
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   696
atspath = project.createDataType("path")
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   697
i = project.getReference('system.definition.files').iterator()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   698
changedfiles = delta_zip.changedFiles(Helper.getProperty(project, 'ats.evalid.pre'), Helper.getProperty(project, 'ats.evalid.post'))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   699
while i.hasNext():
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   700
    path = i.next().toString()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   701
    sysdefpath = os.path.abspath(os.path.join(project.getProperty('build.drive') + os.sep, ido.get_sysdef_location(path)))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   702
    for f in changedfiles:
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   703
        if sysdefpath.lower() in os.path.abspath(f).lower():
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   704
            pe = atspath.createPathElement()
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   705
            pe.setPath(path)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   706
            break
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   707
project.addReference('ats.system.definition.files', atspath)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   708
        </script>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   709
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   710
    
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   711
    <!-- Common target to run ats, aste and matti -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   712
    <target name="run-test" depends="ats-test,ats-aste,matti-test"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   713
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   714
    <!-- Zip build area for emulator -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   715
    <target name="ats-emulator-zip" if="ats.emulator.enable">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   716
        <property name="zips.emulator_zip.spec.name" value="emulator_zip"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   717
        <hlm:zipContentMacro type="emulator_zip" file="${helium.dir}\tools\testing\ats\emulator_zip.cfg.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   718
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   719
        <if>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   720
            <isset property="ats.drop.location" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   721
            <then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   722
                <property name="ats.flash.images" value="${ats.drop.location}\${build.id}_emulator_urel.zip"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   723
                <copy file="${build.output.dir}/ats/${build.id}_emulator_urel.zip" tofile="${ats.flash.images}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   724
            </then>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   725
            <else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   726
                <property name="ats.flash.images" value="${build.output.dir}/ats/${build.id}_emulator_urel.zip"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   727
            </else>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   728
        </if>        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
   729
    </target>
618
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   730
    
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   731
    <!-- Generate and upload drop using custom template -->
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   732
    <target name="ats-custom-drop">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   733
        <mkdir dir="${build.output.dir}/ats" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   734
        <runtarget target="ats-set-flash-image-path" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   735
        <runtarget target="ats-set-defaults-stifeunit" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   736
        <property name="ats.custom.template" value="${helium.dir}/tools/testing/ats/templates/ats4_naviengine_template.xml"/>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   737
        <exec executable="python">
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   738
            <arg line="-Wignore -m ats3.custom" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   739
            <arg value="--custom-template=${ats.custom.template}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   740
            <arg value="--device-type=${ats.product.name}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   741
            <arg value="${internal.ats.diamonds.arg}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   742
            <arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   743
            <arg value="--report-email=${ats.email.list}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   744
            <arg value="--testrun-name=${ats.testrun.name}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   745
            <arg value="--flash-images=${ats.flash.images}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   746
            <arg value="--test-timeout=${ats.test.timeout}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   747
            <arg value="--test-type=${ats.custom.test.type}" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   748
        </exec>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   749
        <runtarget target="do-ats-test" />
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   750
    </target>
df88fead2976 helium_9.0.5-4399343f4f50
wbernard
parents: 587
diff changeset
   751
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   752
</project>