Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(IDX): rename test_utils bazel targets to their unique crate names #2136

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
10623a7
chore(IDX): rename //rs/ethereum/cketh/test_utils:test_utils: -> //rs…
basvandijk Oct 18, 2024
600142d
//rs/bitcoin/adapter/test_utils:test_utils -> //rs/bitcoin/adapter/te…
basvandijk Oct 18, 2024
1496a7c
//rs/canonical_state/tree_hash/test_utils:test_utils -> //rs/canonica…
basvandijk Oct 18, 2024
bbbc86b
//rs/p2p/test_utils:test_utils -> //rs/p2p/test_utils:ic_p2p_test_utils
basvandijk Oct 18, 2024
846d60e
//rs/sns/test_utils:test_utils -> //rs/sns/test_utils:ic_sns_test_utils
basvandijk Oct 18, 2024
3704bbe
//rs/nns/test_utils:test_utils -> //rs/nns/test_utils:ic_nns_test_utils
basvandijk Oct 18, 2024
b79059c
//rs/crypto/test_utils:test_utils -> //rs/crypto/test_utils:ic_crypto…
basvandijk Oct 18, 2024
16329d6
//rs/rosetta-api/icp/test_utils:test_utils -> //rs/rosetta-api/icp/te…
basvandijk Oct 18, 2024
b1f60f2
//rs/ledger_suite/icp/test_utils:test_utils -> //rs/ledger_suite/icp/…
basvandijk Oct 18, 2024
02eb5f6
fix
basvandijk Oct 18, 2024
9ec6c8d
//rs/crypto/tree_hash/test_utils:test_utils -> //rs/crypto/tree_hash/…
basvandijk Oct 18, 2024
ced3c63
//rs/ledger_suite/icrc1/test_utils:test_utils -> //rs/ledger_suite/ic…
basvandijk Oct 18, 2024
10ba82b
//rs/nervous_system/common/test_utils:test_utils -> //rs/nervous_syst…
basvandijk Oct 18, 2024
dc43471
//rs/ethereum/ledger-suite-orchestrator/test_utils:test_utils -> //rs…
basvandijk Oct 18, 2024
3d4a746
//rs/crypto/internal/crypto_lib/basic_sig/iccsa/test_utils:test_utils…
basvandijk Oct 18, 2024
1c87bd7
//rs/rosetta-api/icp/ledger_canister_blocks_synchronizer/test_utils:t…
basvandijk Oct 18, 2024
4a4040b
//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/…
basvandijk Oct 18, 2024
ea29cfd
Remove the now unnecessary crate_names
basvandijk Oct 19, 2024
c3a81a2
more renames
basvandijk Oct 19, 2024
ac5aa8c
more renames
basvandijk Oct 19, 2024
2a7b51e
remove unnecessary //rs/execution_environment:utils
basvandijk Oct 19, 2024
09fc8a5
more renames
basvandijk Oct 19, 2024
5a7c562
clippy
basvandijk Oct 19, 2024
ddccd76
clippy
basvandijk Oct 19, 2024
02bfd54
wip
basvandijk Oct 19, 2024
cfaed5b
fixes
basvandijk Oct 19, 2024
adb513e
fix
basvandijk Oct 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rs/bitcoin/adapter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/bitcoin/adapter/test_utils",
"//rs/bitcoin/adapter/test_utils:ic_btc_adapter_test_utils",
"//rs/bitcoin/client",
"//rs/bitcoin/replica_types",
"//rs/interfaces/adapter_client",
Expand Down
3 changes: 1 addition & 2 deletions rs/bitcoin/adapter/test_utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ DEV_DEPENDENCIES = []
MACRO_DEPENDENCIES = []

