From: Matthew Fernandez Date: Thu, 10 Feb 2022 11:37:45 +0000 (+1100) Subject: CI: redirect stderr→stdout on Windows during build X-Git-Tag: 3.0.0~33^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9438821ae356ebd222d8d803510f351c01c8f80d;p=graphviz CI: redirect stderr→stdout on Windows during build In CI, the Windows environments run ci/build_windows.py to orchestrate compilation. This is run under PowerShell, which has the surprising behavior of (1) hiding stderr and (2) considering any output to stderr a signal to abort the running program. The combined effect of this is that benign CMake logging statements like: message(WARNING "hello world") abruptly terminate compilation with the baffling output: python : CMake Warning at cmake/FindGD.cmake:52 (message): At line:1 char:1 + python ci/build_windows.py --build-system $env:build_system --platfor ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (CMake Warning a...e:52 (message)::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError This behavior appears to be configurable, but it seems simpler to work around this by avoiding any stderr output. The exit status of any build commands is sufficient to signal failure. Gitlab: #2097 --- diff --git a/ci/build_windows.py b/ci/build_windows.py index 49dae7ef3..b4a242811 100644 --- a/ci/build_windows.py +++ b/ci/build_windows.py @@ -12,7 +12,7 @@ from typing import List def run(args: List[str], cwd: Path): #pylint: disable=C0116 print(f"+ {' '.join(str(x) for x in args)}") - subprocess.check_call(args, cwd=cwd) + subprocess.check_call(args, stderr=subprocess.STDOUT, cwd=cwd) def main(args: List[str]) -> int: #pylint: disable=C0116