aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-12-18 17:30:30 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-12-18 17:30:30 +0200
commitc86ee8158a5a4dd6603eab9350c71739800b7f73 (patch)
tree6cd9119c2bb4fc9acc1e0efa681f8375dbcb4233 /run_tests.py
parent015688f506c50f753abf715ac36b684d7c621cff (diff)
downloadmeson-c86ee8158a5a4dd6603eab9350c71739800b7f73.zip
meson-c86ee8158a5a4dd6603eab9350c71739800b7f73.tar.gz
meson-c86ee8158a5a4dd6603eab9350c71739800b7f73.tar.bz2
Make vs dependency detector work on non-english locales.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/run_tests.py b/run_tests.py
index f07e066..f1ed1c7 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -153,9 +153,11 @@ def run_configure_inprocess(commandlist):
sys.stdout = mystdout = StringIO()
old_stderr = sys.stderr
sys.stderr = mystderr = StringIO()
- returncode = meson.run(commandlist)
- sys.stdout = old_stdout
- sys.stderr = old_stderr
+ try:
+ returncode = meson.run(commandlist)
+ finally:
+ sys.stdout = old_stdout
+ sys.stderr = old_stderr
return (returncode, mystdout.getvalue(), mystderr.getvalue())
def run_test_inprocess(testdir):
@@ -165,11 +167,13 @@ def run_test_inprocess(testdir):
sys.stderr = mystderr = StringIO()
old_cwd = os.getcwd()
os.chdir(testdir)
- returncode_test = meson_test.run(['meson-private/meson_test_setup.dat'])
- returncode_benchmark = meson_benchmark.run(['meson-private/meson_benchmark_setup.dat'])
- sys.stdout = old_stdout
- sys.stderr = old_stderr
- os.chdir(old_cwd)
+ try:
+ returncode_test = meson_test.run(['meson-private/meson_test_setup.dat'])
+ returncode_benchmark = meson_benchmark.run(['meson-private/meson_benchmark_setup.dat'])
+ finally:
+ sys.stdout = old_stdout
+ sys.stderr = old_stderr
+ os.chdir(old_cwd)
return (max(returncode_test, returncode_benchmark), mystdout.getvalue(), mystderr.getvalue())