blob: b27e6695c9e1dfcdc56e19f03b0f31a27d4b76af (
plain)
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
32
33
34
35
|
#!/bin/bash
set -e
set -x
PYVER=`python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'`
# setup OSX
if [[ "$(uname -s)" == 'Darwin' ]]; then
if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi
pyenv activate psutil
fi
# install psutil
make clean
python setup.py build
python setup.py develop
# run tests (with coverage)
if [[ $PYVER == '2.7' ]] && [[ "$(uname -s)" != 'Darwin' ]]; then
PSUTIL_TESTING=1 python -Wa -m coverage run psutil/tests/__main__.py
else
PSUTIL_TESTING=1 python -Wa psutil/tests/__main__.py
fi
if [ "$PYVER" == "2.7" ] || [ "$PYVER" == "3.6" ]; then
# run mem leaks test
PSUTIL_TESTING=1 python -Wa psutil/tests/test_memory_leaks.py
# run linter (on Linux only)
if [[ "$(uname -s)" != 'Darwin' ]]; then
python -Wa -m flake8
fi
fi
|