From fa09b122b00848c685d76ec047c813235c1dfdad Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 27 Mar 2017 14:43:45 +0530 Subject: wrap: Also capture stderr while running quiet_git() We want to return the stderr if the command failed. --- mesonbuild/wrap/wrap.py | 2 +- run_unittests.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index fcacc16c6..67e47006c 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -39,7 +39,7 @@ def build_ssl_context(): return ctx def quiet_git(cmd): - pc = subprocess.Popen(['git'] + cmd, stdout=subprocess.PIPE) + pc = subprocess.Popen(['git'] + cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = pc.communicate() if pc.returncode != 0: return False, err diff --git a/run_unittests.py b/run_unittests.py index 91ccf37cb..416cbb785 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -880,6 +880,11 @@ class AllPlatformTests(BasePlatformTests): def test_always_prefer_c_compiler_for_asm(self): testdir = os.path.join(self.common_test_dir, '141 c cpp and asm') + # Skip if building with MSVC + env = Environment(testdir, self.builddir, self.meson_command, + get_fake_options(self.prefix), []) + if env.detect_c_compiler(False).get_id() == 'msvc': + raise unittest.SkipTest('MSVC can\'t compile assembly') self.init(testdir) commands = {'cpp-asm': {}, 'cpp-c-asm': {}, 'c-cpp-asm': {}} for cmd in self.get_compdb(): -- cgit v1.2.3