From c31a45e62a2a4212a9bb23a7de20d4023e333dac Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 15 May 2019 04:42:30 +0000 Subject: [PATCH] [Docs] Document lldb-dotest Document the lldb-dotest binary. llvm-svn: 360748 --- lldb/docs/resources/test.rst | 48 ++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst index 91cc4a2..d1089f2 100644 --- a/lldb/docs/resources/test.rst +++ b/lldb/docs/resources/test.rst @@ -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 -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 :: -- 2.7.4