@@ -247,21 +247,26 @@ Target "RunTests" (fun _ ->
247
247
-- " ./src/examples/**"
248
248
rawProjects |> Seq.choose filterProjects
249
249
250
- let runSingleProject project =
250
+ let projectDlls = projects |> Seq.map ( fun project ->
251
+ let assemblyName = fileNameWithoutExt project
252
+ ( directory project) @@ " bin" @@ " Release" @@ testNetFrameworkVersion @@ assemblyName + " .dll"
253
+ )
254
+
255
+ let runSingleProject projectDll =
251
256
let arguments =
252
257
match ( hasTeamCity) with
253
- | true -> ( sprintf " test -c Release --blame --no-build --logger :trx --logger :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -parallel none - teamcity" testNetFrameworkVersion outputTests)
254
- | false -> ( sprintf " test -c Release --blame --no-build --logger :trx --logger :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -parallel none " testNetFrameworkVersion outputTests)
255
-
258
+ | true -> ( sprintf " test \" %s \" --blame-crash --blame-hang-timeout 25m -l :trx -l :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -teamcity" projectDll testNetFrameworkVersion outputTests)
259
+ | false -> ( sprintf " test \" %s \" --blame-crash --blame-hang-timeout 25m -l :trx -l :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" " projectDll testNetFrameworkVersion outputTests)
260
+
256
261
let result = ExecProcess( fun info ->
257
262
info.FileName <- " dotnet"
258
- info.WorkingDirectory <- ( Directory.GetParent project ) .FullName
263
+ info.WorkingDirectory <- outputTests
259
264
info.Arguments <- arguments) ( TimeSpan.FromMinutes 30.0 )
260
265
261
266
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
262
-
267
+
263
268
CreateDir outputTests
264
- projects |> Seq.iter ( runSingleProject)
269
+ projectDlls |> Seq.iter ( runSingleProject)
265
270
)
266
271
267
272
Target " RunTestsNetCore" ( fun _ ->
@@ -277,21 +282,26 @@ Target "RunTestsNetCore" (fun _ ->
277
282
-- " ./src/examples/**"
278
283
rawProjects |> Seq.choose filterProjects
279
284
280
- let runSingleProject project =
285
+ let projectDlls = projects |> Seq.map ( fun project ->
286
+ let assemblyName = fileNameWithoutExt project
287
+ ( directory project) @@ " bin" @@ " Release" @@ testNetCoreVersion @@ assemblyName + " .dll"
288
+ )
289
+
290
+ let runSingleProject projectDll =
281
291
let arguments =
282
292
match ( hasTeamCity) with
283
- | true -> ( sprintf " test -c Release --blame --no-build --logger :trx --logger :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -parallel none - teamcity" testNetCoreVersion outputTests)
284
- | false -> ( sprintf " test -c Release --blame --no-build --logger :trx --logger :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -parallel none " testNetCoreVersion outputTests)
293
+ | true -> ( sprintf " test \" %s \" --blame-crash --blame-hang-timeout 25m -l :trx -l :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -teamcity" projectDll testNetCoreVersion outputTests)
294
+ | false -> ( sprintf " test \" %s \" --blame-crash --blame-hang-timeout 25m -l :trx -l :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" " projectDll testNetCoreVersion outputTests)
285
295
286
296
let result = ExecProcess( fun info ->
287
297
info.FileName <- " dotnet"
288
- info.WorkingDirectory <- ( Directory.GetParent project ) .FullName
298
+ info.WorkingDirectory <- outputTests
289
299
info.Arguments <- arguments) ( TimeSpan.FromMinutes 30.0 )
290
300
291
301
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
292
302
293
303
CreateDir outputTests
294
- projects |> Seq.iter ( runSingleProject)
304
+ projectDlls |> Seq.iter ( runSingleProject)
295
305
)
296
306
297
307
Target " RunTestsNet" ( fun _ ->
@@ -307,21 +317,26 @@ Target "RunTestsNet" (fun _ ->
307
317
-- " ./src/examples/**"
308
318
rawProjects |> Seq.choose filterProjects
309
319
310
- let runSingleProject project =
320
+ let projectDlls = projects |> Seq.map ( fun project ->
321
+ let assemblyName = fileNameWithoutExt project
322
+ ( directory project) @@ " bin" @@ " Release" @@ testNetVersion @@ assemblyName + " .dll"
323
+ )
324
+
325
+ let runSingleProject projectDll =
311
326
let arguments =
312
327
match ( hasTeamCity) with
313
- | true -> ( sprintf " test -c Release --blame-crash --blame-hang-timeout 25m --no-build --logger :trx --logger :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -parallel none - teamcity" testNetVersion outputTests)
314
- | false -> ( sprintf " test -c Release --blame-crash --blame-hang-timeout 25m --no-build --logger :trx --logger :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -parallel none " testNetVersion outputTests)
328
+ | true -> ( sprintf " test \" %s \" --blame-crash --blame-hang-timeout 25m -l :trx -l :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" -- -teamcity" projectDll testNetVersion outputTests)
329
+ | false -> ( sprintf " test \" %s \" --blame-crash --blame-hang-timeout 25m -l :trx -l :\" console;verbosity=normal\" --framework %s --results-directory \" %s \" " projectDll testNetVersion outputTests)
315
330
316
331
let result = ExecProcess( fun info ->
317
332
info.FileName <- " dotnet"
318
- info.WorkingDirectory <- ( Directory.GetParent project ) .FullName
333
+ info.WorkingDirectory <- outputTests
319
334
info.Arguments <- arguments) ( TimeSpan.FromMinutes 30.0 )
320
335
321
336
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
322
337
323
338
CreateDir outputTests
324
- projects |> Seq.iter ( runSingleProject)
339
+ projectDlls |> Seq.iter ( runSingleProject)
325
340
)
326
341
327
342
Target " MultiNodeTestsNetCore" ( fun _ ->
0 commit comments