recorder tests, tests pass

more reliable way to locate the recording

pester tests pass for all kinds
manual tests pass for all kinds
- video vban.outstream.route
- eq.channel.cell.gain range
This commit is contained in:
pblivingston 2025-12-19 14:30:51 -05:00
parent ef1a583351
commit 55eb851729
3 changed files with 32 additions and 14 deletions

View File

@ -8,9 +8,9 @@ For past/future changes to this project refer to: [CHANGELOG](CHANGELOG.md)
## Tested against ## Tested against
- Basic 1.1.1.9 - Basic 1.1.2.2
- Banana 2.1.1.9 - Banana 2.1.2.2
- Potato 3.1.1.9 - Potato 3.1.2.2
## Requirements ## Requirements
@ -495,7 +495,7 @@ $vmr.vban.outstream[3].bit = 16
##### midi ##### midi
The following midi Vban.outstream[8] properties are available: The following midi Vban.outstream properties are available:
- route: string, ('none', 'midi_in', 'aux_in', 'vban_in', 'all_in', 'midi_out') - route: string, ('none', 'midi_in', 'aux_in', 'vban_in', 'all_in', 'midi_out')
@ -507,7 +507,7 @@ $vmr.vban.outstream[8].route = 'aux_in'
##### video ##### video
The following video Vban.outstream[9] properties are available: The following video Vban.outstream properties are available:
- vfps: int, from 1 to 30 - vfps: int, from 1 to 30
- vformat: string, ('png', 'jpg') - vformat: string, ('png', 'jpg')

View File

@ -1108,13 +1108,19 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
$vmr.recorder.prefix = $prefix $vmr.recorder.prefix = $prefix
$vmr.recorder.filetype = $filetype $vmr.recorder.filetype = $filetype
$start = Get-Date
$vmr.recorder.state = 'record' $vmr.recorder.state = 'record'
Start-Sleep -Milliseconds 10
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
$vmr.recorder.state | Should -Be 'record' $vmr.recorder.state | Should -Be 'record'
Start-Sleep -Milliseconds 2000 Start-Sleep -Milliseconds 2000
$tmp = [System.IO.Path]::Combine($recDir, ("{0} {1}.{2}" -f $prefix, $stamp, $filetype)) $tmp = Get-ChildItem -Path $recDir -Filter ("{0}*.{1}" -f $prefix, $filetype) -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt $start } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if (-not $tmp) {
throw "'$filetype' file with prefix '$prefix' was not found in '$recDir'."
}
$vmr.recorder.state = 'stop' $vmr.recorder.state = 'stop'
$vmr.recorder.eject() $vmr.recorder.eject()
@ -1202,12 +1208,18 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
} }
BeforeEach { BeforeEach {
$start = Get-Date
$vmr.recorder.record() $vmr.recorder.record()
Start-Sleep -Milliseconds 10
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
Start-Sleep -Milliseconds 2000 Start-Sleep -Milliseconds 2000
$tmp = [System.IO.Path]::Combine($recDir, ("{0} {1}.{2}" -f $prefix, $stamp, $filetype)) $tmp = Get-ChildItem -Path $recDir -Filter ("{0}*.{1}" -f $prefix, $filetype) -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt $start } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if (-not $tmp) {
throw "'$filetype' file with prefix '$prefix' was not found in '$recDir'."
}
$vmr.recorder.pause() $vmr.recorder.pause()
Start-Sleep -Milliseconds 500 Start-Sleep -Milliseconds 500

View File

@ -11,12 +11,18 @@ function Test-RecDir ([object]$vmr, [string]$recDir) {
try { try {
$start = Get-Date
$vmr.recorder.record() $vmr.recorder.record()
Start-Sleep -Milliseconds 10
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
Start-Sleep -Milliseconds 2000 Start-Sleep -Milliseconds 2000
$tmp = Join-Path $recDir ("{0} {1}.{2}" -f $prefix, $stamp, $filetype) $tmp = Get-ChildItem -Path $recDir -Filter ("{0}*.{1}" -f $prefix, $filetype) -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt $start } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if (-not $tmp) {
throw "'$filetype' file with prefix '$prefix' was not found in '$recDir'."
}
$vmr.recorder.stop() $vmr.recorder.stop()
$vmr.recorder.eject() $vmr.recorder.eject()