Skip to content

Commit

Permalink
Update tox.ini to use ansible-test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclay committed Jun 30, 2017
1 parent 46514de commit 7ab4a88
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 50 deletions.
6 changes: 3 additions & 3 deletions test/runner/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def parse_args():

integration.add_argument('--python',
metavar='VERSION',
choices=SUPPORTED_PYTHON_VERSIONS,
choices=SUPPORTED_PYTHON_VERSIONS + ('default',),
help='python version: %s' % ', '.join(SUPPORTED_PYTHON_VERSIONS))

integration.add_argument('--start-at',
Expand Down Expand Up @@ -281,7 +281,7 @@ def parse_args():

compiler.add_argument('--python',
metavar='VERSION',
choices=COMPILE_PYTHON_VERSIONS,
choices=COMPILE_PYTHON_VERSIONS + ('default',),
help='python version: %s' % ', '.join(COMPILE_PYTHON_VERSIONS))

add_lint(compiler)
Expand Down Expand Up @@ -313,7 +313,7 @@ def parse_args():

sanity.add_argument('--python',
metavar='VERSION',
choices=SUPPORTED_PYTHON_VERSIONS,
choices=SUPPORTED_PYTHON_VERSIONS + ('default',),
help='python version: %s' % ', '.join(SUPPORTED_PYTHON_VERSIONS))

sanity.add_argument('--base-branch',
Expand Down
16 changes: 0 additions & 16 deletions test/utils/tox/requirements-py3.txt

This file was deleted.

18 changes: 0 additions & 18 deletions test/utils/tox/requirements.txt

This file was deleted.

24 changes: 11 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
[tox]
envlist = py26,py27,py35,py36

[testenv:py35]
deps = -r{toxinidir}/test/utils/tox/requirements-py3.txt

[testenv:py36]
deps = -r{toxinidir}/test/utils/tox/requirements-py3.txt

[testenv]
deps = -r{toxinidir}/test/utils/tox/requirements.txt
whitelist_externals = make
deps = -c{toxinidir}/test/runner/requirements/constraints.txt
-r{toxinidir}/test/runner/requirements/ansible-test.txt
-r{toxinidir}/test/runner/requirements/sanity.txt
-r{toxinidir}/test/runner/requirements/units.txt
commands =
python --version
py26: python -m compileall -fq -x 'test/samples|contrib/inventory/vagrant.py' lib test contrib
py27: python -m compileall -fq -x 'test/samples' lib test contrib
py3{5,6}: python -m compileall -fq -x 'test/samples|lib/ansible/modules' lib test contrib
make tests
# The recommended method of running tests with tox is to execute
# ansible-test directly and use the --tox and --python options.
# The commands below are provided as a convenience for those who
# prefer to run tox directly instead of through ansible-test.
{toxinidir}/test/runner/ansible-test compile --python default -v
{toxinidir}/test/runner/ansible-test sanity --python default -v
{toxinidir}/test/runner/ansible-test units --python default -v
passenv =
# Pass HOME to the test environment to avoid the missing HOME env
# variable error. See issue: #20424
HOME
TEST_FLAGS


[flake8]
Expand Down

0 comments on commit 7ab4a88

Please sign in to comment.