diff options
author | Steve MacLean <sdmaclea@qti.qualcomm.com> | 2017-03-23 13:38:50 -0400 |
---|---|---|
committer | Gaurav Khanna <gkhanna@microsoft.com> | 2017-03-23 10:38:50 -0700 |
commit | 087a2eeb4c1384113fe68da1257b98fa99bd0484 (patch) | |
tree | bef64b8df6963e73b99f9eac314be7da46716f93 /tests/runtest.sh | |
parent | 8f485224cd9a5899e5f8e991f2db87cef5566b1b (diff) | |
download | coreclr-087a2eeb4c1384113fe68da1257b98fa99bd0484.tar.gz coreclr-087a2eeb4c1384113fe68da1257b98fa99bd0484.tar.bz2 coreclr-087a2eeb4c1384113fe68da1257b98fa99bd0484.zip |
[Unix] runtest.sh crossgen should exit on failure (#9907)
* Fix crossgen segfault
* Check crossgen in runtests.sh
* Do not use test -v
CI showed bash 4.2 feature test -v is not present on
OSX CI systems. Fall back to more standard bash test
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-x | tests/runtest.sh | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh index 649e236b9d..dd5bf51c3e 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -43,6 +43,7 @@ function print_usage { echo ' -h|--help : Show usage information.' echo ' --useServerGC : Enable server GC for this test run' echo ' --test-env : Script to set environment variables for tests' + echo ' --crossgen : Precompiles the framework managed assemblies' echo ' --runcrossgentests : Runs the ready to run tests' echo ' --jitstress=<n> : Runs the tests with COMPlus_JitStress=n' echo ' --jitstressregs=<n> : Runs the tests with COMPlus_JitStressRegs=n' @@ -370,11 +371,17 @@ function create_core_overlay { } function precompile_overlay_assemblies { + declare -A skipCrossGenFiles + + while read line + do + skipCrossGenFiles[$line]=1 + done < "$(dirname "$0")/skipCrossGenFiles.$ARCH.txt" if [ $doCrossgen == 1 ]; then local overlayDir=$CORE_ROOT - filesToPrecompile=$(ls -trh $overlayDir/*.dll) + filesToPrecompile=$(find -L $overlayDir -iname \*.dll -not -iname \*.ni.dll -not -iname \*-ms-win-\* -type f ) for fileToPrecompile in ${filesToPrecompile} do local filename=${fileToPrecompile} @@ -385,15 +392,23 @@ function precompile_overlay_assemblies { echo Unable to generate dasm for $filename fi else + if [[ ${skipCrossGenFiles[$(basename $filename)]:-0} == 0 ]]; then + continue + fi echo Precompiling $filename - $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null + $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 1> $filename.stdout 2>$filename.stderr local exitCode=$? - if [ $exitCode == -2146230517 ]; then - echo $filename is not a managed assembly. - elif [ $exitCode != 0 ]; then - echo Unable to precompile $filename. + if [[ $exitCode != 0 ]]; then + if grep -q -e '(COR_E_ASSEMBLYEXPECTED)' $filename.stderr; then + printf "\n\t$filename is not a managed assembly.\n\n" + else + echo Unable to precompile $filename. + cat $filename.stdout + cat $filename.stderr + exit $exitCode + fi else - echo Successfully precompiled $filename + rm $filename.{stdout,stderr} fi fi done |