-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun_audio_description_tests.ps1
More file actions
43 lines (37 loc) · 1.19 KB
/
Copy pathrun_audio_description_tests.ps1
File metadata and controls
43 lines (37 loc) · 1.19 KB
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
39
40
41
42
43
param(
[string]$Python = "py",
[string]$PythonVersion = "3.14",
[switch]$InstallPythonTestDependencies,
[switch]$SkipRust
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$Bridge = Join-Path $Root "bridge"
function Invoke-Python([string[]]$Arguments) {
if ($Python -ieq "py") {
& $Python "-$PythonVersion" @Arguments
} else {
& $Python @Arguments
}
if ($LASTEXITCODE -ne 0) {
throw "Python command failed with exit code $LASTEXITCODE."
}
}
if ($InstallPythonTestDependencies) {
Invoke-Python @("-m", "pip", "install", "-r", (Join-Path $Bridge "requirements-test.txt"))
}
Write-Host "Running 89 audio-description worker and bridge-protocol tests..."
Invoke-Python @((Join-Path $Bridge "run_audio_description_tests.py"))
if (-not $SkipRust) {
Write-Host "Running 17 Sonarpad Rust audio-description regression tests..."
Push-Location $Root
try {
cargo test omni_port_ -- --nocapture
if ($LASTEXITCODE -ne 0) {
throw "cargo test failed with exit code $LASTEXITCODE."
}
} finally {
Pop-Location
}
}
Write-Host "Audio-description test run completed."