blob: 3b15855a59e048638a87c0399628bafdc32c2ccb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
[tox]
skipsdist=True
envlist = py3, pylint, flake8diff
[testenv]
distribute = False
basepython=python3
setenv =
OSDF_CONFIG_FILE={toxinidir}/test/config/osdf_config.yaml
commands =
/bin/cp config/slicing_config.yaml test/config/
/bin/cp config/slicing_config.yaml test/functest/simulators/simulated-config/
/bin/bash test/functest/scripts/start-simulators.sh
coverage run --module pytest --junitxml xunit-results.xml
coverage xml --omit=".tox/py3/*","test/*"
coverage report -m --omit=".tox/py3/*","test/*"
/bin/bash test/functest/scripts/stop-simulators.sh
/bin/rm test/config/slicing_config.yaml
/bin/rm test/functest/simulators/simulated-config/slicing_config.yaml
# TODO: need to update the above "omit" when we package osdf as pip-installable
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test/test-requirements.txt
-r{toxinidir}/requirements-osdf.txt
-r{toxinidir}/requirements-opteng.txt
[run]
source=./apps/,./osdf/,osdfapp.py,./runtime/,solverapp.py
[testenv:pylint]
whitelist_externals=bash
commands = bash -c "pylint --reports=y osdf apps runtime| tee pylint.out"
[testenv:py3]
basepython=python3.6
[testenv:flake8diff]
basepython=python3.6
whitelist_externals=bash
deps = hacking>=2.0.0
commands =
bash -c "files=$(git diff HEAD^ HEAD --diff-filter=d --name-only | grep -E '(^apps\/|osdf\/|runtime\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi"
[flake8]
select = E,H,W,F
max-line-length = 119
ignore = W503 #conflict with W504
per-file-ignores=
|