Sdk test projects (#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)
commiteddc1a621b66d63ac9feda289f08fc0e9f67f850
tree6fc79a1d2daab52f4e70ef85ab1d068fe064295c
parent2b92e13d9c015de34b12487131932410148ffb80
Sdk test projects (#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.
15 files changed:
build-test.cmd
tests/dir.props
tests/dir.sdkbuild.props
tests/override.targets
tests/runtest.proj
tests/src/CLRTest.Execute.Batch.targets
tests/src/CLRTest.Execute.targets
tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
tests/src/Common/Directory.Build.props [new file with mode: 0644]
tests/src/Common/Directory.Build.targets [new file with mode: 0644]
tests/src/Directory.Build.props [new file with mode: 0644]
tests/src/Directory.Build.targets [new file with mode: 0644]
tests/src/dir.targets
tests/src/nobuild.targets [new file with mode: 0644]
tests/src/runonly.targets [new file with mode: 0644]