1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

[lit] Remove callback indirection

The callback provides no benefits since `run.execute()` does not take
any arguments anymore.
This commit is contained in:
Julian Lettner 2019-02-20 23:05:11 -08:00 committed by Julian Lettner
parent 05568538e9
commit a8800b4b14

View File

@ -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: