|
|
|
@ -81,14 +81,17 @@ function wait_for_localnet_boot() { |
|
|
|
|
trap kill_localnet SIGINT SIGTERM EXIT |
|
|
|
|
|
|
|
|
|
BUILD=true |
|
|
|
|
while getopts "B" option; do |
|
|
|
|
KEEP=false |
|
|
|
|
while getopts "Bk" option; do |
|
|
|
|
case ${option} in |
|
|
|
|
B) BUILD=false;; |
|
|
|
|
k) KEEP=true;; |
|
|
|
|
*) echo " |
|
|
|
|
Integration tester for localnet |
|
|
|
|
|
|
|
|
|
Option: Help: |
|
|
|
|
-B Do NOT build binray before testing |
|
|
|
|
-k Keep localnet running after tests are finished |
|
|
|
|
" |
|
|
|
|
esac |
|
|
|
|
done |
|
|
|
@ -98,6 +101,13 @@ setup |
|
|
|
|
build_and_start_localnet || exit 1 & |
|
|
|
|
sleep 20 |
|
|
|
|
wait_for_localnet_boot 100 # Timeout at ~300 seconds |
|
|
|
|
|
|
|
|
|
echo -e "\n=== \e[38;5;0;48;5;255mSTARTING TESTS\e[0m ===\n" |
|
|
|
|
sleep 5 |
|
|
|
|
cd "$DIR/../" && python3 -u -m py.test -v -r s -s tests -n auto |
|
|
|
|
error=0 |
|
|
|
|
cd "$DIR/../" && python3 -u -m py.test -v -r s -s tests -n auto || error=1 |
|
|
|
|
|
|
|
|
|
if [ "$KEEP" == "true" ]; then |
|
|
|
|
tail -f /dev/null |
|
|
|
|
fi |
|
|
|
|
exit "$error" |