2 REM ********************************************************
\r
3 REM This batch file receives the follwing parameters:
\r
4 REM build/rebuild (optional): should the solution file be rebuilded
\r
5 REM or just builded before test run (default is rebuild)
\r
6 REM output files name prefix (mandratory) : prefix for naming output xml files
\r
7 REM test fixture name (optional) : if you want to run some particular test fixture
\r
8 REM directory to run tests (optional)
\r
9 REM path back to root directory (opposite to previous param)
\r
10 REM example run-tests build GhTests Test.Sys.Drawing Test\DrawingTest\Test ..\..\..\
\r
11 REM will cause to build (and not rebuild) test solutions,
\r
12 REM running Test.Sys.Drawing fixture in directory Test\DrawingTest\Test
\r
13 REM with output files named GhTests.Net.xml and GhTests.GH.xml
\r
14 REM ********************************************************
\r
16 IF "%1"=="" GOTO USAGE
\r
18 IF "%VMW_HOME%"=="" GOTO ENVIRONMENT_EXCEPTION
\r
23 set BUILD_OPTION=rebuild
\r
28 REM ********************************************************
\r
30 REM ********************************************************
\r
33 set OUTPUT_FILE_PREFIX=System.Data.OracleClient
\r
34 set RUNNING_FIXTURE=MonoTests.System.Data.OracleClient
\r
35 set TEST_SOLUTION=Test\System.Data.OracleClient.Tests20.J2EE.sln
\r
36 set TEST_ASSEMBLY=System.Data.OracleClient.Tests20.J2EE.jar
\r
37 set PROJECT_CONFIGURATION=Debug_Java20
\r
38 set APP_CONFIG_FILE=Test\System.Data.OracleClient.J2EE.config
\r
41 set DATEL=%date:~10,4%_%date:~4,2%_%date:~7,2%%
\r
42 set TIMEL=%time:~0,2%_%time:~3,2%
\r
43 set TIMESTAMP=%DATEL%_%TIMEL%
\r
46 REM ********************************************************
\r
47 REM @echo Set environment
\r
48 REM ********************************************************
\r
50 set JGAC_PATH=%VMW_HOME%\jgac\vmw4j2ee_110\
\r
51 set JAVA_HOME=%VMW_HOME%\jre5
\r
53 set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar
\r
54 set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar
\r
55 set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.Xml.jar
\r
56 set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.Data.jar
\r
57 set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%J2SE.Helpers.jar
\r
58 set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.Data.OracleClient.jar
\r
60 set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%GHROOT%\jgac\jdbc\ojdbc14.jar
\r
62 set NUNIT_OPTIONS=/exclude=NotWorking
\r
64 set GH_OUTPUT_XML=%TIMESTAMP%.%OUTPUT_FILE_PREFIX%.GH.xml
\r
65 set BUILD_LOG=%TIMESTAMP%.%OUTPUT_FILE_PREFIX%.GH.%RUNNING_FIXTURE%.build.log
\r
66 set RUN_LOG=%TIMESTAMP%.%OUTPUT_FILE_PREFIX%.GH.%RUNNING_FIXTURE%.run.log
\r
68 set NUNIT_PATH=..\..\nunit20\
\r
69 set NUNIT_CLASSPATH=%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit.framework.jar
\r
70 set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit.util.jar
\r
71 set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit.core.jar
\r
72 set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit-console.jar
\r
73 set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;.
\r
74 set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%TEST_ASSEMBLY%
\r
76 set CLASSPATH="%RUNTIME_CLASSPATH%;%NUNIT_CLASSPATH%"
\r
78 REM ********************************************************
\r
79 @echo Building GH solution...
\r
80 REM ********************************************************
\r
82 REM devenv %TEST_SOLUTION% /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1
\r
83 msbuild %TEST_SOLUTION% /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%BUILD_LOG% 2<&1
\r
85 IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
\r
87 REM ********************************************************
\r
88 @echo Building NUnit solution...
\r
89 REM ********************************************************
\r
91 if "%NUNIT_BUILD%" == "DONE" goto NUNITSKIP
\r
93 REM devenv ..\..\nunit20\nunit.java.sln /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1
\r
94 msbuild ..\..\nunit20\nunit20.java.sln /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%BUILD_LOG% 2<&1
\r
99 echo Skipping NUnit Build...
\r
102 set NUNIT_BUILD=DONE
\r
104 IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
\r
106 REM ********************************************************
\r
107 @echo Running GH tests...
\r
108 REM ********************************************************
\r
110 REM ********************************************************
\r
111 @echo Running fixture "%RUNNING_FIXTURE%"
\r
112 REM ********************************************************
\r
114 copy Test\bin\%PROJECT_CONFIGURATION%\%TEST_ASSEMBLY% .
\r
115 copy %APP_CONFIG_FILE% nunit-console.exe.config
\r
118 "%JAVA_HOME%\bin\java" -Xmx1024M -cp %CLASSPATH% NUnit.Console.ConsoleUi %TEST_ASSEMBLY% /fixture=%RUNNING_FIXTURE% %NUNIT_OPTIONS% /xml=%GH_OUTPUT_XML% >>%RUN_LOG% 2<&1
\r
121 REM ********************************************************
\r
122 @echo Build XmlTool
\r
123 REM ********************************************************
\r
124 set XML_TOOL_PATH=..\..\tools\mono-xmltool
\r
125 REM devenv %XML_TOOL_PATH%\XmlTool.sln /%BUILD_OPTION% Debug_Java >>%RUNNING_FIXTURE%_build.log.txt 2<&1
\r
126 msbuild %XML_TOOL_PATH%\XmlTool20.vmwcsproj /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%BUILD_LOG% 2<&1
\r
128 IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
\r
130 copy %XML_TOOL_PATH%\bin\%PROJECT_CONFIGURATION%\xmltool.exe .
\r
131 copy %XML_TOOL_PATH%\nunit_transform.xslt .
\r
133 REM ********************************************************
\r
134 @echo Analyze and print results
\r
135 REM ********************************************************
\r
137 xmltool.exe --transform nunit_transform.xslt %GH_OUTPUT_XML%
\r
143 :ENVIRONMENT_EXCEPTION
\r
144 @echo This test requires environment variable VMW_HOME to be defined
\r
148 @echo Error in building solutions. See %BUILD_LOG% for details...
\r
153 @echo Error in running fixture %RUNNING_FIXTURE%. See %RUN_LOG% for details...
\r
158 @echo Parameters: "[build|rebuild]"
\r
163 copy %BUILD_LOG% ..\
\r
164 copy %GH_OUTPUT_XML% ..\
\r