rust_library(
name = "test_utils",
name = "ic_btc_adapter_test_utils",
testonly = True,
srcs = glob(["src/**/*.rs"]),
crate_name = "ic_btc_adapter_test_utils",
proc_macro_deps = MACRO_DEPENDENCIES,
version = "0.1.0",
deps = DEPENDENCIES + DEV_DEPENDENCIES,
Expand Down
2 changes: 1 addition & 1 deletion rs/boundary_node/ic_boundary/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
# Keep sorted.
"//rs/certification/test-utils",
"//rs/certification/test-utils:ic_certification_test_utils",
"//rs/config",
"//rs/crypto/ed25519",
"//rs/crypto/tree_hash",
Expand Down
2 changes: 1 addition & 1 deletion rs/canister_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/certification/test-utils",
"//rs/certification/test-utils:ic_certification_test_utils",
"//rs/crypto/test_utils/reproducible_rng",
"//rs/crypto/test_utils/root_of_trust",
"//rs/crypto/test_utils/tls",
Expand Down
2 changes: 1 addition & 1 deletion rs/canister_sandbox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DEPENDENCIES = [
"//rs/types/base_types",
"//rs/types/types",
"//rs/types/wasm_types",
"//rs/utils",
"//rs/utils:ic_utils",
"@crate_index//:bincode",
"@crate_index//:bytes",
"@crate_index//:lazy_static",
Expand Down
4 changes: 2 additions & 2 deletions rs/canonical_state/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ MACRO_DEPENDENCIES = [

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/canonical_state/tree_hash/test_utils",
"//rs/canonical_state/tree_hash/test_utils:ic_canonical_state_tree_hash_test_utils",
"//rs/crypto/sha2",
"//rs/registry/subnet_features",
"//rs/sys",
Expand All @@ -38,7 +38,7 @@ DEV_DEPENDENCIES = [
"//rs/test_utilities/types",
"//rs/types/management_canister_types",
"//rs/types/wasm_types",
"//rs/utils",
"//rs/utils:ic_utils",
"@crate_index//:assert_matches",
"@crate_index//:hex",
"@crate_index//:lazy_static",
Expand Down
4 changes: 2 additions & 2 deletions rs/canonical_state/tree_hash/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ DEPENDENCIES = [

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/canonical_state/tree_hash/test_utils",
"//rs/canonical_state/tree_hash/test_utils:ic_canonical_state_tree_hash_test_utils",
"//rs/crypto/test_utils/reproducible_rng",
"//rs/crypto/tree_hash/test_utils",
"//rs/crypto/tree_hash/test_utils:ic_crypto_tree_hash_test_utils",
"@crate_index//:assert_matches",
"@crate_index//:proptest",
"@crate_index//:rand",
Expand Down
5 changes: 2 additions & 3 deletions rs/canonical_state/tree_hash/test_utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ DEPENDENCIES = [
# Keep sorted.
"//rs/canonical_state/tree_hash",
"//rs/crypto/tree_hash",
"//rs/crypto/tree_hash/test_utils",
"//rs/crypto/tree_hash/test_utils:ic_crypto_tree_hash_test_utils",
"@crate_index//:rand",
]

rust_library(
name = "test_utils",
name = "ic_canonical_state_tree_hash_test_utils",
testonly = True,
srcs = glob(["src/**"]),
crate_name = "ic_canonical_state_tree_hash_test_utils",
rustc_flags = select({
"//bazel:fuzzing_code_enabled": DEFAULT_RUSTC_FLAGS_FOR_FUZZING,
"//conditions:default": [],
Expand Down
2 changes: 1 addition & 1 deletion rs/certification/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DEPENDENCIES = [
DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/canonical_state",
"//rs/certification/test-utils",
"//rs/certification/test-utils:ic_certification_test_utils",
"//rs/crypto/internal/crypto_lib/types",
"//rs/crypto/test_utils/reproducible_rng",
"//rs/types/base_types",
Expand Down
5 changes: 2 additions & 3 deletions rs/certification/test-utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ DEPENDENCIES = [
]

rust_library(
name = "test-utils",
name = "ic_certification_test_utils",
srcs = glob(["src/**"]),
crate_name = "ic_certification_test_utils",
version = "0.1.0",
deps = DEPENDENCIES,
)

rust_doc_test(
name = "certification_test_utils_doc_test",
crate = ":test-utils",
crate = ":ic_certification_test_utils",
)
4 changes: 2 additions & 2 deletions rs/consensus/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package(default_visibility = ["//visibility:public"])
DEPENDENCIES = [
# Keep sorted.
"//rs/config",
"//rs/consensus/utils",
"//rs/consensus/utils:ic_consensus_utils",
"//rs/crypto",
"//rs/crypto/prng",
"//rs/crypto/utils/threshold_sig_der",
Expand Down Expand Up @@ -162,7 +162,7 @@ rust_ic_bench(
":consensus",
"//rs/artifact_pool",
"//rs/config",
"//rs/consensus/utils",
"//rs/consensus/utils:ic_consensus_utils",
"//rs/execution_environment",
"//rs/https_outcalls/consensus",
"//rs/ingress_manager",
Expand Down
2 changes: 1 addition & 1 deletion rs/consensus/mocks/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DEPENDENCIES = [
# Keep sorted.
"//rs/artifact_pool",
"//rs/config",
"//rs/consensus/utils",
"//rs/consensus/utils:ic_consensus_utils",
"//rs/interfaces",
"//rs/interfaces/state_manager",
"//rs/monitoring/logger",
Expand Down
7 changes: 3 additions & 4 deletions rs/consensus/utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ DEV_DEPENDENCIES = [
]

rust_library(
name = "utils",
name = "ic_consensus_utils",
srcs = glob(["src/**/*.rs"]),
crate_features = select({
"//conditions:default": [],
}),
crate_name = "ic_consensus_utils",
proc_macro_deps = [
# Keep sorted.
"@crate_index//:strum_macros",
Expand All @@ -47,11 +46,11 @@ rust_library(

rust_doc(
name = "consensus_utils_doc",
crate = ":utils",
crate = ":ic_consensus_utils",
)

rust_test(
name = "consensus_utils_test",
crate = ":utils",
crate = ":ic_consensus_utils",
deps = DEPENDENCIES + DEV_DEPENDENCIES,
)
6 changes: 3 additions & 3 deletions rs/crypto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ MACRO_DEPENDENCIES = [

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/certification/test-utils",
"//rs/certification/test-utils:ic_certification_test_utils",
"//rs/crypto/ecdsa_secp256r1",
"//rs/crypto/for_verification_only",
"//rs/crypto/internal/crypto_lib/basic_sig/der_utils",
"//rs/crypto/internal/crypto_lib/basic_sig/ecdsa_secp256k1",
"//rs/crypto/internal/crypto_lib/basic_sig/ecdsa_secp256r1",
"//rs/crypto/internal/crypto_lib/basic_sig/rsa_pkcs1",
"//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils",
"//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils:ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils",
"//rs/crypto/internal/crypto_lib/tls",
"//rs/crypto/internal/crypto_service_provider/csp_proptest_utils",
"//rs/crypto/internal/csp_test_utils",
Expand All @@ -74,7 +74,7 @@ DEV_DEPENDENCIES = [
"//rs/crypto/secp256k1",
"//rs/crypto/sha2",
"//rs/crypto/temp_crypto",
"//rs/crypto/test_utils",
"//rs/crypto/test_utils:ic_crypto_test_utils",
"//rs/crypto/test_utils/canister_sigs",
"//rs/crypto/test_utils/canister_threshold_sigs",
"//rs/crypto/test_utils/csp",
Expand Down
2 changes: 1 addition & 1 deletion rs/crypto/for_verification_only/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MACRO_DEPENDENCIES = []
DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/crypto/interfaces/sig_verification",
"//rs/crypto/test_utils",
"//rs/crypto/test_utils:ic_crypto_test_utils",
"//rs/crypto/test_utils/reproducible_rng",
"//rs/registry/fake",
"//rs/registry/proto_data_provider",
Expand Down
6 changes: 3 additions & 3 deletions rs/crypto/internal/crypto_lib/basic_sig/iccsa/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/certification/test-utils",
"//rs/crypto/internal/crypto_lib/basic_sig/iccsa/test_utils",
"//rs/crypto/test_utils",
"//rs/certification/test-utils:ic_certification_test_utils",
"//rs/crypto/internal/crypto_lib/basic_sig/iccsa/test_utils:ic_crypto_internal_basic_sig_iccsa_test_utils",
"//rs/crypto/test_utils:ic_crypto_test_utils",
"//rs/crypto/test_utils/reproducible_rng",
"//rs/interfaces",
"@crate_index//:assert_matches",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ package(default_visibility = [

DEPENDENCIES = [
# Keep sorted.
"//rs/certification/test-utils",
"//rs/certification/test-utils:ic_certification_test_utils",
"//rs/crypto/sha2",
"//rs/crypto/tree_hash",
"//rs/types/types",
"@crate_index//:rand",
]

rust_library(
name = "test_utils",
name = "ic_crypto_internal_basic_sig_iccsa_test_utils",
testonly = True,
srcs = glob(["src/**"]),
crate_name = "ic_crypto_internal_basic_sig_iccsa_test_utils",
version = "0.1.0",
deps = DEPENDENCIES,
)
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MACRO_DEPENDENCIES = [

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils",
"//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils:ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils",
"//rs/crypto/test_utils/reproducible_rng",
"@crate_index//:assert_matches",
"@crate_index//:bip32",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ load("@rules_rust//rust:defs.bzl", "rust_library")
package(default_visibility = ["//rs/crypto:__subpackages__"])

rust_library(
name = "test_utils",
name = "ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils",
testonly = True,
srcs = glob(["src/**"]),
crate_name = "ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils",
version = "0.1.0",
deps = [
# Keep sorted.
Expand Down
4 changes: 2 additions & 2 deletions rs/crypto/internal/crypto_service_provider/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ DEPENDENCIES = [

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils",
"//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils:ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils",
"//rs/crypto/internal/crypto_service_provider/csp_proptest_utils",
"//rs/crypto/internal/csp_test_utils",
"//rs/crypto/node_key_generation",
"//rs/crypto/temp_crypto/temp_vault",
"//rs/crypto/test_utils",
"//rs/crypto/test_utils:ic_crypto_test_utils",
"//rs/crypto/test_utils/canister_threshold_sigs",
"//rs/crypto/test_utils/keys",
"//rs/crypto/test_utils/local_csp_vault",
Expand Down
2 changes: 1 addition & 1 deletion rs/crypto/node_key_generation/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DEV_DEPENDENCIES = [
"//rs/crypto",
"//rs/crypto/internal/csp_test_utils",
"//rs/crypto/temp_crypto",
"//rs/crypto/test_utils",
"//rs/crypto/test_utils:ic_crypto_test_utils",
"//rs/crypto/test_utils/keys",
"//rs/crypto/test_utils/local_csp_vault",
"//rs/monitoring/metrics",
Expand Down
2 changes: 1 addition & 1 deletion rs/crypto/temp_crypto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MACRO_DEPENDENCIES = [

DEV_DEPENDENCIES = [
# Keep sorted.
"//rs/crypto/test_utils",
"//rs/crypto/test_utils:ic_crypto_test_utils",
"//rs/crypto/test_utils/reproducible_rng",
"//rs/test_utilities/time",
"//rs/types/types_test_utils",
Expand Down
Loading