-
Notifications
You must be signed in to change notification settings - Fork 831
Skip tests using nuget from signed builds #19111
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces new test attributes to skip tests that require NuGet package restore when running in signed builds. Signed builds operate under network isolation for security reasons, which prevents NuGet package restoration from working. The PR adds three new xUnit test attributes (FactSkipOnSignedBuild, TheorySkipOnSignedBuild, and FactForNETCOREAPPSkipOnSignedBuild) that check the SIGNTYPE environment variable and skip tests when it equals "Real". These attributes are then applied to approximately 30 tests across the test suite that use #r "nuget:" directives or NuGet packages.
Key changes:
- Added
SignedBuildSkipmodule with reusable skip logic in test utilities - Created three new conditional skip attributes for different test scenarios
- Applied skip attributes to FSI printing tests, regression tests, and scripting/dependency manager tests
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/FSharp.Test.Utilities/Utilities.fs | Defines SignedBuildSkip module and three new test attributes (FactSkipOnSignedBuild, TheorySkipOnSignedBuild, FactForNETCOREAPPSkipOnSignedBuild) that check for signed builds via the SIGNTYPE environment variable |
| tests/fsharp/tests.fs | Applies FactSkipOnSignedBuild attribute to FSI printing tests (which use NuGet via test.fsx) and large input regression tests (12322, 13219, 13710) that require NuGet packages |
| tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs | Marks one test that uses #r nuget directives with the skip attribute |
| tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs | Applies skip attributes to multiple scripting tests that use NuGet packages, including ML.NET, FSharpPlus, and other NuGet-dependent scenarios |
| tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs | Marks dependency manager tests that restore and use NuGet packages with the skip attribute |
(network isolation need for signed builds)