diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 000000000..eead4b42c --- /dev/null +++ b/.bazelrc @@ -0,0 +1,3 @@ +# Print warnings for tests with inappropriate test size or timeout. +test --test_verbose_timeout_warnings + diff --git a/.buildkite-bazelrc b/.buildkite-bazelrc index 8e5296ab4..17cecef51 100644 --- a/.buildkite-bazelrc +++ b/.buildkite-bazelrc @@ -17,6 +17,9 @@ build:remote-cache --jobs=50 build:remote-cache --host_platform_remote_properties_override='properties:{name:\"cache-silo-key\" value:\"prysm\"}' build:remote-cache --remote_instance_name=projects/prysmaticlabs/instances/default_instance +# Import workspace options. +import %workspace%/.bazelrc + build --experimental_strict_action_env build --disk_cache=/tmp/bazelbuilds build --experimental_multi_threaded_digest @@ -28,6 +31,5 @@ build --curses=yes --color=yes build --keep_going build --test_output=errors build --flaky_test_attempts=5 -build --test_timeout=5,60,-1,-1 # Disabled race detection due to unstable test results under constrained environment build kite # build --features=race diff --git a/beacon-chain/attestation/BUILD.bazel b/beacon-chain/attestation/BUILD.bazel index e0e370dd9..08a57bade 100644 --- a/beacon-chain/attestation/BUILD.bazel +++ b/beacon-chain/attestation/BUILD.bazel @@ -29,6 +29,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["service_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/blockchain/BUILD.bazel b/beacon-chain/blockchain/BUILD.bazel index 6bd6a6adb..7df94a14b 100644 --- a/beacon-chain/blockchain/BUILD.bazel +++ b/beacon-chain/blockchain/BUILD.bazel @@ -36,6 +36,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "block_processing_test.go", "fork_choice_reorg_test.go", diff --git a/beacon-chain/blockchain/stategenerator/BUILD.bazel b/beacon-chain/blockchain/stategenerator/BUILD.bazel index 0b7cf1541..68f4442b3 100644 --- a/beacon-chain/blockchain/stategenerator/BUILD.bazel +++ b/beacon-chain/blockchain/stategenerator/BUILD.bazel @@ -19,6 +19,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["state_generator_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/chaintest/BUILD.bazel b/beacon-chain/chaintest/BUILD.bazel index f1c3a3468..a47d69e40 100644 --- a/beacon-chain/chaintest/BUILD.bazel +++ b/beacon-chain/chaintest/BUILD.bazel @@ -22,6 +22,7 @@ go_binary( go_test( name = "go_default_test", + size = "small", srcs = ["yaml_test.go"], data = glob(["tests/**"]), embed = [":go_default_library"], diff --git a/beacon-chain/chaintest/backend/BUILD.bazel b/beacon-chain/chaintest/backend/BUILD.bazel index e406f8c31..0951dc214 100644 --- a/beacon-chain/chaintest/backend/BUILD.bazel +++ b/beacon-chain/chaintest/backend/BUILD.bazel @@ -32,6 +32,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["simulated_backend_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/core/balances/BUILD.bazel b/beacon-chain/core/balances/BUILD.bazel index 4f9f9ea39..1c880106c 100644 --- a/beacon-chain/core/balances/BUILD.bazel +++ b/beacon-chain/core/balances/BUILD.bazel @@ -16,6 +16,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["rewards_penalties_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/core/blocks/BUILD.bazel b/beacon-chain/core/blocks/BUILD.bazel index 6b54734aa..f31dff408 100644 --- a/beacon-chain/core/blocks/BUILD.bazel +++ b/beacon-chain/core/blocks/BUILD.bazel @@ -30,6 +30,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "block_operations_test.go", "block_test.go", diff --git a/beacon-chain/core/epoch/BUILD.bazel b/beacon-chain/core/epoch/BUILD.bazel index 09f0a34c0..0621750fc 100644 --- a/beacon-chain/core/epoch/BUILD.bazel +++ b/beacon-chain/core/epoch/BUILD.bazel @@ -26,6 +26,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "epoch_operations_test.go", "epoch_processing_test.go", diff --git a/beacon-chain/core/helpers/BUILD.bazel b/beacon-chain/core/helpers/BUILD.bazel index ffb659820..90de87ed9 100644 --- a/beacon-chain/core/helpers/BUILD.bazel +++ b/beacon-chain/core/helpers/BUILD.bazel @@ -29,6 +29,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "committee_test.go", "deposits_test.go", diff --git a/beacon-chain/core/state/BUILD.bazel b/beacon-chain/core/state/BUILD.bazel index df4ae5f04..5b37019a2 100644 --- a/beacon-chain/core/state/BUILD.bazel +++ b/beacon-chain/core/state/BUILD.bazel @@ -28,6 +28,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "state_test.go", "transition_test.go", diff --git a/beacon-chain/core/state/stateutils/BUILD.bazel b/beacon-chain/core/state/stateutils/BUILD.bazel index 117ff5c1c..00e8ec31e 100644 --- a/beacon-chain/core/state/stateutils/BUILD.bazel +++ b/beacon-chain/core/state/stateutils/BUILD.bazel @@ -13,6 +13,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["validator_index_map_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/core/validators/BUILD.bazel b/beacon-chain/core/validators/BUILD.bazel index e58b9577b..79afbfd94 100644 --- a/beacon-chain/core/validators/BUILD.bazel +++ b/beacon-chain/core/validators/BUILD.bazel @@ -18,6 +18,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["validator_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/db/BUILD.bazel b/beacon-chain/db/BUILD.bazel index 86b69c36f..13848e7e4 100644 --- a/beacon-chain/db/BUILD.bazel +++ b/beacon-chain/db/BUILD.bazel @@ -39,6 +39,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "attestation_test.go", "block_operations_test.go", diff --git a/beacon-chain/node/BUILD.bazel b/beacon-chain/node/BUILD.bazel index b802cc934..e5a0d2932 100644 --- a/beacon-chain/node/BUILD.bazel +++ b/beacon-chain/node/BUILD.bazel @@ -41,6 +41,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["node_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/powchain/BUILD.bazel b/beacon-chain/powchain/BUILD.bazel index 597f0c139..0d84989e9 100644 --- a/beacon-chain/powchain/BUILD.bazel +++ b/beacon-chain/powchain/BUILD.bazel @@ -33,6 +33,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "block_cache_test.go", "block_reader_test.go", diff --git a/beacon-chain/sync/initial-sync/BUILD.bazel b/beacon-chain/sync/initial-sync/BUILD.bazel index d43c2d61c..9faf234b4 100644 --- a/beacon-chain/sync/initial-sync/BUILD.bazel +++ b/beacon-chain/sync/initial-sync/BUILD.bazel @@ -33,6 +33,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["service_test.go"], embed = [":go_default_library"], deps = [ diff --git a/beacon-chain/utils/BUILD.bazel b/beacon-chain/utils/BUILD.bazel index d5e592bac..1f524660e 100644 --- a/beacon-chain/utils/BUILD.bazel +++ b/beacon-chain/utils/BUILD.bazel @@ -19,6 +19,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "clock_test.go", "shuffle_test.go", diff --git a/contracts/deposit-contract/BUILD.bazel b/contracts/deposit-contract/BUILD.bazel index 295231021..e5d3b94de 100644 --- a/contracts/deposit-contract/BUILD.bazel +++ b/contracts/deposit-contract/BUILD.bazel @@ -20,6 +20,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["depositContract_test.go"], embed = [":go_default_library"], deps = [ diff --git a/shared/BUILD.bazel b/shared/BUILD.bazel index d0303f45b..b19f47224 100644 --- a/shared/BUILD.bazel +++ b/shared/BUILD.bazel @@ -10,6 +10,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["service_registry_test.go"], embed = [":go_default_library"], ) diff --git a/shared/bitutil/BUILD.bazel b/shared/bitutil/BUILD.bazel index ea15dbe0c..062acfdb5 100644 --- a/shared/bitutil/BUILD.bazel +++ b/shared/bitutil/BUILD.bazel @@ -13,6 +13,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["bit_test.go"], embed = [":go_default_library"], deps = ["//shared/mathutil:go_default_library"], diff --git a/shared/bls/BUILD.bazel b/shared/bls/BUILD.bazel index 686f22723..18b8a11ea 100644 --- a/shared/bls/BUILD.bazel +++ b/shared/bls/BUILD.bazel @@ -13,6 +13,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["bls_test.go"], embed = [":go_default_library"], deps = ["//shared/bytesutil:go_default_library"], diff --git a/shared/bls/spectest/BUILD.bazel b/shared/bls/spectest/BUILD.bazel index 8e885d244..5358d585c 100644 --- a/shared/bls/spectest/BUILD.bazel +++ b/shared/bls/spectest/BUILD.bazel @@ -17,6 +17,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "aggregate_pubkeys_test.go", "aggregate_sigs_test.go", diff --git a/shared/bytesutil/BUILD.bazel b/shared/bytesutil/BUILD.bazel index 1ddf2d765..f986067e3 100644 --- a/shared/bytesutil/BUILD.bazel +++ b/shared/bytesutil/BUILD.bazel @@ -9,6 +9,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["bytes_test.go"], embed = [":go_default_library"], ) diff --git a/shared/cmd/BUILD.bazel b/shared/cmd/BUILD.bazel index 1f38f3d02..fa0c91370 100644 --- a/shared/cmd/BUILD.bazel +++ b/shared/cmd/BUILD.bazel @@ -14,6 +14,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["customflags_test.go"], embed = [":go_default_library"], ) diff --git a/shared/event/BUILD.bazel b/shared/event/BUILD.bazel index 897d82f25..a9e8708b1 100644 --- a/shared/event/BUILD.bazel +++ b/shared/event/BUILD.bazel @@ -13,6 +13,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "example_feed_test.go", "example_scope_test.go", diff --git a/shared/featureconfig/BUILD.bazel b/shared/featureconfig/BUILD.bazel index a0c799673..68e7bccc3 100644 --- a/shared/featureconfig/BUILD.bazel +++ b/shared/featureconfig/BUILD.bazel @@ -16,6 +16,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["config_test.go"], embed = [":go_default_library"], deps = ["@com_github_urfave_cli//:go_default_library"], diff --git a/shared/forkutil/BUILD.bazel b/shared/forkutil/BUILD.bazel index ca975d8a7..405222e19 100644 --- a/shared/forkutil/BUILD.bazel +++ b/shared/forkutil/BUILD.bazel @@ -10,6 +10,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["signature_test.go"], embed = [":go_default_library"], deps = ["//proto/beacon/p2p/v1:go_default_library"], diff --git a/shared/hashutil/BUILD.bazel b/shared/hashutil/BUILD.bazel index 84f4c37d5..1f06b7de1 100644 --- a/shared/hashutil/BUILD.bazel +++ b/shared/hashutil/BUILD.bazel @@ -18,6 +18,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "beacon_block_test.go", "hash_test.go", diff --git a/shared/iputils/BUILD.bazel b/shared/iputils/BUILD.bazel index f0ac4f940..a8a83423a 100644 --- a/shared/iputils/BUILD.bazel +++ b/shared/iputils/BUILD.bazel @@ -9,6 +9,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["external_ip_test.go"], embed = [":go_default_library"], tags = ["requires-network"], diff --git a/shared/keystore/BUILD.bazel b/shared/keystore/BUILD.bazel index 9e31902ea..c6fe10cb3 100644 --- a/shared/keystore/BUILD.bazel +++ b/shared/keystore/BUILD.bazel @@ -25,6 +25,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "deposit_input_test.go", "key_test.go", diff --git a/shared/mathutil/BUILD.bazel b/shared/mathutil/BUILD.bazel index f82767c91..dacc90b46 100644 --- a/shared/mathutil/BUILD.bazel +++ b/shared/mathutil/BUILD.bazel @@ -9,6 +9,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["math_helper_test.go"], embed = [":go_default_library"], ) diff --git a/shared/messagehandler/BUILD.bazel b/shared/messagehandler/BUILD.bazel index 36d90846e..ca04bc50f 100644 --- a/shared/messagehandler/BUILD.bazel +++ b/shared/messagehandler/BUILD.bazel @@ -14,6 +14,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["messagehandler_test.go"], embed = [":go_default_library"], deps = [ diff --git a/shared/p2p/BUILD.bazel b/shared/p2p/BUILD.bazel index 51a0ef724..df32b3758 100644 --- a/shared/p2p/BUILD.bazel +++ b/shared/p2p/BUILD.bazel @@ -56,6 +56,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "addr_factory_test.go", "connection_manager_test.go", @@ -107,6 +108,7 @@ go_test( go_test( name = "go_norace_test", + size = "small", srcs = [ "discovery_norace_test.go", "service_norace_test.go", diff --git a/shared/p2p/adapter/metric/BUILD.bazel b/shared/p2p/adapter/metric/BUILD.bazel index ab7968a81..44cbcea75 100644 --- a/shared/p2p/adapter/metric/BUILD.bazel +++ b/shared/p2p/adapter/metric/BUILD.bazel @@ -15,6 +15,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["metric_test.go"], embed = [":go_default_library"], deps = [ diff --git a/shared/params/BUILD.bazel b/shared/params/BUILD.bazel index fed69bb20..65f5c80c2 100644 --- a/shared/params/BUILD.bazel +++ b/shared/params/BUILD.bazel @@ -9,6 +9,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["config_test.go"], embed = [":go_default_library"], ) diff --git a/shared/prometheus/BUILD.bazel b/shared/prometheus/BUILD.bazel index ebe38752a..931614051 100644 --- a/shared/prometheus/BUILD.bazel +++ b/shared/prometheus/BUILD.bazel @@ -20,6 +20,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "logrus_collector_test.go", "service_test.go", diff --git a/shared/sliceutil/BUILD.bazel b/shared/sliceutil/BUILD.bazel index dff869a04..9fa3cf821 100644 --- a/shared/sliceutil/BUILD.bazel +++ b/shared/sliceutil/BUILD.bazel @@ -13,6 +13,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = [ "slice_generic_test.go", "slice_test.go", diff --git a/shared/slotutil/BUILD.bazel b/shared/slotutil/BUILD.bazel index 99802af24..133131025 100644 --- a/shared/slotutil/BUILD.bazel +++ b/shared/slotutil/BUILD.bazel @@ -10,6 +10,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["slotticker_test.go"], embed = [":go_default_library"], deps = ["//shared/params:go_default_library"], diff --git a/shared/trieutil/BUILD.bazel b/shared/trieutil/BUILD.bazel index 0940f8a46..ece85262b 100644 --- a/shared/trieutil/BUILD.bazel +++ b/shared/trieutil/BUILD.bazel @@ -13,6 +13,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["sparse_merkle_test.go"], embed = [":go_default_library"], deps = ["//shared/hashutil:go_default_library"], diff --git a/tools/cluster-pk-manager/server/BUILD.bazel b/tools/cluster-pk-manager/server/BUILD.bazel index 629767eff..1e2719db3 100644 --- a/tools/cluster-pk-manager/server/BUILD.bazel +++ b/tools/cluster-pk-manager/server/BUILD.bazel @@ -52,6 +52,7 @@ go_binary( go_test( name = "go_default_test", + size = "small", srcs = ["server_test.go"], embed = [":go_default_library"], deps = ["//proto/cluster:go_default_library"], diff --git a/validator/accounts/BUILD.bazel b/validator/accounts/BUILD.bazel index a66ef28c6..0a927868d 100644 --- a/validator/accounts/BUILD.bazel +++ b/validator/accounts/BUILD.bazel @@ -15,6 +15,7 @@ go_library( go_test( name = "go_default_test", + size = "small", srcs = ["account_test.go"], embed = [":go_default_library"], deps = [ diff --git a/validator/node/BUILD.bazel b/validator/node/BUILD.bazel index 0c9818a8a..16f4fe3f6 100644 --- a/validator/node/BUILD.bazel +++ b/validator/node/BUILD.bazel @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_test( name = "go_default_test", + size = "small", srcs = ["node_test.go"], embed = [":go_default_library"], deps = [