feat: add V1.1.0 serial task scheduler and fast verification entrypoints
This commit is contained in:
1 parent
210fae575d
commit
a7e1b9bd33
10 files changed
+402
-6
No files matched your search
@@ -0,0 +1,18 @@
|
||||
[CmdletBinding()]
|
||||
param([string]$PythonExecutable = 'python', [string[]]$TestPath = @('tests/part_replace', 'tests/trial_task_center', 'tests/ui', 'tests/integration', 'tests/packaging'))
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$testRepository = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '..')).Path
|
||||
$testPreviousPythonPath = $env:PYTHONPATH
|
||||
$testPreviousQtPlatform = $env:QT_QPA_PLATFORM
|
||||
try {
|
||||
$env:PYTHONPATH = Join-Path $testRepository 'src'
|
||||
$env:QT_QPA_PLATFORM = 'offscreen'
|
||||
Push-Location $testRepository
|
||||
& $PythonExecutable -m pytest -q @TestPath --durations=10
|
||||
$testResult = $LASTEXITCODE
|
||||
} finally {
|
||||
Pop-Location
|
||||
$env:PYTHONPATH = $testPreviousPythonPath
|
||||
$env:QT_QPA_PLATFORM = $testPreviousQtPlatform
|
||||
}
|
||||
exit $testResult
|
||||
@@ -0,0 +1,22 @@
|
||||
[CmdletBinding()]
|
||||
param([string]$PythonExecutable = 'python', [switch]$Safety)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$testRepository = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '..')).Path
|
||||
$testPreviousPythonPath = $env:PYTHONPATH
|
||||
$testPreviousQtPlatform = $env:QT_QPA_PLATFORM
|
||||
try {
|
||||
$env:PYTHONPATH = Join-Path $testRepository 'src'
|
||||
$env:QT_QPA_PLATFORM = 'offscreen'
|
||||
Push-Location $testRepository
|
||||
if ($Safety) {
|
||||
& $PythonExecutable -m pytest -q tests/v1_1 tests/part_replace/test_verification.py tests/trial_task_center/test_execution_safety.py tests/trial_task_center/test_application.py --durations=5
|
||||
} else {
|
||||
& $PythonExecutable -m pytest -q tests/v1_1 --durations=5
|
||||
}
|
||||
$testResult = $LASTEXITCODE
|
||||
} finally {
|
||||
Pop-Location
|
||||
$env:PYTHONPATH = $testPreviousPythonPath
|
||||
$env:QT_QPA_PLATFORM = $testPreviousQtPlatform
|
||||
}
|
||||
exit $testResult
|
||||
Reference in new issue
Block a user