@@ -269,34 +269,33 @@ C:\Users\username\Desktop>dumpbin /DEPENDENTS .\example.exe | findstr msvcp
269269 * Otherwise, use [ LLVM's installer] [ ] and choose to add LLVM to your ` PATH ` during installation.
2702704 . Follow the instructions below.
271271
272- ## Running All The Tests
272+ ## Running The Tests
273273
274- After configuring and building the project, running ` ctest ` from the build output directory will run all the tests.
275- CTest will only display the standard error output of tests that failed. In order to get more details from CTest's
276- ` lit ` invocations, run the tests with ` ctest -V ` .
274+ Our tests are currently split across three test suites that are located at ` tests\std ` , ` tests\tr1 ` , and
275+ ` llvm-project\libcxx\test\std ` . The test runner ` ${PROJECT_BINARY_DIR}\tests\utils\stl-lit\stl-lit.py ` accepts paths to
276+ directories in the test suites and runs all tests located in the subtree rooted at those paths. This can mean executing
277+ the entirety of a single test suite, running all tests under a category in ` libcxx ` , or running a single test in ` std `
278+ and ` tr1 ` .
277279
278- ## Running A Subset Of The Tests
279-
280- ` ${PROJECT_BINARY_DIR}\tests\utils\stl-lit\stl-lit.py ` can be invoked on a subdirectory of a test suite and will execute
281- all the tests under that subdirectory. This can mean executing the entirety of a single test suite, running all tests
282- under a category in libcxx, or running a single test in ` std ` and ` tr1 ` .
280+ Some useful ` stl-lit.py ` options:
281+ * ` -v ` (verbose) tells ` stl-lit.py ` to show us output from failed test cases.
282+ * ` -Dnotags=ASAN ` disables the "extra ASan configs" that we typically run only in CI. This is useful to limit runtime
283+ for full validation runs, but often omitted when running just a few test cases to enable the extra ASan coverage.
283284
284285## Examples
285286
286287These examples assume that your current directory is ` C:\Dev\STL\out\x64 ` .
287288
288- * This command will run all of the test suites with verbose output.
289- + ` ctest -V `
290- * This command will also run all of the test suites.
291- + ` python tests\utils\stl-lit\stl-lit.py ..\..\llvm-project\libcxx\test ..\..\tests\std ..\..\tests\tr1 `
292- * This command will run all of the std test suite.
293- + ` python tests\utils\stl-lit\stl-lit.py ..\..\tests\std `
289+ * This command will run all of the test suites:
290+ + ` python tests\utils\stl-lit\stl-lit.py -Dnotags=ASAN ..\..\llvm-project\libcxx\test ..\..\tests\std ..\..\tests\tr1 `
291+ * This command will run only the std test suite.
292+ + ` python tests\utils\stl-lit\stl-lit.py -Dnotags=ASAN ..\..\tests\std `
294293* If you want to run a subset of a test suite, you need to point it to the right place in the sources. The following
295- will run the single test found under VSO_0000000_any_calling_conventions.
296- + ` python tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0000000_any_calling_conventions `
294+ will run the single test found under ` VSO_0000000_any_calling_conventions ` .
295+ + ` python tests\utils\stl-lit\stl-lit.py -Dnotags=ASAN ..\..\tests\std\tests\VSO_0000000_any_calling_conventions `
297296* You can invoke ` stl-lit ` with any arbitrary subdirectory of a test suite. In libcxx this allows you to have finer
298297control over what category of tests you would like to run. The following will run all the libcxx map tests.
299- + ` python tests\utils\stl-lit\stl-lit.py ..\..\llvm-project\libcxx\test\std\containers\associative\map `
298+ + ` python tests\utils\stl-lit\stl-lit.py -Dnotags=ASAN ..\..\llvm-project\libcxx\test\std\containers\associative\map `
300299* You can also use the ` --filter ` option to include tests whose names match a regular expression. The following
301300 command will run tests with "atomic_wait" in their names in both the std and libcxx test suites.
302301 + ` python tests\utils\stl-lit\stl-lit.py ..\..\llvm-project\libcxx\test ..\..\tests\std --filter=atomic_wait `
@@ -305,31 +304,8 @@ control over what category of tests you would like to run. The following will ru
305304
306305## Interpreting The Results Of Tests
307306
308- ### CTest
309-
310- When running the tests via CTest, all of the test suites are considered to be a single test. If any single test in a
311- test suite fails, CTest will simply report that the ` stl ` test failed.
312-
313- Example:
314- ```
315- 0% tests passed, 1 tests failed out of 1
316-
317- Total Test time (real) = 2441.55 sec
318-
319- The following tests FAILED:
320- 1 - stl (Failed)
321- ```
322-
323- The primary utility of CTest in this case is to conveniently invoke ` stl-lit.py ` with the correct set of arguments.
324-
325- CTest will output everything that was sent to stderr for each of the failed test suites, which can be used to identify
326- which individual test within the test suite failed. It can sometimes be helpful to run CTest with the ` -V ` option in
327- order to see the stdout of the tests.
328-
329- ### stl-lit
330-
331- When running the tests directly via the generated ` stl-lit.py ` script the result of each test will be printed. The
332- format of each result is ` {Result Code}: {Test Suite Name} :: {Test Name}:{Configuration Number} ` .
307+ ` stl-lit.py ` prints the result of each test. The format of each result is
308+ ` {Result Code}: {Test Suite Name} :: {Test Name}:{Configuration Number} ` .
333309
334310Example:
335311```
0 commit comments