bdk-ffi/test.sh

39 lines
603 B
Bash
Raw Normal View History

2021-06-14 22:38:29 -07:00
#!/usr/bin/env bash
2021-09-25 21:17:40 -07:00
set -eo pipefail
# functions
## help
help()
{
# Display Help
echo "Test bdk-uniffi and related libraries."
2021-09-25 21:17:40 -07:00
echo
echo "Syntax: build [-a|h|k|v]"
echo "options:"
echo "-h Print this Help."
echo "-k Kotlin tests."
2021-09-25 21:17:40 -07:00
echo
}
2021-06-14 22:38:29 -07:00
2021-09-25 21:17:40 -07:00
test_kotlin() {
2021-10-14 00:06:05 +05:30
(cd bindings/bdk-kotlin && ./gradlew test -Djna.debug_load=true)
2021-09-25 21:17:40 -07:00
}
2021-06-14 22:38:29 -07:00
2021-09-25 21:17:40 -07:00
if [ $1 = "-h" ]
then
help
else
cargo test
2021-10-14 00:06:05 +05:30
2021-09-25 21:17:40 -07:00
# optional tests
while [ -n "$1" ]; do # while loop starts
2021-10-14 00:06:05 +05:30
case "$1" in
2021-09-25 21:17:40 -07:00
-h) help ;;
-k) test_kotlin ;;
*) echo "Option $1 not recognized" ;;
esac
shift
done
2021-10-14 00:06:05 +05:30
fi