<div dir="ltr">On Thu, Aug 8, 2013 at 4:51 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The attached patches centralize the handling of the PWD environment<br>
variable in llvm::sys::fs::current_path().<br>
<br>
The only change in behavior I know is that using fake PWD environment<br>
variables in tooling tests doesn't work since we compare the unique id<br>
of PWD with the unique id of '.'.<br></blockquote><div><br></div><div>Hm, the problem is that those tests really should test whether PWD is taken into account (at least clang-check-pwd).</div><div><br></div><div>
The real fix for those tests is now to create a symlink, cd into the symlink directory, set PWD to the symlink path, and assert on the error messages that the symlinked path is taken, as that would be the breaking behavior if PWD was not taken.</div>
<div><br></div><div>Could you please add a comment to the tests that explain this?</div><div>// FIXME: PWD cannot be set to a different path any more; adapt the test to build a symlink and verify</div><div>// correct handling of PWD by asserting that clang's error messages contain the symlink path instead of</div>
<div>// the underlying path.</div><div><br></div><div>As a side note: if you put changes affecting Tooling through phabricator, you'll get my eternal gratitude ;)</div><div><br></div><div>Cheers,</div><div>/Manuel</div>
</div></div></div>