| @echo off |
| |
| REM default java executable for outer and test vm |
| set vmcmd=java |
| |
| REM reset list of ant targets in test.xml to execute |
| set tests= |
| |
| REM default switch to determine if eclipse should be reinstalled between running of tests |
| set installmode=clean |
| |
| |
| REM default values for os, ws and arch |
| set os=win32 |
| set ws=win32 |
| set arch=x86 |
| |
| REM reset ant command line args |
| set ANT_CMD_LINE_ARGS= |
| |
| REM **************************************************************** |
| REM |
| REM Install Eclipse if it does not exist |
| REM |
| REM **************************************************************** |
| if NOT EXIST eclipseAnt unzip -qq -o %LOCAL_PREREQS_CACHE%/eclipse-SDK-*%ECLIPSE_ID%*.zip -d eclipseAnt && unzip -qq -o -C eclipse-junit-tests*.zip plugins/org.eclipse.test* -d eclipseAnt/eclipse/dropins/ |
| |
| |
| :processcmdlineargs |
| |
| REM **************************************************************** |
| REM |
| REM Process command line arguments |
| REM |
| REM **************************************************************** |
| |
| if x%1==x goto run |
| if x%1==x-ws set ws=%2 && shift && shift && goto processcmdlineargs |
| if x%1==x-os set os =%2 && shift && shift && goto processcmdlineargs |
| if x%1==x-arch set arch=%2 && shift && shift && goto processcmdlineargs |
| if x%1==x-noclean set installmode=noclean&& shift && goto processcmdlineargs |
| if x%1==x-vm set vmcmd="%2" && shift && shift && goto processcmdlineargs |
| |
| set tests=%tests% %1 && shift && goto processcmdlineargs |
| |
| |
| :run |
| REM *************************************************************************** |
| REM Run tests by running Ant in Eclipse on the eclipsePerfTests.xml script |
| REM *************************************************************************** |
| REM get name of org.eclipse.equinox.launcher_*.jar with version label |
| dir /b eclipseAnt\eclipse\plugins\org.eclipse.equinox.launcher_*.jar>launcher-jar-name.txt |
| set /p launcher-jar=<launcher-jar-name.txt |
| |
| %vmcmd% -Dosgi.os=%os% -Dosgi.ws=%ws% -Dosgi.arch=%arch% -jar eclipseAnt\eclipse\plugins\%launcher-jar% -data workspace -application org.eclipse.ant.core.antRunner -file eclipsePerfTests.xml %tests% -Dws=%ws% -Dos=%os% -Darch=%arch% -D%installmode%=true -logger org.apache.tools.ant.DefaultLogger |
| |
| goto end |
| |
| :end |