Skip to content

Commit 778306d

Browse files
committed
expose one functional test
1 parent f30dba3 commit 778306d

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ members = [
1313
"lightning-transaction-sync",
1414
"possiblyrandom",
1515
"ext-test-macro",
16-
]
16+
]
1717

1818
exclude = [
19+
"ext-functional-test-demo",
1920
"no-std-check",
2021
"msrv-no-dev-deps-check",
2122
"bench",

ci/ci-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ cargo check --verbose --color always --features lightning-transaction-sync
157157
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
158158
popd
159159

160+
echo -e "\n\Running functional tests from outside the workspace"
161+
pushd ext-functional-test-demo
162+
cargo test --color always
163+
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
164+
popd
165+
160166
# Test that we can build downstream code with only the "release pins".
161167
pushd msrv-no-dev-deps-check
162168
PIN_RELEASE_DEPS

lightning/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ backtrace = { version = "0.3", optional = true }
5151
core2 = { version = "0.3.0", optional = true, default-features = false }
5252
libm = { version = "0.2", optional = true, default-features = false }
5353
delegate = "0.12.0"
54+
ext-test-macro = { path = "../ext-test-macro" }
5455

5556
[dev-dependencies]
5657
regex = "1.5.6"

lightning/src/ln/functional_tests.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ use alloc::collections::BTreeSet;
5555
use core::iter::repeat;
5656
use bitcoin::hashes::Hash;
5757
use crate::sync::{Arc, Mutex, RwLock};
58+
use ext_test_macro::xtest;
5859

5960
use crate::ln::functional_test_utils::*;
6061
use crate::ln::chan_utils::CommitmentTransaction;
6162

6263
use super::channel::UNFUNDED_CHANNEL_AGE_LIMIT_TICKS;
6364

64-
#[test]
65-
fn test_insane_channel_opens() {
65+
#[xtest(feature = "_test_utils")]
66+
pub fn test_insane_channel_opens() {
6667
// Stand up a network of 2 nodes
6768
use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
6869
let mut cfg = UserConfig::default();

lightning/src/ln/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub use onion_utils::create_payment_onion;
4949
#[cfg(test)]
5050
#[allow(unused_mut)]
5151
mod blinded_payment_tests;
52-
#[cfg(test)]
52+
#[cfg(any(test, feature = "_test_utils"))]
5353
#[allow(unused_mut)]
5454
mod functional_tests;
5555
#[cfg(test)]

0 commit comments

Comments
 (0)