@@ -21,6 +21,7 @@ import (
2121
2222 _ "github.com/openshift/operator-framework-olm/tests-extension/test/qe/specs"
2323 exutil "github.com/openshift/operator-framework-olm/tests-extension/test/qe/util"
24+ "github.com/openshift/operator-framework-olm/tests-extension/test/qe/util/filters"
2425)
2526
2627func main () {
@@ -53,8 +54,7 @@ func main() {
5354 Name : "olmv0/parallel" ,
5455 Parents : []string {"openshift/conformance/parallel" },
5556 Qualifiers : []string {
56- `((!labels.exists(l, l=="Extended")) || (labels.exists(l, l=="Extended") && labels.exists(l, l=="ReleaseGate"))) &&
57- !(name.contains("[Serial]") || name.contains("[Slow]"))` ,
57+ filters .BasedStandardTests (`!(name.contains("[Serial]") || name.contains("[Slow]"))` ),
5858 },
5959 })
6060
@@ -67,8 +67,7 @@ func main() {
6767 Name : "olmv0/serial" ,
6868 Parents : []string {"openshift/conformance/serial" },
6969 Qualifiers : []string {
70- `((!labels.exists(l, l=="Extended")) || (labels.exists(l, l=="Extended") && labels.exists(l, l=="ReleaseGate"))) &&
71- (name.contains("[Serial]") && !name.contains("[Disruptive]") && !name.contains("[Slow]"))` ,
70+ filters .BasedStandardTests (`(name.contains("[Serial]") && !name.contains("[Disruptive]") && !name.contains("[Slow]"))` ),
7271 // refer to https://github.com/openshift/origin/blob/main/pkg/testsuites/standard_suites.go#L456
7372 },
7473 })
@@ -82,8 +81,7 @@ func main() {
8281 Name : "olmv0/slow" ,
8382 Parents : []string {"openshift/optional/slow" },
8483 Qualifiers : []string {
85- `((!labels.exists(l, l=="Extended")) || (labels.exists(l, l=="Extended") && labels.exists(l, l=="ReleaseGate"))) &&
86- name.contains("[Slow]")` ,
84+ filters .BasedStandardTests (`name.contains("[Slow]")` ),
8785 },
8886 })
8987
@@ -94,7 +92,7 @@ func main() {
9492 ext .AddSuite (e.Suite {
9593 Name : "olmv0/all" ,
9694 Qualifiers : []string {
97- `(!labels.exists(l, l=="Extended")) || (labels.exists(l, l=="Extended") && labels.exists(l, l=="ReleaseGate"))` ,
95+ filters . BasedStandardTests ( `` ) ,
9896 },
9997 })
10098
@@ -103,7 +101,7 @@ func main() {
103101 ext .AddSuite (e.Suite {
104102 Name : "olmv0/extended" ,
105103 Qualifiers : []string {
106- `labels.exists(l, l=="Extended")` ,
104+ filters . BasedExtendedTests ( `` ) ,
107105 },
108106 })
109107
@@ -112,7 +110,7 @@ func main() {
112110 ext .AddSuite (e.Suite {
113111 Name : "olmv0/extended/releasegate" ,
114112 Qualifiers : []string {
115- `labels.exists(l, l=="Extended") && labels.exists(l, l=="ReleaseGate")` ,
113+ filters . BasedExtendedReleaseGateTests ( `` ) ,
116114 },
117115 })
118116
@@ -121,45 +119,88 @@ func main() {
121119 ext .AddSuite (e.Suite {
122120 Name : "olmv0/extended/candidate" ,
123121 Qualifiers : []string {
124- `labels.exists(l, l=="Extended") && !labels.exists(l, l=="ReleaseGate")` ,
122+ filters . BasedExtendedCandidateTests ( `` ) ,
125123 },
126124 })
127125
126+ //
127+ // Categorization of Extended Candidate Tests:
128+ // ===========================================
129+ // The extended/candidate tests are categorized by test purpose and characteristics:
130+ //
131+ // 1. By Test Type:
132+ // - function: Functional tests that verify feature behavior and business logic
133+ // - stress: Stress tests that verify system behavior under resource pressure and load
134+ //
135+ // Relationship: candidate = function + stress + (other specialized test types)
136+
137+ // Extended Candidate Function Suite: Extended functional tests that don't meet OpenShift CI requirements
138+ // Contains extended tests that are not for openshift-tests and exclude stress tests
139+ ext .AddSuite (e.Suite {
140+ Name : "olmv1/extended/candidate/function" ,
141+ Qualifiers : []string {
142+ filters .BasedExtendedCandidateFuncTests (`` ),
143+ },
144+ })
145+
146+ //
147+ // Categorization of Extended Candidate Functional Tests:
148+ // =====================================================
149+ // The extended/candidate/function tests are categorized using two complementary approaches:
150+ //
151+ // 1. By Execution Model:
152+ // - parallel: Tests that can run concurrently (excludes [Serial] and [Slow])
153+ // - serial: Tests that must run one at a time ([Serial] but not [Slow])
154+ // - slow: Tests that take significant time to execute ([Slow])
155+ //
156+ // 2. By Execution Speed:
157+ // - fast: All non-slow functional tests (includes both parallel and serial, excludes [Slow])
158+ // - slow: Tests marked as [Slow] (same as above)
159+ //
160+ // Relationship: function = parallel + serial + slow = fast + slow
161+
128162 // Extended Candidate Suite Parallel Suite: extended tests that can run in parallel
129163 // Contains extended tests that can run concurrently (excludes Serial, Slow, and StressTest)
130164 ext .AddSuite (e.Suite {
131165 Name : "olmv0/extended/candidate/parallel" ,
132166 Qualifiers : []string {
133- `(labels.exists(l, l=="Extended") && !labels.exists(l, l=="ReleaseGate") && !labels.exists(l, l=="StressTest")) &&
134- !(name.contains("[Serial]") || name.contains("[Slow]"))` ,
167+ filters .BasedExtendedCandidateFuncTests (`!(name.contains("[Serial]") || name.contains("[Slow]"))` ),
135168 },
136169 })
137170 // Extended Candidate Serial Suite: extended tests that must run one at a time
138171 // Contains extended tests marked as [Serial] (includes Disruptive tests since not used for openshift-tests)
139172 ext .AddSuite (e.Suite {
140173 Name : "olmv0/extended/candidate/serial" ,
141174 Qualifiers : []string {
142- `(labels.exists(l, l=="Extended") && !labels.exists(l, l=="ReleaseGate") && !labels.exists(l, l=="StressTest")) &&
143- (name.contains("[Serial]") && !name.contains("[Slow]"))` ,
175+ filters .BasedExtendedCandidateFuncTests (`(name.contains("[Serial]") && !name.contains("[Slow]"))` ),
144176 // it is not used for openshift-tests, so it does not exclude Disruptive, so that we could use
145177 // olmv0/extended/candidate/serial to run all serial case including Disruptive cases
146178 },
147179 })
180+
181+ // Extended Candidate Fast Suite: extended functional tests excluding slow cases
182+ // Contains all extended functional tests that are not marked as [Slow] (includes both Serial and Parallel)
183+ // This provides a comprehensive functional test coverage with reasonable execution time
184+ ext .AddSuite (e.Suite {
185+ Name : "olmv1/extended/candidate/fast" ,
186+ Qualifiers : []string {
187+ filters .BasedExtendedCandidateFuncTests (`!name.contains("[Slow]")` ),
188+ },
189+ })
148190 // Extended Candidate Slow Suite: extended tests that take significant time to run
149191 // Contains extended tests marked as [Slow] (long-running tests not suitable for fast CI)
150192 ext .AddSuite (e.Suite {
151193 Name : "olmv0/extended/candidate/slow" ,
152194 Qualifiers : []string {
153- `(labels.exists(l, l=="Extended") && !labels.exists(l, l=="ReleaseGate") && !labels.exists(l, l=="StressTest")) &&
154- name.contains("[Slow]")` ,
195+ filters .BasedExtendedCandidateFuncTests (`name.contains("[Slow]")` ),
155196 },
156197 })
157198 // Extended Candidate Stress Suite: extended stress tests
158199 // Contains extended tests designed for stress testing and resource exhaustion scenarios
159200 ext .AddSuite (e.Suite {
160201 Name : "olmv0/extended/candidate/stress" ,
161202 Qualifiers : []string {
162- `labels.exists(l, l=="Extended") && ! labels.exists(l, l=="ReleaseGate") && labels.exists(l, l==" StressTest")` ,
203+ filters . BasedExtendedCandidateTests ( ` labels.exists(l, l=="StressTest")`) ,
163204 },
164205 })
165206
0 commit comments