diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py --- a/llvm/utils/lit/lit/main.py +++ b/llvm/utils/lit/lit/main.py @@ -248,8 +248,10 @@ import shutil shutil.rmtree(tmp_dir) except: - # FIXME: Re-try after timeout on Windows. - lit_config.warning("Failed to delete temp directory '%s'" % tmp_dir) + try: + os.rmdir(tmp_dir) + except: + lit_config.warning("Failed to delete temp directory '%s'" % tmp_dir) def print_histogram(tests):