chore: clarify the labels in scheduler-perf

This commit is contained in:
Kensei Nakada
2024-09-10 23:41:56 +09:00
parent f0f7ff989a
commit 898cb15b18
7 changed files with 108 additions and 98 deletions

View File

@@ -17,12 +17,16 @@ limitations under the License.
package benchmark
import (
"flag"
"strings"
"testing"
"k8s.io/component-base/metrics/legacyregistry"
"k8s.io/kubernetes/pkg/features"
)
var testSchedulingLabelFilter = flag.String("test-scheduling-label-filter", "integration-test,-performance", "comma-separated list of labels which a testcase must have (no prefix or +) or must not have (-), used by TestScheduling")
func TestScheduling(t *testing.T) {
testCases, err := getTestCases(configFile)
if err != nil {
@@ -40,7 +44,7 @@ func TestScheduling(t *testing.T) {
t.Run(tc.Name, func(t *testing.T) {
for _, w := range tc.Workloads {
t.Run(w.Name, func(t *testing.T) {
if !enabled(*testSchedulingLabelFilter, append(tc.Labels, w.Labels...)...) {
if !enabled(strings.Split(*testSchedulingLabelFilter, ","), append(tc.Labels, w.Labels...)...) {
t.Skipf("disabled by label filter %q", *testSchedulingLabelFilter)
}
informerFactory, tCtx := setupTestCase(t, tc, nil, nil)