Skip to content

Commit

Permalink
[lit] Remove unreachable @ expansion code
Browse files Browse the repository at this point in the history
ArgumentParser expands @ (fromfile_prefix_chars) by default, so the
expansion code path is unused.
  • Loading branch information
MaskRay committed Jul 18, 2023
1 parent 3126321 commit 2306f89
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions llvm/utils/lit/lit/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,26 +258,11 @@ def find_tests_for_inputs(lit_config, inputs):
tests to execute.
"""

# Expand '@...' form in inputs.
actual_inputs = []
for input in inputs:
if input.startswith("@"):
f = open(input[1:])
try:
for ln in f:
ln = ln.strip()
if ln:
actual_inputs.append(ln)
finally:
f.close()
else:
actual_inputs.append(input)

# Load the tests from the inputs.
tests = []
test_suite_cache = {}
local_config_cache = {}
for input in actual_inputs:
for input in inputs:
prev = len(tests)
tests.extend(
getTests(
Expand Down

0 comments on commit 2306f89

Please sign in to comment.