From cf0bd77ddd2cd952f17e3485ea1d9e6fc159adb1 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 17 May 2015 15:23:33 +0300 Subject: Do not invoke linker via cmd /c on Windows. --- meson_test.py | 2 ++ mlog.py | 5 +++++ ninjabackend.py | 5 ++--- run_tests.py | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/meson_test.py b/meson_test.py index 71a577e8a..47f3b8b93 100755 --- a/meson_test.py +++ b/meson_test.py @@ -169,6 +169,8 @@ def run_tests(options, datafilename): print('\nFull log written to %s.' % logfilename) def run(args): + global tests_failed + tests_failed = False options = parser.parse_args(args) if len(options.args) != 1: print('Test runner for Meson. Do not run on your own, mmm\'kay?') diff --git a/mlog.py b/mlog.py index 4685c51f0..2807c2bdc 100644 --- a/mlog.py +++ b/mlog.py @@ -27,6 +27,11 @@ def initialize(logdir): log_dir = logdir log_file = open(os.path.join(logdir, 'meson-log.txt'), 'w') +def shutdown(): + global log_file + if log_file is not None: + log_file.close() + class AnsiDecorator(): plain_code = "\033[0m" diff --git a/ninjabackend.py b/ninjabackend.py index 33ed6d972..f3e858783 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -777,9 +777,8 @@ class NinjaBackend(backends.Backend): if is_cross: crstr = '_CROSS' rule = 'rule %s%s_LINKER\n' % (langname, crstr) - command = ' command = %s %s $ARGS %s $in $LINK_ARGS $aliasing\n' % \ - (execute_wrapper, - ' '.join(compiler.get_linker_exelist()),\ + command = ' command = %s $ARGS %s $in $LINK_ARGS $aliasing\n' % \ + (' '.join(compiler.get_linker_exelist()),\ ' '.join(compiler.get_linker_output_args('$out'))) description = ' description = Linking target $out' outfile.write(rule) diff --git a/run_tests.py b/run_tests.py index d830fe167..3d8589409 100755 --- a/run_tests.py +++ b/run_tests.py @@ -20,6 +20,7 @@ from io import StringIO import sys import environment import mesonlib +import mlog import meson, meson_test import argparse import xml.etree.ElementTree as ET @@ -173,6 +174,7 @@ def run_test_inprocess(testdir): def run_test(testdir, should_succeed): global compile_commands + mlog.shutdown() # Close the log file because otherwise Windows wets itself. shutil.rmtree(test_build_dir) shutil.rmtree(install_dir) os.mkdir(test_build_dir) -- cgit v1.2.3