<div dir="ltr">bash -help is pretty fast to start, but it also seems pretty heavyweight for lit.cfg.  It's probably better to check not execute_external like this:<div><div><br></div><div>$ git diff test/lit.cfg<br></div>
<div>diff --git a/test/lit.cfg b/test/lit.cfg</div><div>index a5bb350..f2f16fb 100644</div><div>--- a/test/lit.cfg</div><div>+++ b/test/lit.cfg</div><div>@@ -245,7 +245,7 @@ if execute_external:</div><div>     config.available_features.add('shell')</div>
<div><br></div><div> # Exclude MSYS due to transforming '/' to 'X:/mingwroot/'.</div><div>-if not platform.system() in ['Windows'] or lit.getBashPath() == '':</div><div>+if not platform.system() in ['Windows'] or not execute_external:</div>
<div>     config.available_features.add('shell-preserves-root')</div><div><br></div><div> # ANSI escape sequences in non-dumb terminal</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 1:57 PM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Jul 29, 2013 at 11:44 AM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>

> On Mon, Jul 29, 2013 at 11:33 AM, Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>> wrote:<br>
>><br>
>> On Mon, Jul 29, 2013 at 11:01 AM, NAKAMURA Takumi <<a href="mailto:geek4civic@gmail.com">geek4civic@gmail.com</a>><br>
>> wrote:<br>
>> > I suppose that system's python should be /usr/bin/python in Cygwin's<br>
>> > world.<br>
>> > I didn't know Python/win32 could run Lit for cygwin tests.<br>
>> ><br>
>> > What is a motivation for you to take *external* python on cygwin?<br>
>><br>
>> I build Clang outside Cygwin, in cmd.exe, because I want to build in a<br>
>> "pure win32" environment. But I fail at running the tests in cmd.exe,<br>
>> so I use Cygwin to run the tests.<br>
>><br>
>> If I try to use Cygwin's /usr/bin/python to run the tests, it fails<br>
>> because of some Windows path. Probably because I didn't build in<br>
>> Cygwin.<br>
>><br>
>> I guess my configuration is confusing to lit.cfg, because I have<br>
>> platform.system() = "Windows" and lit.getBashPath() =<br>
>> "C:\src\cygwin\bin\bash.EXE". But it's still not MSYS :)<br>
><br>
><br>
> This configuration is pretty handy because it's way faster to spawn<br>
> processes from native win32 python than from cygwin bash or cygwin python.<br>
><br>
> I think the odd duck that we should be checking for here is MSys, so using<br>
> the MSYSTEM env var sounds good to me.<br>
<br>
</div></div>I got paranoid and started worrying about the possibility of MSYS bash<br>
ending up on the path, even if the test suite is started outside an<br>
MSYS shell. In that case, looking for $MSYSTEM wouldn't work.<br>
<br>
Maybe we should just ask the bash binary which version it has? I'm<br>
attaching a patch that does that, please take a look.<br>
<br>
I realize this isn't super important, as the tests are still being run<br>
by the cygwin buildbots, but it would be nice if this configuration<br>
were supported too.<br>
<br>
Thanks,<br>
Hans<br>
</blockquote></div><br></div>