summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorJulian Lettner <julian.lettner@gmail.com>2019-02-20 23:05:11 -0800
committerJulian Lettner <julian.lettner@apple.com>2019-10-28 18:56:17 -0700
commit7cd301677461b16a1a5a437a6f6be0b5f0125eaf (patch)
treeb677a1fbaad6ac7442b2664c4ae81b840344cdfb /llvm/utils
parent5976a3f5aa990208326c0409e053ed85fdb74e2c (diff)
downloadbcm5719-llvm-7cd301677461b16a1a5a437a6f6be0b5f0125eaf.tar.gz
bcm5719-llvm-7cd301677461b16a1a5a437a6f6be0b5f0125eaf.zip
[lit] Remove callback indirection
The callback provides no benefits since `run.execute()` does not take any arguments anymore.
Diffstat (limited to 'llvm/utils')
-rwxr-xr-xllvm/utils/lit/lit/main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index 3f6595d11e1..607fd45ac22 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -182,7 +182,7 @@ def run_tests(tests, litConfig, opts, numTotalTests):
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 run_tests(tests, litConfig, opts, numTotalTests):
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:
OpenPOWER on IntegriCloud