Skip to content

Commit

Permalink
use check_rc
Browse files Browse the repository at this point in the history
  • Loading branch information
broxigarchen authored Oct 29, 2024
1 parent cc376f0 commit 29fbfcc
Showing 1 changed file with 7 additions and 7 deletions.
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 @@ -22,7 +22,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 @@ -35,7 +35,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 @@ -171,10 +171,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 @@ -211,7 +211,7 @@ def main():
(
check_prefixes,
mc_tool,
checkRC,
check_rc,
mc_cmd_args,
triple_in_cmd,
march_in_cmd,
Expand All @@ -228,7 +228,7 @@ def main():
for (
prefixes,
mc_tool,
checkRC,
check_rc,
mc_args,
triple_in_cmd,
march_in_cmd,
Expand All @@ -247,7 +247,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 29fbfcc

Please sign in to comment.