Changeset 16617 for branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/MultiTest.ps1
- Timestamp:
- 02/20/19 23:50:24 (5 years ago)
- Location:
- branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3
-
Property
svn:global-ignores
set to
tmplogs
-
Property
svn:global-ignores
set to
-
branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/MultiTest.ps1
r16614 r16617 1 1 [cmdletbinding()] 2 2 param( 3 [int] $WaitToStep = 200,3 [int] $WaitToStep = 500, 4 4 [int] $PeelCnt = 3, 5 5 [int] $EvalCnt = 3, 6 6 [ValidateSet("method1","method2", "method3")][string] $InitMethod = "method1", 7 7 [ValidateSet("method1","method2", "method3")][string] $GrowMethod = "method1", 8 [int] $MaxJobs = 30, 9 [switch] $Clear 8 [int] $MaxJobs = 10, 9 [switch] $NoClear, 10 [switch] $UseExisting 10 11 ) 11 12 12 13 $BenchmarksPath = Resolve-Path -Relative "go-code\go-pge\data\benchmark" 13 14 $Clean = $false15 if($Clear) {16 $Clean = $true17 }18 14 19 15 $BenchFiles = Get-ChildItem -Path $BenchmarksPath -File … … 26 22 } 27 23 $ActiveJobs[$BenchName] = Start-Job -ScriptBlock { 28 param($PSPath, $WaitToStep, $BenchName, $PeelCnt, $EvalCnt, $InitMethod, $GrowMethod, $ Clear)24 param($PSPath, $WaitToStep, $BenchName, $PeelCnt, $EvalCnt, $InitMethod, $GrowMethod, $NoClear, $UseExisting) 29 25 Set-Location -Path $PSPath 30 ./TestResults -WaitToStep $WaitToStep -BenchName $BenchName -PeelCnt $PeelCnt -EvalCnt $EvalCnt -InitMethod $InitMethod -GrowMethod $GrowMethod *>&1 31 } -ArgumentList $(Resolve-Path $PSScriptRoot), $WaitToStep, $BenchName, $PeelCnt, $EvalCnt, $InitMethod, $GrowMethod, $Clean 26 ./TestResults -WaitToStep $WaitToStep -BenchName $BenchName -PeelCnt $PeelCnt -EvalCnt $EvalCnt -InitMethod $InitMethod -GrowMethod $GrowMethod -NoClear:$NoClear -UseExisting:$UseExisting *>&1 27 Write-Output "Gen-Return: $LASTEXITCODE" 28 } -ArgumentList $(Resolve-Path $PSScriptRoot), $WaitToStep, $BenchName, $PeelCnt, $EvalCnt, $InitMethod, $GrowMethod, $NoClear.IsPresent, $UseExisting.IsPresent 32 29 Write-Host "Started job for $BenchName" 33 30 } … … 37 34 $Job = $ActiveJobs[$BenchName] 38 35 $Res = $Job | Receive-Job 36 $ReturnLine = $Res | Select-String -SimpleMatch "Gen-Return: " 37 if($ReturnLine -match "Gen-Return: (\d+)") { 38 if($Matches[0] -ne 0) { 39 Write-Error "$($BenchName): An error occurred! Return-Code $($Matches[0])" 40 continue 41 } 42 } 39 43 $Succeeded = ($Res | Select-String -Pattern "^[0-9]+\sOK").Count 40 44 $Failed = ($Res | Select-String -Pattern "^[0-9]+\sfailed!").Count 41 45 if($($Succeeded + $Failed) -ne $WaitToStep ) { 42 Write-Error "Something went wrong!? Please check manuelly" 46 $Missing = $WaitToStep - ($Succeeded + $Failed) 47 Write-Error "$($BenchName): $Missing steps missing, or something went wrong!? Please check manuelly" 43 48 } 44 49 if($Succeeded -eq $WaitToStep) { 45 Write-Host "$($BenchName): $Succeeded / $WaitToStep tests succeeded"50 Write-Host "$($BenchName): $Succeeded / $WaitToStep `ttests succeeded" 46 51 } else { 47 Write-Warning "$($BenchName): $Failed / $WaitToStep tests failed!"52 Write-Warning "$($BenchName): $Failed / $WaitToStep `ttests failed!" 48 53 } 49 54 }
Note: See TracChangeset
for help on using the changeset viewer.