1<?xml version="1.0" encoding="UTF-8"?> 2 3<!-- test launcher file for Android Eclipse unit tests --> 4<project name="testsuite" default="run" basedir="."> 5 <!--The following properties should be passed into this script, set to some default value for now --> 6 <property name="eclipse.home" value="/opt/eclipse" /> 7 <property name="eclipse_test" value="${eclipse.home}/plugins/org.eclipse.test_3.2.0" /> 8 9 <!-- eclipse scripts use an annoying mixture of eclipse-home and eclipse.home --> 10 <!-- lets define both...--> 11 <property name="eclipse-home" value="${eclipse.home}" /> 12 <property name="test-folder" value="${eclipse.home}/unittest_ws" /> 13 14 <!-- sets the properties eclipse.home, and library-file --> 15 <property name="plugin-name" value="com.android.ide.eclipse.tests" /> 16 <property name="library-file" value="${eclipse_test}/library.xml" /> 17 18 <!-- This target holds all initialization code that needs to be done for --> 19 <!-- all tests that are to be run. --> 20 <target name="init"> 21 <ant antfile="test.xml" target="init"> 22 <property name="test-folder" value="${test-folder}" /> 23 </ant> 24 </target> 25 26 <!-- This target defines the tests that need to be run. --> 27 <target name="suite"> 28 <!-- need to launch as ui-test since all ADT plugins depend on ui--> 29 <!-- otherwise other plugins will not load --> 30 <ant target="ui-test" antfile="${library-file}" dir="${eclipse.home}"> 31 <property name="data-dir" value="${test-folder}" /> 32 <property name="plugin-name" value="${plugin-name}" /> 33 <property name="classname" value="com.android.ide.eclipse.tests.UnitTests" /> 34 <!-- pass extra vm arg to set test_data env variable --> 35 <property name="extraVMargs" value="-Dtest_data=${test_data}" /> 36 </ant> 37 </target> 38 39 <!-- This target holds code to cleanup the testing environment after --> 40 <!-- after all of the tests have been run. You can use this target to --> 41 <!-- delete temporary files that have been created. --> 42 <target name="cleanup"> 43 </target> 44 45 <!-- This target runs the test suite. Any actions that need to happen --> 46 <!-- after all the tests have been run should go here. --> 47 <target name="run" depends="init,suite,cleanup"> 48 <ant target="collect" antfile="${library-file}" dir="${eclipse.home}/results"> 49 <property name="includes" value="com*.xml" /> 50 <property name="output-file" value="${plugin-name}.xml" /> 51 </ant> 52 </target> 53</project> 54 55