Skip to content

Commit 98d6689

Browse files
committed
Somewhat clean up ci-tests.sh and sort by RUSTFLAGS
1 parent 443274b commit 98d6689

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

ci/ci-tests.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,26 @@ done
7777
echo -e "\n\nTesting no-std builds"
7878
for DIR in lightning-invoice lightning-rapid-gossip-sync; do
7979
cargo test -p $DIR --verbose --color always --no-default-features
80-
# check if there is a conflict between no-std and the c_bindings cfg
81-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
8280
done
8381

84-
echo -e "\n\nTesting no-std flags in various combinations"
85-
for DIR in lightning; do
86-
cargo test -p $DIR --verbose --color always --no-default-features --features no-std
87-
# check if there is a conflict between no-std and the default std feature
88-
cargo test -p $DIR --verbose --color always --features no-std
89-
done
82+
cargo test -p lightning --verbose --color always --no-default-features --features no-std
83+
# check if there is a conflict between no-std and the default std feature
84+
cargo test -p lightning --verbose --color always --features no-std
85+
86+
echo -e "\n\nTesting c_bindings builds"
87+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
9088

91-
for DIR in lightning; do
89+
for DIR in lightning-invoice lightning-rapid-gossip-sync; do
9290
# check if there is a conflict between no-std and the c_bindings cfg
93-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
91+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
9492
done
95-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
9693

94+
# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
95+
# disable tests in `c_bindings` so we skip doctests entirely here.
96+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning-background-processor --verbose --color always --features futures --no-default-features --lib --bins --tests
97+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --verbose --color always --no-default-features --features=no-std
98+
99+
echo -e "\n\nTesting other crate-specific builds"
97100
# Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
98101
cargo test -p lightning --verbose --color always --no-default-features --features=std,_test_vectors
99102
# This one only works for lightning-invoice

0 commit comments

Comments
 (0)