Skip to content

Commit

Permalink
Test merging IL_Conformance (#80597)
Browse files Browse the repository at this point in the history
* Running ILTransform -n

A few ilproj were moved when deduplicating ilproj names but none of
those include refernces to il files using proj filename (as with
MSBuildProjectName).

* Running ILTransform -ilfile on JIT\IL_Conformance

Some il filenames were renamed to match their respective ilproj and
those ilproj file content were updated to use MSBuildProject
reference as il filenames.

* Running ILTransform -a on JIT/IL_Conformance

Update some assembly names to match il filenames.

* Running ILTransform -prociso on JIT/IL_Conformance

Isolate conv_ovf_i8_i.ilproj.

* Running ILTransform -public

* Running ILTransform -d

* Running ILTransform -ilfact

* Adding JIT/IL_Conformance merge tests wrapper
  • Loading branch information
BrianBohe committed Feb 1, 2023
1 parent bb8aba5 commit 3c47b2c
Show file tree
Hide file tree
Showing 824 changed files with 11,858 additions and 9,940 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
using System.Runtime.Intrinsics;
using System.Reflection;
using System.Reflection.Emit;
using Xunit;

namespace TestCasts
{
class Program
public class Program
{
static int failedCount = 0;

Expand Down Expand Up @@ -1165,7 +1166,8 @@ static void TestConvertFromDoubleToU8()
GenerateTest<double, ulong>(Single.NaN, sourceOp, convOvfUn, ExpectException, 0);
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
TestConvertFromInt4();
TestConvertFromInt8();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/tests/JIT/IL_Conformance/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<BuildAsStandalone Condition="'$(BuildAsStandalone)' == ''">false</BuildAsStandalone>
</PropertyGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
</Project>
9 changes: 9 additions & 0 deletions src/tests/JIT/IL_Conformance/IL_Conformance.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsMergedTestRunnerAssembly>true</IsMergedTestRunnerAssembly>
</PropertyGroup>
<ItemGroup>
<MergedWrapperProjectReference Include="*/**/*.??proj" />
<ProjectReference Include="@(MergedWrapperProjectReference)" />
</ItemGroup>
</Project>
17 changes: 12 additions & 5 deletions src/tests/JIT/IL_Conformance/Old/Base/add.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
Expand All @@ -22,6 +23,8 @@
//[assembly:System.Security.Permissions.SecurityPermissionAttribute( [mscorlib]System.Security.Permissions.SecurityAction.RequestMinimum, Flags=System.Security.Permissions.SecurityPermissionFlag.SkipVerification )]
}

.namespace add_
{
.class public explicit _add {

.field [0] int32 global0
Expand All @@ -33,15 +36,18 @@
// Entry point - Main -
//-------------------------
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.entrypoint
.maxstack 6
.locals init (class _add target)
.locals init (class add_._add target)
//----------------
// begin testing -
//----------------

// creating new instance of _add and storing it
newobj instance void _add::.ctor()
newobj instance void add_._add::.ctor()
stloc.0


Expand All @@ -65,17 +71,17 @@

// -- I4 + * -- Unmanaged ptr
ldloc target
ldflda int32 _add::global0
ldflda int32 add_._add::global0
ldc.i4 0xAAAAAAAA
stind.i4

ldloc target
ldflda int32 _add::global1
ldflda int32 add_._add::global1
ldc.i4 0x44444444
stind.i4

ldloc target
ldflda int32 _add::global0
ldflda int32 add_._add::global0
ldc.i4 0x4
add
ldind.i4
Expand Down Expand Up @@ -120,3 +126,4 @@ FAIL:
ret
}
}
}
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/add.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/add_ovf.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}


.assembly add_ovf{}
Expand Down Expand Up @@ -321,6 +322,9 @@ FAIL:


.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.entrypoint
.maxstack 10
call int32 add_ovf::i1()
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/add_ovf.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup>
Expand Down
21 changes: 14 additions & 7 deletions src/tests/JIT/IL_Conformance/Old/Base/and.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,43 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}


.assembly 'and'{}

.namespace and_
{
.class public _and {

.field public static int32 even32
.field public static int64 even64
.method public static void initialize() {
.maxstack 2
ldc.i4 0xAAAAAAAA
stsfld int32 _and::even32
stsfld int32 and_._and::even32
ldc.i8 0xAAAAAAAAAAAAAAAA
stsfld int64 _and::even64
stsfld int64 and_._and::even64
ret
}

.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.entrypoint
.maxstack 10
call void _and::initialize()
ldsfld int32 _and::even32
call void and_._and::initialize()
ldsfld int32 and_._and::even32
ldc.i4 0xFFFFFFFF
and
ldsfld int32 _and::even32
ldsfld int32 and_._and::even32
ceq
brfalse FAIL
ldsfld int64 _and::even64
ldsfld int64 and_._and::even64
ldc.i8 0xFFFFFFFFFFFFFFFF
and
ldsfld int64 _and::even64
ldsfld int64 and_._and::even64
ceq
brfalse FAIL
PASS:
Expand All @@ -43,3 +49,4 @@ FAIL:
ret
}
}
}
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/and.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/beq.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}

.assembly 'beq'{}

.namespace beq_
{
.class public auto ansi _beq {
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.locals (class [mscorlib]System.String)
.entrypoint

Expand Down Expand Up @@ -54,4 +61,6 @@ fail:
end:
ret
}
}

}
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/beq.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/beq_s.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}


.class public auto ansi beq_s {
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.locals (class [mscorlib]System.String)
.entrypoint

Expand Down Expand Up @@ -53,6 +58,7 @@ fail:
end:
ret
}
}


.assembly beq_s {}
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/beq_s.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/bge.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}

.assembly 'bge'{}

.namespace bge_
{
.class public auto ansi _bge {
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.locals (class [mscorlib]System.String)
.entrypoint
ldc.i4 0x55555555
Expand Down Expand Up @@ -77,4 +84,6 @@ fail:
end:
ret
}
}

}
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/bge.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/bge_s.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}


.class public auto ansi bge_s {
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.locals (class [mscorlib]System.String)
.entrypoint
ldc.i4 0x55555555
Expand Down Expand Up @@ -76,6 +81,7 @@ fail:
end:
ret
}
}


.assembly bge_s {}
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/bge_s.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/bgt.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}

.assembly 'bgt'{}


.namespace bgt_
{
.class public auto ansi _bgt {
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.locals (class [mscorlib]System.String)
.entrypoint

Expand Down Expand Up @@ -79,4 +86,6 @@ fail:
end:
ret
}
}

}
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/bgt.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/tests/JIT/IL_Conformance/Old/Base/bgt_s.il
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern legacy library mscorlib {}
.assembly extern xunit.core {}



.class public auto ansi bgt_s {
.method public static int32 main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.locals (class [mscorlib]System.String)
.entrypoint

Expand Down Expand Up @@ -78,6 +83,7 @@ fail:
end:
ret
}
}


.assembly bgt_s {}
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/IL_Conformance/Old/Base/bgt_s.ilproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 3c47b2c

Please sign in to comment.