summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ci/test.ps19
1 files changed, 7 insertions, 2 deletions
diff --git a/ci/test.ps1 b/ci/test.ps1
index 1cf02118f..fdfa1fec7 100644
--- a/ci/test.ps1
+++ b/ci/test.ps1
@@ -19,12 +19,17 @@ if ($Env:SKIP_TESTS) { exit }
function run_test {
$TestName = $args[0]
+ $TestCommand = (ctest -N -V -R "^$TestName$") -join "`n"
+
+ if (-Not ($TestCommand -match "(?ms).*\n^[0-9]*: Test command: ")) {
+ echo "Could not find tests: $TestName"
+ exit
+ }
+
$TestCommand = (ctest -N -V -R "^$TestName$") -join "`n" -replace "(?ms).*\n^[0-9]*: Test command: ","" -replace "\n.*",""
$TestCommand += " -r${BuildDir}\results_${TestName}.xml"
- Write-Host $TestCommand
Invoke-Expression $TestCommand
-
if ($LastExitCode -ne 0) { $global:Success = $false }
}