diff options
author | Sven Boemer <sbomer@gmail.com> | 2016-10-28 12:55:57 -0700 |
---|---|---|
committer | Sven Boemer <sbomer@gmail.com> | 2016-11-21 14:21:56 -0800 |
commit | 37139ef1a7631e618ee587287b48d49dad04be94 (patch) | |
tree | cd709a65a8eef1d52ab18b06e1adcc5bacf2681d /tests/runtest.sh | |
parent | 13ee34fc2c5cdff0bf8effb04fe870ac82c46ff1 (diff) | |
download | coreclr-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
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-x | tests/runtest.sh | 48 |
1 files changed, 35 insertions, 13 deletions
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 |