lit test suite on Windows always hangs.

I’m using Windows 8.1, and every time I run check-clang, I eventually end up with a bunch of hung processes. Generally this is an instance of clang.exe, a bunch of instances of FileCheck.exe, and occasionally an llc.exe and an opt.exe.

Inside, the processes are all hung inside of calls to WriteFile() attempting to write to stdout.

I notice some of the tests fail with output indicating that it expects a unix-like environment. For example:

207> ********************
207> FAIL: Clang :: CodeGen/2004-06-17-UnorderedCompares.c (1109 of 7263)
207> ******************** TEST ‘Clang :: CodeGen/2004-06-17-UnorderedCompares.c’ FAILED ********************
207> Script:
207> –
207> D:/src/llvm/build/vs2013/Debug/bin/clang.EXE -cc1 -internal-isystem D:\src\llvm\build\vs2013\Debug\bin…\lib\clang\3.5.0\include -std=c99 D:\src\llvm\tools\clang\test\CodeGen\2004-06-17-UnorderedCompares.c -emit-llvm -o - | grep -v llvm.isunordered | D:/src/llvm/build/vs2013/Debug/bin\not.EXE grep call
207> –
207> Exit Code: 127
207>
207> Command Output (stdout):
207> –
207> Command 0: “grep” “-v” “llvm.isunordered”
207> Command 0 Result: 127
207> Command 0 Output:
207>
207>
207> Command 0 Stderr:
207> ‘grep’: command not found
207>
207>
207> –
207>
207> ********************

Any suggestions?

Do you have GnuWin32 installed, and on your path? You may want to look
at http://clang.llvm.org/get_started.html under the Visual Studio
section (the information applies to llvm as well).

~Aaron

Thanks, I wasn’t aware of that requirement! I wonder if this should be mentioned on the llvm getting started page as well, as I had never seen this page.

It is mentioned there, but on the VS-specific page.
http://llvm.org/docs/GettingStartedVS.html

~Aaron

I'm using Windows 8.1, and every time I run check-clang, I eventually end up with a bunch of hung processes. Generally this is an instance of clang.exe, a bunch of instances of FileCheck.exe, and occasionally an llc.exe and an opt.exe.

Inside, the processes are all hung inside of calls to WriteFile() attempting to write to stdout.

I notice some of the tests fail with output indicating that it expects a unix-like environment. For example:

207> ********************
207> FAIL: Clang :: CodeGen/2004-06-17-UnorderedCompares.c (1109 of 7263)
207> ******************** TEST 'Clang :: CodeGen/2004-06-17-UnorderedCompares.c' FAILED ********************
207> Script:
207> --
207> D:/src/llvm/build/vs2013/Debug/bin/clang.EXE -cc1 -internal-isystem D:\src\llvm\build\vs2013\Debug\bin\..\lib\clang\3.5.0\include -std=c99 D:\src\llvm\tools\clang\test\CodeGen\2004-06-17-UnorderedCompares.c -emit-llvm -o - | grep -v llvm.isunordered | D:/src/llvm/build/vs2013/Debug/bin\not.EXE grep call
207> --
207> Exit Code: 127
207>
207> Command Output (stdout):
207> --
207> Command 0: "grep" "-v" "llvm.isunordered"
207> Command 0 Result: 127
207> Command 0 Output:
207>
207>
207> Command 0 Stderr:
207> 'grep': command not found
207>
207>
207> --
207>
207> ********************

Any suggestions?

I think that for tests that are dependent on grep, it might be nice to convert them to FileCheck in the longer run. This might help make it possible to avoid the dependency on GNUWin32.

I think that comment about Cygwin and MSys is wrong. The Cygwin utilities work for me on Windows, but I don’t build or test in VS. I think you just need to get them onto PATH, which you will also need to do with GnuWin32.