This is an archive of the discontinued LLVM Phabricator instance.

Fixed a problem removing temp files
ClosedPublic

Authored by PeteSteinfeld on May 13 2020, 7:13 AM.

Details

Summary

Before making this change, whenever I ran "check-flang", I'd get an
error message like:

llvm-lit: /mnt/c/GitHub/f18/c751/flang/build/bin/../../../llvm/utils/lit/lit/main.py:252: warning: Failed to delete temp directory '/tmp/lit_tmp_gOKUIh'

With this change, there's no such message in the output, and the temp
directory is successfully removed.

Note that my working environment is on Windows 10 running Windows
Subsystem for Linux using the Ubuntu app. I'm running Python version
2.7.1.

Earlier versions of Python do not contain shutil. It may be that this
module was available on Windows systems later than other platforms.
Upgrading my version of Python made the problem go away

I don't believe that timing was a problem since inserting a long delay
didn't fix things.

So I added some text to the error message recommending that the user
upgrade their version of Python if they run into this problem.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.May 13 2020, 7:13 AM
Herald added a project: Restricted Project. · View Herald Transcript
yln accepted this revision.May 13 2020, 11:14 AM

LGTM, thanks! Discussed in https://reviews.llvm.org/D79802

This revision is now accepted and ready to land.May 13 2020, 11:14 AM
This revision was automatically updated to reflect the committed changes.