Procházet zdrojové kódy

Added automated testing support for TARGET_JVM.

svn path=/trunk/mcs/; revision=57865
Boris Kirzner před 20 roky
rodič
revize
09c093f910

+ 4 - 0
mcs/class/System.Data/ChangeLog

@@ -1,3 +1,7 @@
+2006-03-12	Boris Kirzner <[email protected]>
+	* run-tests.bat, run-tests.test.connected.bat, run-tests.test.disconnected.bat
+	added batch files for automated testing for TARGET_JVM.
+
 2006-02-19  Konstantin Triger <[email protected]>
 
 	* TARGET_JVM: added JDBC provider generic adapter mechanism.

+ 4 - 0
mcs/class/System.Data/Test/ChangeLog

@@ -1,3 +1,7 @@
+2006-03-12	Boris Kirzner <[email protected]>
+	* System.Data.Test.sln, System.Data.Test.vmwcsproj: 
+	changes for automated testing for TARGET_JVM.
+
 2006-01-31  Senganal  <[email protected]>
 	
 	* DataSetTest.cs : Added testcase for #77411.

+ 6 - 0
mcs/class/System.Data/Test/ProviderTests/ChangeLog

@@ -1,3 +1,9 @@
+2006-03-12	Boris Kirzner <[email protected]>
+	* System.Data.OleDb.J2EE.sln, System.Data.OleDb.Tests.J2EE.vmwcsproj:
+	changes for automated testing for TARGET_JVM.
+	* System.Data.OleDb.J2EE.config: added app config file 
+	for automated testing for TARGET_JVM.
+
 2006-01-17  Senganal T  <[email protected]>
 
 	* sqlserver.config : Modified the default login and password to 'monotester'

+ 13 - 0
mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.config

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+	<appSettings>
+		<add key="ConnectionString" value="Provider=SQLOLEDB.1;Data Source=xp050;Initial Catalog=GHTDB;User Id=sa;Password=" />
+		<!--
+		<add key="ConnectionString" value="Provider=SQLOLEDB.1;Data Source=xp050;Initial Catalog=GHTDB;User Id=sa;Password=" />
+		<add key="ConnectionString" value="Provider=MSDAORA.1;hostname=xp050;port=1521;User ID=ghtdb;Password=ghtdb;ServiceName=xp050;Data Source=xp050" />
+		<add key="ConnectionString" value="Provider=IBMDADB2;Password=db2admin;User ID=db2admin;Data Source=GHTDB;HostName=xp050;Port=50000;Location=xp050:50000" />
+		<add key="ConnectionString" value="Provider=Sybase ASE OLE DB Provider;hostname=KONGO;port=5000;User ID=sa;Password=;ServiceName=KONGO;Data Source=sybaseoledb;JdbcDriverClassName=com.sybase.jdbc2.jdbc.SybDriver;JdbcURL=jdbc:sybase:Tds:KONGO:5000/GHTDB;user=sa;DatabaseName=GHTDB" />
+		<add key="ConnectionString" value="Provider=Mainsoft.JDBC.OLEDB.1;Persist Security Info=False;User ID=super;Data Source=PostgreSQL_XP050;Extended Properties="DSN=PostgreSQL_XP050;DATABASE=GHTDB;SERVER=xp050;PORT=5432;UID=super;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=8192;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=0;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=0;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0";Initial Catalog=GHTDB;JdbcDriverClassName=org.postgresql.Driver;JdbcURL=jdbc:postgresql://xp050/GHTDB;User=super;Password=super" />
+		-->
+	</appSettings>
+</configuration>

+ 1 - 0
mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.sln

@@ -28,6 +28,7 @@ Global
 		{D5887372-DC7D-47E1-8CAA-B348643412ED}.Release_Java.Build.0 = Release_Java|.NET
 		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug|.NET
 		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.Build.0 = Debug_Java|.NET
 		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug-Strong.ActiveCfg = Debug|.NET
 		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug-Strong.Build.0 = Debug|.NET
 		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release.ActiveCfg = Release_Java|.NET

+ 2 - 2
mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests.J2EE.vmwcsproj

@@ -136,6 +136,6 @@
 				<File RelPath="System.Data.OleDb.jvm\OleDbType\OleDbType_Date.cs" SubType="Code" BuildAction="Compile"/>
 			</Include>
 		</Files>
