aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Doolittle <rdoolittle@gmail.com>2017-05-22 14:47:42 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2017-05-24 20:00:47 +0300
commit56b41d1c7913c540a67e4fcdcd4c48505a59f9c7 (patch)
treeedba3f25583642e3039efa241a747c0523f61b12
parentd8d62a9353c2ca44ad3d8b87da0c5499bf79fbd7 (diff)
downloadmeson-56b41d1c7913c540a67e4fcdcd4c48505a59f9c7.zip
meson-56b41d1c7913c540a67e4fcdcd4c48505a59f9c7.tar.gz
meson-56b41d1c7913c540a67e4fcdcd4c48505a59f9c7.tar.bz2
mesontest: use unbuffered IO
This helps when running mesontest as part of CI.
-rw-r--r--mesonbuild/backend/ninjabackend.py4
-rwxr-xr-xmesontest.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index e12678d..e8fae8e 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -812,7 +812,7 @@ int dummy;
def generate_tests(self, outfile):
self.serialize_tests()
test_exe = get_meson_script(self.environment, 'mesontest')
- cmd = [sys.executable, test_exe, '--no-rebuild']
+ cmd = [sys.executable, '-u', test_exe, '--no-rebuild']
if not self.environment.coredata.get_builtin_option('stdsplit'):
cmd += ['--no-stdsplit']
if self.environment.coredata.get_builtin_option('errorlogs'):
@@ -824,7 +824,7 @@ int dummy;
elem.write(outfile)
# And then benchmarks.
- cmd = [sys.executable, test_exe, '--benchmark', '--logbase',
+ cmd = [sys.executable, '-u', test_exe, '--benchmark', '--logbase',
'benchmarklog', '--num-processes=1', '--no-rebuild']
elem = NinjaBuildElement(self.all_outputs, 'benchmark', 'CUSTOM_COMMAND', ['all', 'PHONY'])
elem.add_item('COMMAND', cmd)
diff --git a/mesontest.py b/mesontest.py
index 9421c7f..62ddc72 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3 -u
# Copyright 2016 The Meson development team