From 3ae10f3449a203e3dbb94cff4bf3044314340cc9 Mon Sep 17 00:00:00 2001 From: Rama Krishnan Raghupathy Date: Thu, 10 Mar 2016 15:45:22 -0800 Subject: [PATCH] Enabling standalone builds for Test Project of any Priority --- Documentation/building/windows-test-instructions.md | 18 ++++++++++++++++++ tests/src/Common/test_runtime/test_runtime.csproj | 5 ++--- tests/src/dir.targets | 13 ++++++++++--- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Documentation/building/windows-test-instructions.md b/Documentation/building/windows-test-instructions.md index 6b74834..87d0b79 100644 --- a/Documentation/building/windows-test-instructions.md +++ b/Documentation/building/windows-test-instructions.md @@ -35,6 +35,14 @@ To run a clean, priority 1, crossgen test pass: Additionally, there is a Visual Studio solution, `\tests\src\AllTestProjects.sln`, where users can build a particular testcase, or all priority 0 testcases that are within it. +**Building Individual Tests** + +Note: buildtest.cmd or build.cmd skipnative skipmscorlib needs to be run atleast once + +* Native Test: Build the generated Visual Studio solution or make file corresponding to Test cmake file. + +* Managed Test: You can invoke msbuild on the project directly from Visual Studio Command Prompt. + **Running Tests** In a clean command prompt: `\tests\runtest.cmd` @@ -83,3 +91,13 @@ If test changes are needed, make the change and build the test project. This wil 8. Add any other projects as a dependency, if needed. 9. Build the test. 10. Follow the steps to re-run a failed test to validate the new test. + +Note: + +1. You can disable building of a test per architecture or configuration by using DisableProjectBuild tag in the project. for example: + + ```` + + ``true`` + + ```` diff --git a/tests/src/Common/test_runtime/test_runtime.csproj b/tests/src/Common/test_runtime/test_runtime.csproj index e9e3a5a..08881fd 100644 --- a/tests/src/Common/test_runtime/test_runtime.csproj +++ b/tests/src/Common/test_runtime/test_runtime.csproj @@ -4,8 +4,6 @@ Debug AnyCPU - Library - false BuildOnly @@ -15,4 +13,5 @@ - \ No newline at end of file + + diff --git a/tests/src/dir.targets b/tests/src/dir.targets index a792d14..8faec24 100644 --- a/tests/src/dir.targets +++ b/tests/src/dir.targets @@ -64,14 +64,21 @@ - + + false + <_WillCLRTestProjectBuild Condition="'$(_WillCLRTestProjectBuild)' == ''">false + <_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' != true">true + <_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' != true And '$(BuildAllProjects)' == true And '$(CLRTestPriority)' <= '$(CLRTestPriorityToBuild)'">true + + + - + @@ -96,7 +103,7 @@ -- 2.7.4