Skip to content

Commit

Permalink
bazel: use test sharding more liberally
Browse files Browse the repository at this point in the history
Closes #76376.

Release note: None

Release justification: non-production code changes
  • Loading branch information
rickystewart committed Mar 1, 2022
1 parent 9bab39f commit e57e278
Show file tree
Hide file tree
Showing 26 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/bench/rttanalysis/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":rttanalysis"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/security",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ go_test(
"multi_region_bench_test.go",
],
data = glob(["testdata/**"]),
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/bench/rttanalysis",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/kvccl/kvtenantccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ go_test(
"tenant_upgrade_test.go",
],
embed = [":kvtenantccl"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/ccl/utilccl",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/schemachangerccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ go_test(
"//pkg/sql/schemachanger:testdata",
],
embed = [":schemachangerccl"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/build/bazel",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/telemetryccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ go_test(
"telemetry_test.go",
],
data = glob(["testdata/**"]),
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/ccl",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/testccl/sqlccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_test(
"show_transfer_state_test.go",
"temp_table_clean_test.go",
],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/ccl/kvccl/kvtenantccl",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/workloadccl/allccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ go_test(
"main_test.go",
],
embed = [":allccl"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/ccl",
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/democluster/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ go_test(
name = "democluster_test",
srcs = ["demo_cluster_test.go"],
embed = [":democluster"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/ccl/kvccl/kvtenantccl",
Expand Down
1 change: 1 addition & 0 deletions pkg/jobs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ go_test(
"testutils_test.go",
],
embed = [":jobs"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/clusterversion",
Expand Down
1 change: 1 addition & 0 deletions pkg/kv/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":kv"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/config/zonepb",
Expand Down
1 change: 1 addition & 0 deletions pkg/kv/kvclient/kvcoord/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":kvcoord"],
shard_count = 16,
tags = ["no-remote"],
deps = [
"//build/bazelutil:noop",
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/kvserver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":kvserver"],
shard_count = 4,
tags = ["cpu:4"],
shard_count = 8,
tags = ["cpu:2"],
deps = [
"//pkg/base",
"//pkg/cli/exit",
Expand Down
1 change: 1 addition & 0 deletions pkg/kv/kvserver/concurrency/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":concurrency"],
shard_count = 16,
deps = [
"//pkg/kv/kvserver/batcheval",
"//pkg/kv/kvserver/concurrency/lock",
Expand Down
1 change: 1 addition & 0 deletions pkg/kv/kvserver/protectedts/ptstorage/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ go_test(
"validate_test.go",
],
embed = [":ptstorage"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/keys",
Expand Down
1 change: 1 addition & 0 deletions pkg/kv/kvserver/spanlatch/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ go_test(
":latch_interval_btree_test.go", # keep
],
embed = [":spanlatch"],
shard_count = 16,
deps = [
"//pkg/keys",
"//pkg/kv/kvserver/spanset",
Expand Down
1 change: 1 addition & 0 deletions pkg/migration/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":migrations"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/clusterversion",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/colexec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ go_test(
"values_test.go",
],
embed = [":colexec"],
shard_count = 16,
deps = [
"//pkg/col/coldata",
"//pkg/col/coldataext",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/opt/exec/execbuilder/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ go_test(
"@cockroach//c-deps:libgeos",
],
embed = [":execbuilder"],
shard_count = 16,
deps = [
"//pkg/security",
"//pkg/security/securitytest",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/pgwire/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":pgwire"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/cloud/impl:cloudimpl",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/physicalplan/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ go_test(
"span_resolver_test.go",
],
embed = [":physicalplan"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/gossip",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/schemachanger/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ go_test(
"schemachanger_test.go",
],
data = [":testdata"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/jobs",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/sqlstats/persistedsqlstats/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ go_test(
"scheduled_sql_stats_compaction_test.go",
],
data = glob(["testdata/**"]),
shard_count = 16,
deps = [
":persistedsqlstats",
"//pkg/base",
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ go_test(
],
data = glob(["testdata/**"]),
embed = [":tests"],
shard_count = 16,
deps = [
"//pkg/base",
"//pkg/bench",
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/metamorphic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ go_test(
"meta_test.go",
],
embed = [":metamorphic"],
shard_count = 16,
deps = [
"//pkg/settings/cluster",
"//pkg/testutils",
Expand Down
1 change: 1 addition & 0 deletions pkg/util/interval/generic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go_test(
size = "large",
srcs = [":example_interval_btree_test.go"],
embed = [":generic"],
shard_count = 16,
deps = [
"//pkg/keys",
"//pkg/roachpb",
Expand Down
1 change: 1 addition & 0 deletions pkg/workload/ycsb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ go_test(
"zipfgenerator_test.go",
],
embed = [":ycsb"],
shard_count = 16,
deps = [
"//pkg/testutils/skip",
"//pkg/util/leaktest",
Expand Down

0 comments on commit e57e278

Please sign in to comment.