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

[Opinion] Expecto Runner should not pass any parameters by default #2039

Closed
0x53A opened this Issue Jul 27, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@0x53A
Copy link
Contributor

0x53A commented Jul 27, 2018

Unittest DLL:

Runner.RunTestsWithArgs(Impl.ExpectoConfig.defaultConfig.WithParallel(false), args, ...)

Fake script:

Fake.DotNet.Testing.Expecto.run id [ testExe ]

Expected:

Just logically speaking, I have set parallel to false in the exe, have not specified anything in my script, so I expect it to run serially.

Actual:

command-line:

Tests.exe --parallel --parallel-workers 0 --fail-on-focused-tests --version

Instead fake passes --parallel and so the tests run in parallel.

Workaround 1:

Fake.DotNet.Testing.Expecto.run (fun o -> {o with Parallel = false }) [ testExe ]

Workaround 2:

in the c# test-exe:

args = args.Except(new[] { "--parallel" }).ToArray();

Fix:

This would be a breaking change, but the proper fix would be to make the properties Options. If they are not set, they stay at None and are not passed to the exe.

@matthid

This comment has been minimized.

Copy link
Collaborator

matthid commented Jul 28, 2018

Yes PR would be welcome :)

@matthid

This comment has been minimized.

Copy link
Collaborator

matthid commented Aug 4, 2018

If you don't specify anything in the command line it will run parallel as well, correct (afaik that is just the default in expecto)?

@0x53A

This comment has been minimized.

Copy link
Contributor Author

0x53A commented Aug 5, 2018

Yeah, I think so

@matthid

This comment has been minimized.

Copy link
Collaborator

matthid commented Sep 27, 2018

We could just set the default to false which would change the behavior in fake to not pass the argument at all

@matthid matthid closed this in c017236 Sep 27, 2018

@matthid matthid referenced this issue Sep 27, 2018

Merged

Release 5.8.4 #2116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.