Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAKE 5, expecto helper always runs mono/process #1880

Closed
haf opened this issue Apr 22, 2018 · 6 comments
Closed

FAKE 5, expecto helper always runs mono/process #1880

haf opened this issue Apr 22, 2018 · 6 comments

Comments

@haf
Copy link
Member

haf commented Apr 22, 2018

Example:

let testNetCoreDir = "src" </> "Suave.Tests" </> "bin" </> "Release" </> "netcoreapp2.0"

Target.create "Test" <| fun _ ->
  Expecto.run id (!! (testNetCoreDir </> "Suave.Tests.dll"))

Crashes:

Starting task 'Expecto': /suave/src/Suave.Tests/bin/Release/netcoreapp2.0/Suave.Tests.dll
/suave/src/Suave.Tests/bin/Release/netcoreapp2.0/Suave.Tests.dll --parallel --parallel-workers 0 --fail-on-focused-tests --version
Finished 'Expecto' in 00:00:00.0211410
Finished 'Test' in 00:00:00.0255590

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target     Duration
------     --------
Clean      00:00:00.1491990
Restore    00:00:11.4618120
AsmInfo    00:00:00.2100470
Replace    00:00:00.0002830
Build      00:00:47.5418750
Test       00:00:00.0254760   (Start of process /suave/src/Suave.Tests/bin/Release/netcoreapp2.0/Suave.Tests.dll failed.)
Total:     00:00:59.4403840
Status:    Failure
---------------------------------------------------------------------
-> BuildFailedException: Target 'Test' failed.
-> One or more errors occurred. (Start of process /Users/h/dev/logibit/suave/src/Suave.Tests/bin/Release/netcoreapp2.0/Suave.Tests.dll failed.)
-> Start of process /suave/src/Suave.Tests/bin/Release/netcoreapp2.0/Suave.Tests.dll failed.
-> Win32Exception: Permission denied

Bugs:

  • Assumes the dll is executable
  • No way to tell it to use dotnet to run it
  • The dotnet-run on mono bug is triggered "aka Mono not supported"
  • The parallel-workers options is broken and outputs a zero. Instead of overriding this setting for expecto I'm wondering what's wrong with the default implementation that DOES work cross platform? https://github.com/haf/expecto/blob/master/Expecto/Expecto.fs#L944
@matthid
Copy link
Member

matthid commented Apr 22, 2018

/cc @jackfoxy see that's why I didn't do it ;)

@jackfoxy
Copy link
Contributor

@matthid I'm not certain which "it" you are referring to, but I do see you merged rc6 into master, including Fake.DotNet.Testing.Expecto

@matthid
Copy link
Member

matthid commented Apr 22, 2018

With "it" I mean this bug report. The problem is that expecto on netcore works differently. This means the module needs some rework :/

@jackfoxy
Copy link
Contributor

Unfortunately I'm not a good candidate for the task, as I only ever work in Windows.

@baronfel
Copy link
Contributor

It's a bit larger than just windows or not. On .net core any sort of executable binary is now compiled as a dll and must be run via the 'dotnet path/to/dll' command, instead of involing manually. So that's where most of the work is, determining which runtime to execute on.

@matthid
Copy link
Member

matthid commented Apr 22, 2018

@baronfel I don't feel like it needs to be detected automatically. I think it would be completely fine to switch via parameter or a new function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants