From 415a6a041e95ed6052c244737e23defa143008f5 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 8 Jun 2018 20:09:47 -0500 Subject: [PATCH] Update tests to new default Change-Id: I3b94013d779bf1b934775b4ee1cec11a94635577 --- .zuul.yaml | 4 ++-- test-requirements.txt | 2 ++ tox.ini | 24 +++++++++++++++--------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 19f22922..cddb2e98 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,9 +1,9 @@ - project: check: jobs: - - openstack-tox-bashate: + - openstack-tox-linters: voting: false gate: jobs: - - openstack-tox-bashate: + - openstack-tox-linters: voting: false diff --git a/test-requirements.txt b/test-requirements.txt index 0043527d..47d1aec2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,3 @@ bashate >= 0.2 +PyYAML >= 3.1.0 +yamllint >= 0.5.2 diff --git a/tox.ini b/tox.ini index 5c3e7a77..89e67e79 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = bashate,pep8 +envlist = linters minversion = 2.3 skipsdist = True @@ -11,9 +11,21 @@ setenv = VIRTUAL_ENV={envdir} OS_TEST_TIMEOUT=60 deps = -r{toxinidir}/test-requirements.txt -[testenv:bashate] +[testenv:linters] +whitelist_externals = bash commands = - bash -c "ls build-tools/*.sh | xargs bashate -v {posargs}" + bash -c "find {toxinidir} \ + -not \( -type d -name .?\* -prune \) \ + -type f \ + -not -name \*~ \ + -not -name \*.md \ + -name \*.sh \ + -print0 | xargs -0 bashate -v" + bash -c "find {toxinidir} \ + \( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \ + -o \( -name .tox -prune \) \ + -o -type f -name '*.yaml' \ + -print0 | xargs -0 yamllint" [testenv:pep8] usedevelop = False @@ -25,9 +37,3 @@ commands = [testenv:venv] commands = {posargs} - -[testenv:true] -# Use same environment directory as pep8 env to save space and install time -envdir = {toxworkdir}/venv -commands = true -whitelist_externals = true