File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments