From a31bc4ede5883d449c15c90535b21bc8f9e28d6d Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 17 May 2017 23:11:52 +0300 Subject: [PATCH] Skip unittests that request it rather than mark them as failed. Closes #1804. --- run_unittests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run_unittests.py b/run_unittests.py index ec9d53b7f..611e16431 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -381,6 +381,8 @@ class BasePlatformTests(unittest.TestCase): output = p.communicate()[0] print(output) if p.returncode != 0: + if 'MESON_SKIP_TEST' in output: + raise unittest.SkipTest('Project requested skipping.') raise subprocess.CalledProcessError(p.returncode, command) return output @@ -396,6 +398,8 @@ class BasePlatformTests(unittest.TestCase): '--libdir', self.libdir] try: self._run(self.meson_command + args + extra_args) + except unittest.SkipTest: + raise unittest.SkipTest('Project requested skipping: ' + srcdir) except: self._print_meson_log() raise