diff --git a/.gitignore b/.gitignore index 130dd056ac1265db514abba6affeebe5c07b45c6..00941bb5af067040269d23ab91d781bfb6cd5bc7 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ tangostationcontrol/dist tangostationcontrol/docs/build **/coverage.xml +**/.coverage **/.ipynb_checkpoints **/pending_log_messages.db **/.eggs diff --git a/tangostationcontrol/tangostationcontrol/beam/__init__.py b/tangostationcontrol/tangostationcontrol/beam/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tangostationcontrol/tox.ini b/tangostationcontrol/tox.ini index fbde7d74e534fac1aa360c4340f80df0753d70fe..d2f6776e72566fa2b9add74b317e2a85765e7bbc 100644 --- a/tangostationcontrol/tox.ini +++ b/tangostationcontrol/tox.ini @@ -26,19 +26,31 @@ setenv = TESTS_DIR=./tangostationcontrol/integration_test commands = stestr run --serial {posargs} +; The access to coverage as module is a bit of an ugly hack. This is due to +; cover inheriting testenv which has `sitepackages = True`, meaning that global +; packages can be accessed by the tox environment. Our tango images already have +; coverage system wide installed, however, the system wide installation will +; never look inside tox its virtualenv for packages. So accessing stestr and +; others fail.. We can't remove `sitepackages = True` either as we need access +; to tango and installing this package is non-trivial. The solution is to +; prevent calling binaries directly and utilizing python to resolve the +; requested module. In addition stestr does not natively support generating +; coverage reports which is where the `PYTHON=python -m coverage run....` comes +; from. [testenv:cover] -allowlist_externals = - coverage +setenv = + VIRTUAL_ENV={envdir} + PYTHON=python -m coverage run --source tangostationcontrol --parallel-mode deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt commands = - coverage erase - stestr run {posargs} - coverage combine - coverage html -d cover - coverage xml -o coverage.xml - coverage report + python -m coverage erase + stestr run {posargs} + python -m coverage combine + python -m coverage html -d cover + python -m coverage xml -o coverage.xml + python -m coverage report ; TODO(Corne): Integrate Hacking to customize pep8 rules [testenv:pep8]