Skip to content

Commit 471dc1f

Browse files
committed
[lit] Print warning if we fail to delete temp directory
llvm-svn: 375049
1 parent 3c7d879 commit 471dc1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/utils/lit/lit/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,15 @@ def progress_callback(test):
223223

224224
startTime = time.time()
225225
try:
226-
run_tests_in_tmp_dir(run_callback)
226+
run_tests_in_tmp_dir(run_callback, litConfig)
227227
except KeyboardInterrupt:
228228
sys.exit(2)
229229
testing_time = time.time() - startTime
230230

231231
display.finish()
232232
return testing_time
233233

234-
def run_tests_in_tmp_dir(run_callback):
234+
def run_tests_in_tmp_dir(run_callback, litConfig):
235235
# Create a temp directory inside the normal temp directory so that we can
236236
# try to avoid temporary test file leaks. The user can avoid this behavior
237237
# by setting LIT_PRESERVES_TMP in the environment, so they can easily use
@@ -260,7 +260,7 @@ def run_tests_in_tmp_dir(run_callback):
260260
shutil.rmtree(tmp_dir)
261261
except:
262262
# FIXME: Re-try after timeout on Windows.
263-
pass
263+
litConfig.warning("Failed to delete temp directory '%s'" % tmp_dir)
264264

265265
def print_summary(tests, opts):
266266
byCode = {}

0 commit comments

Comments
 (0)