SHA256
1
0
forked from pool/meson
meson/meson-handle-skipped-tests.patch

25 lines
801 B
Diff

From d3e0a58260226286c067a7c39f39b704f124813a Mon Sep 17 00:00:00 2001
From: Jussi Pakkanen <jpakkane@gmail.com>
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 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/run_unittests.py b/run_unittests.py
index ec9d53b..2ef1be6 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -381,6 +381,8 @@ def _run(self, command, workdir=None):
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