зеркало из https://github.com/microsoft/testfx.git
Fix broken acceptance tests on pipeline (#4080)
This commit is contained in:
Родитель
a6b6696371
Коммит
1012c29696
|
@ -311,7 +311,9 @@ namespace MSTestSdkTest
|
|||
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>
|
||||
|
@ -319,14 +321,14 @@ namespace MSTestSdkTest
|
|||
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);
|
||||
|
|
|
@ -171,6 +171,8 @@ public class TempDirectory : IDisposable
|
|||
<!-- 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>
|
||||
""");
|
||||
|
|
Загрузка…
Ссылка в новой задаче