[localnet] Reformat run.sh and use min of 8 threads for tests

pull/1/head
Daniel Van Der Maden 4 years ago
parent 304b6330e8
commit e1434401d5
  1. 6
      localnet/scripts/run.sh

@ -93,11 +93,10 @@ Integration tester for localnet
Option: Help:
-B Do NOT build binray before testing
-k Keep localnet running after tests are finished
"
" ;;
esac
done
setup
build_and_start_localnet || exit 1 &
sleep 20
@ -105,8 +104,9 @@ 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
proc_count=$(nproc)
error=0
cd "$DIR/../" && python3 -u -m py.test -v -r s -s tests -n auto || error=1
cd "$DIR/../" && python3 -u -m py.test -v -r s -s tests -n $((proc_count < 8 ? 8 : proc_count)) || error=1
if [ "$KEEP" == "true" ]; then
tail -f /dev/null

Loading…
Cancel
Save