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