mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
add log flag to run tests section in readme
This commit is contained in:
parent
88aa0c3250
commit
21e8b16cec
@ -354,12 +354,11 @@ Run tests using .\tests\pre-commit.ps1 which accepts the following parameters:
|
|||||||
- `kind`: Run tests of this kind
|
- `kind`: Run tests of this kind
|
||||||
- `tag`: Run tests tagged with this marker (currently `higher` or `lower`)
|
- `tag`: Run tests tagged with this marker (currently `higher` or `lower`)
|
||||||
- `num`: Run this number of tests
|
- `num`: Run this number of tests
|
||||||
|
- `log`: Write summary log file
|
||||||
|
|
||||||
Run tests from repository root in a subshell like so:
|
Run tests from repository root in a subshell and write logs, like so:
|
||||||
|
|
||||||
`powershell .\tests\pre-commit.ps1 -k "potato" -t "higher"`
|
`powershell .\tests\pre-commit.ps1 -k "potato" -t "higher" -log`
|
||||||
|
|
||||||
Results will be logged and summary file written.
|
|
||||||
|
|
||||||
### Official Documentation
|
### Official Documentation
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ Import-Module .\lib\Voicemeeter.psm1
|
|||||||
|
|
||||||
Function ParseLog {
|
Function ParseLog {
|
||||||
Param([String]$logfile)
|
Param([String]$logfile)
|
||||||
$summary_file = "_summary.log"
|
$summary_file = Join-Path $PSScriptRoot "_summary.log"
|
||||||
if (Test-Path $summary_file) { Clear-Content $summary_file }
|
if (Test-Path $summary_file) { Clear-Content $summary_file }
|
||||||
|
|
||||||
$PASSED_PATTERN = "^PassedCount\s+:\s(\d+)"
|
$PASSED_PATTERN = "^PassedCount\s+:\s(\d+)"
|
||||||
@ -57,7 +57,7 @@ function main() {
|
|||||||
$ifNotBanana = $vmr.kind.name -ne "banana"
|
$ifNotBanana = $vmr.kind.name -ne "banana"
|
||||||
$ifNotPotato = $vmr.kind.name -ne "potato"
|
$ifNotPotato = $vmr.kind.name -ne "potato"
|
||||||
|
|
||||||
$logfile = "_results.log"
|
$logfile = Join-Path $PSScriptRoot "_results.log"
|
||||||
if (Test-Path $logfile) { Clear-Content $logfile }
|
if (Test-Path $logfile) { Clear-Content $logfile }
|
||||||
|
|
||||||
1..$num | ForEach-Object {
|
1..$num | ForEach-Object {
|
||||||
|
Loading…
Reference in New Issue
Block a user