aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-06-11 14:49:52 +0300
committerGitHub <noreply@github.com>2017-06-11 14:49:52 +0300
commitb8f02047bec9fd2d1a36db82df5fed14ef386cd6 (patch)
treeb4f2e99205f3b3846a086610802ad023227a35ae /run_tests.py
parent22cfd44221ada3219d9096e15dc8b00d32e0f9f6 (diff)
parent868d85d2e567b0f5cfb49858eb0f2ac96f7d5749 (diff)
downloadmeson-b8f02047bec9fd2d1a36db82df5fed14ef386cd6.zip
meson-b8f02047bec9fd2d1a36db82df5fed14ef386cd6.tar.gz
meson-b8f02047bec9fd2d1a36db82df5fed14ef386cd6.tar.bz2
Merge pull request #1900 from centricular/abstract-extdeps
dependencies: Add a new class ExternalDependency
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/run_tests.py b/run_tests.py
index 00c2595..1549979 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -22,7 +22,9 @@ import subprocess
import tempfile
import platform
from mesonbuild import mesonlib
+from mesonbuild import mesonmain
from mesonbuild.environment import detect_ninja
+from io import StringIO
from enum import Enum
from glob import glob
@@ -118,9 +120,23 @@ def get_fake_options(prefix):
def should_run_linux_cross_tests():
return shutil.which('arm-linux-gnueabihf-gcc-6') and not platform.machine().startswith('arm')
+def run_configure_inprocess(commandlist):
+ old_stdout = sys.stdout
+ sys.stdout = mystdout = StringIO()
+ old_stderr = sys.stderr
+ sys.stderr = mystderr = StringIO()
+ try:
+ returncode = mesonmain.run(commandlist[0], commandlist[1:])
+ finally:
+ sys.stdout = old_stdout
+ sys.stderr = old_stderr
+ return returncode, mystdout.getvalue(), mystderr.getvalue()
+
class FakeEnvironment(object):
def __init__(self):
self.cross_info = None
+ self.coredata = lambda: None
+ self.coredata.compilers = {}
def is_cross_build(self):
return False
@@ -162,7 +178,7 @@ if __name__ == '__main__':
os.environ.pop('platform')
# Run tests
print('Running unittests.\n')
- units = ['InternalTests', 'AllPlatformTests']
+ units = ['InternalTests', 'AllPlatformTests', 'FailureTests']
if mesonlib.is_linux():
units += ['LinuxlikeTests']
if should_run_linux_cross_tests():