diff --git a/clang/www/hacking.html b/clang/www/hacking.html index 90dcc3f4fc04..c0c814613b53 100755 --- a/clang/www/hacking.html +++ b/clang/www/hacking.html @@ -207,55 +207,48 @@
If you want more control over how the tests are run, it may - be convenient to run the test harness on the command-line directly. Before - running tests from the command line, you will need to ensure that - lit.site.cfg files have been created for your build. You can do - this by running the tests as described in the previous sections. Once the - tests have started running, you can stop them with control+C, as the - files are generated before running any tests.
+ be convenient to run the test harness on the command-line directly. Running + the check-clang build target will generate a script to start the + LLVM Integrated + Tester (lit) that can be used to run tests for your + current configuration. Once the tests have started running, you can stop + them with control+C, as the files are generated before running any + tests. -Once that is done, to run all the tests from the command line, - execute a command like the following:
+Once that is done, all the tests can be executed from the command line + by running the generated llvm-lit script as follows:
- 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). 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:
+ (build dir)\bin\llvm-lit (path to llvm)\clang\test + + For example; if you have a Ninja build in the + llvm-project\build_ninja directory, the command to execute from the + llvm-project directory would be:- 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) -+ build_ninja\bin\llvm-lit clang\test + -
For example:
+ Or, for a Visual Studio Debug build in the llvm-project\build + directory, the lit start command to execute from the llvm-project + directory would be:- python C:\Tools\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 -+ build\Debug\bin\llvm-lit clang\test + -
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 run a single test or all tests in a specific folder by providing + the target test or folder to lit. For example, we can run the + wchar.c test:
++ build_ninja\bin\llvm-lit clang\test\Sema\wchar.c ++
or all tests in the Sema folder:
++ build_ninja\bin\llvm-lit clang\test\Sema +-
You can also pass in the --no-progress-bar option if you wish to disable +
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: