From: Boris Kirzner Date: Mon, 4 Sep 2006 12:16:45 +0000 (-0000) Subject: Added TARGET_JVM NET_2_0 tests projects and run scripts. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=d44fb23e9213351282a621bdc54a0357973ced9b;p=mono.git Added TARGET_JVM NET_2_0 tests projects and run scripts. svn path=/trunk/mcs/; revision=64855 --- diff --git a/mcs/class/System.Configuration/ChangeLog b/mcs/class/System.Configuration/ChangeLog index 7804f3c6fa2..b0ca7975134 100644 --- a/mcs/class/System.Configuration/ChangeLog +++ b/mcs/class/System.Configuration/ChangeLog @@ -1,3 +1,8 @@ +2006-05-09 Boris Kirzner + + * run-tests.bat, run-tests.test.bat: added scripts for NET_2_0 + TARGET_JVM tests. + 2006-01-02 Chris Toshok * System.Configuration.dll.sources: add the Protected diff --git a/mcs/class/System.Configuration/System.Configuration20.vmwcsproj b/mcs/class/System.Configuration/System.Configuration20.vmwcsproj index 6c07854fd9f..d2afd3ab1ba 100755 --- a/mcs/class/System.Configuration/System.Configuration20.vmwcsproj +++ b/mcs/class/System.Configuration/System.Configuration20.vmwcsproj @@ -1,247 +1,247 @@ - - - Debug_Java - AnyCPU - 8.0.50727 - 2.0 - {7262AA8D-840C-4123-B99E-180F64F13A76} - Library - Properties - System.Configuration - System.Configuration - 1.5.0_05 - 1 - 2.0 - - - bin\Release_Java20\ - TRACE;TARGET_JVM;NET_1_1;NET_2_0 - 285212672 - true - false - pdbonly - AnyCPU - prompt - false - false - 1 - false - - - - - 2.0 - 1.5.0_05 - 0 - - - true - bin\Debug_Java20\ - TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0 - 285212672 - full - AnyCPU - prompt - True - False - 1 - false - - - - - 2.0 - 1.5.0_05 - 0 - - - true - full - false - bin\Debug_Java\ - TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1 - prompt - 4 - 285212672 - false - True - False - 0 - - - - - pdbonly - true - bin\Release_Java\ - TRACE;TARGET_JVM;NET_1_1;ONLY_1_1 - prompt - 4 - 285212672 - false - false - false - 0 - - - - - - ..\lib\J2SE.Helpers.dll - False - - - ..\lib\rt.dll - False - - - - - - - Locale.cs - - - - - - Consts.cs.in - - - MonoTODOAttribute.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Debug_Java + AnyCPU + 8.0.50727 + 2.0 + {7262AA8D-840C-4123-B99E-180F64F13A76} + Library + Properties + System.Configuration + System.Configuration + 1.5.0_05 + 1 + 2.0 + + + bin\Release_Java20\ + TRACE;TARGET_JVM;NET_1_1;NET_2_0 + 285212672 + true + false + pdbonly + AnyCPU + prompt + false + false + 1 + false + + + + + 2.0 + 1.5.0_05 + 0 + + + true + bin\Debug_Java20\ + TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0 + 285212672 + full + AnyCPU + prompt + True + False + 1 + false + + + + + 2.0 + 1.5.0_05 + 0 + + + true + full + false + bin\Debug_Java\ + TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1 + prompt + 4 + 285212672 + false + True + False + 0 + + + + + pdbonly + true + bin\Release_Java\ + TRACE;TARGET_JVM;NET_1_1;ONLY_1_1 + prompt + 4 + 285212672 + false + false + false + 0 + + + + + + ..\lib\J2SE.Helpers.dll + False + + + ..\lib\rt.dll + False + + + + + + + Locale.cs + + + + + + Consts.cs.in + + + MonoTODOAttribute.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mcs/class/System.Configuration/Test/ChangeLog b/mcs/class/System.Configuration/Test/ChangeLog index 46c09115d8f..12ae82af7b5 100644 --- a/mcs/class/System.Configuration/Test/ChangeLog +++ b/mcs/class/System.Configuration/Test/ChangeLog @@ -1,3 +1,9 @@ +2006-05-09 Boris Kirzner + + * System.Configuration.Test20.sln, + System.Configuration.Test20.vmwcsproj: added solution + and project files for NET_2_0 TERGET_JVM tests. + 2005-12-16 Chris Toshok * System.Configuration/ConfigurationLockCollectionTest.cs diff --git a/mcs/class/System.Configuration/Test/System.Configuration.Test20.sln b/mcs/class/System.Configuration/Test/System.Configuration.Test20.sln new file mode 100644 index 00000000000..35d2cb09308 --- /dev/null +++ b/mcs/class/System.Configuration/Test/System.Configuration.Test20.sln @@ -0,0 +1,23 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Configuration.Test20", "System.Configuration.Test20.vmwcsproj", "{A9AEBFBA-4D4C-495A-8851-C70E5132DC10}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Java|Any CPU = Debug_Java|Any CPU + Debug_Java20|Any CPU = Debug_Java20|Any CPU + Release_Java|Any CPU = Release_Java|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/mcs/class/System.Configuration/Test/System.Configuration.Test20.vmwcsproj b/mcs/class/System.Configuration/Test/System.Configuration.Test20.vmwcsproj new file mode 100644 index 00000000000..b1a88dd342c --- /dev/null +++ b/mcs/class/System.Configuration/Test/System.Configuration.Test20.vmwcsproj @@ -0,0 +1,133 @@ + + + true + bin\Debug_Java20\ + TRACE;DEBUG;JAVA;NET_2_0;TARGET_JVM + 285212672 + full + AnyCPU + prompt + True + False + 1 + false + + + + + 2.0 + 1.5.0_05 + 0 + + + Debug_Java + AnyCPU + 8.0.50727 + 2.0 + {A9AEBFBA-4D4C-495A-8851-C70E5132DC10} + Library + Properties + System.Configuration.Test + System.Configuration.Test20 + 1.5.0_05 + 1 + 2.0 + + + true + full + false + bin\Debug_Java\ + TRACE;DEBUG;JAVA;TARGET_JVM + prompt + 4 + 285212672 + false + false + 0 + + + + + pdbonly + true + bin\Release_Java\ + TRACE;JAVA;NET_2_0;TARGET_JVM + prompt + 4 + 285212672 + false + false + 0 + + + + + + False + ..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.core.dll + True + + + False + ..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.framework.dll + True + + + False + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ChangeLog b/mcs/class/System.Configuration/Test/System.Configuration/ChangeLog index 10f6652b199..cbb97b6e405 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ChangeLog +++ b/mcs/class/System.Configuration/Test/System.Configuration/ChangeLog @@ -1,3 +1,8 @@ +2006-05-09 Boris Kirzner + + * ConfigurationManagerTest.cs, ConfigurationPermissionTest.cs: + fixes for TARGET_JVM. + 2006-07-07 Atsushi Enomoto * ConfigurationManagerTest.cs : diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs index efc76da4c6f..4cc1667b232 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs @@ -50,7 +50,11 @@ namespace MonoTests.System.Configuration { Console.WriteLine("application config path: {0}", config.FilePath); FileInfo fi = new FileInfo (config.FilePath); +#if TARGET_JVM + Assert.AreEqual("System.Configuration.Test.jar.config", fi.Name); +#else Assert.AreEqual ("System.Configuration_test_net_2_0.dll.config", fi.Name); +#endif } [Test] @@ -239,7 +243,11 @@ namespace MonoTests.System.Configuration { Console.WriteLine("null mapped application config path: {0}", config.FilePath); FileInfo fi = new FileInfo (config.FilePath); +#if TARGET_JVM + Assert.AreEqual("System.Configuration.Test.jar.config", fi.Name); +#else Assert.AreEqual ("System.Configuration_test_net_2_0.dll.config", fi.Name); +#endif } [Test] @@ -263,9 +271,11 @@ namespace MonoTests.System.Configuration { { SysConfig cfg = ConfigurationManager.OpenMachineConfiguration (); Assert.IsTrue (cfg.Sections.Count > 0, "#1"); +#if !TARGET_JVM ConfigurationSection s = cfg.Sections ["system.net/connectionManagement"]; Assert.IsNotNull (s, "#2"); Assert.IsTrue (s is ConnectionManagementSection, "#3"); +#endif } } } diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs index 307677001a1..5f994463a28 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs @@ -72,6 +72,7 @@ namespace MonoTests.System.Configuration { Assert.IsNull (p3, "A1"); } +#if !TARGET_JVM [Test] [ExpectedException (typeof (ArgumentException))] public void Intersect_wrongtype () @@ -80,6 +81,7 @@ namespace MonoTests.System.Configuration { IPermission p3 = p1.Intersect (new StrongNameIdentityPermission (PermissionState.Unrestricted)); } +#endif [Test] public void Union () @@ -106,6 +108,7 @@ namespace MonoTests.System.Configuration { Assert.IsTrue (((ConfigurationPermission)p3).IsUnrestricted(), "A2"); } +#if !TARGET_JVM [Test] [ExpectedException (typeof (ArgumentException))] public void Union_wrongtypee () @@ -114,6 +117,7 @@ namespace MonoTests.System.Configuration { IPermission p3 = p1.Union (new StrongNameIdentityPermission (PermissionState.Unrestricted)); } +#endif [Test] public void Subset () @@ -130,6 +134,7 @@ namespace MonoTests.System.Configuration { Assert.IsTrue (p2.IsSubsetOf (null), "A6"); } +#if !TARGET_JVM [Test] [ExpectedException (typeof (ArgumentException))] public void Subset_wrongtype () @@ -138,8 +143,12 @@ namespace MonoTests.System.Configuration { Assert.IsFalse (p1.IsSubsetOf (new StrongNameIdentityPermission (PermissionState.Unrestricted))); } +#endif [Test] +#if TARGET_JVM + [Category("NotWorking")] +#endif public void ToXml () { ConfigurationPermission p = new ConfigurationPermission (PermissionState.Unrestricted); diff --git a/mcs/class/System.Configuration/run-tests.bat b/mcs/class/System.Configuration/run-tests.bat new file mode 100644 index 00000000000..aca403870ce --- /dev/null +++ b/mcs/class/System.Configuration/run-tests.bat @@ -0,0 +1,20 @@ +@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 +) + +set OUTPUT_FILE_PREFIX=MonoTests.System.DirectoryServices +set RUNNING_FIXTURE=MonoTests.System.Configuration + +call run-tests.test.bat %BUILD_OPTION% %SECURE_MODE% %OUTPUT_FILE_PREFIX% %RUNNING_FIXTURE% diff --git a/mcs/class/System.Configuration/run-tests.test.bat b/mcs/class/System.Configuration/run-tests.test.bat new file mode 100644 index 00000000000..847e923bc66 --- /dev/null +++ b/mcs/class/System.Configuration/run-tests.test.bat @@ -0,0 +1,141 @@ +@echo on +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 "%VMW_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.Configuration +set RUNNING_FIXTURE=MonoTests.System.Configuration +set TEST_SOLUTION=Test\System.Configuration.Test20.sln +set TEST_ASSEMBLY=System.Configuration.Test20.jar +set PROJECT_CONFIGURATION=Debug_Java20 + +set OUTPUT_FILE_PREFIX=%OUTPUT_FILE_PREFIX% + +REM ******************************************************** +REM @echo Set environment +REM ******************************************************** + +set JGAC_PATH=%VMW_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\%PROJECT_CONFIGURATION%\nunit.framework.jar;%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit.util.jar;%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit.core.jar;%NUNIT_PATH%nunit-console\bin\%PROJECT_CONFIGURATION%\nunit-console.jar + +set CLASSPATH="%RUNTIME_CLASSPATH%;%NUNIT_CLASSPATH%" + +REM ******************************************************** +@echo Building GH solution... +REM ******************************************************** + +rem devenv %TEST_SOLUTION% /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1 +msbuild %TEST_SOLUTION% /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1 + +IF %ERRORLEVEL% NEQ 0 GOTO BUILD_EXCEPTION + +REM ******************************************************** +@echo Building NUnit solution... +REM ******************************************************** + +if "%NUNIT_BUILD%" == "DONE" goto NUNITSKIP + +REM devenv ..\..\nunit20\nunit.java.sln /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1 +msbuild ..\..\nunit20\nunit20.java.sln /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1 + +goto NUNITREADY + +:NUNITSKIP +echo Skipping NUnit Build... + +:NUNITREADY +set NUNIT_BUILD=DONE + +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\System.Configuration\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 +REM devenv %XML_TOOL_PATH%\XmlTool.sln /%BUILD_OPTION% %PROJECT_CONFIGURATION% >>%RUNNING_FIXTURE%_build.log.txt 2<&1 +msbuild %XML_TOOL_PATH%\XmlTool20.vmwcsproj /t:%BUILD_OPTION% /p:Configuration=%PROJECT_CONFIGURATION% >>%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 VMW_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] " +GOTO END + +:END +REM EXIT 0