X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=genbindings.sh;h=20748715be3f60009a95626ae5a04fbdf23bcdf6;hb=09b9f4778e94e1396be3c36c6a9bee94d35d0f8c;hp=fd797d7978e08e3702f98fb1a70d5d44de9463b9;hpb=b5ccb17b2bbc30db17ea7f59c3b836672792031a;p=ldk-c-bindings diff --git a/genbindings.sh b/genbindings.sh index fd797d7..2074871 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -9,6 +9,18 @@ if [ ! -d "$1/lightning" -o "$2" != "true" -a "$2" != "false" ]; then exit 1 fi +SKIP_TESTS_ARGUMENT=$3 +SKIP_TESTS=false + +if [ ! -z "$SKIP_TESTS_ARGUMENT" ]; then + if [ "$SKIP_TESTS_ARGUMENT" != "skip-tests" ]; then + echo "To skip tests, usage must be: $0 path-to-rust-lightning allow-std skip-tests" + exit 1 + else + SKIP_TESTS=true + fi +fi + export LC_ALL=C # On reasonable systems, we can use realpath here, but OSX is a diva with 20-year-old software. @@ -317,6 +329,11 @@ export IFS="$OLD_IFS" set -x mv include/lightningpp_new.hpp include/lightningpp.hpp +if $SKIP_TESTS; then + echo "Skipping tests!" + exit 0 +fi + # Finally, sanity-check the generated C and C++ bindings with demo apps: # Naively run the C demo app: gcc $LOCAL_CFLAGS -Wall -g -pthread demo.c target/debug/libldk.a -ldl -lm