-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.ps1
More file actions
27 lines (21 loc) · 942 Bytes
/
Copy pathrun_tests.ps1
File metadata and controls
27 lines (21 loc) · 942 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
# MLSharp-3D-Maker Test Script (PowerShell)
$ErrorActionPreference = "Stop"
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Running MLSharp Unit Tests" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
if (-not (Test-Path "test_app.py")) {
Write-Host "[WARNING] Test file not found" -ForegroundColor Yellow
Read-Host "Press Enter to exit"
exit 0
}
Write-Host "Running tests..." -ForegroundColor Green
$process = Start-Process -FilePath "python_env\python.exe" -ArgumentList "test_app.py" -NoNewWindow -Wait -PassThru
if ($process.ExitCode -eq 0) {
Write-Host "All tests passed!" -ForegroundColor Green
} else {
Write-Host "Some tests failed!" -ForegroundColor Red
}
Read-Host "Press Enter to exit"
exit $process.ExitCode