Skip to content

Commit

Permalink
Deduplicate project files with the same name in different folders (do…
Browse files Browse the repository at this point in the history
…tnet#64841)

This is a somewhat annoying aspect hitting less than 10% of the
JIT/Methodical subtree: as the new merged wrapper logic is based
on simple assembly names, we cannot merge multiple test projects
that produce a test assembly with the same name otherwise such
assemblies stomp over each other when getting copied to the merged
wrapper folder. I have added a new option to ILTransform to include
the directory name in the project names in these cases. We can
remove some of this in the future when selectively merging actual
test source code (compiling multiple tests into a single asssembly).

Thanks

Tomas
  • Loading branch information
trylek authored and radekdoulik committed Mar 30, 2022
1 parent a5fb81d commit 3429924
Show file tree
Hide file tree
Showing 149 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Boxing/boxunbox/localloc.il
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.assembly extern mscorlib { }
.assembly 'localloc' { }
.assembly 'localloc_boxunbox' { }
.assembly extern xunit.core {}
.namespace JitTest
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Boxing/boxunbox/tailcall.il
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.assembly extern System.Console { auto }
.assembly extern mscorlib { auto }

.assembly 'tailcall' { }
.assembly 'tailcall_boxunbox' { }
.assembly extern xunit.core {}
.namespace JitTest
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Boxing/boxunbox/try.il
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.assembly extern mscorlib { }
.assembly 'try' { }
.assembly 'try_boxunbox' { }
.assembly extern xunit.core {}
.namespace JitTest
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Boxing/seh/filter.il
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.assembly extern mscorlib { }
.assembly 'filter' { }
.assembly 'filter_seh_Boxing' { }
.assembly extern xunit.core {}
.namespace SinCalc
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Boxing/seh/try.il
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.assembly extern mscorlib { }
.assembly 'try' { }
.assembly 'try_seh' { }
.assembly extern xunit.core {}
.namespace SinCalc
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/casts/SEH/filter.il
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 4:0:0:0
}
.assembly 'filter' { }
.assembly 'filter_SEH_casts' { }
.method public static int32 main() cil managed
{
.maxstack 8
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/assemname_cs_d.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="assemname.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/assemname_cs_do.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="assemname.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/assemname_cs_r.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="assemname.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/assemname_cs_ro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="assemname.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads1_cs_d.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads1.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads1_cs_do.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads1.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads1_cs_r.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads1.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads1_cs_ro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads1.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads2_cs_d.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads2.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads2_cs_do.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads2.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads2_cs_r.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads2.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/cctor/misc/threads2_cs_ro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="threads2.cs" />
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_misc.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1b.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1b.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1b.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise1b.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise2.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise2.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise2.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise2.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise4.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise4.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise4.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<Compile Include="xprecise4.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="testlib.csproj" />
<ProjectReference Include="testlib_xassem.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/nonvirtualcall/tailcall.il
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Metadata version: v2.0.50509
.assembly extern mscorlib { auto }

.assembly tailcall
.assembly tailcall_nonvirtualcall
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.hash algorithm 0x00008004
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/xxobj/operand/localloc.il
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.ver 4:0:0:0
}
.assembly extern mscorlib { }
.assembly 'localloc' {
.assembly 'localloc_operand' {
}
.assembly extern xunit.core {}
.namespace JitTest
Expand Down
12 changes: 6 additions & 6 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1326,10 +1326,10 @@

<!-- Catch(T) in shared code -->
<!-- https://github.com/dotnet/runtimelab/issues/204 -->
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_do\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_ro\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_generics_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_generics_do\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_generics_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\throwincatch_generics_ro\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\trycatchnestedtype_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\trycatchnestedtype_do\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\eh\generics\trycatchnestedtype_r\*" />
Expand Down Expand Up @@ -2531,13 +2531,13 @@
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/eh/finallyexec/catchrettoinnertry_cs_ro/**">
<Issue>needs triage</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/Boxing/boxunbox/tailcall_il_r/**">
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/Boxing/boxunbox/tailcall_boxunbox_il_r/**">
<Issue>https://github.com/dotnet/runtime/issues/54388</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/Coverage/b39946/**">
<Issue>https://github.com/dotnet/runtime/issues/54388</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/Boxing/boxunbox/tailcall_il_d/**">
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/Boxing/boxunbox/tailcall_boxunbox_il_d/**">
<Issue>needs triage</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Methodical/eh/finallyexec/loopinfinally_r/**">
Expand Down

0 comments on commit 3429924

Please sign in to comment.