aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-01-30 16:16:08 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-31 15:43:04 +0100
commit8224ecfbe6e1811680113740341a277407904eb9 (patch)
treeba7bb8e00f088cf7b60970485d88d2c7bb895749 /run_unittests.py
parent4bfe0a25681f1abb8710aba1a89220dc328ee589 (diff)
downloadmeson-8224ecfbe6e1811680113740341a277407904eb9.zip
meson-8224ecfbe6e1811680113740341a277407904eb9.tar.gz
meson-8224ecfbe6e1811680113740341a277407904eb9.tar.bz2
Some fixes and assignment based target find
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/run_unittests.py b/run_unittests.py
index f1bf5c6..5539a70 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5034,9 +5034,15 @@ class RewriterTests(BasePlatformTests):
def rewrite(self, directory, args):
if isinstance(args, str):
args = [args]
- out = subprocess.check_output(self.rewrite_command + ['--sourcedir', directory] + args,
- universal_newlines=True)
- return out
+ command = self.rewrite_command + ['--sourcedir', directory] + args
+ p = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+ universal_newlines=True, timeout=60)
+ print(p.stdout)
+ if p.returncode != 0:
+ if 'MESON_SKIP_TEST' in p.stdout:
+ raise unittest.SkipTest('Project requested skipping.')
+ raise subprocess.CalledProcessError(p.returncode, command, output=p.stdout)
+ return p.stdout
def extract_test_data(self, out):
lines = out.split('\n')