NUnitConfiguration.MonoExePath returns wrong path

Bug #602798 reported by Eberhard Beilharz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
High
Charlie Poole

Bug Description

NUnitConfiguration.MonoExePath returns 'nunit-console.exe' when run on Mono on Linux. It should return the path to the Mono executable instead, e.g. '/usr/local/bin/mono'.

This happens in NUnit 2.5.5

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 602798] [NEW] NUnitConfiguration.MonoExePath returns wrong path

Any thoughts on how to get this path?

On Wed, Jul 7, 2010 at 9:35 AM, Eberhard Beilharz
<email address hidden> wrote:
> Public bug reported:
>
> NUnitConfiguration.MonoExePath returns 'nunit-console.exe' when run on
> Mono on Linux. It should return the path to the Mono executable instead,
> e.g. '/usr/local/bin/mono'.
>
> This happens in NUnit 2.5.5
>
> ** Affects: nunitv2
>     Importance: Undecided
>         Status: New
>
> --
> NUnitConfiguration.MonoExePath returns wrong path
> https://bugs.launchpad.net/bugs/602798
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
>

Revision history for this message
Eberhard Beilharz (c-e-beilharz) wrote :

Probably the easiest would be to just return "mono" and let the OS find it. That would most likely find the same installation that NUnit is currently running with, which I think should be sufficient in most cases.

If we want/need the full path, then one possibility would be to run "which mono".

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 602798] Re: NUnitConfiguration.MonoExePath returns wrong path

Great idea! Returning "mono" on Linux is TSTTCPW.

Charlie

On Fri, Jul 9, 2010 at 1:24 PM, Eberhard Beilharz
<email address hidden> wrote:
> Probably the easiest would be to just return "mono" and let the OS find
> it. That would most likely find the same installation that NUnit is
> currently running with, which I think should be sufficient in most
> cases.
>
> If we want/need the full path, then one possibility would be to run
> "which mono".
>
> --
> NUnitConfiguration.MonoExePath returns wrong path
> https://bugs.launchpad.net/bugs/602798
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
>

Changed in nunitv2:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Charlie Poole (charlie.poole)
Revision history for this message
Charlie Poole (charlie.poole) wrote :

I changed the logic to try the following 3 strategies in order

1. If a well-known script or exe is on the path, use it

2. Try to find mono

3. Use "mono"

For step 1, the names sought are mono.bat, mono.cmd and mono.exe on Windows, otherwise mono and mono.exe

For step 2, Windows examines the registry, nothing implemented on other platforms

Changed in nunitv2:
status: Triaged → Fix Committed
milestone: none → 2.5.6
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.