Upgrade bdk dependency to 0.11
This commit is contained in:
64
test.sh
64
test.sh
@@ -1,14 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail -o xtrace
|
||||
set -eo pipefail
|
||||
|
||||
# functions
|
||||
|
||||
## help
|
||||
help()
|
||||
{
|
||||
# Display Help
|
||||
echo "Test bdk-ffi and related libraries."
|
||||
echo
|
||||
echo "Syntax: build [-a|h|k|v]"
|
||||
echo "options:"
|
||||
echo "-a Android aar tests."
|
||||
echo "-h Print this Help."
|
||||
echo "-k JVM jar tests."
|
||||
echo "-v Valgrind tests."
|
||||
echo
|
||||
}
|
||||
|
||||
# rust
|
||||
cargo test --features c-headers -- generate_headers
|
||||
c_headers() {
|
||||
cargo test --features c-headers -- generate_headers
|
||||
}
|
||||
|
||||
# cc
|
||||
export LD_LIBRARY_PATH=`pwd`/target/debug
|
||||
#valgrind --leak-check=full --show-leak-kinds=all cc/bdk_ffi_test
|
||||
cc/bdk_ffi_test
|
||||
test_c() {
|
||||
export LD_LIBRARY_PATH=`pwd`/target/debug
|
||||
cc/bdk_ffi_test
|
||||
}
|
||||
|
||||
# bdk-kotlin
|
||||
(cd bdk-kotlin && gradle test)
|
||||
(cd bdk-kotlin && gradle :android:connectedDebugAndroidTest)
|
||||
test_valgrind() {
|
||||
valgrind --leak-check=full --show-leak-kinds=all cc/bdk_ffi_test
|
||||
}
|
||||
|
||||
test_kotlin() {
|
||||
(cd bdk-kotlin && ./gradlew test)
|
||||
}
|
||||
|
||||
test_android() {
|
||||
(cd bdk-kotlin && ./gradlew :android:connectedDebugAndroidTest)
|
||||
}
|
||||
|
||||
if [ $1 = "-h" ]
|
||||
then
|
||||
help
|
||||
else
|
||||
c_headers
|
||||
test_c
|
||||
|
||||
# optional tests
|
||||
while [ -n "$1" ]; do # while loop starts
|
||||
case "$1" in
|
||||
-a) test_android ;;
|
||||
-h) help ;;
|
||||
-k) test_kotlin ;;
|
||||
-v) test_valgrind ;;
|
||||
*) echo "Option $1 not recognized" ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user