1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/usr/bin/env bash
set -eou pipefail
_dir="$(dirname "${BASH_SOURCE[0]}")"
to_run="${@:-thread http init}"
export PYTHONMALLOC="debug"
if [[ $to_run == *"thread"* ]]; then
"${_dir}"/thread
fi
if [[ $to_run == *"http"* ]]; then
"${_dir}"/http --daemon
sleep 2
"${_dir}"/client 8001
set +e
pkill -f 'wsgi:app' # pkill not present on all CI envs
set -e
fi
if [[ $to_run == *"typestubs"* ]]; then
python "${_dir}"/typestubs.py
mypy "${_dir}"/typestubs.py
fi
if [[ $to_run == *"init"* ]]; then
"${_dir}"/init
fi
|