Skip to content

Commit 785db4f

Browse files
committed
NO-JIRA: Separate cli tests
1 parent cf6c648 commit 785db4f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
447447
return strings.Contains(t.name, "[sig-storage]")
448448
})
449449

450+
cliTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
451+
return strings.Contains(t.name, "[sig-cli]")
452+
})
453+
450454
nodeTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
451455
return strings.Contains(t.name, "[sig-node]")
452456
})
@@ -465,6 +469,7 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
465469

466470
logrus.Infof("Found %d openshift tests", len(openshiftTests))
467471
logrus.Infof("Found %d storage tests", len(storageTests))
472+
logrus.Infof("Found %d cli tests", len(cliTests))
468473
logrus.Infof("Found %d node tests", len(nodeTests))
469474
logrus.Infof("Found %d network tests", len(networkTests))
470475
logrus.Infof("Found %d builds tests", len(buildsTests))
@@ -475,6 +480,7 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
475480
if count != -1 {
476481
originalOpenshift := openshiftTests
477482
originalStorage := storageTests
483+
originalCLI := cliTests
478484
originalNode := nodeTests
479485
originalNetwork := networkTests
480486
originalBuilds := buildsTests
@@ -483,13 +489,14 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
483489
for i := 1; i < count; i++ {
484490
openshiftTests = append(openshiftTests, copyTests(originalOpenshift)...)
485491
storageTests = append(storageTests, copyTests(originalStorage)...)
492+
cliTests = append(cliTests, copyTests(originalCLI)...)
486493
nodeTests = append(nodeTests, copyTests(originalNode)...)
487494
networkTests = append(networkTests, copyTests(originalNetwork)...)
488495
buildsTests = append(buildsTests, copyTests(originalBuilds)...)
489496
mustGatherTests = append(mustGatherTests, copyTests(originalMustGather)...)
490497
}
491498
}
492-
expectedTestCount += len(openshiftTests) + len(storageTests) + len(nodeTests) + len(networkTests) + len(buildsTests) + len(mustGatherTests)
499+
expectedTestCount += len(openshiftTests) + len(storageTests) + len(cliTests) + len(nodeTests) + len(networkTests) + len(buildsTests) + len(mustGatherTests)
493500

494501
abortFn := neverAbort
495502
testCtx := ctx
@@ -516,6 +523,10 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
516523
q.Execute(testCtx, storageTestsCopy, max(1, parallelism/2), testOutputConfig, abortFn) // storage tests only run at half the parallelism, so we can avoid cloud provider quota problems.
517524
tests = append(tests, storageTestsCopy...)
518525

526+
cliTestsCopy := copyTests(cliTests)
527+
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.
528+
tests = append(tests, cliTestsCopy...)
529+
519530
nodeTestsCopy := copyTests(nodeTests)
520531
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.
521532
tests = append(tests, nodeTestsCopy...)

0 commit comments

Comments
 (0)