-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRunUnitTests.ps1
38 lines (31 loc) · 922 Bytes
/
RunUnitTests.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
$root = Split-Path -Parent $PSCommandPath
Push-Location $root
$bins = @()
Write-Host "Finding Alteryx Admin Install Location..."
$reg = Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\SRC\Alteryx -ErrorAction SilentlyContinue
if ($reg -ne $null) {
$bins += $reg.InstallDir64
}
Write-Host "Finding Alteryx User Install Location..."
$reg = Get-ItemProperty HKCU:\SOFTWARE\SRC\Alteryx -ErrorAction SilentlyContinue
if ($reg -ne $null) {
$bins += $reg.InstallDir64
}
if ($bins.Count -eq 0) {
Write-Host "Failed to find Alteryx Install"
Pop-Location
exit -1
}
foreach ($bin in $bins) {
Write-Host "Running Unit Tests..."
& "$bin\AlteryxEngineCmd.exe" "$root\RunUnitTests.yxmd"
if ($LASTEXITCODE -eq 2) {
$message = "Unit Tests failed: " + $LASTEXITCODE
Write-Host $message
Pop-Location
exit -2
}
Write-Host "Unit Tests Passed."
}
Pop-Location
exit 0