From 358d980e643541ac59dce601fec3d2ac11034a04 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 17 Jan 2023 23:39:41 +0000 Subject: [PATCH] Always set `_test_utils` when building lightning for some tests This ensures that we hit additional assertions which are intended to always be run in tests. --- fuzz/Cargo.toml | 2 +- lightning-block-sync/Cargo.toml | 1 + lightning-net-tokio/Cargo.toml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index b0b6910ae..5daebb350 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -18,7 +18,7 @@ libfuzzer_fuzz = ["libfuzzer-sys"] stdin_fuzz = [] [dependencies] -lightning = { path = "../lightning", features = ["regex", "hashbrown"] } +lightning = { path = "../lightning", features = ["regex", "hashbrown", "_test_utils"] } lightning-rapid-gossip-sync = { path = "../lightning-rapid-gossip-sync" } bitcoin = { version = "0.29.0", features = ["secp-lowmemory"] } hex = "0.3" diff --git a/lightning-block-sync/Cargo.toml b/lightning-block-sync/Cargo.toml index 8b185ff3b..c605f5ef3 100644 --- a/lightning-block-sync/Cargo.toml +++ b/lightning-block-sync/Cargo.toml @@ -27,4 +27,5 @@ serde_json = { version = "1.0", optional = true } chunked_transfer = { version = "1.4", optional = true } [dev-dependencies] +lightning = { version = "0.0.113", path = "../lightning", features = ["_test_utils"] } tokio = { version = "~1.14", features = [ "macros", "rt" ] } diff --git a/lightning-net-tokio/Cargo.toml b/lightning-net-tokio/Cargo.toml index 07f9f3133..8a518638c 100644 --- a/lightning-net-tokio/Cargo.toml +++ b/lightning-net-tokio/Cargo.toml @@ -21,3 +21,4 @@ tokio = { version = "1.0", features = [ "io-util", "macros", "rt", "sync", "net" [dev-dependencies] tokio = { version = "~1.14", features = [ "io-util", "macros", "rt", "rt-multi-thread", "sync", "net", "time" ] } +lightning = { version = "0.0.113", path = "../lightning", features = ["_test_utils"] } -- 2.39.5