summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2018-06-12 10:21:16 -0500
committerDean Troyer <dtroyer@gmail.com>2018-06-12 15:33:56 -0500
commitd3e1346fea7d6a07f4637a5fcd23f24c788f4f28 (patch)
tree5ea1f1c32a654e303b44f198ab8b7a26be741252
parente2689f5f00a36c6d06b4854d92497b22905e27b9 (diff)
Add default test framework
Change-Id: I0216dc88249ec4feaab936a8aa880c1493e7173f Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Notes
Notes (review): Code-Review+2: Bob Church <robert.church@windriver.com> Code-Review+2: Erich Cordoba <erich.cordoba.malibran@intel.com> Code-Review+2: Scott Little <scott.little@windriver.com> Workflow+1: Erich Cordoba <erich.cordoba.malibran@intel.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 18 Jun 2018 15:53:40 +0000 Reviewed-on: https://review.openstack.org/574771 Project: openstack/stx-gplv3 Branch: refs/heads/master
-rw-r--r--.gitignore23
-rw-r--r--.zuul.yaml8
-rw-r--r--test-requirements.txt3
-rw-r--r--tox.ini40
4 files changed, 74 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..33f4d24
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,23 @@
1*.a
2*.egg
3*.egg-info
4*.o
5*.py[co]
6*.pyc
7*.so
8*.sqlite
9.*.swp
10.coverage
11.installed.cfg
12.testrepository
13.tox
14.venv
15AUTHORS
16ChangeLog
17_build
18build
19cover
20develop-eggs
21dist
22eggs
23sdist
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..7ccbd0a
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,8 @@
1---
2- project:
3 check:
4 jobs:
5 - openstack-tox-linters
6 gate:
7 jobs:
8 - openstack-tox-linters
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..47d1aec
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,3 @@
1bashate >= 0.2
2PyYAML >= 3.1.0
3yamllint >= 0.5.2
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..c2904c9
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,40 @@
1[tox]
2envlist = linters
3minversion = 2.3
4skipsdist = True
5
6[testenv]
7basepython = python3
8install_command = pip install -U {opts} {packages}
9setenv = VIRTUAL_ENV={envdir}
10 OS_STDOUT_CAPTURE=1
11 OS_STDERR_CAPTURE=1
12 OS_TEST_TIMEOUT=60
13deps = -r{toxinidir}/test-requirements.txt
14
15[testenv:linters]
16whitelist_externals = bash
17commands =
18 bash -c "find {toxinidir} \
19 -not \( -type d -name .?\* -prune \) \
20 -type f \
21 -not -name \*~ \
22 -not -name \*.md \
23 -name \*.sh \
24 -print0 | xargs -0 bashate -v"
25 bash -c "find {toxinidir} \
26 \( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
27 -o \( -name .tox -prune \) \
28 -o -type f -name '*.yaml' \
29 -print0 | xargs -0 yamllint"
30
31[testenv:pep8]
32usedevelop = False
33skip_install = True
34deps =
35 pep8
36commands =
37 pep8
38
39[testenv:venv]
40commands = {posargs}