-
Notifications
You must be signed in to change notification settings - Fork 19
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
Working with Expecto Test Runner #11
Comments
I think @MNie has been active with the .net core templates and might have an opinion on this. I personally don't know, to be honest. |
My (somewhat unqualified) guess is that this is not (really) related to expecto, nor the test runner, but coverlet doing something weird in post-build. To test this theory, I would take the test runner out of the equation (makes things much harder to test ironically). Can you try the following?
See if it crashes and if you get more information. Unfortunately I won't be able to look too much at this for the next few days. |
I’ve tried it with dotnet run and it seems to work fine. |
And you get instrumentation? |
Yes
|
I recall at some point finding that Cecil was being unreliable in writing out symbols for the instrumented assemblies, but I can't remember where I left things -- I'll have to check through history to find the details. At the time, I didn't see a use-case for them, other than completeness. |
Relevant commentary from the code that I made as a note-to-self
where "this" is writing out symbols as .mdb; and
These comments were made in January, apart from the last bit about portable .pdbs on mono, at the start of March; which means I've not re-tested since Cecil 0.10 came out. |
I just made the experiment of setting the .net core build to write .pdb rather than .mdb, and Cecil 0.10 final still gives the same issue
|
Having had reason to look more deeply into this, it's starting to look like maybe this is another manifestation of this issue -- a bug in Cecil 0.10 beta6, that seems possibly fixed in the final build, but which gets masked by the unit test framework. |
Having moved the related tests to xUnit, it now works with pdb in => pdb out, mdb in => mdb out for the .net core build (full fat framework isn't yet touched). Prerelease build 430 has this change in. |
Seems to be working for me! Thanks! |
So it works with XUnit, but not the Expecto runner? |
Any of the unit tests involving symbol output were being skewed in .net core by the fact that NUnit drags in Cecil too, and the latest release of that is still on 0.10 beta6, and we don't have AppDomain isolation to protect from different assemblies with the same version. At root, it's a Cecil versioning bug -- the assembly contracts changed, but the version has stayed the same. By moving those tests to XUnit, I'm actually able to test what Cecil 0.10 final is doing; and I can once more (as was the state of play at the turn of the year) make AltCover write out .pdb files for .pdb in, and .mdb files for .mdb in and see it working. |
The functional change (in amongst all the test and build furniture) is this one. |
I'm just opening here as initial starting point. We can move to other repo's based on if they need PR's.
So I was trying to mimic coverlet's msbuild targets as much as I could like https://github.com/TheAngryByrd/ExpectoAltCover-Test/blob/master/tests/Directory.Build.targets. However when I go to run
dotnet test
I'm getting an issue with the Expecto Test adapterThis error seems to come from inside Mono.Cecil. https://github.com/jbevain/cecil/blob/master/Mono.Cecil/ModuleDefinition.cs#L1077
Repo: https://github.com/TheAngryByrd/ExpectoAltCover-Test
just run
dotnet test
in the tests folder to see the behavior.Do you have any input as to what needs to change to make this work?
Thanks!
cc: @Alxandr @haf @AnthonyLloyd
The text was updated successfully, but these errors were encountered: