From: Aaron Ballman Date: Thu, 9 Feb 2012 15:23:18 +0000 (+0000) Subject: Updated information on how to perform command line testing on Windows when built... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7d923dff62f0eac570f5984e5381c3d83785625;p=clang Updated information on how to perform command line testing on Windows when built from MSVC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150180 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/www/hacking.html b/www/hacking.html index 759b16c6ba..2c11ce1896 100644 --- a/www/hacking.html +++ b/www/hacking.html @@ -215,34 +215,49 @@ the following:

-  python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar
- (path to llvm)/llvm/tools/clang/test
+  python (path to llvm)\llvm\utils\lit\lit.py -sv
+  --param=build_mode=Win32 --param=build_config=Debug
+  --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
+ (path to llvm)\llvm\tools\clang\test
 

For CMake builds e.g. on Windows with Visual Studio, you will need to specify your build configuration (Debug, Release, etc.) via - --param=build_config=(build config).

+ --param=build_config=(build config). You may also need to specify + the build mode (Win32, etc) via --param=build_mode=(build mode).

+ +

Additionally, you will need to specify the lit site configuration which + lives in (build dir)\tools\clang\test, via + --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg. +

To run a single test:

-  python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar
- (path to llvm)/llvm/tools/clang/test/(dir)/(test)
+  python (path to llvm)\llvm\utils\lit\lit.py -sv
+  --param=build_mode=Win32 --param=build_config=Debug
+  --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
+  (path to llvm)\llvm\tools\clang\test\(dir)\(test)
 

For example:

-  python C:/Tools/llvm/utils/lit/lit.py -sv --no-progress-bar
-  C:/Tools/llvm/tools/clang/test/Sema/wchar.c
+  python C:\Tool\llvm\utils\lit\lit.py -sv
+  --param=build_mode=Win32 --param=build_config=Debug
+  --param=clang_site_config=c:\Tools\build\tools\clang\test\lit.site.cfg
+  C:\Tools\llvm\tools\clang\test\Sema\wchar.c
 

The -sv option above tells the runner to show the test output if any tests failed, to help you determine the cause of failure.

+

You can also pass in the --no-progress-bar option if you wish to disable + progress indications while the tests are running.

+

Your output might look something like this:

-
lit.py: lit.cfg:152: note: using clang: 'C:/Tools/llvm/bin/Release\\clang.EXE'
+  
lit.py: lit.cfg:152: note: using clang: 'C:\Tools\llvm\bin\Release\clang.EXE'
 -- Testing: Testing: 2534 tests, 4 threads --
 Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
 Testing Time: 81.52s