nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #02457
[Bug 860558] Re: pnunit-agent can't run a tests from another folder
I responded to your last comment about 18 hours ago and it hasn't shown
up here. I'll try again using the online interface to give you a summary
of where I think we are.
1. The need to have a reference to pnunit.framework makes sense since
that contains the common interfaces used by both the launcher and the
agent.
2. The need to have pnunit-agent makes no sense at all. The test domain
should not be referencing the agent.
3. While forcing the success of a reference through AssemblyResolver
appears to solve your problem, it really doesn't deal with the basic
question of why such a reference should be needed. I need to look into
this further.
4. Running the equivalent test under MS .NET on Windows, it runs without
the error. So this seems to be peculiar to Mono on Linux.
5. I'm asking the authors of pNUnit for help.
6. I'm not opposed to putting in the change you request temporarily if
we don't find any better solution.
Charlie
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/860558
Title:
pnunit-agent can't run a tests from another folder
Status in NUnit V2 Test Framework:
In Progress
Bug description:
if the assembly `pnunit.tests.dll` located in another directory then
the process `pnunit-agent.exe` can not download the file `pnunit-
agent.exe` as a dll library.
I recommend the following modification of the file:
=== modify file src/NUnitCore/core/AssemblyResolver.cs
--- src/NUnitCore/core/AssemblyResolver.cs 2009-02-01 05:16:27 +0000
+++ src/NUnitCore/core/AssemblyResolver.cs 2011-09-09 09:28:02 +0000
@@ -9,7 +9,8 @@
using System;
using System.IO;
using System.Reflection;
- using System.Collections;
+ using System.Collections;
+ using System.Collections.Generic;
/// <summary>
/// Class adapted from NUnitAddin for use in handling assemblies that are not
@@ -92,8 +93,11 @@
}
foreach( string dir in _dirs )
- {
- foreach( string file in Directory.GetFiles( dir, "*.dll" ) )
+ {
+ List<string> dllCandidates = new List<string>();
+ dllCandidates.AddRange(Directory.GetFiles(dir, "*.dll"));
+ dllCandidates.AddRange(Directory.GetFiles(dir, "*.exe"));
+ foreach (string file in dllCandidates)
{
string fullFile = Path.Combine( dir, file );
AssemblyReader rdr = new AssemblyReader(fullFile);
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/860558/+subscriptions
References