Skip to content

Commit 7643ddf

Browse files
Merge pull request #30171 from neisw/trt-2257-separate-build-tests
trt-2257: separate builds tests
2 parents 85b1080 + 748b654 commit 7643ddf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,18 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
432432
return strings.Contains(t.name, "[sig-storage]")
433433
})
434434

435+
buildsTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
436+
return strings.Contains(t.name, "[sig-builds]")
437+
})
438+
435439
mustGatherTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool {
436440
return strings.Contains(t.name, "[sig-cli] oc adm must-gather")
437441
})
438442

439443
logrus.Infof("Found %d openshift tests", len(openshiftTests))
440444
logrus.Infof("Found %d kube tests", len(kubeTests))
441445
logrus.Infof("Found %d storage tests", len(storageTests))
446+
logrus.Infof("Found %d builds tests", len(buildsTests))
442447
logrus.Infof("Found %d must-gather tests", len(mustGatherTests))
443448

444449
// If user specifies a count, duplicate the kube and openshift tests that many times.
@@ -447,12 +452,14 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
447452
originalKube := kubeTests
448453
originalOpenshift := openshiftTests
449454
originalStorage := storageTests
455+
originalBuilds := buildsTests
450456
originalMustGather := mustGatherTests
451457

452458
for i := 1; i < count; i++ {
453459
kubeTests = append(kubeTests, copyTests(originalKube)...)
454460
openshiftTests = append(openshiftTests, copyTests(originalOpenshift)...)
455461
storageTests = append(storageTests, copyTests(originalStorage)...)
462+
buildsTests = append(buildsTests, copyTests(originalBuilds)...)
456463
mustGatherTests = append(mustGatherTests, copyTests(originalMustGather)...)
457464
}
458465
}
@@ -486,6 +493,10 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
486493
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.
487494
tests = append(tests, storageTestsCopy...)
488495

496+
buildsTestsCopy := copyTests(buildsTests)
497+
q.Execute(testCtx, buildsTestsCopy, max(1, parallelism/2), testOutputConfig, abortFn) // builds tests only run at half the parallelism, so we can avoid high cpu problems.
498+
tests = append(tests, buildsTestsCopy...)
499+
489500
openshiftTestsCopy := copyTests(openshiftTests)
490501
q.Execute(testCtx, openshiftTestsCopy, parallelism, testOutputConfig, abortFn)
491502
tests = append(tests, openshiftTestsCopy...)

0 commit comments

Comments
 (0)