Browse Source

Update NUnit to version 2.6.2

pull/28/head
Matt Ward 13 years ago
parent
commit
40639853dc
  1. BIN
      src/Tools/NUnit/lib/nunit-console-runner.dll
  2. BIN
      src/Tools/NUnit/lib/nunit.core.dll
  3. BIN
      src/Tools/NUnit/lib/nunit.core.interfaces.dll
  4. BIN
      src/Tools/NUnit/lib/nunit.util.dll
  5. BIN
      src/Tools/NUnit/nunit-console-dotnet2-x86.exe
  6. 38
      src/Tools/NUnit/nunit-console-dotnet2-x86.exe.config
  7. BIN
      src/Tools/NUnit/nunit-console-dotnet2.exe
  8. 38
      src/Tools/NUnit/nunit-console-dotnet2.exe.config
  9. BIN
      src/Tools/NUnit/nunit-console-x86.exe
  10. 38
      src/Tools/NUnit/nunit-console-x86.exe.config
  11. BIN
      src/Tools/NUnit/nunit-console.exe
  12. 38
      src/Tools/NUnit/nunit-console.exe.config
  13. 4
      src/Tools/NUnit/nunit-console/AssemblyInfo.cs
  14. 166
      src/Tools/NUnit/nunit-console/ExtendedConsoleUi.cs
  15. BIN
      src/Tools/NUnit/nunit.framework.dll

BIN
src/Tools/NUnit/lib/nunit-console-runner.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.core.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.core.interfaces.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.util.dll

Binary file not shown.

BIN
src/Tools/NUnit/nunit-console-dotnet2-x86.exe

Binary file not shown.

38
src/Tools/NUnit/nunit-console-dotnet2-x86.exe.config

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
@ -8,24 +8,18 @@ @@ -8,24 +8,18 @@
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v2.0.50727" />
<!-- <supportedRuntime version="v4.0.30319" /> -->
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

BIN
src/Tools/NUnit/nunit-console-dotnet2.exe

Binary file not shown.

38
src/Tools/NUnit/nunit-console-dotnet2.exe.config

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
@ -8,24 +8,18 @@ @@ -8,24 +8,18 @@
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v2.0.50727" />
<!-- <supportedRuntime version="v4.0.30319" /> -->
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

BIN
src/Tools/NUnit/nunit-console-x86.exe

Binary file not shown.

38
src/Tools/NUnit/nunit-console-x86.exe.config

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
@ -8,24 +8,18 @@ @@ -8,24 +8,18 @@
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<!-- <supportedRuntime version="v2.0.50727" /> -->
<supportedRuntime version="v4.0.30319" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v4.0.30319" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

BIN
src/Tools/NUnit/nunit-console.exe

Binary file not shown.

38
src/Tools/NUnit/nunit-console.exe.config

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
@ -8,24 +8,18 @@ @@ -8,24 +8,18 @@
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<!-- <supportedRuntime version="v2.0.50727" /> -->
<supportedRuntime version="v4.0.30319" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v4.0.30319" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

4
src/Tools/NUnit/nunit-console/AssemblyInfo.cs

@ -36,5 +36,5 @@ using System.Reflection; @@ -36,5 +36,5 @@ using System.Reflection;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.6.1")]
[assembly: AssemblyInformationalVersion("2.6.1")]
[assembly: AssemblyVersion("2.6.2")]
[assembly: AssemblyInformationalVersion("2.6.2")]

