Skip to content
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

[automated] Merge branch 'main' => 'release/dev17.14' #18272

Open
wants to merge 7 commits into
base: release/dev17.14
Choose a base branch
from
Prev Previous commit
Next Next commit
Tests: Fix flaky AssemblyVersion tests (#18268)
  • Loading branch information
majocha authored Jan 27, 2025
commit a3bf3c96e5f85cea5fa2f53feb60eaeb8b7b1868
10 changes: 10 additions & 0 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,16 @@ or
> Please note, that by default, **Release** version of IL baseline tests will be running in CI, so when updating baseline (.bsl) files, make sure to add `-c Release` flag to the build command.


### Parallel execution of tests

Tests utilizing xUnit framework by default run in parallel. If your tests depend on some shared state or are time-critical, you can add the module to predefined `NotThreadSafeResourceCollection` to prevent parallel execution.
For example:
```fsharp
[<Collection(nameof NotThreadSafeResourceCollection)>]
module TimeCritical =
```


### Updating FCS surface area baselines

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,23 @@ module CustomAttributes_AttributeUsage =
|> verifyCompileAndRun
|> shouldSucceed

// SOURCE=AssemblyVersion03.fs # AssemblyVersion03.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"AssemblyVersion03.fs"|])>]
let ``AssemblyVersion03_fs`` compilation =
compilation
|> withOptions ["--nowarn:52"]
|> verifyCompileAndRun
|> shouldSucceed

// SOURCE=AssemblyVersion04.fs # AssemblyVersion04.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"AssemblyVersion04.fs"|])>]
let ``AssemblyVersion04_fs`` compilation =
compilation
|> withOptions ["--nowarn:52"]
|> verifyCompileAndRun
|> shouldSucceed
[<Collection(nameof NotThreadSafeResourceCollection)>]
module TimeCritical =
// SOURCE=AssemblyVersion03.fs # AssemblyVersion03.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"AssemblyVersion03.fs"|])>]
let ``AssemblyVersion03_fs`` compilation =
compilation
|> withOptions ["--nowarn:52"]
|> verifyCompileAndRun
|> shouldSucceed

// SOURCE=AssemblyVersion04.fs # AssemblyVersion04.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"AssemblyVersion04.fs"|])>]
let ``AssemblyVersion04_fs`` compilation =
compilation
|> withOptions ["--nowarn:52"]
|> verifyCompileAndRun
|> shouldSucceed

// SOURCE=AttributeTargetsIsCtor01.fs # AttributeTargetsIsCtor01.fs
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"AttributeTargetsIsCtor01.fs"|])>]
Expand Down