Skip to content

Commit d7b455b

Browse files
authored
skip build dependencies when running tests (#5671)
- **Avoid using embedded symbols and don't build on test run target** - **Avoid using embedded symbols and don't build on test run target** - **Move to dbprops**
1 parent c5a74de commit d7b455b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
</PropertyGroup>
2323

2424
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
25+
<PropertyGroup>
26+
<CustomAfterTraversalTargets>$(RepoRoot)eng/traversalFixups.targets</CustomAfterTraversalTargets>
27+
</PropertyGroup>
2528

2629
<!--
2730
$(TargetOS) - target operating system (win, linux, osx). Defaults to host OS.
@@ -72,6 +75,9 @@
7275
<SupportedSubProcessTargetFrameworks>net8.0;net9.0;net10.0</SupportedSubProcessTargetFrameworks>
7376
<!-- This is the list of TFMs we build our unit tests as. -->
7477
<SupportedXUnitTestTargetFrameworks>net8.0</SupportedXUnitTestTargetFrameworks>
78+
<!-- Arcade wants to be opinionated and use embedded PDBs for CI/local builds.
79+
We want to test the detached case in general. -->
80+
<DebugType>portable</DebugType>
7581
</PropertyGroup>
7682

7783
</Project>

eng/traversalFixups.targets

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project>
2+
<!-- The traversal project SDK has a test depends on build model. While this is great
3+
to get us closer to the way SDK logic works for vanilla projects, it regresses the official
4+
build in a few ways. It causes a full rebuild making it slow and it surfaces a bug in the SDK where
5+
some settings are not considered as inputs to :
6+
- dotnet test build.proj doesn't work due to dotnet/sdk#51316
7+
- dotnet build /t:Test would work, but we need to fix the build scripts so that build and test are called with the
8+
same properties, otherwise we trigger rebuilds that hit the bug.
9+
This doesn't preclude people from doing `dotnet test` on a specific test project for inner loop.
10+
-->
11+
<PropertyGroup>
12+
<TestDependsOn />
13+
</PropertyGroup>
14+
</Project>

0 commit comments

Comments
 (0)