Skip to content

Commit 2cfcebe

Browse files
committed
cleanup
1 parent 154134f commit 2cfcebe

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

tests/ParallelTypeCheckingTests/Program.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let _parse (argv: string[]): Args =
2626
{
2727
Path = path
2828
LineLimit = None
29-
Mode = mode
29+
Method = mode
3030
WorkingDir = workingDir
3131
}
3232

tests/ParallelTypeCheckingTests/Tests/AssemblySetUp.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace global
22
open NUnit.Framework
33
open ParallelTypeCheckingTests
4+
open OpenTelemetry.Trace
45

56
/// One-time Otel setup for NUnit tests
67
[<SetUpFixture>]
@@ -13,5 +14,9 @@ type AssemblySetUp() =
1314

1415
[<OneTimeTearDown>]
1516
member this.TearDown() =
16-
tracerProvider |> Option.iter (fun x -> x.Dispose())
17+
tracerProvider
18+
|> Option.iter (fun x ->
19+
x.ForceFlush() |> ignore
20+
x.Dispose()
21+
)
1722
tracerProvider <- None

tests/ParallelTypeCheckingTests/Tests/TestCompilationFromCmdlineArgs.fs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,18 @@ open Utils
1111

1212
let codebases =
1313
[
14-
//@"$CODE_ROOT$\tests\FSharp.Compiler.ComponentTests", @"$CODE_ROOT$\tests\ParallelTypeCheckingTests\ComponentTests_args.txt"
15-
//@"$CODE_ROOT$\src\compiler", @"$CODE_ROOT$\tests\ParallelTypeCheckingTests\Tests\FCSArgs.txt"
16-
@"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 360
1714
@"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", None
18-
//@"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS_no_fsi.txt", Some 227
19-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 227
20-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 239
21-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 256
22-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 308
23-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 407
24-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", Some 502
25-
// // @"$CODE_ROOT$\src\compiler", @"$CODE_ROOT$\tests\ParallelTypeCheckingTests\Tests\FCS_323.txt"
26-
// // @"$CODE_ROOT$\src\compiler", @"$CODE_ROOT$\tests\ParallelTypeCheckingTests\Tests\FCS_434.txt"
27-
// @"$CODE_ROOT$\src\compiler", @"c:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCS.txt", None
2815
]
2916

3017
let configs =
31-
[Method.Sequential; Method.ParallelFs; Method.Graph; Method.Nojaf]
18+
[Method.Graph]
3219
|> List.allPairs codebases
3320
|> List.map (fun ((workDir, path, lineLimit : int option), method) ->
3421
{
3522
Path = path
3623
LineLimit = lineLimit
3724
WorkingDir = Some workDir
38-
Mode = method
25+
Method = method
3926
}
4027
)
4128

@@ -57,19 +44,20 @@ let setupArgsMethod (method: Method) (args: string[]): string[] =
5744
Array.append args [|"--test:ParallelCheckingWithSignatureFilesOn"|]
5845

5946
let setupParsed config =
60-
let {Path = path; LineLimit = lineLimit; Mode = mode; WorkingDir = workingDir} = config
47+
let {Path = path; LineLimit = lineLimit; Method = method; WorkingDir = workingDir} = config
6148
let args =
6249
System.IO.File.ReadAllLines(path |> replacePaths)
6350
|> fun lines -> match lineLimit with Some limit -> Array.take (Math.Min(limit, lines.Length)) lines | None -> lines
6451
|> Array.map replacePaths
6552

6653
printfn $"WorkingDir = {workingDir}"
67-
let args = setupArgsMethod mode args
54+
let args = setupArgsMethod method args
6855
workingDir |> Option.iter (fun dir -> Environment.CurrentDirectory <- replaceCodeRoot dir)
6956
args
7057

7158
[<TestCaseSource(nameof(configs))>]
7259
let TestCompilerFromArgs (config : Args) : unit =
60+
use _ = FSharp.Compiler.Diagnostics.Activity.start "Compile codebase" ["method", config.Method.ToString()]
7361
let oldWorkDir = Environment.CurrentDirectory
7462

7563
let exiter =

tests/ParallelTypeCheckingTests/Tests/Utils.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type Args =
6161
{
6262
Path : string
6363
LineLimit : int option
64-
Mode : Method
64+
Method : Method
6565
WorkingDir : string option
6666
}
6767

0 commit comments

Comments
 (0)