@@ -560,15 +560,15 @@ func runTestsWithConfig(testDir, testFocus, testSkip, testConfigArg string, clou
560
560
561
561
artifactsDir , ok := os .LookupEnv ("ARTIFACTS" )
562
562
reportArg := ""
563
+ kubetestDumpDir := ""
563
564
if ok {
564
565
if len (reportPrefix ) > 0 {
565
- reportDir : = filepath .Join (artifactsDir , reportPrefix )
566
- if err := os .MkdirAll (reportDir , 0755 ); err != nil {
566
+ kubetestDumpDir = filepath .Join (artifactsDir , reportPrefix )
567
+ if err := os .MkdirAll (kubetestDumpDir , 0755 ); err != nil {
567
568
return err
568
569
}
569
- reportArg = fmt .Sprintf ("-report-dir=%s" , reportDir )
570
570
} else {
571
- reportArg = fmt . Sprintf ( "-report-dir=%s" , artifactsDir )
571
+ kubetestDumpDir = artifactsDir
572
572
}
573
573
}
574
574
ginkgoArgs := fmt .Sprintf ("--ginkgo.focus=%s --ginkgo.skip=%s" , testFocus , testSkip )
@@ -586,6 +586,9 @@ func runTestsWithConfig(testDir, testFocus, testSkip, testConfigArg string, clou
586
586
"--check-version-skew=false" ,
587
587
fmt .Sprintf ("--test_args=%s" , testArgs ),
588
588
}
589
+ if kubetestDumpDir != "" {
590
+ kubeTestArgs = append (kubeTestArgs , fmt .Sprintf ("--dump=%s" , kubetestDumpDir ))
591
+ }
589
592
kubeTestArgs = append (kubeTestArgs , cloudProviderArgs ... )
590
593
591
594
err = runCommand ("Running Tests" , exec .Command ("kubetest" , kubeTestArgs ... ))
0 commit comments