@@ -7,12 +7,14 @@ open FSharp.Compiler.Service.Tests
77open NUnit.Framework
88open Utils
99
10+ let codebases =
11+ [
12+ @" $CODE_ROOT$\tests\FSharp.Compiler.ComponentTests" , @" $CODE_ROOT$\tests\ParallelTypeCheckingTests\ComponentTests_args.txt"
13+ @" $CODE_ROOT$\src\compiler" , @" $CODE_ROOT$\tests\ParallelTypeCheckingTests\Tests\FCSArgs.txt"
14+ ]
15+
1016let configs =
11- let codebases =
12- [
13- @" C:\projekty\fsharp\heuristic\tests\FSharp.Compiler.ComponentTests" , @" C:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\ComponentTests_args.txt"
14- @" C:\projekty\fsharp\fsharp_main\src\compiler" , @" C:\projekty\fsharp\heuristic\tests\ParallelTypeCheckingTests\Tests\FCSArgs.txt"
15- ]
17+
1618
1719 methods
1820 |> List.allPairs codebases
@@ -43,17 +45,21 @@ let setupArgsMethod (method: Method) (args: string[]): string[] =
4345
4446let setupParsed config =
4547 let { Path = path ; Mode = mode ; WorkingDir = workingDir } = config
46- let args = System.IO.File.ReadAllLines( path)
48+ let args =
49+ System.IO.File.ReadAllLines( path |> replacePaths)
50+ |> Array.map replacePaths
51+
4752 printfn $" WorkingDir = {workingDir}"
53+ printfn $" %+A {args}"
4854 let args = setupArgsMethod mode args
49- workingDir |> Option.iter ( fun dir -> Environment.CurrentDirectory <- dir)
55+ workingDir |> Option.iter ( fun dir -> Environment.CurrentDirectory <- replaceCodeRoot dir)
5056 args
5157
5258[<TestCaseSource( nameof( configs)) >]
5359let TestCompilerFromArgs ( config : Args ) : unit =
5460 let oldWorkDir = Environment.CurrentDirectory
5561 try
56- let args = setupParsed config
62+ let args = setupParsed config
5763 let exit = CommandLineMain.main args
5864 Assert.That( exit, Is.Zero)
5965 finally
0 commit comments