mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
update readme, runall and gitignore
Update installation instructions in README. Added logging and log parsing to runall.ps1 Add ignore log files
This commit is contained in:
@@ -402,9 +402,9 @@ Describe -Tag 'higher', -TestName 'All Alias Tests' {
|
||||
$vmr.strip[1].gain | Should -Be 5.1
|
||||
}
|
||||
|
||||
It 'Should set Strip[1].Gain to -0.2' {
|
||||
$vmr.strip[1].gain =-0.2
|
||||
$vmr.strip[1].gain | Should -Be -0.2
|
||||
It 'Should set Strip[1].Gain to -4.2' {
|
||||
$vmr.strip[1].gain = -4.2
|
||||
$vmr.strip[1].gain | Should -Be -4.2
|
||||
}
|
||||
|
||||
It 'Should set Strip[2].Gain to 2.7' {
|
||||
@@ -594,9 +594,9 @@ Describe -Tag 'higher', -TestName 'All Alias Tests' {
|
||||
$vmr.bus[1].gain | Should -Be 5.1
|
||||
}
|
||||
|
||||
It 'Should set Bus[1].Gain to -0.2' {
|
||||
$vmr.bus[1].gain =-0.2
|
||||
$vmr.bus[1].gain | Should -Be -0.2
|
||||
It 'Should set Bus[1].Gain to -4.2' {
|
||||
$vmr.bus[1].gain = -4.2
|
||||
$vmr.bus[1].gain | Should -Be -4.2
|
||||
}
|
||||
|
||||
It 'Should set Bus[2].Gain to 2.7' {
|
||||
|
||||
@@ -2,14 +2,49 @@ Param([String]$tag, [Int]$num=1)
|
||||
Import-Module ..\lib\Voicemeeter.psm1
|
||||
. ..\lib\base.ps1
|
||||
|
||||
Function ParseLog {
|
||||
Param([String]$logfile)
|
||||
$summary_file = "_summary.log"
|
||||
if (Test-Path $summary_file) { Clear-Content $summary_file }
|
||||
|
||||
$PASSED_PATTERN = "^PassedCount\s+:\s(\d+)"
|
||||
$FAILED_PATTERN = "^FailedCount\s+:\s(\d+)"
|
||||
|
||||
$DATA = @{
|
||||
"passed" = 0
|
||||
"failed" = 0
|
||||
}
|
||||
|
||||
ForEach ($line in `
|
||||
$(Get-content -Path "${logfile}")) {
|
||||
if ($line -match $PASSED_PATTERN) {
|
||||
$DATA["passed"] += $Matches[1]
|
||||
}
|
||||
elseif ($line -match $FAILED_PATTERN) {
|
||||
$DATA["failed"] += $Matches[1]
|
||||
}
|
||||
}
|
||||
|
||||
"=========================`n" + `
|
||||
"$num tests run:`n" + `
|
||||
"=========================" | Tee-Object -FilePath $summary_file -Append
|
||||
$DATA | ForEach-Object { $_ } | Tee-Object -FilePath $summary_file -Append
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$vmr = Get-RemotePotato
|
||||
|
||||
$logfile = "_results.log"
|
||||
if (Test-Path $logfile) { Clear-Content $logfile }
|
||||
|
||||
1..$num | ForEach-Object {
|
||||
Write-Host "Running test $_ of $num"
|
||||
Invoke-Pester -Tag $tag
|
||||
"Running test $_ of $num" | Tee-Object -FilePath $logfile -Append
|
||||
Invoke-Pester -Tag $tag -PassThru | Tee-Object -FilePath $logfile -Append
|
||||
}
|
||||
|
||||
Parselog -logfile $logfile
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user