From 191c16fd341167874a6cdde0719c4efaf3c5c74d Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Wed, 13 Nov 2024 12:51:03 -0800 Subject: [PATCH] Kubernetes tests: Mark `k8sctx` as testonly and disable `nogo`. They are all test-only libraries, so `nogo` analysis (expensive on some of the autogenerated proto code it imports) is not important. PiperOrigin-RevId: 696238370 --- test/kubernetes/benchmarks/BUILD | 14 ++++++++++++++ test/kubernetes/k8sctx/BUILD | 2 ++ test/kubernetes/tests/BUILD | 1 + 3 files changed, 17 insertions(+) diff --git a/test/kubernetes/benchmarks/BUILD b/test/kubernetes/benchmarks/BUILD index 6ac7d5543..b57fe7da5 100644 --- a/test/kubernetes/benchmarks/BUILD +++ b/test/kubernetes/benchmarks/BUILD @@ -8,6 +8,7 @@ package( go_test( name = "abslbuild_test", srcs = ["abslbuild_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -27,6 +28,7 @@ go_test( go_test( name = "startup_test", srcs = ["startup_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -44,6 +46,7 @@ go_test( go_test( name = "redis_test", srcs = ["redis_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -63,6 +66,7 @@ go_test( go_test( name = "ruby_dev_test", srcs = ["ruby_dev_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -83,6 +87,7 @@ go_test( go_test( name = "ffmpeg_test", srcs = ["ffmpeg_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -102,6 +107,7 @@ go_test( go_test( name = "grpc_test", srcs = ["grpc_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -121,6 +127,7 @@ go_test( go_test( name = "nginx_test", srcs = ["nginx_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -141,6 +148,7 @@ go_test( go_test( name = "postgresql_test", srcs = ["postgresql_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -159,6 +167,7 @@ go_test( go_test( name = "tensorflow_test", srcs = ["tensorflow_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -178,6 +187,7 @@ go_test( go_test( name = "wordpress_test", srcs = ["wordpress_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -197,6 +207,7 @@ go_test( go_test( name = "pytorch_test", srcs = ["pytorch_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -218,6 +229,7 @@ go_test( embedsrcs = [ "//test/kubernetes/benchmarks/resources:files", # keep ], + nogo = False, tags = [ "local", "noguitar", @@ -239,6 +251,7 @@ go_test( go_test( name = "stablediffusion_test", srcs = ["stablediffusion_test.go"], + nogo = False, tags = [ "local", "noguitar", @@ -258,6 +271,7 @@ go_test( go_test( name = "gsutil_test", srcs = ["gsutil_test.go"], + nogo = False, tags = [ "local", "noguitar", diff --git a/test/kubernetes/k8sctx/BUILD b/test/kubernetes/k8sctx/BUILD index a35e8a248..0361ab747 100644 --- a/test/kubernetes/k8sctx/BUILD +++ b/test/kubernetes/k8sctx/BUILD @@ -7,10 +7,12 @@ package( go_library( name = "k8sctx", + testonly = True, srcs = [ "k8sctx.go", "k8sctx_impl.go", ], + nogo = False, visibility = [ "//visibility:public", ], diff --git a/test/kubernetes/tests/BUILD b/test/kubernetes/tests/BUILD index 5f6235a06..0234680c1 100644 --- a/test/kubernetes/tests/BUILD +++ b/test/kubernetes/tests/BUILD @@ -8,6 +8,7 @@ package( go_test( name = "hello_test", srcs = ["hello_test.go"], + nogo = False, tags = [ "local", "noguitar",