Skip to content

Allow repos to opt-out of building tests #46394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@

<!-- Only pass these properites through when necessary to reduce command line noise. -->
<BuildArgs Condition="'$(CrossBuild)' == 'true'">$(BuildArgs) /p:CrossBuild=true</BuildArgs>
<BuildArgs Condition="'$(DotNetBuildTests)' == 'true'">$(BuildArgs) /p:DotNetBuildTests=true</BuildArgs>
<BuildArgs Condition="'$(NuGetConfigFile)' != ''">$(BuildArgs) /p:RestoreConfigFile=$(NuGetConfigFile)</BuildArgs>
<BuildArgs Condition="'$(DotNetBuildUseMonoRuntime)' == 'true'">$(BuildArgs) /p:DotNetBuildUseMonoRuntime=$(DotNetBuildUseMonoRuntime)</BuildArgs>
<BuildArgs Condition="'$(OfficialBuildId)' != ''">$(BuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</BuildArgs>
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/repo-projects/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
<BuildArgs>$(BuildArgs) /p:PortableBuild=$(PortableBuild)</BuildArgs>
<BuildArgs Condition="'$(ShortStack)' != 'true' and '$(TargetOS)' != 'linux-musl'">$(BuildArgs) /p:RuntimeOS=$(RuntimeOS)</BuildArgs>
<BuildArgs Condition="'$(ShortStack)' != 'true' and '$(TargetOS)' != 'linux-musl'">$(BuildArgs) /p:BaseOS=$(BaseOS)</BuildArgs>

<!-- Only pass when enabled to reduce command line noise. -->
<BuildArgs Condition="'$(DotNetBuildTests)' == 'true' and '$(DotNetBuildTestsOptOut)' != 'true'">$(BuildArgs) /p:DotNetBuildTests=true</BuildArgs>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/repo-projects/aspnetcore.proj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<BuildArgs>$(BuildArgs) /p:EnablePackageValidation=false</BuildArgs>

<LogVerbosityOptOut>true</LogVerbosityOptOut>

<!-- Tests are failing to build: https://github.com/dotnet/aspnetcore/issues/60095 -->
<DotNetBuildTestsOptOut>true</DotNetBuildTestsOptOut>
</PropertyGroup>

<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
Expand Down
5 changes: 5 additions & 0 deletions src/SourceBuild/content/repo-projects/efcore.proj
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- Tests are failing to build: https://github.com/dotnet/efcore/issues/35547 -->
<DotNetBuildTestsOptOut>true</DotNetBuildTestsOptOut>
</PropertyGroup>

<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="runtime" />
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/repo-projects/roslyn.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<PropertyGroup>
<LogVerbosityOptOut>true</LogVerbosityOptOut>

<!-- Tests are failing to build: https://github.com/dotnet/roslyn/issues/76960 -->
<DotNetBuildTestsOptOut>true</DotNetBuildTestsOptOut>

<!-- Roslyn's build.cmd adds -build automatically. On non-windows, use the default -->
<BuildActions Condition="'$(BuildOS)' == 'windows'">$(FlagParameterPrefix)restore</BuildActions>
<BuildActions Condition="'$(BuildOS)' == 'windows'">$(BuildActions) $(FlagParameterPrefix)pack</BuildActions>
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/repo-projects/vstest.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<PropertyGroup>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>

<!-- Tests are failing to build: https://github.com/microsoft/vstest/issues/14994 -->
<DotNetBuildTestsOptOut>true</DotNetBuildTestsOptOut>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<!-- For product build, the .NET Framework TFM only builds in the second build pass as it depends on assets from other
verticals that are built in the first build pass.
Disabling this project as references are not building in this case. -->
<ExcludeFromBuild Condition="'$(DotNetBuild)' == 'true' and '$(DotNetBuildPass)' != '2'">true</ExcludeFromBuild>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>

<!-- By default test projects don't append TargetFramework to output path, but for multi-targeted tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<PropertyGroup>
<TargetFrameworks>net472;$(ToolsetTargetFramework)</TargetFrameworks>
<TargetFrameworks Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' ">$(ToolsetTargetFramework)</TargetFrameworks>
<!-- For product build, the .NET Framework TFM only builds in the second build pass as it depends on assets from other
verticals that are built in the first build pass. -->
<TargetFrameworks Condition="'$(DotNetBuild)' == 'true' and '$(DotNetBuildPass)' != '2'">$(ToolsetTargetFramework)</TargetFrameworks>
<OutputType Condition="'$(TargetFramework)' == '$(ToolsetTargetFramework)'">Exe</OutputType>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>

Expand Down
Loading