Sdk test projects (dotnet/coreclr#19044)
authorChris Sienkiewicz <chsienki@microsoft.com>
Wed, 25 Jul 2018 18:13:27 +0000 (11:13 -0700)
committerGitHub <noreply@github.com>
Wed, 25 Jul 2018 18:13:27 +0000 (11:13 -0700)
commit30788d2c31dcf400def00feba197564acf6044da
tree0e645cc0cc15713571c78fef71ed70f2c93ba320
parent0a8e6d922c55f59c796bb7eb4cb0e72e7da93db3
Sdk test projects (dotnet/coreclr#19044)

Change the associated targets and props files in the test directory to allow the test csproj's to be built as SDK style projects alongside traditional style projects.

Remove CodeTaskFactory:
- Allows the projects to be built using the core version of msbuild/dotnet build
- Converted to using msbuild property expansion instead

Add directory.build.{props,targets}:
- Currently we just import the dirs.props and targets, but means SDK style projects don't need to explicitly include these files
- We probably want to move all projects over to using these in the future, but this keeps the changes smaller for now

Specific code for SDK projects:
- There are a several changes required to build an SDK project. This change guards them behind conditionals so that only the new style projects see them. When we get to the point that there are only new projects, we can remove the guards (probably at the same time as ditching the dir.props)

Reordered build targets:
- Because SDK projects implicitly import the build targets, we can no longer re-define the build targets unconditionally knowing they will likely be overwritten.
- Instead we move the overwritten targets to separate files, and include these conditionally based on properties. In this way there is always a build defined for SDK projects, which can then be overwritten to do nothing as needed.

Commit migrated from https://github.com/dotnet/coreclr/commit/eddc1a621b66d63ac9feda289f08fc0e9f67f850
15 files changed:
src/coreclr/build-test.cmd
src/coreclr/tests/dir.props
src/coreclr/tests/dir.sdkbuild.props
src/coreclr/tests/override.targets
src/coreclr/tests/runtest.proj
src/coreclr/tests/src/CLRTest.Execute.Batch.targets
src/coreclr/tests/src/CLRTest.Execute.targets
src/coreclr/tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
src/coreclr/tests/src/Common/Directory.Build.props [new file with mode: 0644]
src/coreclr/tests/src/Common/Directory.Build.targets [new file with mode: 0644]
src/coreclr/tests/src/Directory.Build.props [new file with mode: 0644]
src/coreclr/tests/src/Directory.Build.targets [new file with mode: 0644]
src/coreclr/tests/src/dir.targets
src/coreclr/tests/src/nobuild.targets [new file with mode: 0644]
src/coreclr/tests/src/runonly.targets [new file with mode: 0644]