[lit] Clean up temporary files created by tests
authorReid Kleckner <rnk@google.com>
Fri, 2 Sep 2016 16:29:24 +0000 (16:29 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 2 Sep 2016 16:29:24 +0000 (16:29 +0000)
commit8663b44318db4a18a5893382b1b5b9d3782f845b
tree56723ea5a3906d2397de8d04ed7fc32cf528c119
parenta66ae923e4afb56012e8bc1cb1884fea8e34db0e
[lit] Clean up temporary files created by tests

Do this by creating a temp directory in the normal system temp
directory, and cleaning it up on exit.

It is still possible for this temp directory to leak if Python exits
abnormally, but this is probably good enough for now.

Fixes PR18335

llvm-svn: 280501
llvm/utils/lit/lit/TestingConfig.py
llvm/utils/lit/lit/main.py