File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,26 @@ System.Environment.CurrentDirectory <- (Path.combine __SOURCE_DIRECTORY__ "..")
1111// --------------------------------------------------------------------------------------
1212let isNullOrWhiteSpace = System.String.IsNullOrWhiteSpace
1313
14+ let environVarAsBoolOrDefault varName defaultValue =
15+ let truthyConsts = [
16+ " 1"
17+ " Y"
18+ " YES"
19+ " T"
20+ " TRUE"
21+ ]
22+
23+ try
24+ let envvar = ( Environment.environVar varName) .ToUpper()
25+
26+ truthyConsts
27+ |> List.exists ((=) envvar)
28+ with _ ->
29+ defaultValue
30+
31+
32+ let isCI = lazy ( environVarAsBoolOrDefault " CI" false )
33+
1434let exec cmd args dir env =
1535 let proc =
1636 CreateProcess.fromRawCommandLine cmd args
@@ -86,9 +106,15 @@ let init args =
86106 try
87107 exec " dotnet" $" new globaljson --force --sdk-version {tfmToSdkMap.[tfm]} --roll-forward LatestMinor" " test" Map.empty
88108
109+ let failedOnFocus =
110+ if isCI.Value then
111+ " Expecto.fail-on-focused-tests=true"
112+ else
113+ " "
114+
89115 exec
90116 " dotnet"
91- $" test --blame --blame-hang-timeout 60s --framework {tfm} --logger trx --logger GitHubActions -c {configuration} .\\ Ionide.ProjInfo.Tests\\ Ionide.ProjInfo.Tests.fsproj"
117+ $" test %s {failedOnFocus} --blame --blame-hang-timeout 60s --framework {tfm} --logger trx --logger GitHubActions -c %s {configuration} .\\ Ionide.ProjInfo.Tests\\ Ionide.ProjInfo.Tests.fsproj"
92118 " test"
93119 ( Map.ofSeq [ " BuildNet9" , tfmToBuildNet9Map.[ tfm]. ToString() ])
94120 |> ignore
You can’t perform that action at this time.
0 commit comments