[cfe-dev] Help with running clang unit tests on Windows?

Thompson, John John_Thompson at playstation.sony.com
Tue Jan 28 14:17:44 PST 2014


Can someone help with running tests on Windows?

Here's a session running from a Windows command shell:

d:\Clang\llvmnewmod\tools\clang\test\Lexer>which bash
C:\msys\1.0\bin\bash.EXE

d:\Clang\llvmnewmod\tools\clang\test\Lexer>which python
C:\Tools\Python27\python.EXE

d:\Clang\llvmnewmod\tools\clang\test\Lexer>echo %LLVMDIR%
d:\Clang\llvmnewmod

d:\Clang\llvmnewmod\tools\clang\test\Lexer>clangtest wchar.c
d:\Clang\llvmnewmod\tools\clang\test\Lexer>python.exe d:\Clang\llvmnewmod\utils\lit\lit.py --param clang_site_config=d:\Clang\llvmnewmod\tools\clang\test\lit.site.cfg --param clang_unit_site_config=d:\Clang\llvmnewmod\tools\clang\test\Unit\lit.site.cfg --param build_config=Debug --param build_mode=Win32 -sv --noprogress-bar    wchar.c
lit.py: LitConfig.py:94: note: Unable to find 'bash.exe'.
lit.py: lit.cfg:196: note: using clang: 'd:/Clang/llvmnewmod/bin/Debug/clang.exe'
lit.py: TestingConfig.py:108: fatal: unable to parse config file 'D:/Clang/llvmnewmod/tools/clang/test/lit.cfg', traceba
ck: Traceback (most recent call last):
  File "d:\Clang\llvmnewmod\utils\lit\lit\TestingConfig.py", line 95, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "D:/Clang/llvmnewmod/tools/clang/test/lit.cfg", line 258, in <module>
    getClangBuiltinIncludeDir(config.clang))) )
  File "D:/Clang/llvmnewmod/tools/clang/test/lit.cfg", line 221, in getClangBuiltinIncludeDir
    stdout=subprocess.PIPE)
  File "C:\Tools\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Tools\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

I believe this script worked for me a couple of years ago.

Here's a sesson running from bash in a Windows command shell:

bash-3.1$ which bash
C:\msys\1.0\bin\bash.EXE
bash-3.1$ which python
c:\Tools\Python27\python.EXE
bash-3.1$ echo $LLVMDIR
/d/Clang/llvmnewmodbash-3.1$ pwd
/d/Clang/llvmnewmod/tools/clang/test/Lexer
bash-3.1$ python.exe $LLVMDIR/utils/lit/lit.py --param clang_site_config=$LLVMDIR/tools/clang/test/lit.site.cfg --param
clang_unit_site_config=$LLVMDIR/tools/clang/test/Unit/lit.site.cfg --param build_config=Debug --param build_mode=Win32
-sv --no-progress-bar wchar.c
lit.py: LitConfig.py:94: note: Unable to find 'bash.exe'.
lit.py: lit.cfg:196: note: using clang: 'd:/Clang/llvmnewmod/bin/Debug/clang.exe'
lit.py: TestingConfig.py:108: fatal: unable to parse config file 'D:/Clang/llvmnewmod/tools/clang/test/lit.cfg', traceba
ck: Traceback (most recent call last):
  File "d:\Clang\llvmnewmod\utils\lit\lit\TestingConfig.py", line 95, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "D:/Clang/llvmnewmod/tools/clang/test/lit.cfg", line 258, in <module>
    getClangBuiltinIncludeDir(config.clang))) )
  File "D:/Clang/llvmnewmod/tools/clang/test/lit.cfg", line 221, in getClangBuiltinIncludeDir
    stdout=subprocess.PIPE)
  File "c:\Tools\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "c:\Tools\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

bash-3.1$

Any idea what's wrong?

Thanks.

-John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140128/97b97e62/attachment.html>


More information about the cfe-dev mailing list