Skip to content

Commit

Permalink
Fix broken acceptance tests on pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Nov 19, 2024
1 parent a6b6696 commit cbbb0f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,24 @@ public async Task NativeAot_Smoke_Test_Windows()
AssetName,
SingleTestSourceCode
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)
.PatchCodeWithReplace("$TargetFramework$", TargetFrameworks.NetCurrent.Arguments)
// temporarily set test to be on net9.0 as it's fixing one error that started to happen: error IL3000: System.Net.Quic.MsQuicApi..cctor
// see https://github.com/dotnet/sdk/issues/44880.
.PatchCodeWithReplace("$TargetFramework$", "net9.0")
.PatchCodeWithReplace("$ExtraProperties$", $"""
<PublishAot>true</PublishAot>
<EnableMicrosoftTestingExtensionsCodeCoverage>false</EnableMicrosoftTestingExtensionsCodeCoverage>
"""),
addPublicFeeds: true);
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync(
$"publish -r {RID} -f {TargetFrameworks.NetCurrent.Arguments} {testAsset.TargetAssetPath}",
$"publish -r {RID} -f net9.0 {testAsset.TargetAssetPath}",
_acceptanceFixture.NuGetGlobalPackagesFolder.Path,
// We prefer to use the outer retry mechanism as we need some extra checks
retryCount: 0);
compilationResult.AssertOutputContains("Generating native code");
compilationResult.AssertOutputNotContains("warning");
var testHost = TestHost.LocateFrom(testAsset.TargetAssetPath, AssetName, TargetFrameworks.NetCurrent.Arguments, verb: Verb.publish);
var testHost = TestHost.LocateFrom(testAsset.TargetAssetPath, AssetName, "net9.0", verb: Verb.publish);
TestHostResult testHostResult = await testHost.ExecuteAsync();
testHostResult.AssertExitCodeIs(ExitCodes.Success);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ internal static (string BaseDirectory, string FinalDirectory) CreateUniqueDirect
<!-- Do not warn about package downgrade. NuGet uses alphabetical sort as ordering so -dev or -ci are considered downgrades of -preview. -->
<NoWarn>NU1605</NoWarn>
<RunAnalyzers>false</RunAnalyzers>
<!-- Prevent build warnings/errors on unsupported TFMs -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
</Project>
""");
Expand Down

0 comments on commit cbbb0f7

Please sign in to comment.