diff --git a/eng/Configurations.props b/eng/Configurations.props index 764887c3ae5a6f..94646e7991b87c 100644 --- a/eng/Configurations.props +++ b/eng/Configurations.props @@ -43,6 +43,7 @@ OSX FreeBSD NetBSD + SunOS Linux Windows_NT $(TargetOS) diff --git a/eng/build.sh b/eng/build.sh index 64496fd1080506..36e68ef1c1dc42 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -18,7 +18,7 @@ usage() { echo "Common settings:" echo " --subset Build a subset, print available subsets with -subset help (short: -s)" - echo " --os Build operating system: Windows_NT, Linux, FreeBSD, OSX, tvOS, iOS, Android or Browser" + echo " --os Build operating system: Windows_NT, Linux, FreeBSD, OSX, tvOS, iOS, Android, Browser, NetBSD or SunOS" echo " --arch Build platform: x86, x64, arm, armel, arm64 or wasm" echo " --configuration Build configuration: Debug, Release or [CoreCLR]Checked (short: -c)" echo " --runtimeConfiguration Runtime build configuration: Debug, Release or [CoreCLR]Checked (short: -rc)" @@ -108,16 +108,16 @@ while [[ $# > 0 ]]; do exit 0 ;; -subset|-s) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then arguments="$arguments /p:Subset=help" shift 1 - else + else arguments="$arguments /p:Subset=$2" shift 2 fi ;; -arch) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No architecture supplied. See help (--help) for supported architectures." 1>&2 exit 1 fi @@ -125,7 +125,7 @@ while [[ $# > 0 ]]; do shift 2 ;; -configuration|-c) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No configuration supplied. See help (--help) for supported configurations." 1>&2 exit 1 fi @@ -134,7 +134,7 @@ while [[ $# > 0 ]]; do shift 2 ;; -framework|-f) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No framework supplied. See help (--help) for supported frameworks." 1>&2 exit 1 fi @@ -143,7 +143,7 @@ while [[ $# > 0 ]]; do shift 2 ;; -os) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No target operating system supplied. See help (--help) for supported target operating systems." 1>&2 exit 1 fi @@ -156,7 +156,7 @@ while [[ $# > 0 ]]; do shift 1 ;; -testscope) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No test scope supplied. See help (--help) for supported test scope values." 1>&2 exit 1 fi @@ -172,7 +172,7 @@ while [[ $# > 0 ]]; do shift 1 ;; -runtimeconfiguration|-rc) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No runtime configuration supplied. See help (--help) for supported runtime configurations." 1>&2 exit 1 fi @@ -181,7 +181,7 @@ while [[ $# > 0 ]]; do shift 2 ;; -librariesconfiguration|-lc) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No libraries configuration supplied. See help (--help) for supported libraries configurations." 1>&2 exit 1 fi @@ -198,7 +198,7 @@ while [[ $# > 0 ]]; do shift 1 ;; -cmakeargs) - if [ -z ${2+x} ]; then + if [ -z ${2+x} ]; then echo "No cmake args supplied." 1>&2 exit 1 fi diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index 27381c68d0e35b..309244b9671cc3 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -409,7 +409,7 @@ done # Get the number of processors available to the scheduler # Other techniques such as `nproc` only get the number of # processors available to a single process. -platform=$(uname) +platform="$(uname)" if [[ "$platform" == "FreeBSD" ]]; then __NumProc=$(sysctl hw.ncpu | awk '{ print $2+1 }') elif [[ "$platform" == "NetBSD" || "$platform" == "SunOS" ]]; then diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 735f77b0282178..e0301cb6b3fc13 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -227,15 +227,13 @@ if (CLR_CMAKE_HOST_UNIX) if(CLR_CMAKE_HOST_OSX) message("Detected OSX x86_64") - endif(CLR_CMAKE_HOST_OSX) - - if(CLR_CMAKE_HOST_FREEBSD) + elseif(CLR_CMAKE_HOST_FREEBSD) message("Detected FreeBSD amd64") - endif(CLR_CMAKE_HOST_FREEBSD) - - if(CLR_CMAKE_HOST_NETBSD) + elseif(CLR_CMAKE_HOST_NETBSD) message("Detected NetBSD amd64") - endif(CLR_CMAKE_HOST_NETBSD) + elseif(CLR_CMAKE_HOST_SUNOS) + message("Detected SunOS amd64") + endif(CLR_CMAKE_HOST_SUNOS) endif(CLR_CMAKE_HOST_UNIX) if (CLR_CMAKE_HOST_WIN32) @@ -373,6 +371,8 @@ if(CLR_CMAKE_TARGET_UNIX) add_definitions(-DTARGET_LINUX) elseif(CLR_CMAKE_TARGET_NETBSD) add_definitions(-DTARGET_NETBSD) + elseif(CLR_CMAKE_TARGET_SUNOS) + add_definitions(-DTARGET_SUNOS) elseif(CLR_CMAKE_TARGET_ANDROID) add_definitions(-DTARGET_ANDROID) endif() diff --git a/eng/run-test.sh b/eng/run-test.sh index abd1d920b1615a..5f14e6f6121bec 100644 --- a/eng/run-test.sh +++ b/eng/run-test.sh @@ -15,12 +15,12 @@ wait_on_pids() usage() { - echo "Runs .NET CoreFX tests on FreeBSD, NetBSD or Linux" + echo "Runs .NET CoreFX tests on FreeBSD, Linux, NetBSD or SunOS" echo "usage: run-test [options]" echo echo "Input sources:" echo " --runtime Location of root of the binaries directory" - echo " containing the FreeBSD, NetBSD or Linux runtime" + echo " containing the FreeBSD, Linux, NetBSD or SunOS runtime" echo " default: /bin/testhost/netcoreapp---" echo " --corefx-tests Location of the root binaries location containing" echo " the tests to run" @@ -29,7 +29,7 @@ usage() echo "Flavor/OS/Architecture options:" echo " --configuration Configuration to run (Debug/Release)" echo " default: Debug" - echo " --os OS to run (FreeBSD, NetBSD or Linux)" + echo " --os OS to run (FreeBSD, Linux, NetBSD or SunOS)" echo " default: detect current OS" echo " --arch Architecture to run (x64, arm, armel, x86, arm64)" echo " default: detect current architecture" @@ -236,34 +236,34 @@ done # Compute paths to the binaries if they haven't already been computed -if [ "$Runtime" == "" ] +if [ -z "$Runtime" ] then Runtime="$ProjectRoot/artifacts/bin/testhost/netcoreapp-$OS-$Configuration-$__Arch" fi -if [ "$CoreFxTests" == "" ] +if [ -z "$CoreFxTests" ] then CoreFxTests="$ProjectRoot/artifacts/bin" fi # Check parameters up front for valid values: -if [ ! "$Configuration" == "Debug" ] && [ ! "$Configuration" == "Release" ] +if [ "$Configuration" != "Debug" ] && [ "$Configuration" != "Release" ] then echo "error: Configuration should be Debug or Release" exit 1 fi -if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "NetBSD" ] && [ ! "$OS" == "Linux" ] +if [ "$OS" != "FreeBSD" ] && [ "$OS" != "Linux" ] && [ "$OS" != "NetBSD" ] && [ "$OS" != "SunOS" ] then - echo "error: OS should be FreeBSD, NetBSD or Linux" + echo "error: OS should be FreeBSD, Linux, NetBSD or Linux" exit 1 fi export CORECLR_SERVER_GC="$serverGC" export PAL_OUTPUTDEBUGSTRING="1" -if [ "$LANG" == "" ] +if [ -z "$LANG" ] then export LANG="en_US.UTF-8" fi @@ -285,7 +285,10 @@ if [ $RunTestSequential -eq 1 ] then maxProcesses=1; else - if [ `uname` = "NetBSD" ] || [ `uname` = "FreeBSD" ]; then + platform="$(uname)" + if [ "$platform" = "FreeBSD" ]; then + maxProcesses=$(sysctl hw.ncpu | awk '{ print $2+1 }') + if [ "$platform" = "NetBSD" ] || [ "$platform" = "SunOS" ] ; then maxProcesses=$(($(getconf NPROCESSORS_ONLN)+1)) else maxProcesses=$(($(getconf _NPROCESSORS_ONLN)+1)) diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props index 2f427328fd5fd6..f89923d3ab86ce 100644 --- a/eng/targetframeworksuffix.props +++ b/eng/targetframeworksuffix.props @@ -62,6 +62,13 @@ netbsd + + + true + true + sunos + + true diff --git a/src/coreclr/dir.common.props b/src/coreclr/dir.common.props index e4d212b2aee164..2ff54f14de24a2 100644 --- a/src/coreclr/dir.common.props +++ b/src/coreclr/dir.common.props @@ -55,10 +55,11 @@ true true true + true true true - true + true $(__DistroRid) diff --git a/src/coreclr/run-cppcheck.sh b/src/coreclr/run-cppcheck.sh index c505fd184dedc3..46e51e1e7471fc 100755 --- a/src/coreclr/run-cppcheck.sh +++ b/src/coreclr/run-cppcheck.sh @@ -17,13 +17,13 @@ usage() check_dependencies() { # Check presence of cppcheck on the path - if [ "$RunCppCheck" == true ] + if [ "$RunCppCheck" = "true" ] then hash cppcheck 2>/dev/null || { echo >&2 "Please install cppcheck before running this script"; exit 1; } fi - + # Check presence of sloccount on the path - if [ "$RunSlocCount" == true ] + if [ "$RunSlocCount" = "true" ] then hash sloccount 2>/dev/null || { echo >&2 "Please install sloccount before running this script"; exit 1; } fi @@ -39,9 +39,10 @@ SloccountOutput="sloccount.sc" # Get the number of processors available to the scheduler # Other techniques such as `nproc` only get the number of # processors available to a single process. -if [ `uname` = "FreeBSD" ]; then -NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'` -elif [ `uname` = "NetBSD" ]; then +platform="$(uname)" +if [ "$platform" = "FreeBSD" ]; then +NumProc=$(sysctl hw.ncpu | awk '{ print $2+1 }') +elif [ "$platform" = "NetBSD" || "$platform" = "SunOS" ]; then NumProc=$(($(getconf NPROCESSORS_ONLN)+1)) else NumProc=$(($(getconf _NPROCESSORS_ONLN)+1)) @@ -80,19 +81,19 @@ do esac done -if [ "$FilesFromArgs" != "" ]; +if [ -n "$FilesFromArgs" ]; then Files=$FilesFromArgs fi -if [ "$CppCheckOutput" == "" ]; +if [ -z "$CppCheckOutput" ]; then echo "Expected: file for cppcheck output" usage exit 1 fi -if [ "$SloccountOutput" == "" ]; +if [ -z "$SloccountOutput" ]; then echo "Expected: file for sloccount output" usage @@ -101,14 +102,14 @@ fi check_dependencies -if [ "$RunCppCheck" == true ] +if [ "$RunCppCheck" = "true" ] then echo "Running cppcheck for files: $Files" cppcheck --enable=all -j $NumProc --xml --xml-version=2 --force $Files 2> $CppCheckOutput CppCheckOutputs="$CppCheckOutput (cppcheck)" fi -if [ "$RunSlocCount" == true ] +if [ "$RunSlocCount" = "true" ] then echo "Running sloccount for files: $Files" sloccount --wide --details $Files > $SloccountOutput diff --git a/src/coreclr/src/.nuget/Directory.Build.props b/src/coreclr/src/.nuget/Directory.Build.props index e321b384626e0e..2fd932c03b84ee 100644 --- a/src/coreclr/src/.nuget/Directory.Build.props +++ b/src/coreclr/src/.nuget/Directory.Build.props @@ -28,7 +28,7 @@ $(OSRid) - Windows_NT;OSX;Android;Linux;FreeBSD + Windows_NT;OSX;Android;Linux;FreeBSD;NetBSD;SunOS ;$(SupportedPackageOSGroups); + netbsd-$(TargetArchitecture) + + + + + sunos-$(TargetArchitecture) + + sunos-$(TargetArchitecture) + + android.21-$(TargetArchitecture) @@ -159,6 +173,12 @@ + + + + + + x86 diff --git a/src/coreclr/src/.nuget/Microsoft.NET.Sdk.IL/targets/Microsoft.NET.Sdk.IL.targets b/src/coreclr/src/.nuget/Microsoft.NET.Sdk.IL/targets/Microsoft.NET.Sdk.IL.targets index 299511fa2a8be4..f2c0a3fb649733 100644 --- a/src/coreclr/src/.nuget/Microsoft.NET.Sdk.IL/targets/Microsoft.NET.Sdk.IL.targets +++ b/src/coreclr/src/.nuget/Microsoft.NET.Sdk.IL/targets/Microsoft.NET.Sdk.IL.targets @@ -7,7 +7,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and created a backup copy. Incorrect changes to this file will make it impossible to load or build your projects from the command-line or the IDE. -Copyright (c) .NET Foundation. All rights reserved. +Copyright (c) .NET Foundation. All rights reserved. *********************************************************************************************** --> @@ -24,13 +24,15 @@ Copyright (c) .NET Foundation. All rights reserved. <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('linux'))">linux <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('osx'))">osx <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('freebsd'))">freebsd + <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('netbsd'))">netbsd + <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('sunos'))">sunos <_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) $(_OSPlatform)-$(_OSArchitecture.ToLower()) 5.0.0 runtime.$(MicrosoftNetCoreIlasmPackageRuntimeId).microsoft.netcore.ilasm runtime.$(MicrosoftNetCoreIlasmPackageRuntimeId).microsoft.netcore.ildasm - + <_IlasmDir Condition="'$(ILAsmToolPath)' != ''">$([MSBuild]::NormalizeDirectory($(ILAsmToolPath))) @@ -68,8 +70,8 @@ Copyright (c) .NET Foundation. All rights reserved. - @@ -122,7 +124,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_KeyFileArgument Condition="'$(KeyOriginatorFile)' != ''">-KEY="$(KeyOriginatorFile)" - <_IlasmSwitches>-QUIET -NOLOGO + <_IlasmSwitches>-QUIET -NOLOGO <_IlasmSwitches Condition="'$(FoldIdenticalMethods)' == 'True'">$(_IlasmSwitches) -FOLD <_IlasmSwitches Condition="'$(SizeOfStackReserve)' != ''">$(_IlasmSwitches) -STACK=$(SizeOfStackReserve) <_IlasmSwitches Condition="'$(DebugType)' == 'Full'">$(_IlasmSwitches) -DEBUG diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt index 4358d79669b452..4260ea92d19166 100644 --- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt @@ -61,10 +61,10 @@ else(CLR_CMAKE_HOST_WIN32) set(EXPORTS_LINKER_OPTION "${EXPORTS_LINKER_OPTION} -Wl,--no-warn-shared-textrel") endif(CLR_CMAKE_TARGET_ANDROID AND CLR_CMAKE_HOST_ARCH_ARM) - if(CLR_CMAKE_HOST_SUNOS) + if(CLR_CMAKE_TARGET_SUNOS) # Add linker exports file option set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) - endif(CLR_CMAKE_HOST_SUNOS) + endif(CLR_CMAKE_TARGET_SUNOS) endif (CLR_CMAKE_HOST_WIN32) diff --git a/src/coreclr/src/inc/pedecoder.h b/src/coreclr/src/inc/pedecoder.h index ad0e77e532c157..c4f4e92b6b613a 100644 --- a/src/coreclr/src/inc/pedecoder.h +++ b/src/coreclr/src/inc/pedecoder.h @@ -95,6 +95,8 @@ inline CHECK CheckOverflow(RVA value1, COUNT_T value2) #define IMAGE_FILE_MACHINE_NATIVE_OS_OVERRIDE 0x7B79 #elif defined(__NetBSD__) #define IMAGE_FILE_MACHINE_NATIVE_OS_OVERRIDE 0x1993 +#elif defined(__sun) +#define IMAGE_FILE_MACHINE_NATIVE_OS_OVERRIDE 0x1992 #else #define IMAGE_FILE_MACHINE_NATIVE_OS_OVERRIDE 0 #endif diff --git a/src/coreclr/src/jit/CMakeLists.txt b/src/coreclr/src/jit/CMakeLists.txt index 8ba2c47973fde4..0fd69af5982090 100644 --- a/src/coreclr/src/jit/CMakeLists.txt +++ b/src/coreclr/src/jit/CMakeLists.txt @@ -325,7 +325,7 @@ else() set(JIT_EXPORTS_LINKER_OPTION -Wl,--version-script=${JIT_EXPORTS_FILE}) elseif(CLR_CMAKE_TARGET_OSX) set(JIT_EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${JIT_EXPORTS_FILE}) - elseif(CLR_CMAKE_HOST_SUNOS) + elseif(CLR_CMAKE_TARGET_SUNOS) # Add linker exports file option set(JIT_EXPORTS_LINKER_OPTION -Wl,-M,${JIT_EXPORTS_FILE}) endif() diff --git a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt index 37ff7de67a1fc0..2d2d037ca29c69 100644 --- a/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt +++ b/src/coreclr/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt @@ -26,10 +26,10 @@ if(CLR_CMAKE_TARGET_OSX) set(EXPORTS_LINKER_OPTION1 -Wl,-exported_symbols_list,${EXPORTS_FILE1}) endif(CLR_CMAKE_TARGET_OSX) -if(CLR_CMAKE_HOST_SUNOS) +if(CLR_CMAKE_TARGET_SUNOS) # Add linker exports file option set(EXPORTS_LINKER_OPTION -Wl,-M,${EXPORTS_FILE}) -endif(CLR_CMAKE_HOST_SUNOS) +endif(CLR_CMAKE_TARGET_SUNOS) set(DLL1SOURCES dlltest1.cpp) add_library(paltest_pal_sxs_test1_dll1 SHARED ${DLL1SOURCES}) diff --git a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs index 808f8ed03c5836..7d76bf5259b78c 100644 --- a/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs +++ b/src/coreclr/src/tools/Common/Compiler/DependencyAnalysis/Target_X64/TargetRegisterMap.cs @@ -34,6 +34,8 @@ public TargetRegisterMap(TargetOS os) case TargetOS.Linux: case TargetOS.OSX: case TargetOS.FreeBSD: + case TargetOS.SunOS: + case TargetOS.NetBSD: Arg0 = Register.RDI; Arg1 = Register.RSI; Arg2 = Register.RDX; diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs index 162df18395aab2..9337d7670904aa 100644 --- a/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs +++ b/src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs @@ -31,6 +31,7 @@ public enum TargetOS OSX, FreeBSD, NetBSD, + SunOS, WebAssembly, } diff --git a/src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs b/src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs index d4ba4683609c2e..0b943d6233991c 100644 --- a/src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs +++ b/src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/ObjectWriter/TargetExtensions.cs @@ -20,6 +20,7 @@ public enum MachineOSOverride : ushort Apple = 0x4644, FreeBSD = 0xADC4, NetBSD = 0x1993, + SunOS = 0x1992, } /// diff --git a/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs b/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs index c252c306d46a04..729a492215755a 100644 --- a/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs +++ b/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs @@ -31,6 +31,7 @@ public enum OperatingSystem FreeBSD = 0xADC4, Linux = 0x7B79, NetBSD = 0x1993, + SunOS = 0x1992, Windows = 0, Unknown = -1 } diff --git a/src/coreclr/tests/scripts/run-corefx-tests.sh b/src/coreclr/tests/scripts/run-corefx-tests.sh index 03d186f04c9d5e..39a87d03834d23 100755 --- a/src/coreclr/tests/scripts/run-corefx-tests.sh +++ b/src/coreclr/tests/scripts/run-corefx-tests.sh @@ -16,7 +16,7 @@ usage() echo "Flavor/OS/Architecture options:" echo " --configuration Configuration to run (Debug/Release)" echo " default: Debug" - echo " --os OS to run (FreeBSD, Linux, NetBSD or OSX)" + echo " --os OS to run (FreeBSD, Linux, NetBSD, OSX, SunOS)" echo " default: detect current OS" echo " --arch Architecture to run (x64, arm, armel, x86, arm64)" echo " default: detect current architecture" @@ -37,7 +37,7 @@ usage() echo "Runtime Code Coverage options:" echo " --coreclr-coverage Optional argument to get coreclr code coverage reports" echo " --coreclr-objs Location of root of the object directory" - echo " containing the FreeBSD, Linux, NetBSD or OSX coreclr build" + echo " containing the FreeBSD, Linux, NetBSD, OSX or SunOS coreclr build" echo " default: /bin/obj/.x64. Location of root of the directory" echo " containing the coreclr source files" @@ -81,6 +81,10 @@ case $OSName in OS=NetBSD ;; + SunOS) + OS=SunOS + ;; + *) echo "Unsupported OS $OSName detected, configuring as if for Linux" OS=Linux @@ -342,7 +346,7 @@ run_test() coreclr_code_coverage() { - if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "Linux" ] && [ ! "$OS" == "NetBSD" ] && [ ! "$OS" == "OSX" ] ; then + if [ "$OS" != "FreeBSD" ] && [ "$OS" != "Linux" ] && [ "$OS" != "NetBSD" ] && [ "$OS" != "OSX" ] && [ "$OS" != "SunOS" ] ; then echo "error: Code Coverage not supported on $OS" exit 1 fi @@ -501,9 +505,9 @@ then exit 1 fi -if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "Linux" ] && [ ! "$OS" == "NetBSD" ] && [ ! "$OS" == "OSX" ] +if [ "$OS" != "FreeBSD" ] && [ "$OS" != "Linux" ] && [ "$OS" != "NetBSD" ] && [ "$OS" != "OSX" ] && [ "$OS" != "SunOS" ] then - echo "error: OS should be FreeBSD, Linux, NetBSD or OSX" + echo "error: OS should be FreeBSD, Linux, NetBSD, OSX or SunOS" exit 1 fi diff --git a/src/coreclr/tests/scripts/run-gc-reliability-framework.sh b/src/coreclr/tests/scripts/run-gc-reliability-framework.sh index 8f8886a1bc84dd..c136c1561ec9ca 100755 --- a/src/coreclr/tests/scripts/run-gc-reliability-framework.sh +++ b/src/coreclr/tests/scripts/run-gc-reliability-framework.sh @@ -18,6 +18,9 @@ case $OSName in OS=NetBSD ;; + SunOS) + OS=SunOS + ;; *) echo "Unsupported OS $OSName detected, configuring as if for Linux" OS=Linux diff --git a/src/coreclr/tests/setup-stress-dependencies.sh b/src/coreclr/tests/setup-stress-dependencies.sh index 400a78003f6d53..a81c8fff7b2a75 100755 --- a/src/coreclr/tests/setup-stress-dependencies.sh +++ b/src/coreclr/tests/setup-stress-dependencies.sh @@ -82,7 +82,7 @@ if [ -z "$libInstallDir" ]; then exit_with_error 1 fi -if [ "$__BuildArch" == "arm64" ] || [ "$__BuildArch" == "arm" ]; then +if [ "$__BuildArch" = "arm64" ] || [ "$__BuildArch" = "arm" ]; then echo "No runtime dependencies for arm32/arm64" exit $EXIT_CODE_SUCCESS fi diff --git a/src/coreclr/tests/src/Directory.Build.props b/src/coreclr/tests/src/Directory.Build.props index fd07aff01d369e..c4ed9921bd310a 100644 --- a/src/coreclr/tests/src/Directory.Build.props +++ b/src/coreclr/tests/src/Directory.Build.props @@ -91,6 +91,20 @@ ubuntu.14.04-$(TargetArchitecture) + + + true + true + ubuntu.14.04-$(TargetArchitecture) + + + + + true + true + ubuntu.14.04-$(TargetArchitecture) + + @@ -109,7 +123,7 @@ - true + true C# IL diff --git a/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj b/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj index d43bf082a225b5..440413d3e2853b 100644 --- a/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj +++ b/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj @@ -16,7 +16,7 @@ - +