blob: 2b8b6827a5abc51dc35324437b5c50abb4469053 [file] [log] [blame]
tiernob3cda2e2018-10-30 17:26:59 +00001# Copyright 2018 Telefonica S.A.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
tiernoc0e42e22018-05-11 11:36:10 +020016[tox]
bravof922c4172020-11-24 21:21:43 -030017envlist = cover, flake8
tiernoc0e42e22018-05-11 11:36:10 +020018
19[testenv]
garciadeblase6d17e62020-07-03 10:40:56 +000020usedevelop = True
tiernob3cda2e2018-10-30 17:26:59 +000021basepython = python3
22install_command = python3 -m pip install -r requirements.txt -U {opts} {packages}
garciadeblas92aa6272020-02-19 17:40:44 +010023
24[testenv:cover]
25basepython = python3
26deps =
27 nose2
28 nose2-cov
29 coverage
30 -rrequirements.txt
31 -rtest-requirements.txt
32commands =
33 coverage erase
34 nose2 -C --coverage osm_lcm --plugin nose2.plugins.junitxml -s osm_lcm/tests
35 coverage report --omit='*tests*'
36 coverage html -d ./cover --omit='*tests*'
37 coverage xml -o coverage.xml --omit='*tests*'
tiernoc0e42e22018-05-11 11:36:10 +020038
39[testenv:flake8]
garciadeblas92aa6272020-02-19 17:40:44 +010040basepython = python3
41deps =
42 flake8
43 -rrequirements.txt
tiernob3cda2e2018-10-30 17:26:59 +000044commands = flake8 osm_lcm --max-line-length 120 \
lloretgalleg62b2ee42020-06-30 11:26:48 +000045 --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp,frontend_grpc.py,frontend_pb2.py \
46 --ignore W291,W293,E226,W504
tiernoc0e42e22018-05-11 11:36:10 +020047
48[testenv:build]
49basepython = python3
50deps = stdeb
51 setuptools-version-command
52commands = python3 setup.py --command-packages=stdeb.command bdist_deb
tiernob3cda2e2018-10-30 17:26:59 +000053