diff --git a/alibuild_helpers/utilities.py b/alibuild_helpers/utilities.py index f0b4b123..33dfacad 100644 --- a/alibuild_helpers/utilities.py +++ b/alibuild_helpers/utilities.py @@ -29,6 +29,10 @@ class SpecError(Exception): asList = lambda x : x if type(x) == list else [x] +# This function is only needed to check the coverage of the testsuite +# is really happening and we did not made a mistake in tox.ini +def check_coverage(): + return True def resolve_store_path(architecture, spec_hash): """Return the path where a tarball with the given hash is to be stored. diff --git a/tests/test_coverage.py b/tests/test_coverage.py new file mode 100644 index 00000000..4dfcfb37 --- /dev/null +++ b/tests/test_coverage.py @@ -0,0 +1,7 @@ +import unittest +from alibuild_helpers.utilities import check_coverage + +class FooTest(unittest.TestCase): + def test_foo(self): + self.assertTrue(check_coverage()) + diff --git a/tox.ini b/tox.ini index ed710071..da3f14df 100644 --- a/tox.ini +++ b/tox.ini @@ -108,11 +108,13 @@ commands = coverage run --source={toxinidir} -a {toxinidir}/aliBuild init zlib touch zlib/foo coverage run --source={toxinidir} -a {toxinidir}/aliBuild -a {env:ARCHITECTURE} --no-system --disable GCC-Toolchain build zlib + coverage run --source={envsitepackagesdir} -a -m unittest discover {toxinidir}/tests [coverage:run] branch = True -omit = - */.tox/*/lib/* +include = + */alibuild*/* + */.tox/*/lib/*/alibuild_helpers/* [coverage:report] exclude_lines =