summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Boemer <sbomer@gmail.com>2016-10-28 12:55:57 -0700
committerSven Boemer <sbomer@gmail.com>2016-11-21 14:21:56 -0800
commit37139ef1a7631e618ee587287b48d49dad04be94 (patch)
treecd709a65a8eef1d52ab18b06e1adcc5bacf2681d
parent13ee34fc2c5cdff0bf8effb04fe870ac82c46ff1 (diff)
downloadcoreclr-37139ef1a7631e618ee587287b48d49dad04be94.tar.gz
coreclr-37139ef1a7631e618ee587287b48d49dad04be94.tar.bz2
coreclr-37139ef1a7631e618ee587287b48d49dad04be94.zip
Enable jit disasm in test scripts
This change adds a section to the generated bash/cmd scripts for each test that will run jit-dasm on the test dll when runtests is invoked with the jitdasm flag. Also begin updating netci.groovy to support jit-diff scenario. Other minor fixes: - Add corefxlab feed for System.CommandLine test dependency Without this, restoring the test dependencies retrieved an obsolete package of the same name from nuget.org. - Skip jit-diff job generation for arm This fixes an assert that was checking that we are in the default scenario on arm. - Fix an assert in netci.groovy - Add branch that skips non-checked configurations for jitdiff scenario. - Fix some dasm failures and a typo in dasm job name - Some jit-dasm runs were failing because the dependencies in the current directory wasn't included in the arguments. - Escape argument to jit-dasm - increase timeout for jit-diff job - Put PR job under a trigger, and some temporary changes for testing - Make PR trigger look for comment - Update Newtonsoft.Json version for compatibility with cijobs - Update cijobs version for retrieving job by commit - Temporarily run only one test - Archive raw dasm output instead of zip - Remove pr-specific logic, enable framework dasm - Remove windows System.Private.CoreLib.ni.dll from test overlay The new test runtime dependencies were placing System.Private.CoreLib.ni.dll in the core_root directory, which resulted in the native image for windows being placed in the coreoverlay directory. We already had similar logic handling this case for mscorlib.ni.dll. This change also fixes the framework dasm output directory to match the test dasm output directory, and fixes some typos in the generated .sh files for running dasm on linux. - Add dasm archiving on non-windows jobs - Use core_root in bash scripts
-rwxr-xr-xnetci.groovy75
-rw-r--r--tests/dir.props3
-rw-r--r--tests/runtest.cmd39
-rwxr-xr-xtests/runtest.sh48
-rw-r--r--tests/src/CLRTest.Execute.Bash.targets3
-rw-r--r--tests/src/CLRTest.Execute.Batch.targets4
-rw-r--r--tests/src/CLRTest.Jit.targets63
-rw-r--r--tests/src/Common/test_dependencies/project.json2
-rw-r--r--tests/src/Common/test_runtime/project.json3
-rw-r--r--tests/src/dirs.proj14
10 files changed, 221 insertions, 33 deletions
diff --git a/netci.groovy b/netci.groovy
index 8550d1921c..a6809eaa91 100755
--- a/netci.groovy
+++ b/netci.groovy
@@ -77,7 +77,7 @@ class Constants {
'r2r_jitstressregs4', 'r2r_jitstressregs8', 'r2r_jitstressregsx10', 'r2r_jitstressregsx80',
'r2r_jitminopts', 'r2r_jitforcerelocs']
// This is the basic set of scenarios
- def static basicScenarios = ['default', 'pri1', 'ilrt', 'r2r', 'pri1r2r', 'gcstress15_pri1r2r', 'longgc', 'coverage', 'formatting', 'gcsimulator', 'standalone_gc'] + r2rJitStressScenarios
+ def static basicScenarios = ['default', 'pri1', 'ilrt', 'r2r', 'pri1r2r', 'gcstress15_pri1r2r', 'longgc', 'coverage', 'formatting', 'gcsimulator', 'jitdiff', 'standalone_gc'] + r2rJitStressScenarios
def static configurationList = ['Debug', 'Checked', 'Release']
// This is the set of architectures
def static architectureList = ['arm', 'arm64', 'x64', 'x86ryujit', 'x86lb']
@@ -140,6 +140,10 @@ def static isLongGc(def scenario) {
return (scenario == 'longgc' || scenario == 'gcsimulator')
}
+def static isJitDiff(def scenario) {
+ return (scenario == 'jitdiff')
+}
+
def static setTestJobTimeOut(newJob, scenario) {
if (isGCStressRelatedTesting(scenario)) {
Utilities.setJobTimeout(newJob, 4320)
@@ -159,6 +163,9 @@ def static setTestJobTimeOut(newJob, scenario) {
else if (isLongGc(scenario)) {
Utilities.setJobTimeout(newJob, 1440)
}
+ else if (isJitDiff(scenario)) {
+ Utilities.setJobTimeout(newJob, 240)
+ }
// Non-test jobs use the default timeout value.
}
@@ -453,6 +460,12 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
}
}
break
+ case 'jitdiff':
+ assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
+ assert configuration == 'Checked'
+ assert (architecture == 'x64' || architecture == 'x86')
+ Utilities.addGithubPushTrigger(job)
+ break
case 'coverage':
assert (os == 'Ubuntu' || os == 'Windows_NT')
assert configuration == 'Release'
@@ -606,6 +619,11 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
}
break
+ case 'jitdiff':
+ if (configuration == 'Checked') {
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Jit Diff Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
+ }
+ break
case 'ilrt':
if (configuration == 'Release') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
@@ -883,6 +901,11 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test")
}
break
+ case 'jitdiff':
+ if (configuration == 'Checked') {
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Jit Diff Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
+ }
+ break
case 'ilrt':
if (configuration == 'Release') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
@@ -1580,7 +1603,7 @@ combinedScenarios.each { scenario ->
}
}
else {
- // If this is a r2r jitstress, jitstressregs, jitminopts or forcerelocs scenario
+ // If this is a r2r jitstress, jitstressregs, jitminopts, or forcerelocs scenario
// and configuration is not Checked, bail out.
if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
return;
@@ -1614,6 +1637,17 @@ combinedScenarios.each { scenario ->
return
}
break
+ case 'jitdiff':
+ if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
+ return
+ }
+ if (architecture != 'x64' && architecture != 'x86') {
+ return
+ }
+ if (configuration != 'Checked') {
+ return
+ }
+ break
case 'r2r':
// The r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
// the default scenario build
@@ -1756,6 +1790,7 @@ combinedScenarios.each { scenario ->
if (Constants.jitStressModeScenarios.containsKey(scenario) ||
scenario == 'default' ||
scenario == 'r2r' ||
+ scenario == 'jitdiff' ||
Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
buildOpts += enableCorefxTesting ? ' skiptests' : ''
buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts}"
@@ -1803,6 +1838,7 @@ combinedScenarios.each { scenario ->
def runjitstressregsStr = ''
def runjitmioptsStr = ''
def runjitforcerelocsStr = ''
+ def runjitdisasmStr = ''
def gcstressStr = ''
def runtestArguments = ''
def gcTestArguments = ''
@@ -1853,11 +1889,16 @@ combinedScenarios.each { scenario ->
gcstressStr = 'gcstresslevel 0xF'
}
+ if (scenario == 'jitdiff')
+ {
+ runjitdisasmStr = 'jitdisasm crossgen'
+ }
+
if (isLongGc(scenario)) {
gcTestArguments = "${scenario} sequential"
}
- runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${gcTestArguments}"
+ runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${gcTestArguments}"
if (Constants.jitStressModeScenarios.containsKey(scenario)) {
if (enableCorefxTesting) {
// Sync to corefx repo
@@ -1906,16 +1947,22 @@ combinedScenarios.each { scenario ->
buildCommands += "build.cmd ${lowerConfiguration} ${arch} linuxmscorlib"
buildCommands += "build.cmd ${lowerConfiguration} ${arch} freebsdmscorlib"
buildCommands += "build.cmd ${lowerConfiguration} ${arch} osxmscorlib"
-
+
// Zip up the tests directory so that we don't use so much space/time copying
// 10s of thousands of files around.
buildCommands += "powershell -Command \"Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('.\\bin\\tests\\${osGroup}.${arch}.${configuration}', '.\\bin\\tests\\tests.zip')\"";
-
- if (!Constants.jitStressModeScenarios.containsKey(scenario)) {
+
+ if (!Constants.jitStressModeScenarios.containsKey(scenario) && scenario != 'jitdiff') {
// For windows, pull full test results and test drops for x86/x64.
// No need to pull for stress mode scenarios (downstream builds use the default scenario)
Utilities.addArchival(newJob, "bin/Product/**,bin/tests/tests.zip")
}
+
+ if (scenario == 'jitdiff') {
+ // retrive jit-dasm output for base commit, and run jit-diff
+
+ Utilities.addArchival(newJob, "bin/tests/${osGroup}.${arch}.${configuration}/dasm/**")
+ }
if (!isBuildOnly) {
if (architecture == 'x64' || !isPR) {
@@ -2227,6 +2274,10 @@ combinedScenarios.each { scenario ->
return
}
break
+ case 'jitdiff':
+ if (configuration != 'Checked') {
+ return;
+ }
case 'r2r':
//Skip configs that aren't Checked or Release (so just Debug, for now)
if (configuration != 'Checked' && configuration != 'Release') {
@@ -2344,6 +2395,7 @@ combinedScenarios.each { scenario ->
def runjitstressregsStr = ''
def runjitmioptsStr = ''
def runjitforcerelocsStr = ''
+ def runjitdisasmStr = ''
def gcstressStr = ''
if (scenario == 'r2r' ||
@@ -2392,6 +2444,11 @@ combinedScenarios.each { scenario ->
gcstressStr = '--gcstresslevel=0xF'
}
+ if (scenario == 'jitdiff')
+ {
+ runjitdisasmStr = '--jitdisasm --crossgen'
+ }
+
if (isLongGc(scenario)) {
// Long GC tests behave very poorly when they are not
// the only test running (many of them allocate until OOM).
@@ -2557,7 +2614,7 @@ combinedScenarios.each { scenario ->
--coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.Release;\${WORKSPACE}/bin/Unix.AnyCPU.Release;\${WORKSPACE}/bin/AnyOS.AnyCPU.Release\" \\
--coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\" \\
--limitedDumpGeneration \\
- ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${sequentialString} ${playlistString}""")
+ ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${sequentialString} ${playlistString}""")
}
}
}
@@ -2569,6 +2626,10 @@ combinedScenarios.each { scenario ->
// addEmailPublisher(newJob, 'clrcoverage@microsoft.com')
}
+ if (scenario == 'jitdiff') {
+ Utilities.addArchival(newJob, "bin/tests/${osGroup}.${architecture}.${configuration}/dasm/**")
+ }
+
// Experimental: If on Ubuntu 14.04, then attempt to pull in crash dump links
if (os in ['Ubuntu']) {
SummaryBuilder summaries = new SummaryBuilder()
diff --git a/tests/dir.props b/tests/dir.props
index 9d93e93b7d..43026caed2 100644
--- a/tests/dir.props
+++ b/tests/dir.props
@@ -54,7 +54,8 @@
<!-- list of nuget package sources passed to dnu -->
<ItemGroup>
- <!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
+ <!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
+ <DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<DnuSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
</ItemGroup>
diff --git a/tests/runtest.cmd b/tests/runtest.cmd
index a369c2950e..86ed0ddc1f 100644
--- a/tests/runtest.cmd
+++ b/tests/runtest.cmd
@@ -32,6 +32,7 @@ set __msbuildExtraArgs=
set __LongGCTests=
set __GCSimulatorTests=
set __AgainstPackages=
+set __JitDisasm=
:Arg_Loop
if "%1" == "" goto ArgsDone
@@ -67,6 +68,7 @@ if /i "%1" == "jitstress" (set COMPlus_JitStress=%2&shift&shift&goto
if /i "%1" == "jitstressregs" (set COMPlus_JitStressRegs=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "jitminopts" (set COMPlus_JITMinOpts=1&shift&shift&goto Arg_Loop)
if /i "%1" == "jitforcerelocs" (set COMPlus_ForceRelocs=1&shift&shift&goto Arg_Loop)
+if /i "%1" == "jitdisasm" (set __JitDisasm=1&shift&goto Arg_Loop)
if /i "%1" == "GenerateLayoutOnly" (set __GenerateLayoutOnly=1&set __SkipWrapperGeneration=true&shift&goto Arg_Loop)
if /i "%1" == "PerfTests" (set __PerfTests=true&set __SkipWrapperGeneration=true&shift&goto Arg_Loop)
if /i "%1" == "runcrossgentests" (set RunCrossGen=true&shift&goto Arg_Loop)
@@ -256,6 +258,8 @@ REM ============================================================================
REM Compile the managed assemblies in Core_ROOT before running the tests
:PrecompileAssembly
+if defined __JitDisasm goto :jitdisasm
+
REM Skip mscorlib since it is already precompiled.
if /I "%3" == "mscorlib.dll" exit /b 0
if /I "%3" == "mscorlib.ni.dll" exit /b 0
@@ -275,6 +279,27 @@ if %__exitCode% neq 0 (
echo Successfully precompiled %2
exit /b 0
+:jitdisasm
+
+if /I "%3" == "mscorlib.ni.dll" exit /b 0
+
+echo "%1\corerun" "%1\jit-dasm.dll" --crossgen %1\crossgen.exe --platform %CORE_ROOT% --output %__TestWorkingDir%\dasm "%2"
+"%1\corerun" "%1\jit-dasm.dll" --crossgen %1\crossgen.exe --platform %CORE_ROOT% --output %__TestWorkingDir%\dasm "%2"
+set /a __exitCode = %errorlevel%
+
+if "%__exitCode%" == "-2146230517" (
+ echo %2 is not a managed assembly.
+ exit /b 0
+)
+
+if %__exitCode% neq 0 (
+ echo Unable to precompile %2
+ exit /b 0
+)
+
+echo Successfully precompiled and generated dasm for %2
+exit /b 0
+
:PrecompileFX
for %%F in (%CORE_ROOT%\*.dll) do call :PrecompileAssembly "%CORE_ROOT%" "%%F" %%~nF%%~xF
exit /b 0
@@ -305,6 +330,7 @@ set __msbuildLogArgs=^
set __msbuildArgs=%* %__msbuildCommonArgs% %__msbuildLogArgs%
@REM The next line will overwrite the existing log file, if any.
+echo %_msbuildexe% %__msbuildArgs%
echo Invoking: %_msbuildexe% %__msbuildArgs% > "%__BuildLog%"
%_msbuildexe% %__msbuildArgs%
@@ -342,13 +368,23 @@ if defined __GCSimulatorTests (
set RunningGCSimulatorTests=1
)
+if defined __JitDisasm (
+ if defined __DoCrossgen (
+ echo Running jit disasm on framework and test assemblies
+ )
+ if not defined __DoCrossgen (
+ echo Running jit disasm on test assemblies only
+ )
+ set RunningJitDisasm=1
+)
+
set __BuildLogRootName=Tests_GenerateRuntimeLayout
call :msbuild "%__ProjectFilesDir%\runtest.proj" /p:GenerateRuntimeLayout=true
if errorlevel 1 (
echo Test Dependency Resolution Failed
exit /b 1
)
-echo %__MsgPrefix% Created the runtime layout with all dependencies in %CORE_ROOT%
+echo %__MsgPrefix%Created the runtime layout with all dependencies in %CORE_ROOT%
exit /b 0
@@ -375,6 +411,7 @@ echo jitstress n - Runs the tests with COMPlus_JitStress=n
echo jitstressregs n - Runs the tests with COMPlus_JitStressRegs=n
echo jitminopts - Runs the tests with COMPlus_JITMinOpts=1
echo jitforcerelocs - Runs the tests with COMPlus_ForceRelocs=1
+echo jitdisasm - Runs jit-dasm on the tests
echo gcstresslevel n - Runs the tests with COMPlus_GCStress=n
echo 0: None 1: GC on all allocs and 'easy' places
echo 2: GC on transitions to preemptive GC 4: GC on every allowable JITed instr
diff --git a/tests/runtest.sh b/tests/runtest.sh
index df552beb48..51c01926ee 100755
--- a/tests/runtest.sh
+++ b/tests/runtest.sh
@@ -50,6 +50,7 @@ function print_usage {
echo ' --jitstressregs=<n> : Runs the tests with COMPlus_JitStressRegs=n'
echo ' --jitminopts : Runs the tests with COMPlus_JITMinOpts=1'
echo ' --jitforcerelocs : Runs the tests with COMPlus_ForceRelocs=1'
+ echo ' --jitdisasm : Runs jit-dasm on the tests'
echo ' --gcstresslevel n : Runs the tests with COMPlus_GCStress=n'
echo ' 0: None 1: GC on all allocs and '"'easy'"' places'
echo ' 2: GC on transitions to preemptive GC 4: GC on every allowable JITed instr'
@@ -392,31 +393,43 @@ function create_core_overlay {
# Test dependencies come from a Windows build, and mscorlib.ni.dll would be the one from Windows
rm -f "$coreOverlayDir/mscorlib.ni.dll"
fi
+ if [ -f "$coreOverlayDir/System.Private.CoreLib.ni.dll" ]; then
+ # Test dependencies come from a Windows build, and System.Private.CoreLib.ni.dll would be the one from Windows
+ rm -f "$coreOverlayDir/System.Private.CoreLib.ni.dll"
+ fi
copy_test_native_bin_to_test_root
}
function precompile_overlay_assemblies {
if [ $doCrossgen == 1 ]; then
-
local overlayDir=$CORE_ROOT
filesToPrecompile=$(ls -trh $overlayDir/*.dll)
for fileToPrecompile in ${filesToPrecompile}
do
local filename=${fileToPrecompile}
- # Precompile any assembly except mscorlib since we already have its NI image available.
- if [[ "$filename" != *"mscorlib.dll"* ]]; then
- if [[ "$filename" != *"mscorlib.ni.dll"* ]]; then
- echo Precompiling $filename
- $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null
- local exitCode=$?
- if [ $exitCode == -2146230517 ]; then
- echo $filename is not a managed assembly.
- elif [ $exitCode != 0 ]; then
- echo Unable to precompile $filename.
- else
- echo Successfully precompiled $filename
+ if [ $jitdisasm == 1]; then
+
+ $overlayDir/corerun $overlayDir/jit-dasm.dll --crossgen $overlayDir/crossgen --platform $overlayDir --output $testRootDir/dasm $filename
+ local exitCode=$?
+ if [ $exitCode != 0 ]; then
+ echo Unable to generate dasm for $filename
+ fi
+ else
+ # Precompile any assembly except mscorlib since we already have its NI image available.
+ if [[ "$filename" != *"mscorlib.dll"* ]]; then
+ if [[ "$filename" != *"mscorlib.ni.dll"* ]]; then
+ echo Precompiling $filename
+ $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null
+ local exitCode=$?
+ if [ $exitCode == -2146230517 ]; then
+ echo $filename is not a managed assembly.
+ elif [ $exitCode != 0 ]; then
+ echo Unable to precompile $filename.
+ else
+ echo Successfully precompiled $filename
+ fi
fi
fi
fi
@@ -973,6 +986,7 @@ limitedCoreDumps=
# Handle arguments
verbose=0
doCrossgen=0
+jitdisasm=0
for i in "$@"
do
@@ -999,6 +1013,9 @@ do
--jitforcerelocs)
export COMPlus_ForceRelocs=1
;;
+ --jitdisasm)
+ jitdisasm=1
+ ;;
--testRootDir=*)
testRootDir=${i#*=}
;;
@@ -1125,6 +1142,11 @@ if [ ! -z "$gcsimulator" ]; then
export RunningGCSimulatorTests=1
fi
+if [ ! -z "$jitdisasm" ]; then
+ echo "Running jit disasm"
+ export RunningJitDisasm=1
+fi
+
# If this is a coverage run, make sure the appropriate args have been passed
if [ "$CoreClrCoverage" == "ON" ]
then
diff --git a/tests/src/CLRTest.Execute.Bash.targets b/tests/src/CLRTest.Execute.Bash.targets
index e9c06ee805..60270a14da 100644
--- a/tests/src/CLRTest.Execute.Bash.targets
+++ b/tests/src/CLRTest.Execute.Bash.targets
@@ -99,7 +99,7 @@ fi
<Target Name="GenerateBashExecutionScript"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(OutputPath)\$(MSBuildProjectName).sh"
- DependsOnTargets="FetchExternalPropertiesForXpalt;$(BashScriptSnippetGen);GetIlasmRoundTripBashScript">
+ DependsOnTargets="FetchExternalPropertiesForXpalt;$(BashScriptSnippetGen);GetJitDisasmBashScript;GetIlasmRoundTripBashScript">
<Message Text="Project depends on $(_CLRTestToRunFileFullPath)." Condition="'$(_CLRTestNeedsProjectToRun)' == 'True'" />
@@ -307,6 +307,7 @@ $(BashEnvironmentVariables)
$(BashCLRTestEnvironmentCompatibilityCheck)
$(BashCLRTestArgPrep)
$(BashCLRTestExitCodePrep)
+$(JitDisasmBashScript)
# IlasmRoundTrip Script
$(IlasmRoundTripBashScript)
# PreCommands
diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets
index d118db724b..5de78b42f6 100644
--- a/tests/src/CLRTest.Execute.Batch.targets
+++ b/tests/src/CLRTest.Execute.Batch.targets
@@ -95,7 +95,7 @@ IF NOT "!ERRORLEVEL!"=="0" (
<Target Name="GenerateBatchExecutionScript"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(OutputPath)\$(MSBuildProjectName).cmd"
- DependsOnTargets="FetchExternalProperties;$(BatchScriptSnippetGen);GetIlasmRoundTripBatchScript">
+ DependsOnTargets="FetchExternalProperties;$(BatchScriptSnippetGen);GetJitDisasmBatchScript;GetIlasmRoundTripBatchScript">
<Message Text="Project depends on $(_CLRTestToRunFileFullPath)." Condition="'$(_CLRTestNeedsProjectToRun)' == 'True'" />
@@ -327,6 +327,8 @@ $(BatchEnvironmentVariables)
$(BatchCLRTestEnvironmentCompatibilityCheck)
+$(JitDisasmBatchScript)
+
REM IlasmRoundTrip Script
$(IlasmRoundTripBatchScript)
diff --git a/tests/src/CLRTest.Jit.targets b/tests/src/CLRTest.Jit.targets
index c295634d55..4eb632722e 100644
--- a/tests/src/CLRTest.Jit.targets
+++ b/tests/src/CLRTest.Jit.targets
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
***********************************************************************************************
@@ -18,18 +19,68 @@ WARNING: When setting properties based on their current state (for example:
***********************************************************************************************
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition="$(RunWithGcStress) != ''" >
- <CLRTestBatchPreCommands>
+
+ <Target Name="GetJitDisasmBashScript"
+ Returns="$(JitDisasmBashScript)">
+ <PropertyGroup>
+ <InputAssemblyName Condition="'$(CLRTestKind)' == 'RunOnly'">$([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace("\","/"))</InputAssemblyName>
+ <InputAssemblyName Condition="'$(CLRTestKind)' == 'BuildAndRun'">$(MSBuildProjectName).exe</InputAssemblyName>
+ <JitDisasmOut>$(BaseOutputPathWithConfig.Replace("\","/"))dasm/$(BuildProjectRelativeDir.Replace("\","/"))</JitDisasmOut>
+ <JitDisasmBashScript>
+<![CDATA[
+# JitDisasm Script
+if [ ! -z $RunningJitDisasm ]
+then
+ echo $CORE_ROOT/corerun "$CORE_ROOT/jit-dasm.dll" --crossgen $CORE_ROOT/crossgen.exe --platform $CORE_ROOT --output $(JitDisasmOut) $(InputAssemblyName)
+ "$CORE_ROOT/corerun" "$CORE_ROOT/jit-dasm" --crossgen $CORE_ROOT/crossgen.exe --platform $CORE_ROOT --output $(JitDisasmOut) $(InputAssemblyName)
+ if [ $ERRORLEVEL -ne 0 ]
+ then
+ echo EXECUTION OF JIT-DASM - FAILED $ERRORLEVEL
+ exit 1
+ fi
+fi
+]]>
+ </JitDisasmBashScript>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="GetJitDisasmBatchScript"
+ Returns="$(JitDisasmBatchScript)">
+ <PropertyGroup>
+ <InputAssemblyName Condition="'$(CLRTestKind)' == 'RunOnly'">$([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)))</InputAssemblyName>
+ <InputAssemblyName Condition="'$(CLRTestKind)' == 'BuildAndRun'">$(MSBuildProjectName).exe</InputAssemblyName>
+ <JitDisasmOut>$(BaseOutputPathWithConfig)dasm\$(BuildProjectRelativeDir)</JitDisasmOut>
+ <JitDisasmBatchScript>
+<![CDATA[
+REM JitDisasm Script
+if defined RunningJitDisasm (
+ echo %CORE_ROOT%\corerun %CORE_ROOT%\jit-dasm.dll --crossgen %CORE_ROOT%/crossgen.exe --platform %CORE_ROOT%%3B%25cd%25 --output $(JitDisasmOut) $(InputAssemblyName)
+ %CORE_ROOT%\corerun %CORE_ROOT%\jit-dasm.dll --crossgen %CORE_ROOT%/crossgen.exe --platform %CORE_ROOT%%3B%25cd%25 --output $(JitDisasmOut) $(InputAssemblyName)
+ IF NOT "!ERRORLEVEL!"=="0" (
+ ECHO EXECUTION OF JIT-DASM - FAILED !ERRORLEVEL!
+ Exit /b 1
+ )
+ Exit /b 0
+)
+ ]]>
+ </JitDisasmBatchScript>
+ </PropertyGroup>
+ </Target>
+
+ <PropertyGroup Condition="$(RunWithGcStress) != ''" >
+ <CLRTestBatchPreCommands>
<![CDATA[
$(CLRTestBatchPreCommands)
set COMPlus_GCStress=$(RunWithGcStress)
]]>
- </CLRTestBatchPreCommands>
- <BashCLRTestPreCommands>
+ </CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands>
<![CDATA[
$(BashCLRTestPreCommands)
export COMPlus_GCStress=$(RunWithGcStress)
]]>
- </BashCLRTestPreCommands>
- </PropertyGroup>
+ </BashCLRTestPreCommands>
+ </PropertyGroup>
+
+
</Project>
diff --git a/tests/src/Common/test_dependencies/project.json b/tests/src/Common/test_dependencies/project.json
index 918b5d79d0..98447885df 100644
--- a/tests/src/Common/test_dependencies/project.json
+++ b/tests/src/Common/test_dependencies/project.json
@@ -8,7 +8,7 @@
"Microsoft.DotNet.xunit.performance.analysis": "1.0.0-alpha-build0040",
"Microsoft.DotNet.xunit.performance.runner.Windows": "1.0.0-alpha-build0040",
"Microsoft.Win32.Primitives": "4.4.0-beta-24710-01",
- "Newtonsoft.Json": "7.0.1",
+ "Newtonsoft.Json": "8.0.3",
"Microsoft.NETCore.Platforms": "1.2.0-beta-24710-01",
"Microsoft.NETCore.Targets": "1.2.0-beta-24710-01",
"System.Collections.Immutable": "1.4.0-beta-24710-01",
diff --git a/tests/src/Common/test_runtime/project.json b/tests/src/Common/test_runtime/project.json
index 0e718d9f4b..2c7c15f414 100644
--- a/tests/src/Common/test_runtime/project.json
+++ b/tests/src/Common/test_runtime/project.json
@@ -1,6 +1,9 @@
{
"dependencies": {
"Microsoft.DotNet.CoreCLR.TestDependencies": "1.0.0-prerelease",
+ "jit-dasm": "0.0.1.1",
+ "cijobs": "0.0.1.2",
+ "jit-analyze": "0.0.1.0"
},
"frameworks": {
"netcoreapp1.1": {
diff --git a/tests/src/dirs.proj b/tests/src/dirs.proj
index 99a50a4f6c..bb793022a7 100644
--- a/tests/src/dirs.proj
+++ b/tests/src/dirs.proj
@@ -25,12 +25,22 @@
</ItemGroup>
<ItemGroup>
- <Project Include="*\**\*.csproj" Exclude="@(DisabledProjects)">
+ <Project Include="JIT\RyuJit\DoWhileBndChk.csproj" Exclude="@(DisabledProjects)">
<AdditionalProperties>OSGroup=$(OSGroup)</AdditionalProperties>
</Project>
- <Project Include="*\**\*.ilproj" Exclude="@(DisabledProjects)">
+
+<!-- <Project Include="JIT\**\*.csproj" Exclude="@(DisabledProjects)">
+ <AdditionalProperties>OSGroup=$(OSGroup)</AdditionalProperties>
+ </Project>
+ -->
+ <!--
+ <Project Include="*\**\*.csproj" Exclude="@(DisabledProjects)">
<AdditionalProperties>OSGroup=$(OSGroup)</AdditionalProperties>
</Project>
+ <Project Include="*\**\*.ilproj" Exclude="@(DisabledProjects)">
+ <AdditionalProperties>OSGroup=$(OSGroup)</AdditionalProperties>
+ </Project>
+ -->
</ItemGroup>
</Target>