From 5c1927274f44ea9be71b9284086f12cfcfe913d1 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 8 Jun 2018 09:27:15 -0500 Subject: [PATCH] Add basic test framework test-requirements.txt - install bashate tox.ini - bashate and a do-nothing target .zuul.yaml - non-voting bashate job Change-Id: I35ff6063568518a3994441cc3eadbd4896f25d64 --- .zuul.yaml | 9 +++++++++ test-requirements.txt | 1 + tox.ini | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 .zuul.yaml create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 00000000..19f22922 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,9 @@ +- project: + check: + jobs: + - openstack-tox-bashate: + voting: false + gate: + jobs: + - openstack-tox-bashate: + voting: false diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..0043527d --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +bashate >= 0.2 diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..5c3e7a77 --- /dev/null +++ b/tox.ini @@ -0,0 +1,33 @@ +[tox] +envlist = bashate,pep8 +minversion = 2.3 +skipsdist = True + +[testenv] +install_command = pip install -U {opts} {packages} +setenv = VIRTUAL_ENV={envdir} + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=60 +deps = -r{toxinidir}/test-requirements.txt + +[testenv:bashate] +commands = + bash -c "ls build-tools/*.sh | xargs bashate -v {posargs}" + +[testenv:pep8] +usedevelop = False +skip_install = True +deps = + pep8 +commands = + pep8 + +[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