Browse Source

Add default test framework

Change-Id: I828864d3b686e303a6448b0f9c9136e947aaac0b
Dean Troyer 10 months ago
parent
commit
b3d4df1cc5
4 changed files with 76 additions and 0 deletions
  1. 23
    0
      .gitignore
  2. 10
    0
      .zuul.yaml
  3. 3
    0
      test-requirements.txt
  4. 40
    0
      tox.ini

+ 23
- 0
.gitignore View File

@@ -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
15
+AUTHORS
16
+ChangeLog
17
+_build
18
+build
19
+cover
20
+develop-eggs
21
+dist
22
+eggs
23
+sdist

+ 10
- 0
.zuul.yaml View File

@@ -0,0 +1,10 @@
1
+---
2
+- project:
3
+    check:
4
+      jobs:
5
+        - openstack-tox-linters:
6
+            voting: false
7
+    gate:
8
+      jobs:
9
+        - openstack-tox-linters:
10
+            voting: false

+ 3
- 0
test-requirements.txt View File

@@ -0,0 +1,3 @@
1
+bashate >= 0.2
2
+PyYAML >= 3.1.0
3
+yamllint >= 0.5.2

+ 40
- 0
tox.ini View File

@@ -0,0 +1,40 @@
1
+[tox]
2
+envlist = linters
3
+minversion = 2.3
4
+skipsdist = True
5
+
6
+[testenv]
7
+basepython = python3
8
+install_command = pip install -U {opts} {packages}
9
+setenv = VIRTUAL_ENV={envdir}
10
+         OS_STDOUT_CAPTURE=1
11
+         OS_STDERR_CAPTURE=1
12
+         OS_TEST_TIMEOUT=60
13
+deps = -r{toxinidir}/test-requirements.txt
14
+
15
+[testenv:linters]
16
+whitelist_externals = bash
17
+commands =
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]
32
+usedevelop = False
33
+skip_install = True
34
+deps =
35
+    pep8
36
+commands =
37
+    pep8
38
+
39
+[testenv:venv]
40
+commands = {posargs}

Loading…
Cancel
Save