-		<UserProperties REFS.JarPath.system="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.jar" REFS.JarPath.system.data="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Data.jar" REFS.JarPath.system.xml="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Xml.jar" REFS.JarPath.rt="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jre5\lib\rt.jar" project.JDKType="1.5.0_05"/>
+		<UserProperties jarserver="ipa" project.JDKType="1.5.0_05" REFS.JarPath.rt="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jre5\lib\rt.jar" REFS.JarPath.system.xml="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Xml.jar" REFS.JarPath.system.data="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Data.jar" REFS.JarPath.system="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.jar"/>
 	</CSHARP>
-	<VisualMainWin><Project Prop2023="1.5.0_05" Prop2024="" Prop2026="" Prop2015="" Version="1.7.0" ProjectType="1"/><References/><Configs><Config Prop2000="1" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="1" Prop2006="C:\cygwin1\monobuild1\mcs\nunit20\nunit-console\bin\Debug_Java\nunit-console.exe" Prop2007="" Prop2008="" Prop2009="/wait C:\cygwin1\monobuild1\mcs\class\System.Data\Test\ProviderTests\bin\Debug\System.Data.OleDb.Tests.dll" Prop2010="C:\cygwin1\monobuild1\mcs\class\System.Data\Test\ProviderTests\bin\Debug" Prop2011="-1" Prop2012="-1" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="-1" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Release_Java"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="-1" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug_Java"/></Configs></VisualMainWin></VisualStudioProject>
+	<VisualMainWin><Project Prop2023="1.5.0_05" Prop2024="" Prop2026="" Prop2015="" Version="1.7.0" ProjectType="1"/><References/><Configs><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="-1" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug_Java"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="-1" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Release_Java"/><Config Prop2000="1" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="1" Prop2006="C:\cygwin1\monobuild1\mcs\nunit20\nunit-console\bin\Debug_Java\nunit-console.exe" Prop2007="" Prop2008="" Prop2009="/wait C:\cygwin1\monobuild1\mcs\class\System.Data\Test\ProviderTests\bin\Debug\System.Data.OleDb.Tests.dll" Prop2010="C:\cygwin1\monobuild1\mcs\class\System.Data\Test\ProviderTests\bin\Debug" Prop2011="-1" Prop2012="-1" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug"/></Configs></VisualMainWin></VisualStudioProject>

+ 13 - 0
mcs/class/System.Data/Test/System.Data.Test.sln

@@ -3,16 +3,29 @@ Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Data.Test", "System.
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
+Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll.J2EE.vmwcsproj", "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
 		Debug_Java = Debug_Java
 		Release_Java = Release_Java
 	EndGlobalSection
 	GlobalSection(ProjectConfiguration) = postSolution
