Skip to content

Commit 39e79b2

Browse files
committed
CI: improve logging when reunning Pester specs
1 parent 3251a2b commit 39e79b2

File tree

1 file changed

+7
-5
lines changed
  • ci/tasks/test-units-bosh-psmodules

1 file changed

+7
-5
lines changed

ci/tasks/test-units-bosh-psmodules/run.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ $pesterModule | Save-Module -Path $moduleDir
99
Import-Module "$moduleDir\Pester\$($pesterModule.Version)\Pester.psm1"
1010

1111
$status = (Get-Service -Name "wuauserv").Status
12-
$startupType = Get-Service "wuauserv" | Select-Object -ExpandProperty StartType | Out-String
13-
"wuauserv status = * $status *"
14-
"wuauserv startuptype = * $startupType *"
12+
$startupType = (Get-Service "wuauserv" | Select-Object -ExpandProperty StartType)
13+
Write-Host "wuauserv Status = '$status'"
14+
Write-Host "wuauserv StartType = '$startupType'"
15+
Write-Host "-----------------------------------"
16+
Write-Host
1517

1618
$result = 0
1719

1820
$testModules = Get-ChildItem "stemcell-builder\$env:MODULES_DIR" -recurse | Where-Object {$_.name -match ".*.Tests.ps1"} | ForEach-Object {$_.DirectoryName}
1921
foreach ($module in $testModules) {
20-
Write-Host "Testing: $module"
22+
Write-Host "START Testing: $module"
2123
Push-Location "$module"
2224

2325
# Do not set $ErrorActionPreference and let Pester handle it nativetly; setting it to Stop globally will
@@ -27,7 +29,7 @@ foreach ($module in $testModules) {
2729
if ($results.FailedCount -gt 0) {
2830
$result += $results.FailedCount
2931
}
30-
32+
Write-Host "FINISH Testing: $module"
3133
Pop-Location
3234
}
3335

0 commit comments

Comments
 (0)