Skip to content

Commit e212d74

Browse files
committed
Somewhat clean up ci-tests.sh and sort by RUSTFLAGS
1 parent 51f5bc8 commit e212d74

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
@@ -80,23 +80,26 @@ done
8080
echo -e "\n\nTesting no-std builds"
8181
for DIR in lightning-invoice lightning-rapid-gossip-sync; do
8282
cargo test -p $DIR --verbose --color always --no-default-features
83-
# check if there is a conflict between no-std and the c_bindings cfg
84-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
8583
done
8684

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

94-
for DIR in lightning; do
92+
for DIR in lightning-invoice lightning-rapid-gossip-sync; do
9593
# check if there is a conflict between no-std and the c_bindings cfg
96-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
94+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
9795
done
98-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
9996

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

0 commit comments

Comments
 (0)