Skip to content

Commit a8da2a2

Browse files
committed
NO-JIRA: Separate apps tests
1 parent 785db4f commit a8da2a2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
451451
return strings.Contains(t.name, "[sig-cli]")
452452
})
453453

454+
appsTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
455+
return strings.Contains(t.name, "[sig-apps]")
456+
})
457+
454458
nodeTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
455459
return strings.Contains(t.name, "[sig-node]")
456460
})
@@ -463,13 +467,15 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
463467
return strings.Contains(t.name, "[sig-builds]")
464468
})
465469

466-
mustGatherTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
470+
// separate from cliTests
471+
mustGatherTests, cliTests := splitTests(cliTests, func(t *testCase) bool {
467472
return strings.Contains(t.name, "[sig-cli] oc adm must-gather")
468473
})
469474

470475
logrus.Infof("Found %d openshift tests", len(openshiftTests))
471476
logrus.Infof("Found %d storage tests", len(storageTests))
472477
logrus.Infof("Found %d cli tests", len(cliTests))
478+
logrus.Infof("Found %d apps tests", len(appsTests))
473479
logrus.Infof("Found %d node tests", len(nodeTests))
474480
logrus.Infof("Found %d network tests", len(networkTests))
475481
logrus.Infof("Found %d builds tests", len(buildsTests))
@@ -481,6 +487,7 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
481487
originalOpenshift := openshiftTests
482488
originalStorage := storageTests
483489
originalCLI := cliTests
490+
originalApps := appsTests
484491
originalNode := nodeTests
485492
originalNetwork := networkTests
486493
originalBuilds := buildsTests
@@ -490,13 +497,14 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
490497
openshiftTests = append(openshiftTests, copyTests(originalOpenshift)...)
491498
storageTests = append(storageTests, copyTests(originalStorage)...)
492499
cliTests = append(cliTests, copyTests(originalCLI)...)
500+
appsTests = append(appsTests, copyTests(originalApps)...)
493501
nodeTests = append(nodeTests, copyTests(originalNode)...)
494502
networkTests = append(networkTests, copyTests(originalNetwork)...)
495503
buildsTests = append(buildsTests, copyTests(originalBuilds)...)
496504
mustGatherTests = append(mustGatherTests, copyTests(originalMustGather)...)
497505
}
498506
}
499-
expectedTestCount += len(openshiftTests) + len(storageTests) + len(cliTests) + len(nodeTests) + len(networkTests) + len(buildsTests) + len(mustGatherTests)
507+
expectedTestCount += len(openshiftTests) + len(storageTests) + len(cliTests) + len(appsTests) + len(nodeTests) + len(networkTests) + len(buildsTests) + len(mustGatherTests)
500508

501509
abortFn := neverAbort
502510
testCtx := ctx
@@ -527,6 +535,10 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
527535
q.Execute(testCtx, cliTestsCopy, max(1, parallelism/2), testOutputConfig, abortFn) // cli tests only run at half the parallelism, so we can avoid high cpu problems.
528536
tests = append(tests, cliTestsCopy...)
529537

538+
appsTestsCopy := copyTests(appsTests)
539+
q.Execute(testCtx, appsTestsCopy, max(1, parallelism/2), testOutputConfig, abortFn) // apps tests only run at half the parallelism, so we can avoid high cpu problems.
540+
tests = append(tests, appsTestsCopy...)
541+
530542
nodeTestsCopy := copyTests(nodeTests)
531543
q.Execute(testCtx, nodeTestsCopy, max(1, parallelism/2), testOutputConfig, abortFn) // run node tests separately at half the parallelism, so we can avoid high cpu problems.
532544
tests = append(tests, nodeTestsCopy...)

0 commit comments

Comments
 (0)