Skip to content

Commit ffad103

Browse files
authored
Call prune-junit-xml again (#515)
* Call prune-junit-xml again * fixup! Call prune-junit-xml again
1 parent 569f117 commit ffad103

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/k8s_unit_windows.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ function Run-K8sUnitTests {
212212
$env:GOMAXPROCS = 4
213213
Write-Host "Job starting for package: $package from $(Get-Location)"
214214

215+
# Create filesystem-safe package name
216+
$packageName = $package -replace '[./]', '-'
215217
$junitFile = "c:\Logs\junit_$($junitIndex).xml"
216-
$logFile = "c:\Logs\output_$($junitIndex).log"
218+
$logFile = "c:\Logs\output_$($junitIndex)_$packageName.log"
217219
$command = "gotestsum.exe"
218220

219221
# Build arguments array like the original
@@ -294,6 +296,10 @@ function Run-K8sUnitTests {
294296
"Exit code: $exitCode" | Out-File -FilePath $logFile -Append -Encoding UTF8
295297
"Job completed at: $(Get-Date)" | Out-File -FilePath $logFile -Append -Encoding UTF8
296298

299+
# Prune junit XML file to remove skipped tests
300+
Write-Host "Pruning junit file: $junitFile"
301+
& prune-junit-xml.exe "$junitFile"
302+
297303
# Check if log file exists and get its size
298304
if (Test-Path $logFile) {
299305
$logSize = (Get-Item $logFile).Length

0 commit comments

Comments
 (0)