buildframework/helium/sf/python/pythoncore/tests/data/matti/matti_template.xml
changeset 628 7c4a911dc066
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
       
     1 <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
       
     2 <!-- 
       
     3 ============================================================================ 
       
     4 Name        : matti_template.xml
       
     5 Part of     : Helium 
       
     6 
       
     7 Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     8 All rights reserved.
       
     9 This component and the accompanying materials are made available
       
    10 under the terms of the License "Eclipse Public License v1.0"
       
    11 which accompanies this distribution, and is available
       
    12 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    13 
       
    14 Initial Contributors:
       
    15 Nokia Corporation - initial contribution.
       
    16 
       
    17 Contributors:
       
    18 
       
    19 Description:
       
    20 Contains the template for the test.xml file output. The test.xml file contains
       
    21 information on the files used to create the drop file.
       
    22 ============================================================================
       
    23 -->
       
    24 
       
    25 <testrun>
       
    26     <metadata>
       
    27         {% if xml_dict['diamonds_build_url'] -%}
       
    28         <meta name="diamonds-buildid">{{ xml_dict['diamonds_build_url'] }}</meta> 
       
    29         <meta name="diamonds-testtype">Smoke</meta>
       
    30         {% endif %}
       
    31         <meta name="name">{{ xml_dict['testrun_name'] }}</meta> 
       
    32     </metadata>
       
    33     
       
    34     <agents>
       
    35         <agent alias="{{ xml_dict['alias_name'] }}">
       
    36             <property name="hardware" value="{{ xml_dict["device_type"] }}"/>
       
    37         </agent>
       
    38     </agents>
       
    39     
       
    40     
       
    41     {% for exe_block in xml_dict['execution_blocks'] -%}
       
    42     <execution defaultAgent="{{ xml_dict['alias_name'] }}">        
       
    43         <initialization>
       
    44         
       
    45             {% if exe_block['image_files'] -%}
       
    46             <task agents="{{ xml_dict['alias_name'] }}">
       
    47                 <type>FlashTask</type>
       
    48                 <parameters>
       
    49                 {% set i = 1 %}
       
    50                 {% for img in exe_block['image_files'] -%}
       
    51                     <parameter name="image-{{ i }}" value="images\{{ os.path.basename(img) }}" />
       
    52                     {% set i = i + 1 %}
       
    53                 {% endfor -%}
       
    54                 </parameters>
       
    55             </task>
       
    56             {% endif %}
       
    57                      
       
    58 
       
    59             {% if exe_block['install_files'] != [] -%}
       
    60               {% for file in exe_block['install_files'] -%}            
       
    61             <task agents="{{ xml_dict['alias_name'] }}">
       
    62                 <type>FileUploadTask</type>
       
    63                 <parameters>
       
    64                     <parameter name="src" value="{{exe_block['name']}}{{ atspath.normpath(atspath.normpath(file[0]).replace(atspath.normpath(exe_block['asset_path']).rsplit("\\", 1)[0], "")) }}"/>
       
    65                     <parameter name="dst" value="{{ atspath.normpath(file[1]) }}"/>
       
    66                 </parameters>
       
    67             </task>
       
    68               {% endfor -%}
       
    69             {% endif %}
       
    70             
       
    71             {% if exe_block['matti_sis_files'] != [] -%}
       
    72               {% for sisfile in exe_block['matti_sis_files'] -%}            
       
    73             <task agents="{{ xml_dict['alias_name'] }}">
       
    74                 <type>FileUploadTask</type>
       
    75                 <parameters>
       
    76                     <parameter name="src" value="sisfiles\{{ os.path.basename(sisfile[0]) }}"/>
       
    77                     <parameter name="dst" value="{{ sisfile[2] }}"/>
       
    78                 </parameters>
       
    79             </task>
       
    80               {% endfor -%}
       
    81             {% endif %}
       
    82 
       
    83           {% for sis_file in exe_block["matti_sis_files"] -%}
       
    84             <task agents="{{ xml_dict['alias_name'] }}">
       
    85                <type>InstallSisTask</type>
       
    86                <parameters>
       
    87                     <parameter name="software-package" value="{{ sis_file[2] }}"/>
       
    88                     <parameter name="timeout" value="{{ exe_block["test_timeout"] }}"/>
       
    89                     <parameter name="upgrade-data " value="true"/>
       
    90                     <parameter name="ignore-ocsp-warnings" value="true"/>
       
    91                     <parameter name="ocsp-done" value="true"/>
       
    92                     <parameter name="install-drive" value="{{ sis_file[2].split(":")[0] }}"/>
       
    93                     <parameter name="overwrite-allowed" value="true"/>
       
    94                     <parameter name="download-allowed" value="false"/>
       
    95                     <parameter name="download-username" value="user"/>
       
    96                     <parameter name="download-password" value="passwd"/>
       
    97                     <parameter name="upgrade-allowed" value="true"/>
       
    98                     <parameter name="optional-items-allowed" value="true"/>
       
    99                     <parameter name="untrusted-allowed" value="true"/>
       
   100                     <parameter name="package-info-allowed" value="true"/>
       
   101                     <parameter name="user-capabilities-granted" value="true"/>
       
   102                     <parameter name="kill-app" value="true"/>
       
   103                </parameters>
       
   104             </task>
       
   105           {%- endfor -%}
       
   106 
       
   107             <task agents="{{ xml_dict['alias_name'] }}">
       
   108                 <type>RebootTask</type>
       
   109                 <parameters/>                
       
   110             </task>
       
   111             <task agents="{{ xml_dict['alias_name'] }}">
       
   112                 <type>CreateDirTask</type>
       
   113                 <parameters>                
       
   114                     <parameter value="c:\logs\testability" name="dir"/>
       
   115                 </parameters>
       
   116             </task>
       
   117         </initialization>
       
   118 
       
   119         {% for task_file in exe_block["matti_task_files"] -%}
       
   120         <task agents="{{ xml_dict['alias_name'] }}">
       
   121            <type>MATTITask</type>
       
   122            <parameters>
       
   123               <parameter value="{{ exe_block["name"] }}\matti_testcases\" name="script"/>
       
   124               <parameter value="{{ exe_block["name"] }}\matti_testcases\mattiparameters\{{ os.path.basename(exe_block["matti_parameters"][0]) }}" name="xml"/>
       
   125               <parameter value="{{ exe_block['test_timeout'] }}" name="timeout"/>
       
   126               <parameter value="{{ exe_block["sierra_enabled"] }}" name="sierra"/>
       
   127               <parameter value="{{ exe_block["sierra_parameters"] }} -e %TEST_RUN_SANDBOX%/{{ exe_block["name"] }}/{{ task_file }} test_unit" name="executable-parameters"/>
       
   128            </parameters>
       
   129         </task>
       
   130         {% endfor -%}
       
   131         
       
   132         <finalization>
       
   133 	      <task agents="{{ xml_dict['alias_name'] }}">
       
   134 	        <type>CleanupTask</type>
       
   135 	        <parameters>
       
   136 	          <parameter value="true" name="upload-files"/>
       
   137 	        </parameters>
       
   138 	      </task>
       
   139         </finalization>
       
   140     </execution>    
       
   141     {% endfor -%}
       
   142     
       
   143     <postActions>
       
   144     <action>
       
   145       <type>EmailAction</type>
       
   146       <parameters>
       
   147         <parameter value="{{ xml_dict['email_subject'] }}" name="subject"/>
       
   148         <parameter value="{{ xml_dict['report_email'] }}" name="to"/>
       
   149         <parameter value="{{ xml_dict['email_format'] }}" name="format"/>
       
   150       </parameters>
       
   151     </action>
       
   152     </postActions>
       
   153     
       
   154 </testrun>