diff options
author | Eugene Rozenfeld <erozen@microsoft.com> | 2015-12-15 17:40:43 -0800 |
---|---|---|
committer | Eugene Rozenfeld <erozen@microsoft.com> | 2015-12-21 15:20:57 -0800 |
commit | 3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069 (patch) | |
tree | 0510ffcdfef296301d5c9e52a663453f5780afb1 /tests | |
parent | ea7f6d05953cd1660b07621dac11d4d204d3bbbb (diff) | |
download | coreclr-3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069.tar.gz coreclr-3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069.tar.bz2 coreclr-3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069.zip |
Enable checked builds of CoreCLR.
In checked builds coreclr, mscorlib, and the test are built optimized
but assertion checking is on. This adds additional coverage (the jit is
optimizing and assertion checking is on), speeds up testing compared to debug,
and allows testing JIT stress modes.
This doesn't affect CoreFX.
Several tests are currently failing in checked configuration due to newly
discovered bugs (JIT asserts). We didn't see these asserts in debug mode
because by default JIT is in minopt mode; we didn't see these bugs in release
mode because assertion checking is off. I will file the bugs once checked build
changes are in.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/buildtest.cmd | 4 | ||||
-rw-r--r-- | tests/runtest.cmd | 3 | ||||
-rw-r--r-- | tests/src/dir.common.props | 6 |
4 files changed, 18 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2021fd1add..c45f42431c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,14 @@ # Require at least version 2.8.12 of CMake cmake_minimum_required(VERSION 2.8.12) +if (CMAKE_CONFIGURATION_TYPES) # multi-configuration generator? + set(CMAKE_CONFIGURATION_TYPES "Debug;Checked;Release;RelWithDebInfo" CACHE STRING "" FORCE) +endif (CMAKE_CONFIGURATION_TYPES) +set(CMAKE_C_FLAGS_CHECKED "") +set(CMAKE_CXX_FLAGS_CHECKED "") +set(CMAKE_EXE_LINKER_FLAGS_CHECKED "") +set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "") + set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform) if (WIN32) add_definitions(-DWINDOWS=1) diff --git a/tests/buildtest.cmd b/tests/buildtest.cmd index 795d287eb6..08bedebe5a 100644 --- a/tests/buildtest.cmd +++ b/tests/buildtest.cmd @@ -25,6 +25,7 @@ if /i "%1" == "x64" (set __BuildArch=x64&shift&goto Arg_Loop) if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop) if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop) +if /i "%1" == "checked" (set __BuildType=Checked&shift&goto Arg_Loop) if /i "%1" == "clean" (set __CleanBuild=1&shift&goto Arg_Loop) @@ -161,7 +162,6 @@ setlocal call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat" if not defined VSINSTALLDIR echo Error: build.cmd should be run from a Visual Studio Command Prompt. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions. && exit /b 1 - :BuildTests echo Starting the Managed Tests Build @@ -215,7 +215,7 @@ echo Usage: echo %0 BuildArch BuildType [clean] [vsversion] [crossgen] [priority N] [verbose] where: echo. echo BuildArch can be: x64 -echo BuildType can be: Debug, Release +echo BuildType can be: Debug, Release, Checked echo Clean - optional argument to force a clean build. echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2015) echo CrossGen - Enables the tests to run crossgen on the test executables before executing them. diff --git a/tests/runtest.cmd b/tests/runtest.cmd index 7414e46193..0f92eb25b3 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -18,6 +18,7 @@ if /i "%1" == "x86" (set __BuildArch=x86&set __MSBuildBuildArch=x86&shift&got if /i "%1" == "debug" (set __BuildType=debug&shift&goto Arg_Loop) if /i "%1" == "release" (set __BuildType=release&shift&goto Arg_Loop) +if /i "%1" == "checked" (set __BuildType=checked&shift&goto Arg_Loop) if /i "%1" == "SkipWrapperGeneration" (set __SkipWrapperGeneration=true&shift&goto Arg_Loop) if /i "%1" == "Exclude" (set __Exclude=%2&shift&shift&goto Arg_Loop) if /i "%1" == "Exclude0" (set __Exclude0=%2&shift&shift&goto Arg_Loop) @@ -153,7 +154,7 @@ echo Usage: echo %0 BuildArch BuildType [SkipWrapperGeneration] [Exclude EXCLUSION_TARGETS] [TestEnv TEST_ENV_SCRIPT] [vsversion] CORE_ROOT where: echo. echo BuildArch is x64, x86 -echo BuildType can be: Debug, Release +echo BuildType can be: Debug, Release, Checked echo SkipWrapperGeneration- Optional parameter - this will run the same set of tests as the last time it was run echo Exclude0- Optional parameter - specify location of default exclusion file (defaults to issues.targets if not specified) echo Set to "" to disable default exclusion file. diff --git a/tests/src/dir.common.props b/tests/src/dir.common.props index 4f332e41d4..a04f439244 100644 --- a/tests/src/dir.common.props +++ b/tests/src/dir.common.props @@ -26,6 +26,12 @@ <DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType> <DefineConstants>$(DefineConstants);TRACE</DefineConstants> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)' == 'Checked'"> + <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> + <Optimize Condition="'$(Optimize)' == ''">true</Optimize> + <DebugType Condition="'$(DebugType)' == ''">full</DebugType> + <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants> + </PropertyGroup> <!-- Setup the default output and intermediate paths --> <PropertyGroup> |