Skip to content

Commit

Permalink
[lit] Print warning if we fail to delete temp directory
Browse files Browse the repository at this point in the history
llvm-svn: 375049
  • Loading branch information
yln committed Oct 16, 2019
1 parent 3c7d879 commit 471dc1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/utils/lit/lit/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ def progress_callback(test):

startTime = time.time()
try:
run_tests_in_tmp_dir(run_callback)
run_tests_in_tmp_dir(run_callback, litConfig)
except KeyboardInterrupt:
sys.exit(2)
testing_time = time.time() - startTime

display.finish()
return testing_time

def run_tests_in_tmp_dir(run_callback):
def run_tests_in_tmp_dir(run_callback, 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
Expand Down Expand Up @@ -260,7 +260,7 @@ def run_tests_in_tmp_dir(run_callback):
shutil.rmtree(tmp_dir)
except:
# FIXME: Re-try after timeout on Windows.
pass
litConfig.warning("Failed to delete temp directory '%s'" % tmp_dir)

def print_summary(tests, opts):
byCode = {}
Expand Down

0 comments on commit 471dc1f

Please sign in to comment.