166
src/Tools/NUnit/nunit-console/ExtendedConsoleUi.cs

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
// copyright ownership at http://nunit.org.
// ****************************************************************
using System.Diagnostics;
namespace NUnit.ConsoleRunner
{
using System;
@ -69,6 +71,7 @@ namespace NUnit.ConsoleRunner @@ -69,6 +71,7 @@ namespace NUnit.ConsoleRunner
testResultWriter = new StreamWriter ( options.results, false, Encoding.UTF8 );
((StreamWriter)testResultWriter).AutoFlush = true;
}
TestPackage package = MakeTestPackage(options);
ProcessModel processModel = package.Settings.Contains("ProcessModel")
@ -110,61 +113,10 @@ namespace NUnit.ConsoleRunner @@ -110,61 +113,10 @@ namespace NUnit.ConsoleRunner
ExtendedEventCollector collector = new ExtendedEventCollector( options, outWriter, errorWriter, testResultWriter );
TestFilter testFilter = TestFilter.Empty;
SimpleNameFilter nameFilter = new SimpleNameFilter();
if ( options.run != null && options.run != string.Empty )
{
Console.WriteLine( "Selected test(s): " + options.run );
foreach (string name in TestNameParser.Parse(options.run))
nameFilter.Add(name);
testFilter = nameFilter;
}
if (options.runlist != null && options.runlist != string.Empty)
{
Console.WriteLine("Run list: " + options.runlist);
using (StreamReader rdr = new StreamReader(options.runlist))
{
// NOTE: We can't use rdr.EndOfStream because it's
// not present in .NET 1.x.
string line = rdr.ReadLine();
while (line != null)
{
if (line[0] != '#')
nameFilter.Add(line);
line = rdr.ReadLine();
}
}
testFilter = nameFilter;
}
if ( options.include != null && options.include != string.Empty )
{
TestFilter includeFilter = new CategoryExpression( options.include ).Filter;
Console.WriteLine("Included categories: " + includeFilter.ToString());
if (testFilter.IsEmpty)
testFilter = includeFilter;
else
testFilter = new AndFilter( testFilter, includeFilter );
}
if ( options.exclude != null && options.exclude != string.Empty )
{
TestFilter excludeFilter = new NotFilter( new CategoryExpression( options.exclude ).Filter );
Console.WriteLine("Excluded categories: " + excludeFilter.ToString());
if ( testFilter.IsEmpty )
testFilter = excludeFilter;
else if ( testFilter is AndFilter )
((AndFilter)testFilter).Add( excludeFilter );
else
testFilter = new AndFilter( testFilter, excludeFilter );
}
if (testFilter is NotFilter)
((NotFilter)testFilter).TopLevel = true;
TestFilter testFilter;
if(!CreateTestFilter(options, out testFilter))
return INVALID_ARG;
TestResult result = null;
string savedDirectory = Environment.CurrentDirectory;
@ -180,13 +132,15 @@ namespace NUnit.ConsoleRunner @@ -180,13 +132,15 @@ namespace NUnit.ConsoleRunner
outWriter.Flush();
errorWriter.Flush();
if ( redirectOutput )
if (redirectOutput)
outWriter.Close();
if ( redirectError )
if (redirectError)
errorWriter.Close();
if ( options.IsResults )
testResultWriter.Close();
Environment.CurrentDirectory = savedDirectory;
Console.SetOut( savedOut );
Console.SetError( savedError );
@ -239,7 +193,7 @@ namespace NUnit.ConsoleRunner @@ -239,7 +193,7 @@ namespace NUnit.ConsoleRunner
returnCode = summary.Errors + summary.Failures + summary.NotRunnable;
}
if ( collector.HasExceptions )
if (collector.HasExceptions)
{
collector.WriteExceptions();
returnCode = UNEXPECTED_ERROR;
@ -249,6 +203,84 @@ namespace NUnit.ConsoleRunner @@ -249,6 +203,84 @@ namespace NUnit.ConsoleRunner
}
}
internal static bool CreateTestFilter(ConsoleOptions options, out TestFilter testFilter)
{
testFilter = TestFilter.Empty;
SimpleNameFilter nameFilter = new SimpleNameFilter();
if (options.run != null && options.run != string.Empty)
{
Console.WriteLine("Selected test(s): " + options.run);
foreach (string name in TestNameParser.Parse(options.run))
nameFilter.Add(name);
testFilter = nameFilter;
}
if (options.runlist != null && options.runlist != string.Empty)
{
Console.WriteLine("Run list: " + options.runlist);
try
{
using (StreamReader rdr = new StreamReader(options.runlist))
{
// NOTE: We can't use rdr.EndOfStream because it's
// not present in .NET 1.x.
string line = rdr.ReadLine();
while (line != null && line.Length > 0)
{
if (line[0] != '#')
nameFilter.Add(line);
line = rdr.ReadLine();
}
}
}
catch (Exception e)
{
if (e is FileNotFoundException || e is DirectoryNotFoundException)
{
Console.WriteLine("Unable to locate file: " + options.runlist);
return false;
}
throw;
}
testFilter = nameFilter;
}
if (options.include != null && options.include != string.Empty)
{
TestFilter includeFilter = new CategoryExpression(options.include).Filter;
Console.WriteLine("Included categories: " + includeFilter.ToString());
if (testFilter.IsEmpty)
testFilter = includeFilter;
else
testFilter = new AndFilter(testFilter, includeFilter);
}
if (options.exclude != null && options.exclude != string.Empty)
{
TestFilter excludeFilter = new NotFilter(new CategoryExpression(options.exclude).Filter);
Console.WriteLine("Excluded categories: " + excludeFilter.ToString());
if (testFilter.IsEmpty)
testFilter = excludeFilter;
else if (testFilter is AndFilter)
((AndFilter) testFilter).Add(excludeFilter);
else
testFilter = new AndFilter(testFilter, excludeFilter);
}
if (testFilter is NotFilter)
((NotFilter) testFilter).TopLevel = true;
return true;
}
#region Helper Methods
// TODO: See if this can be unified with the Gui's MakeTestPackage
private TestPackage MakeTestPackage( ConsoleOptions options )
@ -289,6 +321,17 @@ namespace NUnit.ConsoleRunner @@ -289,6 +321,17 @@ namespace NUnit.ConsoleRunner
domainUsage = DomainUsage.Multiple;
}
if (options.basepath != null && options.basepath != string.Empty)
{
package.BasePath = options.basepath;
}
if (options.privatebinpath != null && options.privatebinpath != string.Empty)
{
package.AutoBinPath = false;
package.PrivateBinPath = options.privatebinpath;
}
#if CLR_2_0 || CLR_4_0
if (options.framework != null)
framework = RuntimeFramework.Parse(options.framework);
@ -304,10 +347,9 @@ namespace NUnit.ConsoleRunner @@ -304,10 +347,9 @@ namespace NUnit.ConsoleRunner
package.Settings["ProcessModel"] = processModel;
package.Settings["DomainUsage"] = domainUsage;
if (framework != null)
package.Settings["RuntimeFramework"] = framework;
if (framework != null)
package.Settings["RuntimeFramework"] = framework;
if (domainUsage == DomainUsage.None)
{

BIN
src/Tools/NUnit/nunit.framework.dll

Binary file not shown.
Loading…
Cancel
Save