nunit-dev team mailing list archive
-
nunit-dev team
-
Mailing list archive
-
Message #00170
FW: [Merge] lp:~jv-ravichandran/nunitv2/DotNet4Fix_191009 into lp:nunitv2
Hi All,
In case you missed the merge request, this is a very important review
and it would be helpful if people downloaded and tried it in various
environments. For example, it needs testing...
* with only .NET 4.0 installed
* with .NET 4.0 not installed
* with .NET 4.0 plus other stuff installed
In each case, tests need to be run from the Gui and console using all the
installed frameworks. The small changes in code hide a lot of possibilities!
Please record what and how you tested in your reviews.
Charlie
-----Original Message-----
From: bounces@xxxxxxxxxxxxx [mailto:bounces@xxxxxxxxxxxxx] On Behalf Of Jv
Sent: Monday, October 19, 2009 6:01 AM
To: mp+13563@xxxxxxxxxxxxxxxxxx
Subject: [Merge] lp:~jv-ravichandran/nunitv2/DotNet4Fix_191009 into
lp:nunitv2
Jv has proposed merging lp:~jv-ravichandran/nunitv2/DotNet4Fix_191009 into
lp:nunitv2.
Requested reviews:
NUnit Developers (nunit-dev)
Added an additional "4.0" check for checking .Net 4.0 and make NUnit work
with it.
--
https://code.launchpad.net/~jv-ravichandran/nunitv2/DotNet4Fix_191009/+merge
/13563
You are subscribed to branch lp:nunitv2.
=== modified file 'src/ClientUtilities/tests/TestAgentTests.cs'
--- src/ClientUtilities/tests/TestAgentTests.cs 2009-09-27 22:42:10 +0000
+++ src/ClientUtilities/tests/TestAgentTests.cs 2009-10-19 13:00:29 +0000
@@ -30,9 +30,9 @@
[Test]
public void CanLocateBinDirForAllInstalledVersions()
{
- foreach (Version version in NUnit.Core.RuntimeFramework.KnownVersions)
+ foreach (NUnit.Core.RuntimeFramework availableVersion in NUnit.Core.RuntimeFramework.AvailableFrameworks)
{
- string path = NUnit.Core.NUnitConfiguration.GetNUnitBinDirectory(version);
+ string path = NUnit.Core.NUnitConfiguration.GetNUnitBinDirectory(availableVersion.Version);
if (path != null) // All version may not be installed
Assert.That(System.IO.Directory.Exists(path), "Directory {0} does not exist", path);
}
@@ -41,9 +41,9 @@
[Test]
public void CanLocateAgentExeForAllInstalledVersions()
{
- foreach (Version version in NUnit.Core.RuntimeFramework.KnownVersions)
+ foreach (NUnit.Core.RuntimeFramework availableVersion in NUnit.Core.RuntimeFramework.AvailableFrameworks)
{
- string path = NUnit.Core.NUnitConfiguration.GetTestAgentExePath(version);
+ string path = NUnit.Core.NUnitConfiguration.GetTestAgentExePath(availableVersion.Version);
if (path != null)
Assert.That(System.IO.File.Exists(path), "File {0} does not exist", path);
}
=== modified file 'src/ClientUtilities/util/Services/TestAgency.cs'
--- src/ClientUtilities/util/Services/TestAgency.cs 2009-04-27 03:54:57 +0000
+++ src/ClientUtilities/util/Services/TestAgency.cs 2009-10-19 13:00:29 +0000
@@ -196,7 +196,10 @@
case RuntimeType.Net:
p.StartInfo.FileName = agentExePath;
if ( targetRuntime.Version == new Version("1.0.3705") )
- p.StartInfo.EnvironmentVariables["COMPLUS_Version"]="v1.0.3705";
+ p.StartInfo.EnvironmentVariables["COMPLUS_Version"]="v1.0.3705";
+ if (targetRuntime.Version == new Version("4.0.20506"))
+ p.StartInfo.EnvironmentVariables["COMPLUS_Version"] = "v4.0.20506";
+
p.StartInfo.Arguments = arglist;
break;
default:
=== modified file 'src/NUnitCore/core/NUnitConfiguration.cs'
--- src/NUnitCore/core/NUnitConfiguration.cs 2009-09-27 22:42:10 +0000
+++ src/NUnitCore/core/NUnitConfiguration.cs 2009-10-19 13:00:29 +0000
@@ -286,7 +286,16 @@
string current = Environment.Version.ToString(2);
string target = v.ToString(2);
if (current == "1.0") current = "1.1";
- if (target == "1.0") target = "1.1";
+ if (target == "1.0") target = "1.1";
+ if (current == "2.0") current = "net 2.0";
+ if (target == "2.0") target = "net 2.0";
+ if (current == "3.0") current = "net 2.0";
+ if (target == "3.0") target = "net 2.0";
+ if (current == "3.5") current = "net 2.0";
+ if (target == "3.5") target = "net 2.0";
+ if (current == "4.0") current = "net 4.0";
+ if (target == "4.0") target = "net 4.0";
+
if (target == current)
return dir;