For the diffing issue seems like we should be able to generate makefiles with stable separators. I haven't seen the generation code, but it seems like we could write a function lldbsuite.support.fs.unixpath() that works like normpath but always uses /, never \. Would that fix it?<br><br>When you say it doesn't support in place renames, the only issue I'm aware of is that you can't use os.rename if the destination already exists. As such, you also can't implement atomic rename. As long as that isn't required, you should be able to unlink first, then rename. I thought we had a function in lldbsuite.support.fs that does this, but I can't remember <br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 7, 2016 at 2:48 PM Pavel Labath <<a href="mailto:labath@google.com">labath@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added subscribers: zturner, labath.<br>
labath added a comment.<br>
<br>
Hi, I have reverted this commit, as it makes a number of assumptions, which are not true on windows. Please see comments for details.<br>
<br>
If you need help testing out a revised version on windows, let me know. I think Zachary will be able to help with that as well (:P).<br>
<br>
<br>
================<br>
Comment at: packages/Python/lldbsuite/test/lldbinline.py:135<br>
@@ +134,3 @@<br>
+ if os.path.exists("Makefile"):<br>
+ if not filecmp.cmp("Makefile", "Makefile.tmp"):<br>
+ sys.exit("Existing Makefile doesn't match generated Makefile!")<br>
----------------<br>
This files will not end up being identical, due to different path separators and newlines when this is being run on windows.<br>
<br>
I like the idea of diffing, but it needs to be done in a way that it will work on windows.<br>
<br>
================<br>
Comment at: packages/Python/lldbsuite/test/lldbinline.py:136<br>
@@ +135,3 @@<br>
+ if not filecmp.cmp("Makefile", "Makefile.tmp"):<br>
+ sys.exit("Existing Makefile doesn't match generated Makefile!")<br>
+<br>
----------------<br>
This will not cause the error to be reported in the test runner. See <<a href="http://lab.llvm.org:8011/builders/lldb-windows7-android/builds/6268/steps/test1/logs/stdio" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/lldb-windows7-android/builds/6268/steps/test1/logs/stdio</a>> where, this code is triggered, but the test is still not marked as failed in the summary at the end. I think throwing an exception here would do the expected thing.<br>
<br>
================<br>
Comment at: packages/Python/lldbsuite/test/lldbinline.py:138<br>
@@ +137,3 @@<br>
+<br>
+ os.rename("Makefile.tmp", "Makefile")<br>
+<br>
----------------<br>
Windows does not support in-place renames, so this will just fail.<br>
<br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D21032" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21032</a><br>
<br>
<br>
<br>
</blockquote></div>