aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-08-18 15:31:13 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-08-20 20:32:30 +0300
commita1326581a5bc23aadbcf9dd4541b8a8304f6bc95 (patch)
tree3dcbcda82487d965f4f665a5c4a2b36af4952929 /run_unittests.py
parente02f1dc809c7835a3935c8ac4a457d93f4b358d6 (diff)
downloadmeson-a1326581a5bc23aadbcf9dd4541b8a8304f6bc95.zip
meson-a1326581a5bc23aadbcf9dd4541b8a8304f6bc95.tar.gz
meson-a1326581a5bc23aadbcf9dd4541b8a8304f6bc95.tar.bz2
Fix coverage target breakage and add a test for it.
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