-
Notifications
You must be signed in to change notification settings - Fork 14
/
tox.ini
86 lines (76 loc) · 2.35 KB
/
tox.ini
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[tox]
envlist = copying,{py37,py38,py39,py310}-{lint,tests,tools,cli,checksetup}
skip_missing_interpreters = true
[testenv]
whitelist_externals =
cli: {[testenv:cli]whitelist_externals}
deps=
-rtests_utils/test-requirements.txt
checksetup: {[testenv:checksetup]deps}
tools: {[testenv:tools]deps}
commands=
tests: {[testenv:tests]commands}
tools: {[testenv:tools]commands}
lint: {[testenv:lint]commands}
cli: {[testenv:cli]commands}
checksetup: {[testenv:checksetup]commands}
coverage: {[testenv:coverage]commands}
[testenv:tests]
commands=
pytest --cov=iotlabcli --cov-report=term --cov-report=xml --cov-report=html --cov-report=term-missing {posargs}
[testenv:tools]
deps=
git+https://github.com/iot-lab/oml-plot-tools.git#egg=oml_plot_tools
git+https://github.com/iot-lab/ssh-cli-tools.git#egg=iotlabsshcli
git+https://github.com/iot-lab/aggregation-tools.git#egg=iotlabaggregator
commands=
{[testenv:tests]commands}
[testenv:lint]
commands=
pycodestyle iotlabcli setup.py
pylint --rcfile=setup.cfg iotlabcli setup.py
flake8
twine check {distdir}/*
[testenv:copying]
whitelist_externals=
/bin/bash
/usr/bin/bash
commands=
bash tests_utils/check_license.sh
[testenv:cli]
whitelist_externals=
/bin/bash
/usr/bin/bash
commands=
bash -exc "for i in auth experiment node profile robot; \
do iotlab-$i --help > /dev/null; done"
bash -exc "iotlab help > /dev/null";
bash -exc "iotlab --help > /dev/null";
bash -exc "iotlab > /dev/null";
[testenv:checksetup]
deps =
docutils
readme-renderer
skip_install = True
usedevelop = False
commands =
python setup.py check --strict --metadata
[testenv:coverage_upload_tests]
passenv = CI TRAVIS TRAVIS_*
commands = codecov -e TOXENV
[testenv:coverage_upload_tools]
passenv = CI TRAVIS TRAVIS_*
commands = codecov -e TOXENV
[testenv:integration]
# Use develop to get 'iotlabcli' coverage output
# Either it would be in .tox/integration/..../site-packages/
usedevelop=True
deps=
-rtests_utils/test-requirements.txt
passenv = IOTLAB_TEST_PASSWORD
commands=
pip install --upgrade -e.[secure] # Install iotlabcli[secure] dependencies
coverage run --source iotlabcli --omit='iotlabcli/tests/*' iotlabcli/integration/test_integration.py {posargs}
coverage report
coverage html
coverage xml