9 lines
564 B
PowerShell
9 lines
564 B
PowerShell
param([switch]$Integration,[switch]$Diagnostic)
|
|||
|
|
$ErrorActionPreference = 'Stop'
|
||
|
|
& (Join-Path $PSScriptRoot 'build.ps1') -Tests
|
||
|
|
$artifactsDirectory = Join-Path $PSScriptRoot 'artifacts'
|
||
|
|
New-Item -ItemType Directory -Path $artifactsDirectory -Force | Out-Null
|
||
|
|
$mode = if ($Diagnostic) { '--diagnostic' } elseif ($Integration) { '--integration' } else { '--unit' }
|
||
|
|
& (Join-Path $PSScriptRoot 'dist\UniClik.Tests.exe') $mode (Join-Path $artifactsDirectory 'test-results.txt')
|
||
|
|
if ($LASTEXITCODE -ne 0) { throw 'UniClik checks failed. See artifacts\test-results.txt.' }
|