From 1bcacc76833953e7272ea0c9b5bd4ca735c0616d Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Thu, 3 May 2018 20:19:32 +0530 Subject: Install latest pip for virtual environments To avoid errors trying to install latest dependencies using unexpected pip version. It allows us to run tests on RHEL7.4 Also, update 'README' file with actual information about running commands in venvs. Change-Id: I154be92cbaa46b7169d2a259acdb05d50448d570 --- README | 10 +++++----- tox.ini | 28 ++++++++++++++++------------ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/README b/README index 07d7a27b..fa53a045 100644 --- a/README +++ b/README @@ -4,12 +4,12 @@ Testing Install 'tox' package first: - $ pip install tox + $ pip install git+git://github.com/tox-dev/tox.git@2.9.1#egg=tox -Run all the tests (currently, it is only pep8 checks): +Run 'pep8' checks: - $ tox + $ tox -e pep8 -Run only 'pep8' checks: +Run 'functional' tests: - $ tox -e pep8 + $ tox -e functional -- glusto -c /path/to/config.yaml --pytest='-v -s tests' diff --git a/tox.ini b/tox.ini index 87f64768..edb108ed 100644 --- a/tox.ini +++ b/tox.ini @@ -7,23 +7,27 @@ envlist = pep8 basepython = python2.7 setenv = VIRTUAL_ENV={envdir} whitelist_externals = * -commands = find . -type f -name "*.py[c|o]" -delete +commands = + find . -type f -name "*.py[c|o]" -delete + python -m pip install --upgrade pip>=9.0.0 setuptools wheel [testenv:pep8] -deps = -r{toxinidir}/test-requirements.txt -commands = flake8 {posargs} +commands = + {[testenv]commands} + pip install -r{toxinidir}/test-requirements.txt + flake8 {posargs} [testenv:functional] -deps = - rtyaml - ddt - git+git://github.com/loadtheaccumulator/glusto.git - git+git://github.com/gluster/glusto-tests.git#egg=glustolibs-gluster&subdirectory=glustolibs-gluster - git+git://github.com/gluster/glusto-tests.git#egg=glustolibs-io&subdirectory=glustolibs-io - git+git://github.com/gluster/glusto-tests.git#egg=glustolibs-misc&subdirectory=glustolibs-misc - --editable=file:///{toxinidir}/cns-libs commands = - find . -type f -name "*.py[c|o]" -delete + {[testenv]commands} + pip install \ + rtyaml \ + ddt \ + git+git://github.com/loadtheaccumulator/glusto.git \ + "git+git://github.com/gluster/glusto-tests.git#egg=glustolibs-gluster&subdirectory=glustolibs-gluster" \ + "git+git://github.com/gluster/glusto-tests.git#egg=glustolibs-io&subdirectory=glustolibs-io" \ + "git+git://github.com/gluster/glusto-tests.git#egg=glustolibs-misc&subdirectory=glustolibs-misc" \ + --editable=file:///{toxinidir}/cns-libs {posargs:bash -c "echo 'No commands have been specified. Exiting.'; exit 1"} [testenv:venv] -- cgit