[Docs] Document lldb-dotest

Document the lldb-dotest binary.

llvm-svn: 360748
This commit is contained in:
Jonas Devlieghere 2019-05-15 04:42:30 +00:00
parent 384d46c0d5
commit c31a45e62a
1 changed files with 35 additions and 13 deletions

View File

@ -10,16 +10,25 @@ verify both the LLDB command line interface and the scripting API.
.. contents::
:local:
.. note::
On Windows any invocations of python should be replaced with python_d, the
debug interpreter, when running the test suite against a debug version of
LLDB.
.. note::
On NetBSD you must export ``LD_LIBRARY_PATH=$PWD/lib`` in your environment.
This is due to lack of the ``$ORIGIN`` linker feature.
Running the Full Test Suite
---------------------------
**Windows Note**: In the examples that follow, any invocations of python should
be replaced with python_d, the debug interpreter, when running the test suite
against a debug version of LLDB.
The easiest way to run the LLDB test suite is to use the ``check-lldb`` build
target. By default, the ``check-lldb`` target builds the test programs with the
same compiler that was used to build LLDB. To build the tests with a different
target.
By default, the ``check-lldb`` target builds the test programs with the same
compiler that was used to build LLDB. To build the tests with a different
compiler, you can set the ``LLDB_TEST_C_COMPILER`` or the
``LLDB_TEST_CXX_COMPILER`` CMake variables. These variables are ignored unless
the respective ``LLDB_TEST_USE_CUSTOM_C_COMPILER`` and
@ -38,23 +47,36 @@ built with a custom version of clang, do:
Note that multiple ``-A`` and ``-C`` flags can be specified to
``LLDB_TEST_USER_ARGS``.
Note that on NetBSD you must export ``LD_LIBRARY_PATH=$PWD/lib`` in your
environment. This is due to lack of the ``$ORIGIN`` linker feature.
Running a Specific Test or Set of Tests
---------------------------------------
In addition to running all the LLDB test suites with the "check-lldb" CMake
target above, it is possible to run individual LLDB tests. For example, to run
the test cases defined in TestInferiorCrashing.py, run:
In addition to running all the LLDB test suites with the ``check-lldb`` CMake
target above, it is possible to run individual LLDB tests. If you have a CMake
build you can use the ``lldb-dotest`` binary, which is a wrapper around
``dotest.py`` that passes all the arguments configured by CMake. Alternatively,
you can use ``dotest.py`` directly, if you want to run a test one-off with a
different configuration.
For example, to run the test cases defined in TestInferiorCrashing.py, run:
::
> lldb-dotest -p TestInferiorCrashing.py
::
> cd $lldb/test
> python dotest.py --executable <path-to-lldb> -p TestInferiorCrashing.py ../packages/Python/lldbsuite/test
If the test is not specified by name (e.g. if you leave the -p argument off),
LLDB will run all tests in that directory:
If the test is not specified by name (e.g. if you leave the ``-p`` argument
off), all tests in that directory will be executed:
::
> lldb-dotest functionalities/data-formatter
::