pberkland | 1f2b71b | 2007-12-11 15:55:24 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | |
| 3 | <project |
| 4 | name="testsuite" |
| 5 | default="run" |
| 6 | basedir="."> |
| 7 | |
| 8 | <!-- The following properties should be passed into this script --> |
| 9 | <!-- ${eclipse-home} --> |
| 10 | <!-- ${buildDirectory} --> |
| 11 | <!-- ${buildLabel} --> |
| 12 | |
| 13 | <!-- should be little need to change what's above --> |
| 14 | <property |
| 15 | name="plugin-name" |
| 16 | value="org.eclipse.wst.jsdt.core.tests.compiler" /> |
| 17 | <property |
| 18 | name="classname" |
david_williams | d30ddf3 | 2007-12-12 12:47:39 +0000 | [diff] [blame] | 19 | value="org.eclipse.wst.jsdt.core.tests.compiler.JSDTTestAll" /> |
pberkland | 1f2b71b | 2007-12-11 15:55:24 +0000 | [diff] [blame] | 20 | <property |
| 21 | name="testType" |
| 22 | value="core-test" /> |
| 23 | |
| 24 | <!-- should be little need to change what's below --> |
| 25 | |
| 26 | <echo message="basedir: ${basedir}" /> |
| 27 | <echo message="eclipse-home: ${eclipse-home}" /> |
| 28 | <echo message="buildDirectory: ${buildDirectory}" /> |
| 29 | <echo message="plugin-name: ${plugin-name}" /> |
| 30 | <echo message="classname: ${classname}" /> |
| 31 | <echo message="testType ${testType}" /> |
| 32 | |
| 33 | |
| 34 | <property |
| 35 | name="library-file" |
| 36 | value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" /> |
| 37 | <property |
| 38 | name="workspace" |
| 39 | value="${eclipse-home}/junitworkspaces/${plugin-name}" /> |
| 40 | |
| 41 | <!-- This target holds all initialization code that needs to be done for --> |
| 42 | <!-- all tests that are to be run. Initialization for individual tests --> |
| 43 | <!-- should be done within the body of the suite target. --> |
| 44 | <target name="init"> |
| 45 | <tstamp /> |
| 46 | <delete> |
| 47 | <fileset |
| 48 | dir="${eclipse-home}" |
| 49 | includes="${plugin-name}.*xml" /> |
| 50 | </delete> |
| 51 | <!-- make directory, in case path doesn't exist yet --> |
| 52 | <mkdir dir="${workspace}" /> |
| 53 | <!-- but delete to make sure fresh contents--> |
| 54 | <delete |
| 55 | dir="${workspace}" |
| 56 | quiet="true" /> |
| 57 | |
| 58 | </target> |
| 59 | |
| 60 | <!-- This target defines the tests that need to be run. --> |
| 61 | <target name="suite"> |
| 62 | |
| 63 | <ant |
| 64 | target="${testType}" |
| 65 | antfile="${library-file}" |
| 66 | dir="${eclipse-home}"> |
| 67 | <property |
| 68 | name="data-dir" |
| 69 | value="${workspace}" /> |
| 70 | <property |
| 71 | name="plugin-name" |
| 72 | value="${plugin-name}" /> |
| 73 | <property |
| 74 | name="classname" |
| 75 | value="${classname}" /> |
| 76 | <property |
| 77 | name="plugin-path" |
| 78 | value="${eclipse-home}/plugins/${plugin-name}" /> |
| 79 | </ant> |
| 80 | |
| 81 | <copy |
| 82 | failonerror="false" |
| 83 | file="${workspace}/.metadata/.log" |
| 84 | tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" /> |
| 85 | |
| 86 | </target> |
| 87 | |
| 88 | <!-- This target holds code to cleanup the testing environment after --> |
| 89 | <!-- after all of the tests have been run. You can use this target to --> |
| 90 | <!-- delete temporary files that have been created. --> |
| 91 | <target name="cleanup"> |
| 92 | <!-- usually no need to delete workspace until next run, and leaving it allows inspection --> |
| 93 | <!-- <delete dir="${workspace}" quiet="true" /> --> |
| 94 | </target> |
| 95 | |
| 96 | <!-- This target runs the test suite. Any actions that need to happen --> |
| 97 | <!-- after all the tests have been run should go here. --> |
| 98 | <target |
| 99 | name="run" |
| 100 | depends="init,suite,cleanup"> |
| 101 | <ant |
| 102 | target="collect" |
| 103 | antfile="${library-file}" |
| 104 | dir="${eclipse-home}"> |
| 105 | <property |
| 106 | name="includes" |
| 107 | value="${plugin-name}.*xml" /> |
| 108 | <property |
| 109 | name="output-file" |
| 110 | value="${plugin-name}.xml" /> |
| 111 | </ant> |
| 112 | </target> |
| 113 | |
| 114 | </project> |