Skip to content

Commit 4c6b3f4

Browse files
authored
Revert "[Utils] Add new --update-tests flag to llvm-lit" (#110772)
Reverts llvm/llvm-project#108425
1 parent ad220a2 commit 4c6b3f4

File tree

5 files changed

+0
-27
lines changed

5 files changed

+0
-27
lines changed

lit/LitConfig.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def __init__(
3838
parallelism_groups={},
3939
per_test_coverage=False,
4040
gtest_sharding=True,
41-
update_tests=False,
4241
):
4342
# The name of the test runner.
4443
self.progname = progname
@@ -90,8 +89,6 @@ def __init__(
9089
self.parallelism_groups = parallelism_groups
9190
self.per_test_coverage = per_test_coverage
9291
self.gtest_sharding = bool(gtest_sharding)
93-
self.update_tests = update_tests
94-
self.test_updaters = []
9592

9693
@property
9794
def maxIndividualTestTime(self):

lit/TestRunner.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,18 +1190,6 @@ def executeScriptInternal(
11901190
str(result.timeoutReached),
11911191
)
11921192

1193-
if litConfig.update_tests:
1194-
for test_updater in litConfig.test_updaters:
1195-
try:
1196-
update_output = test_updater(result, test)
1197-
except Exception as e:
1198-
out += f"Exception occurred in test updater: {e}"
1199-
continue
1200-
if update_output:
1201-
for line in update_output.splitlines():
1202-
out += f"# {line}\n"
1203-
break
1204-
12051193
return out, err, exitCode, timeoutInfo
12061194

12071195

lit/cl_arguments.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,6 @@ def parse_args():
204204
action="store_true",
205205
help="Exit with status zero even if some tests fail",
206206
)
207-
execution_group.add_argument(
208-
"--update-tests",
209-
dest="update_tests",
210-
action="store_true",
211-
help="Try to update regression tests to reflect current behavior, if possible",
212-
)
213207
execution_test_time_group = execution_group.add_mutually_exclusive_group()
214208
execution_test_time_group.add_argument(
215209
"--skip-test-time-recording",

lit/llvm/config.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,12 @@ def __init__(self, lit_config, config):
6464
self.with_environment("_TAG_REDIR_ERR", "TXT")
6565
self.with_environment("_CEE_RUNOPTS", "FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)")
6666

67-
if lit_config.update_tests:
68-
self.use_lit_shell = True
69-
7067
# Choose between lit's internal shell pipeline runner and a real shell.
7168
# If LIT_USE_INTERNAL_SHELL is in the environment, we use that as an
7269
# override.
7370
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
7471
if lit_shell_env:
7572
self.use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
76-
if not self.use_lit_shell and lit_config.update_tests:
77-
print("note: --update-tests is not supported when using external shell")
7873

7974
if not self.use_lit_shell:
8075
features.add("shell")

lit/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def main(builtin_params={}):
4242
config_prefix=opts.configPrefix,
4343
per_test_coverage=opts.per_test_coverage,
4444
gtest_sharding=opts.gtest_sharding,
45-
update_tests=opts.update_tests,
4645
)
4746

4847
discovered_tests = lit.discovery.find_tests_for_inputs(

0 commit comments

Comments
 (0)