-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.ps1
More file actions
40 lines (28 loc) · 726 Bytes
/
Test.ps1
File metadata and controls
40 lines (28 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[CmdletBinding(PositionalBinding = $false)]
param(
[ValidateSet('Debug', 'Release')]
$Configuration = 'Release',
[switch]
$CollectCoverage,
[switch]
$NoBuild,
[switch]
$NoIntegrationTests
)
Set-StrictMode -Version 1
$ErrorActionPreference = 'Stop'
. .\Functions.ps1
write-host -f Magenta '*** Test ***'
$arguments = New-Object System.Collections.ArrayList
if ($NoBuild) {
[void]$arguments.Add('--no-build')
}
if($NoIntegrationTests) {
[void]$arguments.Add('--filter="Category!=Integration"')
}
[void]$arguments.Add("-property:Configuration=$Configuration")
if ($CollectCoverage) {
[void]$arguments.Add("-p:CollectCoverage=true")
}
exec dotnet test @arguments
write-host -f green 'Test Done!'