@@ -73,38 +73,55 @@ let runIntegrationTest (fn: string) : bool =
73
73
true
74
74
| None ->
75
75
tracefn " Running FSIHelper '%s ', '%s ', '%s '" FSIHelper.fsiPath dir fn
76
- let result , msgs = FSIHelper.executeFSI dir fn []
77
- let msgs = msgs |> Seq.filter ( fun x -> x.IsError) |> Seq.toList
78
- if not result then
79
- for msg in msgs do
80
- traceError msg.Message
81
- result
76
+ let testExecution =
77
+ try
78
+ let fsiExec = async {
79
+ return Some ( FSIHelper.executeFSI dir fn [])
80
+ }
81
+ Async.RunSynchronously ( fsiExec, TimeSpan.FromMinutes( 10.0 ) .TotalMilliseconds |> int)
82
+ with :? TimeoutException ->
83
+ None
84
+ match testExecution with
85
+ | None -> //timeout
86
+ false
87
+ | Some ( result, msgs) ->
88
+ let msgs = msgs |> Seq.filter ( fun x -> x.IsError) |> Seq.toList
89
+ if not result then
90
+ for msg in msgs do
91
+ traceError msg.Message
92
+ result
82
93
83
94
Target " IntegrationTest" ( fun _ ->
95
+ trace " Running Integration tests..."
84
96
let runOk =
85
97
integrationTests
86
98
|> Seq.map runIntegrationTest
87
99
|> Seq.forall id
88
100
89
101
if not runOk then
102
+ trace " Integration tests did not run successfully"
90
103
failwith " Integration tests did not run successfully"
91
104
else
105
+ trace " checking tests results..."
92
106
let ok , out , err =
93
107
Git.CommandHelper.runGitCommand
94
108
" ."
95
109
( " -c core.fileMode=false diff --exit-code " + integrationTestDir)
96
110
if not ok then
97
111
trace ( toLines out)
98
112
failwithf " Integration tests failed:\n %s " err
113
+ trace " Done Integration tests."
99
114
)
100
115
101
116
Target " UnitTest" ( fun _ ->
117
+ trace " Running Unit tests."
102
118
!! testAssemblies
103
119
|> NUnit3 ( fun p ->
104
120
{ p with
105
121
ShadowCopy = true
106
- TimeOut = TimeSpan.FromMinutes 20 .
122
+ TimeOut = TimeSpan.FromMinutes 10 .
107
123
OutputDir = " TestResults.xml" })
124
+ trace " Done Unit tests."
108
125
)
109
126
110
127
0 commit comments