aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-08 09:18:57 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-04-09 23:11:36 +0530
commita51d582c725ee39e9f0308e03e20179afd16178a (patch)
tree12e86dfac9176b762a02640ea58215f466938ab4
parentf80d471345e0ece943819ae79e4d85e645e2d1a7 (diff)
downloadmeson-a51d582c725ee39e9f0308e03e20179afd16178a.zip
meson-a51d582c725ee39e9f0308e03e20179afd16178a.tar.gz
meson-a51d582c725ee39e9f0308e03e20179afd16178a.tar.bz2
unit tests: Skip tests that need Ninja
Such as tests that use the compiler db, or install things.
-rwxr-xr-xrun_unittests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 0c7d6c0..6485797 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -405,6 +405,8 @@ class BasePlatformTests(unittest.TestCase):
self._run(self.test_command, workdir=self.builddir)
def install(self):
+ if self.backend is not Backend.ninja:
+ raise unittest.SkipTest('{!r} backend can\'t install files'.format(self.backend.name))
os.environ['DESTDIR'] = self.installdir
self._run(self.install_command, workdir=self.builddir)
@@ -430,6 +432,8 @@ class BasePlatformTests(unittest.TestCase):
shutil.rmtree(self.builddir)
def get_compdb(self):
+ if self.backend is not Backend.ninja:
+ raise unittest.SkipTest('Compiler db not available with {} backend'.format(self.backend.name))
with open(os.path.join(self.builddir, 'compile_commands.json')) as ifile:
contents = json.load(ifile)
# If Ninja is using .rsp files, generate them, read their contents, and
@@ -611,6 +615,8 @@ class AllPlatformTests(BasePlatformTests):
Tests that the Meson introspection API exposes install filenames correctly
https://github.com/mesonbuild/meson/issues/829
'''
+ if self.backend is not Backend.ninja:
+ raise unittest.SkipTest('{!r} backend can\'t install files'.format(self.backend.name))
testdir = os.path.join(self.common_test_dir, '8 install')
self.init(testdir)
intro = self.introspect('--targets')