buildframework/helium/sf/java/legacy/tests/antunit/test_rebaseline_task.ant.xml
changeset 588 c7c26511138f
parent 587 85df38eb4012
child 590 360bd6b35136
child 628 7c4a911dc066
equal deleted inserted replaced
587:85df38eb4012 588:c7c26511138f
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <!-- 
       
     3 ============================================================================ 
       
     4 Name        : test_rebaseline_task.ant.xml 
       
     5 Part of     : Helium 
       
     6 
       
     7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     8 All rights reserved.
       
     9 This component and the accompanying materials are made available
       
    10 under the terms of the License "Eclipse Public License v1.0"
       
    11 which accompanies this distribution, and is available
       
    12 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    13 
       
    14 Initial Contributors:
       
    15 Nokia Corporation - initial contribution.
       
    16 
       
    17 Contributors:
       
    18 
       
    19 Description:
       
    20 
       
    21 ============================================================================
       
    22 -->
       
    23 <project name="test_rebaseline_task" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
       
    24     <description>
       
    25         Rebaseline testing targets for script rebaseline.pl
       
    26     </description>
       
    27     <property environment="env"/>
       
    28     <taskdef resource="com/nokia/ant/antlib.xml" uri="http://www.nokia.com/helium" />
       
    29 
       
    30 
       
    31     <target name="test-rebaseline-no-arguments-case">
       
    32         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    33             <hlm:rebaseline/>
       
    34         </au:expectfailure>
       
    35     </target>
       
    36 
       
    37     <target name="test-rebaseline-task-database-set-case">
       
    38         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - password ccmProject">
       
    39             <hlm:rebaseline database="to1tobet"/>
       
    40         </au:expectfailure>
       
    41         <au:assertLogContains text="Set database to to1tobet" />
       
    42     </target>
       
    43 
       
    44     <target name="test-rebaseline-task-ccmproject-set-case">
       
    45         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password">
       
    46             <hlm:rebaseline ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/>
       
    47         </au:expectfailure>
       
    48         <au:assertLogContains text="Set ccmProject to helium-to1tobet#helium_4.49:project:vc1s60p1#1"/>
       
    49     </target>
       
    50 
       
    51     <target name="test-rebaseline-task-password-set-case">
       
    52         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database ccmProject">
       
    53             <hlm:rebaseline password="test"/>
       
    54         </au:expectfailure>
       
    55         <au:assertLogContains text="Set password to ******" />
       
    56     </target>
       
    57 
       
    58     <target name="test-rebaseline-task-release-set-case">
       
    59         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    60             <hlm:rebaseline release="tony/test"/>
       
    61         </au:expectfailure>
       
    62         <au:assertLogContains text="Set release to tony/test" />
       
    63     </target>
       
    64 
       
    65     <target name="test-rebaseline-task-baseline-set-case">
       
    66         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    67             <hlm:rebaseline baseline="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/>
       
    68         </au:expectfailure>
       
    69         <au:assertLogContains text="Set baseline to helium-to1tobet#helium_4.49:project:vc1s60p1#1" />
       
    70     </target>
       
    71 
       
    72     <target name="test-rebaseline-task-version-set-case">
       
    73         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    74             <hlm:rebaseline version="RnD_2007wk49"/>
       
    75         </au:expectfailure>
       
    76         <au:assertLogContains text="Set version to RnD_2007wk49" />
       
    77     </target>
       
    78 
       
    79     <target name="test-rebaseline-task-releasebaseline-set-case">
       
    80         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    81             <hlm:rebaseline releaseBaseline="yes"/>
       
    82         </au:expectfailure>
       
    83         <au:assertLogContains text="Set releaseBaseline to true" />
       
    84     </target>
       
    85 
       
    86     <target name="test-rebaseline-task-leavefolders-writable-set-case">
       
    87         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    88             <hlm:rebaseline leaveFoldersWritable="yes"/>
       
    89         </au:expectfailure>
       
    90         <au:assertLogContains text="Set leaveFoldersWritable to true" />
       
    91     </target>
       
    92 
       
    93     <target name="test-rebaseline-task-disable-taskrebadging-set-case">
       
    94         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
    95             <hlm:rebaseline disableTaskRebadging="yes"/>
       
    96         </au:expectfailure>
       
    97         <au:assertLogContains text="Set disableTaskRebadging to true" />
       
    98     </target>
       
    99 
       
   100     <target name="test-rebaseline-task-rebadgeobjectversions-set-case">
       
   101         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
   102             <hlm:rebaseline rebadgeObjectVersions="yes"/>
       
   103         </au:expectfailure>
       
   104         <au:assertLogContains text="Set rebadgeObjectVersions to true" />
       
   105     </target>
       
   106 
       
   107     <target name="test-rebaseline-task-newbaselineName-set-to-quiet-case">
       
   108         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
   109             <hlm:rebaseline newBaselineName="shoephone-RnD_2007wk49_01project:co1train#1"/>
       
   110         </au:expectfailure>
       
   111         <au:assertLogContains text="Set newBaselineName to shoephone-RnD_2007wk49_01project:co1train#1" />
       
   112     </target>
       
   113 
       
   114     <target name="test-rebaseline-task-usebranchrelease-methodology-set-case">
       
   115         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
   116             <hlm:rebaseline useBranchReleaseMethodology="yes"/>
       
   117         </au:expectfailure>
       
   118         <au:assertLogContains text="Set useBranchReleaseMethodology to true" />
       
   119     </target>
       
   120 
       
   121     <target name="test-rebaseline-task-create-baseline-for-rollingreleasetag-set-case">
       
   122         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
   123             <hlm:rebaseline createBaselineForRollingReleaseTag="yes"/>
       
   124         </au:expectfailure>
       
   125         <au:assertLogContains text="Set createBaselineForRollingReleaseTag to true" />
       
   126     </target>
       
   127 
       
   128     <target name="test-rebaseline-task-verbosity-set-to-quiet-case">
       
   129         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
   130             <hlm:rebaseline verbosity="0"/>
       
   131         </au:expectfailure>
       
   132         <au:assertLogContains text="Set verbosity to 0" />
       
   133     </target>
       
   134 
       
   135     <target name="test-rebaseline-task-verbosity-set-to-verbose-case">
       
   136         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database password ccmProject">
       
   137             <hlm:rebaseline verbosity="1"/>
       
   138         </au:expectfailure>
       
   139         <au:assertLogContains text="Set verbosity to 1" />
       
   140     </target>
       
   141 
       
   142     <target name="test-rebaseline-task-database-and-ccmproject-set-case">
       
   143         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - password">
       
   144             <hlm:rebaseline database="to1tobet" ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1"/>
       
   145         </au:expectfailure>
       
   146     </target>
       
   147 
       
   148     <target name="test-rebaseline-task-database-and-password-set-case">
       
   149         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - ccmProject">
       
   150             <hlm:rebaseline database="to1tobet" password="test"/>
       
   151         </au:expectfailure>
       
   152     </target>
       
   153 
       
   154     <target name="test-rebaseline-task-ccmproject-and-password-set-case">
       
   155         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: mandatory attributes are not defined - database">
       
   156             <hlm:rebaseline ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1" password="test"/>
       
   157         </au:expectfailure>
       
   158     </target>
       
   159 
       
   160     <target name="test-rebaseline-task-all-mandatory-arguments-given-but-password-wrong-case">
       
   161         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: Script execution failure.">
       
   162             <hlm:rebaseline database="to1tobet" ccmProject="helium-to1tobet#helium_4.49:project:vc1s60p1#1" password="test"/>
       
   163         </au:expectfailure>
       
   164         <au:assertLogContains text="Set database to to1tobet" />
       
   165         <au:assertLogContains text="Set ccmProject to helium-to1tobet#helium_4.49:project:vc1s60p1#1" />
       
   166         <au:assertLogContains text="Set password to ******"/>
       
   167     </target>
       
   168 
       
   169     <target name="test-rebaseline-task-all-mandatory-arguments-and-optional-arguments-given-but-password-wrong-case">
       
   170         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: Script execution failure.">
       
   171             <hlm:rebaseline database="to1tobet" ccmProject="symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" password="test" verbosity="1"/>
       
   172         </au:expectfailure>
       
   173         <au:assertLogContains text="Set database to to1tobet" />
       
   174         <au:assertLogContains text="Set ccmProject to symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" />
       
   175         <au:assertLogContains text="Set password to ******" />
       
   176         <au:assertLogContains text="Set verbosity to 1" />
       
   177     </target>
       
   178 
       
   179     <target name="test-rebaseline-task-all-mandatory-arguments-and-optional-arguments-given-but-password-wrong-and-verbosity-wrong-case">
       
   180         <au:expectfailure expectedMessage="[hlm:rebaseline] Error: Verbosity level is not recognised. Legal values are: 0 - quiet, 1 - verbose.">
       
   181             <hlm:rebaseline database="to1tobet" ccmProject="symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" password="test" verbosity="9"/>
       
   182         </au:expectfailure>
       
   183         <au:assertLogContains text="Set database to to1tobet" />
       
   184         <au:assertLogContains text="Set ccmProject to symbiantools-to1tobet#symbiantools_08_w34:project:ccm51#1" />
       
   185         <au:assertLogContains text="Set password to ******" />
       
   186         <au:assertLogContains text="Set verbosity to 9" />
       
   187     </target>
       
   188 
       
   189 </project>