aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 666777d..1fb1b4b 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1910,6 +1910,19 @@ class LinuxlikeTests(BasePlatformTests):
for i in compdb:
self.assertIn("-fsanitize=address", i["command"])
+ def test_coverage(self):
+ if not shutil.which('gcovr'):
+ raise unittest.SkipTest('gcovr not found')
+ if not shutil.which('genhtml'):
+ raise unittest.SkipTest('genhtml not found')
+ if 'clang' in os.environ.get('CC', '') and os.environ.get('TRAVIS_OS_NAME', '') == 'linux':
+ raise unittest.SkipTest('Gcovr has a bug and does not work with Clang in the CI environment.')
+ testdir = os.path.join(self.common_test_dir, '1 trivial')
+ self.init(testdir, ['-Db_coverage=true'])
+ self.build()
+ self.run_tests()
+ self.run_target('coverage-html')
+
class LinuxArmCrossCompileTests(BasePlatformTests):
'''
Tests that verify cross-compilation to Linux/ARM