Deduplicate JIT/Methodical/explicit/coverage tests #62867
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This test set contains several project groups exercising various
primitive types using explicit and sequential layout. Each group
comprises a variant source file implementing a sequential or
explicit struct / class 'AA' with a field of the given type
(e.g. expl_byte_1.cs / seq_byte_1.cs) and a common source file
(body_byte.cs in this case) implementing a number of tests
manipulating the type 'AA' that is shared by the explicit and
the sequential variant of the project (e.q. expl_byte_1[_d/_r].csproj,
seq_byte_1[_d/_r].csproj).
The problem was that the Main method resided in the common source
file so that it was always present twice - once for the sequential
and once for the explicit variant of the test (ignoring the _d / _r
flavors). After experimenting with several ways to refactor the tests
I have come to the conclusion that the most straightforward way
of deduplicating them is just moving the Main method out of the shared
source code into the variant (explicit / sequential) sources that
aren't shared.
Thanks
Tomas
/cc @dotnet/jit-contrib