How about putting this in lit.util and make a function called remove_directory() then call this function (here and throughput the rest of lit)<br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 31, 2019 at 12:22 PM Shoaib Meenai via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">smeenai added inline comments.<br>
<br>
<br>
================<br>
Comment at: utils/lit/lit/TestRunner.py:619<br>
+                    path = os.path.abspath(path)<br>
+                    if not ctypes.windll.kernel32.RemoveDirectoryW(r'\\?\%s' % path):<br>
+                        raise ctypes.WinError()<br>
----------------<br>
Shouldn't the error handling logic match the other branch (`on_rm_error if force else None`)?<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D57533/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D57533/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D57533" rel="noreferrer" target="_blank">https://reviews.llvm.org/D57533</a><br>
<br>
<br>
<br>
</blockquote></div>