diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-04-23 02:51:54 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-04-23 02:51:54 +0200 |
commit | 6a59ad8825a2d18cc444b1149691f42980478cd4 (patch) | |
tree | ab5ffdf57825d81824bc3322c20d27fa0ec185f1 /.ci | |
parent | d82e725de0fa2a785db3225b4fd2a7c090681276 (diff) | |
download | psutil-6a59ad8825a2d18cc444b1149691f42980478cd4.tar.gz |
restore travis config to original status
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/travis/install.sh | 73 | ||||
-rwxr-xr-x | .ci/travis/run.sh | 19 |
2 files changed, 55 insertions, 37 deletions
diff --git a/.ci/travis/install.sh b/.ci/travis/install.sh index 5f445522..677dc465 100755 --- a/.ci/travis/install.sh +++ b/.ci/travis/install.sh @@ -3,41 +3,52 @@ set -e set -x -PYVER=`python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'` - uname -a -echo $PYVER - -# if [[ "$(uname -s)" == 'Darwin' ]]; then -# brew update || brew update -# brew outdated pyenv || brew upgrade pyenv -# brew install pyenv-virtualenv - -# if which pyenv > /dev/null; then -# eval "$(pyenv init -)" -# fi - -# case "${PYVER}" in -# py27) -# pyenv install 2.7.10 -# pyenv virtualenv 2.7.10 psutil -# ;; -# py34) -# pyenv install 3.4.3 -# pyenv virtualenv 3.4.3 psutil -# ;; -# esac -# pyenv rehash -# pyenv activate psutil -# fi +python -c "import sys; print(sys.version)" + +if [[ "$(uname -s)" == 'Darwin' ]]; then + brew update || brew update + brew outdated pyenv || brew upgrade pyenv + brew install pyenv-virtualenv + + if which pyenv > /dev/null; then + eval "$(pyenv init -)" + fi + + case "${PYVER}" in + # py26) + # pyenv install 2.6.9 + # pyenv virtualenv 2.6.9 psutil + # ;; + py27) + pyenv install 2.7.10 + pyenv virtualenv 2.7.10 psutil + ;; + # py32) + # pyenv install 3.2.6 + # pyenv virtualenv 3.2.6 psutil + # ;; + # py33) + # pyenv install 3.3.6 + # pyenv virtualenv 3.3.6 psutil + # ;; + py34) + pyenv install 3.4.3 + pyenv virtualenv 3.4.3 psutil + ;; + esac + pyenv rehash + pyenv activate psutil +fi -# old python versions -if [[ $PYVER == '2.6' ]]; then +if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]] || [[ $PYVER == 'py26' ]]; then pip install -U ipaddress unittest2 argparse mock==1.0.1 -elif [[ $PYVER == '2.7' ]]; then +elif [[ $TRAVIS_PYTHON_VERSION == '2.7' ]] || [[ $PYVER == 'py27' ]]; then + pip install -U ipaddress mock +elif [[ $TRAVIS_PYTHON_VERSION == '3.2' ]] || [[ $PYVER == 'py32' ]]; then pip install -U ipaddress mock -elif [[ $PYVER == '3.3' ]]; then +elif [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] || [[ $PYVER == 'py33' ]]; then pip install -U ipaddress fi -pip install --upgrade coverage coveralls setuptools flake8 +pip install -U coverage coveralls flake8 pep8 setuptools diff --git a/.ci/travis/run.sh b/.ci/travis/run.sh index 92c1db39..0f453dd7 100755 --- a/.ci/travis/run.sh +++ b/.ci/travis/run.sh @@ -5,22 +5,29 @@ set -x PYVER=`python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'` -# install +# setup OSX +if [[ "$(uname -s)" == 'Darwin' ]]; then + if which pyenv > /dev/null; then + eval "$(pyenv init -)" + fi + pyenv activate psutil +fi + +# install psutil python setup.py build python setup.py develop -# run tests +# run tests (with coverage) if [[ $PYVER == '2.7' ]] && [[ "$(uname -s)" != 'Darwin' ]]; then coverage run psutil/tests/runner.py --include="psutil/*" --omit="test/*,*setup*" else python psutil/tests/runner.py fi -# Run memory leak tests and linter only on Linux and latest major Python -# versions. -if [[ $PYVER == '2.7' ]] || [[ $PYVER == '3.6' ]]; then +if [ "$PYVER" == "2.7" ] || [ "$PYVER" == "3.6" ]; then + # run mem leaks test python psutil/tests/test_memory_leaks.py - + # run linter (on Linux only) if [[ "$(uname -s)" != 'Darwin' ]]; then python -m flake8 fi |