From: Kyungwoo Lee Date: Wed, 30 Dec 2015 05:31:47 +0000 (-0800) Subject: Enable ilasm round trip testing X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7a7d25ee7606aef57579b19f1fc4727e6443f49;p=platform%2Fupstream%2Fcoreclr.git Enable ilasm round trip testing This enables ilasm round-trip testing for Windows. In order to test il{d}asm on xPlatforms, I injected ilasm round trip before executing the test. This means this step is a part of the runtest not the buildtest -- unlike runtest, currently buildtest is only on Windows. 1. Test batch file is extended to run ildasm followed by ilasm. 2. BuildTest has now an optional flag "ilasmroundtrip" to enable the round-trip tests. Note under this flag, we run both the original binary and the round-trip binary respectively. 3. Test timeout is increased since the round-trip is part of runtime. 4. Did some clean-up on CLRTest.Execute.Batch.targets 5. Bail out the round-trip tests that are built against mscorlib instead of .Net Core. 6. Added /raweh to ildasm due to https://github.com/dotnet/coreclr/issues/2481 7. ilasmroundtrip.targets (~10 tests) are added to enable them by default in a regular test run. Tested with enabling the entire tests (>5K tests) with 'ilasmroundtrip' on, which should be on in a daily or weekly stress mode. --- diff --git a/tests/buildtest.cmd b/tests/buildtest.cmd index 0ce20a778b..5e434a81a4 100644 --- a/tests/buildtest.cmd +++ b/tests/buildtest.cmd @@ -33,6 +33,7 @@ if /i "%1" == "vs2013" (set __VSVersion=%1&shift&goto Arg_Loop) if /i "%1" == "vs2015" (set __VSVersion=%1&shift&goto Arg_Loop) if /i "%1" == "crossgen" (set _crossgen=true&shift&goto Arg_Loop) +if /i "%1" == "ilasmroundtrip" (set _ilasmroundtrip=true&shift&goto Arg_Loop) if /i "%1" == "priority" (set _priorityvalue=%2&shift&shift&goto Arg_Loop) if /i "%1" == "verbose" (set _verbosity=detailed&shift&goto Arg_Loop) @@ -43,6 +44,7 @@ goto Usage :ArgsDone if defined _crossgen echo Building tests with CrossGen enabled.&set _buildParameters=%_buildParameters% /p:CrossGen=true +if defined _ilasmroundtrip echo Building tests with IlasmRoundTrip enabled.&set _buildParameters=%_buildParameters% /p:IlasmRoundTrip=true if defined _priorityvalue echo Building Test Priority %_priorityvalue%&set _buildParameters=%_buildParameters% /p:CLRTestPriorityToBuild=%_priorityvalue% if defined _verbosity echo Enabling verbose file logging if not defined _verbosity set _verbosity=normal @@ -221,5 +223,6 @@ echo Clean - optional argument to force a clean build. echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2015) echo CrossGen - Enables the tests to run crossgen on the test executables before executing them. echo Priority (N) where N is a number greater than zero that signifies the set of tests that will be built and consequently run. +echo IlasmRoundTrip - Enables ilasm round trip build and run of the tests before executing them. echo Verbose - Enables detailed file logging for the msbuild tasks. exit /b 1 diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets index f8c27be279..67805cc120 100644 --- a/tests/src/CLRTest.Execute.Batch.targets +++ b/tests/src/CLRTest.Execute.Batch.targets @@ -46,6 +46,38 @@ if not exist "$(MSBuildProjectName).ni.exe" "%CORE_ROOT%\crossgen.exe" /Platform + + + $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath))) + $(MSBuildProjectName).exe + $(MSBuildProjectName).dasm.il + $(MSBuildProjectName).asm.exe + + + false + + + + + + + + @@ -88,7 +120,7 @@ if not exist "$(MSBuildProjectName).ni.exe" "%CORE_ROOT%\crossgen.exe" /Platform + DependsOnTargets="FetchExternalProperties;GetCrossgenBatchScript;GetIlasmRoundTripBatchScript"> @@ -154,7 +186,7 @@ IF NOT "%CLRTestExitCode%"=="%CLRTestExpectedExitCode%" ( true - envScriptFullPath + CoreRootFullPath @@ -168,33 +200,24 @@ IF NOT "%CLRTestExitCode%"=="%CLRTestExpectedExitCode%" ( - <_CLRTestExeFile Condition="'$(_CLRTestNeedsProjectToRun)' == 'true'">$(_CLRTestToRunFileFullPath) - <_CLRTestExeFile Condition="'$(_CLRTestNeedsProjectToRun)' == 'false'">$(MSBuildProjectName).exe - <_CLRTestExeFile Condition="'$(CLRTestIsHosted)'=='true' And '$(_CLRTestNeedsProjectToRun)'=='true'">$([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath))) - <_CLRTestRunFile Condition="'$(CLRTestIsHosted)'=='true'">"%CORE_ROOT%\corerun.exe" "$(_CLRTestExeFile)" - <_CLRTestRunFile Condition="'$(CLRTestIsHosted)'=='false'">"$(_CLRTestExeFile)" + <_CLRTestRunFile Condition="'$(CLRTestIsHosted)'=='true'">"%CORE_ROOT%\corerun.exe" + - + + @(CLRTestBatchEnvironmentVariable -> '%(Identity)', '%0d%0a') @@ -269,7 +292,7 @@ $(BatchCLRTestArgPrep) <_CLRTestExecutionScriptText> /DLL <_OutputTypeArgument Condition="'$(OutputType)' == 'Exe'">/EXE <_IlasmSwitches>/QUIET /NOLOGO - <_IlasmSwitches Condition="'$(KeyOriginatorFile)' != ''">$(_IlasmSwitches) /KEY=$(KeyOriginatorFile) <_IlasmSwitches Condition="'$(FoldIdenticalMethods)' == 'True'">$(_IlasmSwitches) /FOLD <_IlasmSwitches Condition="'$(SizeOfStackReserve)' != ''">$(_IlasmSwitches) /STACK=$(SizeOfStackReserve) <_IlasmSwitches Condition="'$(DebugType)' == 'Full'">$(_IlasmSwitches) /DEBUG diff --git a/tests/src/JIT/BBT/Scenario4/Not-Int32.ilproj b/tests/src/JIT/BBT/Scenario4/Not-Int32.ilproj index 4ddb8bc690..eebe8b0222 100644 --- a/tests/src/JIT/BBT/Scenario4/Not-Int32.ilproj +++ b/tests/src/JIT/BBT/Scenario4/Not-Int32.ilproj @@ -14,6 +14,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ 7a9bfb7d + true diff --git a/tests/src/JIT/CodeGenBringUpTests/Add1.csproj b/tests/src/JIT/CodeGenBringUpTests/Add1.csproj index 8427c290ec..88ee59d8bd 100644 --- a/tests/src/JIT/CodeGenBringUpTests/Add1.csproj +++ b/tests/src/JIT/CodeGenBringUpTests/Add1.csproj @@ -13,6 +13,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ 7a9bfb7d + true diff --git a/tests/src/JIT/Directed/array-il/_Arrayscomplex3.ilproj b/tests/src/JIT/Directed/array-il/_Arrayscomplex3.ilproj index a85f4e238c..5d6d3c7019 100644 --- a/tests/src/JIT/Directed/array-il/_Arrayscomplex3.ilproj +++ b/tests/src/JIT/Directed/array-il/_Arrayscomplex3.ilproj @@ -15,6 +15,7 @@ ..\..\ true 7a9bfb7d + true diff --git a/tests/src/JIT/Generics/Exceptions/general_class_instance01.csproj b/tests/src/JIT/Generics/Exceptions/general_class_instance01.csproj index 3888e2d206..eb263f8c11 100644 --- a/tests/src/JIT/Generics/Exceptions/general_class_instance01.csproj +++ b/tests/src/JIT/Generics/Exceptions/general_class_instance01.csproj @@ -15,6 +15,7 @@ ..\..\ 7a9bfb7d + true diff --git a/tests/src/JIT/IL_Conformance/Old/directed/heap_ovf.ilproj b/tests/src/JIT/IL_Conformance/Old/directed/heap_ovf.ilproj index afef3a71b4..e6af1f7954 100644 --- a/tests/src/JIT/IL_Conformance/Old/directed/heap_ovf.ilproj +++ b/tests/src/JIT/IL_Conformance/Old/directed/heap_ovf.ilproj @@ -15,6 +15,7 @@ ..\..\ true 7a9bfb7d + true diff --git a/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_d.csproj b/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_d.csproj index 380db83829..d707e581c2 100644 --- a/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_d.csproj +++ b/tests/src/JIT/Methodical/fp/apps/bouncingball_cs_d.csproj @@ -15,6 +15,7 @@ ..\..\ 7a9bfb7d + true diff --git a/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.csproj b/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.csproj index e9f416df72..9263d7ebd5 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.csproj +++ b/tests/src/JIT/Performance/CodeQuality/BenchF/SqMtx/SqMtx.csproj @@ -13,6 +13,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ 7a9bfb7d + true diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b00719/b00719.csproj b/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b00719/b00719.csproj index 54c1f9dcf1..f17ec7f1c7 100644 --- a/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b00719/b00719.csproj +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b00719/b00719.csproj @@ -15,6 +15,7 @@ ..\..\ true 7a9bfb7d + true diff --git a/tests/src/JIT/SIMD/BitwiseOperations.csproj b/tests/src/JIT/SIMD/BitwiseOperations.csproj index 85e8868c6f..d9835c3364 100644 --- a/tests/src/JIT/SIMD/BitwiseOperations.csproj +++ b/tests/src/JIT/SIMD/BitwiseOperations.csproj @@ -13,6 +13,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ 7a9bfb7d + true diff --git a/tests/src/JIT/jit64/eh/basics/loopEH.csproj b/tests/src/JIT/jit64/eh/basics/loopEH.csproj index 6ed553102c..93fd0cb181 100644 --- a/tests/src/JIT/jit64/eh/basics/loopEH.csproj +++ b/tests/src/JIT/jit64/eh/basics/loopEH.csproj @@ -15,6 +15,7 @@ ..\..\ true 7a9bfb7d + true diff --git a/tests/src/JIT/opt/perf/doublealign/Locals.csproj b/tests/src/JIT/opt/perf/doublealign/Locals.csproj index 848d302af8..1141489365 100644 --- a/tests/src/JIT/opt/perf/doublealign/Locals.csproj +++ b/tests/src/JIT/opt/perf/doublealign/Locals.csproj @@ -15,6 +15,7 @@ ..\..\ true 7a9bfb7d + true