forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
15 changed files
with
84 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<!-- | ||
Common files don't take part in the root tests\src\Directory.Build.props | ||
This file prevents them from including it as it gets included in its place | ||
If they ever need to take part, we can conditionally include them as documented | ||
here https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<!-- | ||
Common files don't take part in the root tests\src\Directory.Build.targets | ||
This file prevents them from including it as it gets included in its place | ||
If they ever need to take part, we can conditionally include them as documented | ||
here https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- SDK Style projects auto-magically include this file. | ||
We include the dir.props for them here so they partake in the old | ||
style of build without them needing to explicitly include anything --> | ||
<Import Project="dir.props" Condition="'$(UsingMicrosoftNETSdk)' == 'true'" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- SDK Style projects auto-magically include this file. | ||
We include the dir.targets for them here so they partake in the old | ||
style of build without them needing to explicitly include anything --> | ||
<Import Project="dir.targets" Condition="'$(UsingMicrosoftNETSdk)' == 'true'" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Target Name="CreateManifestResourceNames" /> | ||
<Target Name="Compile" /> | ||
<Target Name="CoreCompile" /> | ||
<Target Name="Build" /> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Target Name="CreateManifestResourceNames" /> | ||
<Target Name="Compile" /> | ||
<Target Name="CoreCompile" /> | ||
|
||
<!-- if this is a RunOnly project that has been scheduled to build, make the output directory and build any dependent projects --> | ||
<Target Name="Build" Condition="('$(CLRTestKind)'=='RunOnly') And '$(_WillCLRTestProjectBuild)'"> | ||
<MSBuild Projects="@(ProjectReference)" /> | ||
<MakeDir ContinueOnError="false" Directories="$(OutputPath)" /> | ||
</Target> | ||
|
||
</Project> |