[llvm] [AMDGPU][test] fix the error case in update_mc_test_check script (PR #112731)
Brox Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 09:30:14 PDT 2024
================
@@ -32,7 +31,20 @@ def invoke_tool(exe, cmd_args, testline, verbose=False):
cmd = 'echo "' + testline + '" | ' + exe + " " + args
if verbose:
print("Command: ", cmd)
- out = subprocess.check_output(cmd, shell=True)
+
+ # if not is used in runline, the command might or might not
+ # return non-zero code on a single line run
+ try:
+ out = subprocess.check_output(cmd, shell=True, stderr=subprocess.DEVNULL)
+ except:
----------------
broxigarchen wrote:
no needed since switched to use `run`
https://github.com/llvm/llvm-project/pull/112731
More information about the llvm-commits
mailing list