<div dir="ltr">Yeah, the llvm-ar tests are working on Windows.  But I'm getting different results when I try to use the same commands in an LLDB lit test.  Maybe there's something messed up in LLDB's local lit config?<div><br></div><div>If I have `mkdir %t/subdir` in my lit test, I get either file-not-found or a complaint about "unrecognized option /subdir."</div><div><br></div><div>The one-and-only mkdir on my PATH is "C:\Program Files\Git\usr\bin\mkdir.exe".  If I run that explicitly, bypassing the one build into the Windows CMD prompt, I can use `--help`, `--parents`, and `--version` (among others).  But if I issue those commands from the lit test, I get reports of "unsupported option: `--parents`" and subdirectories named `--help` and `--version`.  That tells me lit isn't running the same command, though the "unsupported option" is not an error message I'd expect from CMD's mkdir.<br></div><div><br></div><div>The GnuWin tools have been removed from my machine for a while now.  `which` and `where` report only the Git version.</div><div><br></div><div>'Tis a puzzle.</div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 6, 2020 at 3:45 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">there are some existing tests that seem to do this, for instance:<br>
<br>
llvm/test/tools/llvm-ar/lto-kind-from-triple.test<br>
<br>
Are these not running on Windows?<br>
<br>
On Thu, Aug 6, 2020 at 3:36 PM Adrian McCarthy via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> I'm writing a lit test that needs to temporarily make a subdirectory.<br>
><br>
> I tried:<br>
><br>
> ```<br>
> // RUN: mkdir %t/subdir<br>
> ```<br>
><br>
> But on Windows, it's hard to bypass the built-in mkdir to use a Posix-style one from Git or GnuWin.  The built-in mkdir believes the `/subdir` is an unrecognized command flag.  I figure I cannot just use a backslash because that would fail on Posix systems.  (The test should run on all platforms.)<br>
><br>
> The lit documentation mentioned a `%{pathsep}` macro, so I tried that.  After several minutes of confusing results, I discovered this is not for the path component separator, but for the separators used between paths in the PATH environment variable.  On Windows, that's ';', which doesn't help.<br>
><br>
> Suggestions?<br>
><br>
> Thanks,<br>
> Adrian McCarthy<br>
><br>
> Why does this test need a separate directory?<br>
><br>
> The test is to confirm that LLDB can locate a PDB symbol file that corresponds to the target executable.  In the executable, the linker writes the location where it generated the PDB file.  I need that path to be a different directory than the directory for the executable itself because the fallback search includes the directory of the executable.<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>