@@ -27,6 +27,8 @@ import (
27
27
"k8s.io/klog/v2"
28
28
k8simage "k8s.io/kubernetes/test/utils/image"
29
29
30
+ k8sgenerated "k8s.io/kubernetes/openshift-hack/e2e/annotate/generated"
31
+
30
32
"github.com/openshift/origin/pkg/clioptions/clusterdiscovery"
31
33
"github.com/openshift/origin/pkg/clioptions/imagesetup"
32
34
"github.com/openshift/origin/pkg/clioptions/upgradeoptions"
@@ -74,17 +76,17 @@ func InitializeOpenShiftTestsExtensionFramework() (*extension.Registry, *extensi
74
76
return nil , nil , fmt .Errorf ("failed to build extension test specs: %w" , err )
75
77
}
76
78
79
+ // Apply annotations to test names only for upstream tests
80
+ specs .Walk (func (spec * extensiontests.ExtensionTestSpec ) {
81
+ if append , ok := k8sgenerated .Annotations [spec .Name ]; ok {
82
+ spec .Name += append
83
+ }
84
+ })
85
+
77
86
klog .Infof ("Found %d test specs" , len (specs ))
78
87
// Filter out kube tests, vendor filtering isn't working within origin
79
88
specs = specs .Select (func (spec * extensiontests.ExtensionTestSpec ) bool {
80
- for _ , cl := range spec .CodeLocations {
81
- // If there is a CodeLocation for origin, that isn't simply "framework" it is not a vendored test
82
- if strings .Contains (cl , "github.com/openshift/origin/" ) &&
83
- ! strings .Contains (cl , "github.com/openshift/origin/test/extended/util/framework.go" ) {
84
- return true
85
- }
86
- }
87
- return false
89
+ return ! strings .Contains (spec .Name , "[Suite:k8s" )
88
90
})
89
91
klog .Infof ("%d test specs remain, after filtering out k8s" , len (specs ))
90
92
0 commit comments