[5d12a0]: / tests / run_tests.ps1

Download this file

33 lines (26 with data), 713 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
$PYCMD = "python"
$PYTHON_SCRIPTS = @(
"test_core_ants_image.py",
"test_core_ants_image_io.py",
"test_core_ants_transform.py",
"test_core_ants_transform_io.py",
"test_core_ants_metric.py",
"test_learn.py",
"test_registration.py",
"test_segmentation.py",
"test_utils.py",
"test_bugs.py"
)
$scriptFailed = $false
Set-Location -Path ".\tests"
foreach ($script in $PYTHON_SCRIPTS) {
Write-Host "Running Python script $script"
& $PYCMD $script $args
if ($LASTEXITCODE -ne 0) {
Write-Host "Python script $script failed with exit code $LASTEXITCODE"
$scriptFailed = $true
}
}
if ($scriptFailed) {
exit 1
}