Skip to content

Commit

Permalink
use check_rc
Browse files Browse the repository at this point in the history
  • Loading branch information
broxigarchen committed Oct 29, 2024
1 parent 9ced142 commit 6a3905f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py
// RUN: not llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECKA %s
// RUN: not llvm-mc -triple=amdgcn %s 2>&1 | FileCheck --check-prefixes=CHECKB %s

Expand Down
14 changes: 7 additions & 7 deletions llvm/utils/update_mc_test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
COMMENT = {"asm": "//", "dasm": "#"}


def invoke_tool(exe, checkRC, cmd_args, testline, verbose=False):
def invoke_tool(exe, check_rc, cmd_args, testline, verbose=False):
if isinstance(cmd_args, list):
args = [applySubstitutions(a, substitutions) for a in cmd_args]
else:
Expand All @@ -36,7 +36,7 @@ def invoke_tool(exe, checkRC, cmd_args, testline, verbose=False):
out = subprocess.run(
cmd,
shell=True,
check=checkRC,
check=check_rc,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
).stdout
Expand Down Expand Up @@ -194,10 +194,10 @@ def main():
# if not is used in runline, disable rc check, since
# the command might or might not
# return non-zero code on a single line run
checkRC = True
check_rc = True
mc_cmd_args = mc_cmd.strip().split()
if mc_cmd_args[0] == "not":
checkRC = False
check_rc = False
mc_tool = mc_cmd_args[1]
mc_cmd = mc_cmd[len(mc_cmd_args[0]) :].strip()
else:
Expand Down Expand Up @@ -234,7 +234,7 @@ def main():
(
check_prefixes,
mc_tool,
checkRC,
check_rc,
mc_cmd_args,
triple_in_cmd,
march_in_cmd,
Expand All @@ -255,7 +255,7 @@ def main():
for (
prefixes,
mc_tool,
checkRC,
check_rc,
mc_args,
triple_in_cmd,
march_in_cmd,
Expand All @@ -274,7 +274,7 @@ def main():
# get output for each testline
out = invoke_tool(
ti.args.llvm_mc_binary or mc_tool,
checkRC,
check_rc,
mc_args,
line,
verbose=ti.args.verbose,
Expand Down

0 comments on commit 6a3905f

Please sign in to comment.