File: run

package info (click to toggle)
python-orjson 3.10.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,180 kB
  • sloc: ansic: 11,270; python: 6,658; sh: 135; makefile: 9
file content (31 lines) | stat: -rwxr-xr-x 526 bytes parent folder | download
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