projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
00ed41f
)
Create an option to skip tests.
author
Arik Sosman
<git@arik.io>
Tue, 30 Jan 2024 21:16:22 +0000
(13:16 -0800)
committer
Arik Sosman
<git@arik.io>
Thu, 1 Feb 2024 19:39:11 +0000
(11:39 -0800)
genbindings.sh
patch
|
blob
|
history
diff --git
a/genbindings.sh
b/genbindings.sh
index fd797d7978e08e3702f98fb1a70d5d44de9463b9..bdf3794410655601b6d8ac23b9928dd82795c17e 100755
(executable)
--- a/
genbindings.sh
+++ b/
genbindings.sh
@@
-9,6
+9,18
@@
if [ ! -d "$1/lightning" -o "$2" != "true" -a "$2" != "false" ]; then
exit 1
fi
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.
export LC_ALL=C
# On reasonable systems, we can use realpath here, but OSX is a diva with 20-year-old software.
@@
-249,6
+261,11
@@
else
sed -i '' 's/#include <stdlib.h>/#include "ldk_rust_types.h"/g' include/lightning.h
fi
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
# 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