[llvm] 7cd3016 - [lit] Remove callback indirection
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 18:58:41 PDT 2019
Author: Julian Lettner
Date: 2019-10-28T18:56:17-07:00
New Revision: 7cd301677461b16a1a5a437a6f6be0b5f0125eaf
URL: https://github.com/llvm/llvm-project/commit/7cd301677461b16a1a5a437a6f6be0b5f0125eaf
DIFF: https://github.com/llvm/llvm-project/commit/7cd301677461b16a1a5a437a6f6be0b5f0125eaf.diff
LOG: [lit] Remove callback indirection
The callback provides no benefits since `run.execute()` does not take
any arguments anymore.
Added:
Modified:
llvm/utils/lit/lit/main.py
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index 3f6595d11e1a..607fd45ac228 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -182,7 +182,7 @@ def progress_callback(test):
progress_callback, opts.maxTime)
try:
- elapsed = run_tests_in_tmp_dir(run.execute, litConfig)
+ elapsed = execute_in_tmp_dir(run, litConfig)
except KeyboardInterrupt:
#TODO(yln): should we attempt to cleanup the progress bar here?
sys.exit(2)
@@ -195,7 +195,7 @@ def progress_callback(test):
display.finish()
return elapsed
-def run_tests_in_tmp_dir(run_callback, litConfig):
+def execute_in_tmp_dir(run, litConfig):
# Create a temp directory inside the normal temp directory so that we can
# try to avoid temporary test file leaks. The user can avoid this behavior
# by setting LIT_PRESERVES_TMP in the environment, so they can easily use
@@ -216,7 +216,7 @@ def run_tests_in_tmp_dir(run_callback, litConfig):
# scanning for stale temp directories, and deleting temp directories whose
# lit process has died.
try:
- return run_callback()
+ return run.execute()
finally:
if tmp_dir:
try:
More information about the llvm-commits
mailing list