Lines Matching refs:API
18 * **API tests**: Integration tests that interact with the debugger through the
19 SB API. These are written in Python and use LLDB's ``dotest.py`` testing
56 as the Python API. For example, to test setting a breakpoint, you could do it
57 from the command line driver with ``b main`` or you could use the SB API and do
61 relatively simple. Expressivity is limited compared to the API tests, which
64 specific to remote debugging must be tested with API tests instead.
74 you can often get away with a broken or incomplete binary, whereas the API
87 API Tests
90 API tests are located under ``lldb/test/API``. They are run with the
92 compiled with Make. The majority of API tests are end-to-end tests that compile
102 Below is the directory layout of the `example API test
103 <https://github.com/llvm/llvm-project/tree/main/lldb/test/API/sample_test>`_.
153 test, the API test also allow for much more complex scenarios when it comes to
203 In conclusion, you'll want to opt for an API test to test the API itself or
205 program being debugged. The fact that the API tests work with different
206 variants mean that more general tests should be API tests, so that they can be
209 Guidelines for API tests
212 API tests are expected to be fast, reliable and maintainable. To achieve this
213 goal, API tests should conform to the following guidelines in addition to normal
222 The part of the SB API that can be tested with just a target includes
228 the `SBType`-related parts of the API. With those languages it's also
247 use a cache that is shared between all API tests and that contains
275 **Prefer LLDB testing utilities over directly working with the SB API.**
285 **Prefer calling the SB API over checking command output.**
287 the output of LLDB commands and instead try calling into the SB API. Relying
350 As an example, take a look at test/API/functionalities/breakpoint/breakpoint_conditions/main.c which has these
371 As an example, take a look at test/API/lang/c/forward/TestForwardDeclaration.py which has these lines:
396 for example, in test/API/terminal/TestSTTYBeforeAndAfter.py:
486 * Use ``check-lldb-api`` to run just the SB API tests.
491 target ``check-lldb-shell-objectfile``. However, because the unit tests and API
515 For the SB API tests it is possible to forward arguments to ``dotest.py`` by
523 Below is an overview of running individual test in the unit and API test suites
526 Running a Specific Test or Set of Tests: API Tests
624 To instead debug a test's python source, edit the test and insert ``import pdb; pdb.set_trace()`` or ``breakpoint()`` (Python 3 only) at the point you want to start debugging. The ``breakpoint()`` command can be used for any LLDB Python script, not just for API tests.