In ChangePrinters tests, redirect stderr of `diff --help` to stdout
authorMatt Jacobson <mhjacobson@me.com>
Thu, 17 Nov 2022 09:04:15 +0000 (04:04 -0500)
committerMatt Jacobson <mhjacobson@me.com>
Thu, 17 Nov 2022 09:06:17 +0000 (04:06 -0500)
FreeBSD's diff writes its `--help` to stderr.

llvm/test/Other/ChangePrinters/lit.local.cfg

index 95046e4..dc21ca5 100644 (file)
@@ -6,7 +6,8 @@ def have_needed_diff_support():
         return False
 
     ld_cmd = subprocess.Popen(
-        ['/usr/bin/diff', '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
+        ['/usr/bin/diff', '--help'], stdout=subprocess.PIPE,
+        stderr=subprocess.STDOUT, env={'LANG': 'C'})
     ld_out = ld_cmd.stdout.read().decode()
     ld_cmd.wait()