1402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll@echo off 2402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 3402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM default java executable 4402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset vm=java 5402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 6402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM reset list of ant targets in test.xml to execute 7402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset tests= 8402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 9402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM default switch to determine if eclipse should be reinstalled between running of tests 10402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset installmode=clean 11402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 12402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM property file to pass to Ant scripts 13402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset properties= 14402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 15402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM default values for os, ws and arch 16402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset os=win32 17402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset ws=win32 18402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset arch=x86 19402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 20402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM reset ant command line args 21402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset ANT_CMD_LINE_ARGS= 22402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 23402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 24402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 25402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM Delete previous Eclipse installation and workspace 26402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM (This is the Eclipse that controls the test. The test will start another Eclipse. 27402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 28402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 29402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif EXIST eclipse rmdir /S /Q eclipse 30402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif EXIST workspace rmdir /s /Q workspace 31402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 32402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 33402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 34402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM Install Eclipse and org.eclipse.test plugin 35402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 36402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 37402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 38402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollunzip -qq -o eclipse-SDK*.zip 39402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollunzip -qq -o -C VE-junit-tests*.zip */plugins/org.eclipse.test* 40402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 41402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 42402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll:processcmdlineargs 43402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 44402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 45402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 46402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM Process command line arguments 47402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 48402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 49402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 50402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x goto setup 51402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x-ws set ws=%2 && shift && shift && goto processcmdlineargs 52402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x-os set os =%2 && shift && shift && goto processcmdlineargs 53402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x-arch set arch=%2 && shift && shift && goto processcmdlineargs 54402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x-noclean set installmode=noclean && shift && goto processcmdlineargs 55402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x-properties set properties=-propertyfile %2 && shift && shift && goto processcmdlineargs 56402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif x%1==x-vm set vm=%2 && shift && shift && goto processcmdlineargs 57402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 58402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset tests=%tests% %1 && shift && goto processcmdlineargs 59402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 60402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 61402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll:setup 62402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 63402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 64402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM Setup up the test (target) GEF SDK 65402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 66402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM ** if -noclean set, Eclipse will be re-installed only if the 67402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM directory target\eclipse does not exist. If this directory 68402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM exists in a partially installed state, it should be deleted manually 69402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM and the script rerun with the same parameter settings. ** 70402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM 71402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM **************************************************************** 72402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 73402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM command for executing antRunner headless 74402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollset antRunner=%vm% -cp eclipse\startup.jar -Dosgi.ws=%ws% -Dosgi.os=%os% -Dosgi.arch=%arch% org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner 75402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 76402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif %installmode%==noclean %antRunner% -file test.xml setup -Dws=%ws% -Dos=%os% -Darch=%arch% "-D%installmode%=true" -logger org.apache.tools.ant.DefaultLogger 77402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollgoto run 78402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 79402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 80402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll:run 81402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM *************************************************************************** 82402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM Run tests by running Ant in Eclipse on the test.xml script 83402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollREM *************************************************************************** 84402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 85402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll%antRunner% -file test.xml %tests% -Dws=%ws% -Dos=%os% -Darch=%arch% %properties% "-D%installmode%=true" -logger org.apache.tools.ant.DefaultLogger 86402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollgoto end 87402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll 88402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll:end