Skip to content

Commit 9d36d64

Browse files
authored
Improve benchmark unix support (#16702)
* fix configuration case * make path construction x-platform * to be consistent * improve path construction
1 parent 352f48a commit 9d36d64

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ type CompilerServiceBenchmarks() =
105105
| Some _ -> configOpt
106106
| None ->
107107
let checker = FSharpChecker.Create(projectCacheSize = 200)
108-
let source = FSharpSourceText.From(File.OpenRead("""..\..\..\..\..\..\..\..\..\src\Compiler\Checking\CheckExpressions.fs"""), Encoding.Default, FSharpSourceHashAlgorithm.Sha1, true)
108+
let path = __SOURCE_DIRECTORY__ ++ ".." ++ ".." ++ ".." ++ ".." ++ "src" ++ "Compiler" ++ "Checking" ++ "CheckExpressions.fs"
109+
let source = FSharpSourceText.From(File.OpenRead(path), Encoding.Default, FSharpSourceHashAlgorithm.Sha1, true)
109110
let assemblies =
110111
AppDomain.CurrentDomain.GetAssemblies()
111112
|> Array.map (fun x -> x.Location)

tests/benchmarks/SmokeTestBenchmarks.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Run {
99

1010
dotnet run `
1111
--project $path `
12-
-c release `
12+
-c Release `
1313
--no-build `
1414
--job Dry `
1515
--allCategories short `

tests/benchmarks/SmokeTestBenchmarks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ run() {
66
local path=$1
77
dotnet run \
88
--project $path \
9-
-c release \
9+
-c Release \
1010
--no-build \
1111
--job Dry \
1212
--allCategories short \

0 commit comments

Comments
 (0)