Skip to content

Commit 0ba47de

Browse files
committed
Create an option to skip tests.
1 parent 00ed41f commit 0ba47de

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

genbindings.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ if [ ! -d "$1/lightning" -o "$2" != "true" -a "$2" != "false" ]; then
99
exit 1
1010
fi
1111

12+
SKIP_TESTS_ARGUMENT=$3
13+
SKIP_TESTS=false
14+
15+
if [ ! -z "$SKIP_TESTS_ARGUMENT" ]; then
16+
if [ "$SKIP_TESTS_ARGUMENT" != "skip-tests" ]; then
17+
echo "To skip tests, usage must be: $0 path-to-rust-lightning allow-std skip-tests"
18+
exit 1
19+
else
20+
SKIP_TESTS=true
21+
fi
22+
fi
23+
1224
export LC_ALL=C
1325

1426
# On reasonable systems, we can use realpath here, but OSX is a diva with 20-year-old software.
@@ -249,6 +261,11 @@ else
249261
sed -i '' 's/#include <stdlib.h>/#include "ldk_rust_types.h"/g' include/lightning.h
250262
fi
251263

264+
if $SKIP_TESTS; then
265+
echo "Skipping tests!"
266+
exit 0
267+
fi
268+
252269
# Build C++ class methods which call trait methods
253270
echo "Updating C++ header, this may take some time, especially on macOS"
254271
set +x # Echoing every command is very verbose here

0 commit comments

Comments
 (0)