diff options
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-x | tests/runtest.sh | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh index 1c67a70db7..8a917c3bf4 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -11,8 +11,7 @@ function print_usage { echo ' --testNativeBinDir="coreclr/bin/obj/Linux.x64.Debug/tests"' echo ' --coreClrBinDir="coreclr/bin/Product/Linux.x64.Debug"' echo ' --mscorlibDir="windows/coreclr/bin/Product/Linux.x64.Debug"' - echo ' --coreFxBinDir="corefx/bin/Linux.AnyCPU.Debug"' - echo ' --coreFxNativeBinDir="corefx/bin/Linux.x64.Debug"' + echo ' --coreFxBinDir="corefx/bin/runtime/netcoreapp-Linux-Debug-x64' echo '' echo 'Required arguments:' echo ' --testRootDir=<path> : Root directory of the test build (e.g. coreclr/bin/tests/Windows_NT.x64.Debug).' @@ -22,14 +21,13 @@ function print_usage { echo 'Optional arguments:' echo ' --coreOverlayDir=<path> : Directory containing core binaries and test dependencies. If not specified, the' echo ' default is testRootDir/Tests/coreoverlay. This switch overrides --coreClrBinDir,' - echo ' --mscorlibDir, --coreFxBinDir, and --coreFxNativeBinDir.' + echo ' --mscorlibDir, and --coreFxBinDir.' echo ' --coreClrBinDir=<path> : Directory of the CoreCLR build (e.g. coreclr/bin/Product/Linux.x64.Debug).' echo ' --mscorlibDir=<path> : Directory containing the built mscorlib.dll. If not specified, it is expected to be' echo ' in the directory specified by --coreClrBinDir.' - echo ' --coreFxBinDir="<path>[;<path>]" : List of one or more directories with CoreFX build outputs (semicolon-delimited)' - echo ' (e.g. "corefx/bin/Linux.AnyCPU.Debug;corefx/bin/Unix.AnyCPU.Debug;corefx/bin/AnyOS.AnyCPU.Debug").' + echo ' --coreFxBinDir="<path>" : Directory with CoreFX build outputs' + echo ' (e.g. "corefx/bin/runtime/netcoreapp-Linux-Debug-x64")' echo ' If files with the same name are present in multiple directories, the first one wins.' - echo ' --coreFxNativeBinDir=<path> : Directory of the CoreFX native build (e.g. corefx/bin/Linux.x64.Debug).' echo ' --testDir=<path> : Run tests only in the specified directory. The path is relative to the directory' echo ' specified by --testRootDir. Multiple of this switch may be specified.' echo ' --testDirFile=<path> : Run tests only in the directories specified by the file at <path>. Paths are listed' @@ -97,6 +95,7 @@ xunitOutputPath= xunitTestOutputPath= # libExtension determines extension for dynamic library files +# runtimeName determines where CoreFX Runtime files will be located OSName=$(uname -s) libExtension= case $OSName in @@ -353,12 +352,6 @@ function create_core_overlay { if [ -z "$coreFxBinDir" ]; then exit_with_error "$errorSource" "One of --coreOverlayDir or --coreFxBinDir must be specified." "$printUsage" fi - if [ -z "$coreFxNativeBinDir" ]; then - exit_with_error "$errorSource" "One of --coreOverlayDir or --coreFxBinDir must be specified." "$printUsage" - fi - if [ ! -d "$coreFxNativeBinDir/Native" ]; then - exit_with_error "$errorSource" "Directory specified by --coreNativeFxBinDir does not exist: $coreFxNativeBinDir/Native" - fi # Create the overlay coreOverlayDir=$testRootDir/Tests/coreoverlay @@ -368,21 +361,7 @@ function create_core_overlay { fi mkdir "$coreOverlayDir" - while IFS=';' read -ra coreFxBinDirectories; do - for currDir in "${coreFxBinDirectories[@]}"; do - if [ ! -d "$currDir" ]; then - exit_with_error "$errorSource" "Directory specified in --coreFxBinDir does not exist: $currDir" - fi - pushd $currDir > /dev/null - for dirName in $(find . -iname '*.dll' \! -iwholename '*test*' \! -iwholename '*/ToolRuntime/*' \! -iwholename '*/RemoteExecutorConsoleApp/*' \! -iwholename '*/net*' \! -iwholename '*aot*' -exec dirname {} \; | uniq | sed 's/\.\/\(.*\)/\1/g'); do - cp -n -v "$currDir/$dirName/$dirName.dll" "$coreOverlayDir/" - done - popd $currDur > /dev/null - done - done <<< $coreFxBinDir - - cp -f -v "$coreFxNativeBinDir/Native/"*."$libExtension" "$coreOverlayDir/" 2>/dev/null - + cp -f -v "$coreFxBinDir/"* "$coreOverlayDir/" 2>/dev/null cp -f -v "$coreClrBinDir/"* "$coreOverlayDir/" 2>/dev/null cp -f -v "$mscorlibDir/mscorlib.dll" "$coreOverlayDir/" 2>/dev/null if [ -d "$mscorlibDir/bin" ]; then @@ -409,8 +388,7 @@ function precompile_overlay_assemblies { for fileToPrecompile in ${filesToPrecompile} do local filename=${fileToPrecompile} - if [ $jitdisasm == 1]; then - + 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 @@ -613,7 +591,7 @@ function print_info_from_core_file { function download_dumpling_script { echo "Downloading latest version of dumpling script." - wget "https://raw.githubusercontent.com/Microsoft/dotnet-reliability/master/src/triage.python/dumpling.py" + wget "https://dumpling.azurewebsites.net/api/client/dumpling.py" local dumpling_script="dumpling.py" chmod +x $dumpling_script @@ -644,8 +622,11 @@ function upload_core_file_to_dumpling { paths_to_add=$coreClrBinDir fi + # Ensure the script has Unix line endings + perl -pi -e 's/\r\n|\n|\r/\n/g' "$dumpling_script" + # The output from this will include a unique ID for this dump. - ./$dumpling_script "--corefile" "$core_file_name" "upload" "--addpaths" $paths_to_add "--squelch" | tee -a $dumpling_file + ./$dumpling_script "upload" "--dumppath" "$core_file_name" "--incpaths" $paths_to_add "--properties" "Project=CoreCLR" "--squelch" | tee -a $dumpling_file } function preserve_core_file { @@ -968,7 +949,6 @@ coreOverlayDir= coreClrBinDir= mscorlibDir= coreFxBinDir= -coreFxNativeBinDir= coreClrObjs= coreClrSrc= coverageOutputDir= @@ -1035,9 +1015,6 @@ do --coreFxBinDir=*) coreFxBinDir=${i#*=} ;; - --coreFxNativeBinDir=*) - coreFxNativeBinDir=${i#*=} - ;; --testDir=*) testDirectories[${#testDirectories[@]}]=${i#*=} ;; @@ -1143,7 +1120,7 @@ if [ ! -z "$gcsimulator" ]; then export RunningGCSimulatorTests=1 fi -if [ ! -z "$jitdisasm" ]; then +if [[ ! "$jitdisasm" -eq 0 ]]; then echo "Running jit disasm" export RunningJitDisasm=1 fi |