Skip to content

Commit d12257d

Browse files
tchaikovepuertat
authored andcommitted
test/dashboard: hardcode .coverage path to workaround tox bugs
rhel/centos 7.3 comes with tox 1.4.2, which has a bunch of issues related to environment variable substitution. for instance, see - tox-dev/tox#515 so, instead of having different coverage files for py3 and py2.7, it would be simpler to just use the same path for coverage. this approach works because pytest-cov plugin erases the coverage data file at the beginning of test[1]. --- [1] https://pypi.org/project/pytest-cov/#coverage-data-file . Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 32b07dd) Signed-off-by: Ernesto Puerta <[email protected]>
1 parent 23fb327 commit d12257d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/pybind/mgr/dashboard/tox.ini

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ setenv=
1414
py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2
1515
py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3
1616
cov: UNITTEST = true
17-
cov: COVERAGE_FILE = .coverage.{envname}
1817
commands=
1918
cov: coverage erase
2019
cov: {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml --doctest-modules controllers/rbd.py services/ tests/ tools.py
21-
cov: coverage combine {toxinidir}/{env:COVERAGE_FILE}
20+
cov: coverage combine {toxinidir}/.coverage
2221
cov: coverage report
2322
cov: coverage xml
2423
lint: pylint --rcfile=.pylintrc --jobs=5 . module.py tools.py controllers tests services

0 commit comments

Comments
 (0)