+		{B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug.ActiveCfg = Debug_Java|.NET
+		{B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug.Build.0 = Debug_Java|.NET
 		{B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug_Java.ActiveCfg = Debug_Java|.NET
 		{B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug_Java.Build.0 = Debug_Java|.NET
 		{B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Release_Java.ActiveCfg = Release_Java|.NET
 		{B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Release_Java.Build.0 = Release_Java|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.Build.0 = Debug|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.Build.0 = Debug_Java|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.ActiveCfg = Release_Java|.NET
+		{39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.Build.0 = Release_Java|.NET
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	EndGlobalSection

+ 1 - 1
mcs/class/System.Data/Test/System.Data.Test.vmwcsproj

@@ -10,7 +10,7 @@
 				<Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"/>
 				<Reference Name="System.Xml" AssemblyName="System.Xml" HintPath="..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Xml.dll"/>
 				<Reference Name="rt" AssemblyName="rt" HintPath="..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\jre5\rt.dll" Private="False"/>
-				<Reference Name="nunit.framework" AssemblyName="nunit.framework" HintPath="..\..\..\..\..\..\Program Files\NUnit 2.2\bin\nunit.framework.dll" AssemblyFolderKey="hklm\dn\nunit.framework"/>
+				<Reference Name="nunit.framework.dll.J2EE" Project="{39CC8FF7-EF1A-41A1-B727-42684211ECD1}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>
 			</References>
 		</Build>
 		<Files>

+ 21 - 0
mcs/class/System.Data/run-tests.bat

@@ -0,0 +1,21 @@
+@echo off
+REM ********************************************************
+REM This batch call all the test batches with default parameters
+REM ********************************************************
+REM ********************************************************
+REM This batch file receives the follwing parameters:
+REM build/rebuild (optional): should the solution file be rebuilded 
+REM                             or just builded before test run (default is rebuild)
+REM ********************************************************
+
+IF "%1"=="" (
+	set BUILD_OPTION=rebuild
+) ELSE (
+	set BUILD_OPTION=%1
+)
+	
+
+call run-tests.test.disconnected.bat %BUILD_OPTION%
+
+call run-tests.test.connected.bat %BUILD_OPTION%
+

+ 150 - 0
mcs/class/System.Data/run-tests.test.connected.bat

@@ -0,0 +1,150 @@
+@echo off
+REM ********************************************************
+REM This batch file receives the follwing parameters:
+REM build/rebuild (optional): should the solution file be rebuilded 
+REM                             or just builded before test run (default is rebuild)
+REM output files name prefix (mandratory) : prefix for naming output xml files
+REM test fixture name (optional) : if you want to run some particular test fixture
+REM directory to run tests (optional)
+REM path back to root directory (opposite to previous param)
+REM example run-tests build GhTests Test.Sys.Drawing Test\DrawingTest\Test ..\..\..\
+REM will cause to build (and not rebuild) test solutions,
+REM running Test.Sys.Drawing fixture in directory Test\DrawingTest\Test
+REM with output files named GhTests.Net.xml and GhTests.GH.xml
+REM ********************************************************
+
+IF "%1"=="" GOTO USAGE
+
+IF "%JAVA_HOME%"=="" GOTO ENVIRONMENT_EXCEPTION
+
+IF "%GH_HOME%"=="" GOTO ENVIRONMENT_EXCEPTION
+
+
+IF "%1"=="" (
+	set BUILD_OPTION=rebuild
+) ELSE (
+	set BUILD_OPTION=%1
+)
+
+REM ********************************************************
+REM Set parameters
+REM ********************************************************
+
+set BUILD_OPTION=%1
+set OUTPUT_FILE_PREFIX=MonoTests.System.Data
+set RUNNING_FIXTURE=MonoTests.System.Data
+
+set TEST_SOLUTION=Test\ProviderTests\System.Data.OleDb.J2EE.sln
+set TEST_ASSEMBLY=System.Data.OleDb.Tests.jar
+set PROJECT_CONFIGURATION=Debug_Java
+set APP_CONFIG_FILE=Test\ProviderTests\System.Data.OleDb.J2EE.config
+
+set RUN_ID=connected
+set OUTPUT_FILE_PREFIX=%OUTPUT_FILE_PREFIX%.%RUN_ID%
+
+REM ********************************************************
+REM @echo Set environment
+REM ********************************************************
+
+set JGAC_PATH=%GH_HOME%\jgac\vmw4j2ee_110\
+
+set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.jar
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.Xml.jar
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%System.Data.jar
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%JGAC_PATH%J2SE.Helpers.jar
+
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%GH_HOME%\jgac\jdbc\msbase.jar
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%GH_HOME%\jgac\jdbc\mssqlserver.jar
+set RUNTIME_CLASSPATH=%RUNTIME_CLASSPATH%;%GH_HOME%\jgac\jdbc\msutil.jar
+
+set NUNIT_OPTIONS=/exclude=NotWorking
+
+set NET_OUTPUT_XML=%OUTPUT_FILE_PREFIX%.Net.xml
+set GH_OUTPUT_XML=%OUTPUT_FILE_PREFIX%.GH.xml
+
+set NUNIT_PATH=..\..\nunit20\
+set NUNIT_CLASSPATH=%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit.framework.jar
+set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit.util.jar
+set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit.core.jar
+set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit-console.jar
+set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;.
+set NUNIT_CLASSPATH=%NUNIT_CLASSPATH%;C:\cygwin\monobuild\mcs\class\System.Data\System.Data.OleDb.Tests.jar
+
+set CLASSPATH="%RUNTIME_CLASSPATH%;%NUNIT_CLASSPATH%"
+
+REM ********************************************************
+@echo Building GH solution...
+REM ********************************************************
+
+devenv %TEST_SOLUTION% /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.%RUN_ID%.log.txt 2<&1
+
+IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
+
+REM ********************************************************
+@echo Building NUnit solution...
+REM ********************************************************
+
+devenv ..\..\nunit20\nunit.java.sln /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.%RUN_ID%.log.txt 2<&1
+
+IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
+
+REM ********************************************************
+@echo Running GH tests...
+REM ********************************************************
+
+REM ********************************************************
+@echo Running fixture "%RUNNING_FIXTURE%"
+REM ********************************************************
+
+copy Test\ProviderTests\bin\%PROJECT_CONFIGURATION%\%TEST_ASSEMBLY% .
+copy %APP_CONFIG_FILE% nunit-console.exe.config
+
+
+REM @echo on
+"%JAVA_HOME%\bin\java" -Xmx1024M -cp %CLASSPATH% NUnit.Console.ConsoleUi C:\cygwin\monobuild\mcs\class\System.Data\%TEST_ASSEMBLY% /fixture=%RUNNING_FIXTURE%  %NUNIT_OPTIONS% /xml=%GH_OUTPUT_XML% >>%RUNNING_FIXTURE%_run.%RUN_ID%.log.txt 2<&1
+REM @echo off
+
+REM ********************************************************
+@echo Build XmlTool
+REM ********************************************************
+set XML_TOOL_PATH=..\..\tools\mono-xmltool
+devenv %XML_TOOL_PATH%\XmlTool.sln /%BUILD_OPTION% Debug_Java >>%RUNNING_FIXTURE%_build.%RUN_ID%.log.txt 2<&1
+
+IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
+
+copy %XML_TOOL_PATH%\bin\%PROJECT_CONFIGURATION%\xmltool.exe .
+copy %XML_TOOL_PATH%\nunit_transform.xslt .
+
+REM ********************************************************
+@echo Analyze and print results
+REM ********************************************************
+@echo on
+xmltool.exe --transform nunit_transform.xslt %GH_OUTPUT_XML%
+@echo off
+
+@echo
+
+:FINALLY
+GOTO END
+
+:ENVIRONMENT_EXCEPTION
+@echo This test requires environment variables JAVA_HOME and GH_HOME to be defined
+GOTO END
+
+:BUILD_EXCEPTION
+@echo Error in building solutions. See %RUNNING_FIXTURE%_build.log.txt for details...
+REM EXIT 1
+GOTO END
+
+:RUN_EXCEPTION
+@echo Error in running fixture %RUNNING_FIXTURE%. See %RUNNING_FIXTURE%_run.%RUN_ID%.log.txt for details...
+REM EXIT 1
+GOTO END
+
+:USAGE
+@echo Parameters: "[build|rebuild]"
+GOTO END
+
+:END
+REM EXIT 0

+ 128 - 0
mcs/class/System.Data/run-tests.test.disconnected.bat

@@ -0,0 +1,128 @@
+@echo off
+REM ********************************************************
+REM This batch file receives the follwing parameters:
+REM build/rebuild (optional): should the solution file be rebuilded 
+REM                             or just builded before test run (default is rebuild)
+REM output files name prefix (mandratory) : prefix for naming output xml files
+REM test fixture name (optional) : if you want to run some particular test fixture
+REM directory to run tests (optional)
+REM path back to root directory (opposite to previous param)
+REM example run-tests build GhTests Test.Sys.Drawing Test\DrawingTest\Test ..\..\..\
+REM will cause to build (and not rebuild) test solutions,
+REM running Test.Sys.Drawing fixture in directory Test\DrawingTest\Test
+REM with output files named GhTests.Net.xml and GhTests.GH.xml
+REM ********************************************************
+
+IF "%1"=="" GOTO USAGE
+
+IF "%JAVA_HOME%"=="" GOTO ENVIRONMENT_EXCEPTION
+
+IF "%GH_HOME%"=="" GOTO ENVIRONMENT_EXCEPTION
+
+
+IF "%1"=="" (
+	set BUILD_OPTION=rebuild
+) ELSE (
+	set BUILD_OPTION=%1
+)
+
+REM ********************************************************
+REM Set parameters
+REM ********************************************************
+
+set BUILD_OPTION=%1
+set OUTPUT_FILE_PREFIX=MonoTests.System.Data
+set RUNNING_FIXTURE=MonoTests.System.Data
+set TEST_SOLUTION=Test\System.Data.Test.sln
+set TEST_ASSEMBLY=System.Data.Test.jar
+set PROJECT_CONFIGURATION=Debug_Java
+
+set OUTPUT_FILE_PREFIX=%OUTPUT_FILE_PREFIX%.disconnected
+
+REM ********************************************************
+REM @echo Set environment
+REM ********************************************************
+
+set JGAC_PATH=%GH_HOME%\jgac\vmw4j2ee_110\
+
+set RUNTIME_CLASSPATH=%JGAC_PATH%mscorlib.jar;%JGAC_PATH%System.jar;%JGAC_PATH%System.Xml.jar;%JGAC_PATH%System.Data.jar;%JGAC_PATH%J2SE.Helpers.jar
+set NUNIT_OPTIONS=/exclude=NotWorking
+
+set GH_OUTPUT_XML=%OUTPUT_FILE_PREFIX%.GH.xml
+
+set NUNIT_PATH=..\..\nunit20\
+set NUNIT_CLASSPATH=%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit.framework.jar;%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit.util.jar;%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit.core.jar;%NUNIT_PATH%nunit-console\bin\Debug_Java\nunit-console.jar
+
+set CLASSPATH="%RUNTIME_CLASSPATH%;%NUNIT_CLASSPATH%"
+
+REM ********************************************************
+@echo Building GH solution...
+REM ********************************************************
+
+devenv %TEST_SOLUTION% /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1
+
+IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
+
+REM ********************************************************
+@echo Building NUnit solution...
+REM ********************************************************
+
+devenv ..\..\nunit20\nunit.java.sln /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1
+
+IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
+
+REM ********************************************************
+@echo Running GH tests...
+REM ********************************************************
+
+REM ********************************************************
+@echo Running fixture "%RUNNING_FIXTURE%"
+REM ********************************************************
+
+copy %BACK_TO_ROOT_DIR%Test\bin\%PROJECT_CONFIGURATION%\%TEST_ASSEMBLY% .
+
+REM @echo on
+"%JAVA_HOME%\bin\java" -Xmx1024M -cp %CLASSPATH% NUnit.Console.ConsoleUi %TEST_ASSEMBLY% /fixture=%RUNNING_FIXTURE%  %NUNIT_OPTIONS% /xml=%GH_OUTPUT_XML% >>%RUNNING_FIXTURE%_run.log.txt 2<&1
+REM @echo off
+
+REM ********************************************************
+@echo Build XmlTool
+REM ********************************************************
+set XML_TOOL_PATH=..\..\tools\mono-xmltool
+devenv %XML_TOOL_PATH%\XmlTool.sln /%BUILD_OPTION% Debug_Java >>%RUNNING_FIXTURE%_build.log.txt 2<&1
+
+IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION
+
+copy %XML_TOOL_PATH%\bin\%PROJECT_CONFIGURATION%\xmltool.exe .
+copy %XML_TOOL_PATH%\nunit_transform.xslt .
+
+REM ********************************************************
+@echo Analyze and print results
+REM ********************************************************
+@echo on
+xmltool.exe --transform nunit_transform.xslt %GH_OUTPUT_XML%
+@echo off
+
+:FINALLY
+GOTO END
+
+:ENVIRONMENT_EXCEPTION
+@echo This test requires environment variables JAVA_HOME and GH_HOME to be defined
+GOTO END
+
+:BUILD_EXCEPTION
+@echo Error in building solutions. See %RUNNING_FIXTURE%_build.log.txt for details...
+REM EXIT 1
+GOTO END
+
+:RUN_EXCEPTION
+@echo Error in running fixture %RUNNING_FIXTURE%. See %RUNNING_FIXTURE%_run.log.txt for details...
+REM EXIT 1
+GOTO END
+
+:USAGE
+@echo Parameters: "[build|rebuild] <output_file_name_prefix> <test_fixture> <relative_Working_directory> <back_path (..\..\.....) >"
+GOTO END
+
+:END
+REM EXIT 0