Skip to content

Commit

Permalink
unique project names in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin521 committed Feb 27, 2025
1 parent 991bb3d commit 53d8e94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/FSharp.Test.Utilities/CompilerAssert.fs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ and Compilation =

module CompilerAssertHelpers =

let uniqueName =
let mutable counter = 0
fun (ext: string) -> $"test%x{Interlocked.Increment &counter}{ext}"

let UseTransparentCompiler =
FSharp.Compiler.CompilerConfig.FSharpExperimentalFeaturesEnabledAutomatically ||
not (String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("TEST_TRANSPARENT_COMPILER")))
Expand Down Expand Up @@ -407,7 +411,7 @@ module CompilerAssertHelpers =
#endif
|]
{
ProjectFileName = "Z:\\test.fsproj"
ProjectFileName = "Z:\\" ++ uniqueName ".fsproj"
ProjectId = None
SourceFiles = [|"test.fs"|]
OtherOptions = Array.append testDefaults assemblies
Expand Down

0 comments on commit 53d8e94

Please sign in to comment.