mobility.project/test/build-qa-functional.xml
author Jesse Glick <jglick@netbeans.org>
Sat Jan 26 20:24:50 2008 -0500 (5 months ago)
changeset 64892 7faabd8f6ca6
parent 58113b9104fa10e33
permissions -rw-r--r--
Another script whose paths mysteriously failed to get translated.
        1 <?xml version="1.0"?>
        2 <!--
        3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
        4 
        5 Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
        6 
        7 
        8 The contents of this file are subject to the terms of either the GNU
        9 General Public License Version 2 only ("GPL") or the Common
       10 Development and Distribution License("CDDL") (collectively, the
       11 "License"). You may not use this file except in compliance with the
       12 License. You can obtain a copy of the License at
       13 http://www.netbeans.org/cddl-gplv2.html
       14 or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
       15 specific language governing permissions and limitations under the
       16 License.  When distributing the software, include this License Header
       17 Notice in each file and include the License file at
       18 nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
       19 particular file as subject to the "Classpath" exception as provided
       20 by Sun in the GPL Version 2 section of the License file that
       21 accompanied this code. If applicable, add the following below the
       22 License Header, with the fields enclosed by brackets [] replaced by
       23 your own identifying information:
       24 "Portions Copyrighted [year] [name of copyright owner]"
       25 
       26 Contributor(s):
       27 
       28  The Original Software is NetBeans. The Initial Developer of the Original
       29  Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
       30  Microsystems, Inc. All Rights Reserved.
       31 
       32 If you wish your version of this file to be governed by only the CDDL
       33 or only the GPL Version 2, indicate your decision by adding
       34 "[Contributor] elects to include this software in this distribution
       35 under the [CDDL or GPL Version 2] license." If you do not indicate a
       36 single choice of license, a recipient has the option to distribute
       37 your version of this file under either the CDDL, the GPL Version 2 or
       38 to extend the choice of license to its licensees as provided above.
       39 However, if you add GPL Version 2 code and therefore, elected the GPL
       40 Version 2 license, then the option applies only if the new code is
       41 made subject to such option by the copyright holder.
       42 -->
       43 
       44 <project name="Mobility Pack functional tests" basedir="." default="all">
       45 
       46     <!-- Root folders -->
       47     <property name="nball.dir" location="../.."/>
       48     <property name="nbextra.dir" location="../../../nbextra"/>
       49 
       50     <!-- Import defaults for QA-functional tests -->
       51     <import file="${nball.dir}/nbbuild/templates/xtest-qa-functional.xml"/>
       52     
       53     <!-- Custom properties -->
       54     <property name="xtest.tmpdir.createproject" location="${xtest.tmpdir}/createdProjects"/>
       55     
       56     <!-- ================ -->
       57     <!-- Global Executors -->
       58     <!-- ================ -->
       59     
       60     <!-- This target is executed from test-executor in newly created Project -->
       61     <!-- Name of this task is defined in cfg-xxx.xml -->
       62     <!-- This target executes tests inside IDE -->
       63     <target name="runidesetup" depends="init-cp, copy_unzip_mp_projects, prepare-wtk">
       64 
       65         <executeTests pluginName="ide">
       66             <classpath>
       67                 <path refid="jemmy.and.jelly.path"/>
       68                 <path location="${test.qa-functional.run.cp.extra}"/>
       69             </classpath>
       70             
       71             <property name="xtest.timeout" value="2400000" />
       72             
       73             <!-- Opens project at specified location -->
       74             <property name="xtest.ide.open.project" location="${xtest.tmpdir}/MobileApplicationVisualMIDlet"/>
       75         </executeTests>
       76 
       77         <!-- save copy of current Userdir -->
       78         <copy todir="${xtest.workdir}/sys/ide_backup">
       79             <fileset dir="${xtest.workdir}/sys/ide"/>
       80         </copy>
       81         
       82         <antcall target="delete-wtk"/>
       83     </target>
       84 
       85     
       86     <target name="runidetest" depends="init-cp, prepare-wtk">
       87         <mkdir dir="${xtest.tmpdir.createproject}"/>
       88  
       89         <executeTests pluginName="ide">
       90             <classpath>
       91                 <path refid="jemmy.and.jelly.path"/>
       92                 <path location="${test.qa-functional.run.cp.extra}"/>
       93             </classpath>
       94         </executeTests>
       95         
       96         <delete dir="${xtest.tmpdir.createproject}"/>
       97         <antcall target="delete-wtk"/>
       98     </target>
       99     
      100     
      101     <target name="runidetest_scan" depends="init-cp, prepare-wtk, copy_unzip_mp_projects">
      102 
      103        
      104         <executeTests pluginName="ide">
      105             <classpath>
      106                 <path refid="jemmy.and.jelly.path"/>
      107                 <path location="${test.qa-functional.run.cp.extra}"/>
      108             </classpath>
      109             
      110             <property name="xtest.ide.commandline.suffix" value="-J-Dperf.refactoring.test=true"/>
      111 
      112             <property name="xtest.enable.assertions" value="false" />
      113             <property name="xtest.timeout" value="1200000" />
      114         </executeTests>
      115         
      116         <antcall target="delete-wtk"/>
      117     </target>
      118     
      119     
      120        
      121    
      122     
      123     <!-- ========= -->
      124     <!-- Utils     -->
      125     <!-- ========= -->
      126     
      127     <!-- Copy and unzip project MobilityProject from close source path, will be used for Performance tests -->
      128     <target name="copy_unzip_mp_projects">
      129         <unzip src="${nbextra.dir}/qa/projectized/MobileApplicationSwitchConfiguration.zip" dest="${xtest.tmpdir}/"/>
      130         <unzip src="${nbextra.dir}/qa/projectized/MobileApplicationVisualMIDlet.zip" dest="${xtest.tmpdir}/"/>
      131     </target>
      132     
      133     <!-- ============= -->
      134     <!-- Work with WTK -->
      135     <!-- ============= -->
      136 
      137     <target name="set-wtk-path" unless="wtk.zipfile.name">
      138         <condition property="wtk.zipfile.name" value="wtk22_win.zip">
      139             <os family="windows"/>
      140         </condition>
      141         <condition property="wtk.zipfile.name" value="wtk22_linux.zip">
      142             <os family="unix" name="linux"/>
      143         </condition>
      144     </target>
      145     
      146     <target name="prepare-wtk" depends="set-wtk-path">
      147         <fail unless="wtk.zipfile.name" message="Not supported platform."/>
      148         <property name="wtk.dir" location="${nbextra.dir}/qa/performance/mobility"/>
      149         <property name="emulators.mobility" value="${netbeans.dest.dir}/mobility8/emulators-inst"/>
      150         <available file="${emulators.mobility}" type="dir" property="emulators.mobility.exist"/>
      151         <mkdir dir="${emulators.mobility}"/>
      152         <copy file="${wtk.dir}/${wtk.zipfile.name}" todir="${emulators.mobility}"/>
      153     </target>
      154     
      155     <target name="delete-wtk" unless="emulators.mobility.exist">
      156         <!-- Delete mobility8/emulators-inst only if it doesn't exist before tests. -->
      157         <delete dir="${emulators.mobility}" failonerror="true"/>
      158     </target>
      159 </project>