forked from editorconfig/editorconfig-core-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ps1
46 lines (32 loc) · 801 Bytes
/
test.ps1
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
41
42
43
44
45
46
param(
[ValidateSet("pcre2","core")]
[string] $proj = "core",
[ValidateSet("ON","OFF")]
[string] $static = "ON",
[ValidateSet("Debug","Release")]
[string] $config = "Release",
[ValidateSet("x86","x64")]
[string] $arch = "x64"
)
$ErrorActionPreference="stop"
$dest = "bin"
if ((Test-Path $dest) -ne $true){
throw "Missing build path! Used init?"
}
$dest += "\$arch"
if($static -eq "ON"){
$dest += "-static"
}
$bin = "$dest\build\bin"
$dest += "\$proj"
if ((Test-Path $dest) -ne $true){
throw "Missing build path! Used init?"
}
$env:Path += ";" + (Resolve-Path $bin)
"Testing $proj" | Write-Host -ForegroundColor DarkGreen
Push-Location $dest
try {
ctest -E utf_8_char -VV --output-on-failure . -C $config
} finally {
Pop-Location
}