]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Move test-skipping effect to be prior to sanity-
authorArik Sosman <git@arik.io>
Mon, 5 Feb 2024 06:04:56 +0000 (22:04 -0800)
committerArik Sosman <git@arik.io>
Mon, 5 Feb 2024 06:04:56 +0000 (22:04 -0800)
checking and running the gcc app.

genbindings.sh

index bdf3794410655601b6d8ac23b9928dd82795c17e..20748715be3f60009a95626ae5a04fbdf23bcdf6 100755 (executable)
@@ -261,11 +261,6 @@ else
        sed -i '' 's/#include <stdlib.h>/#include "ldk_rust_types.h"/g' include/lightning.h
 fi
 
-if $SKIP_TESTS; then
-  echo "Skipping tests!"
-  exit 0
-fi
-
 # Build C++ class methods which call trait methods
 echo "Updating C++ header, this may take some time, especially on macOS"
 set +x # Echoing every command is very verbose here
@@ -334,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