diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-08-18 15:31:13 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-08-20 20:32:30 +0300 |
commit | a1326581a5bc23aadbcf9dd4541b8a8304f6bc95 (patch) | |
tree | 3dcbcda82487d965f4f665a5c4a2b36af4952929 /run_unittests.py | |
parent | e02f1dc809c7835a3935c8ac4a457d93f4b358d6 (diff) | |
download | meson-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-x | run_unittests.py | 13 |
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 |