| 1 |
.. _libc_uefi_testing: |
| 2 |
|
| 3 |
========================== |
| 4 |
Testing the UEFI C library |
| 5 |
========================== |
| 6 |
|
| 7 |
.. contents:: Table of Contents |
| 8 |
:depth: 4 |
| 9 |
:local: |
| 10 |
|
| 11 |
Testing infrastructure |
| 12 |
====================== |
| 13 |
|
| 14 |
The LLVM C library supports different kinds of :ref:`tests <build_and_test>` |
| 15 |
depending on the build configuration. The UEFI target is considered a full build |
| 16 |
and therefore provides all of its own utilities to build and run the generated |
| 17 |
tests. Currently UEFI supports two kinds of tests. |
| 18 |
|
| 19 |
#. **Hermetic tests** - These are unit tests built with a test suite similar to |
| 20 |
Google's ``gtest`` infrastructure. These use the same infrastructure as unit |
| 21 |
tests except that the entire environment is self-hosted. |
| 22 |
|
| 23 |
#. **Integration tests** - These are lightweight tests that simply call a |
| 24 |
``main`` function and checks if it returns non-zero. |
| 25 |
|
| 26 |
The UEFI target uses the same testing infrastructure as the other supported |
| 27 |
``libc`` targets. We do this by treating UEFI as a standard hosted environment |
| 28 |
capable of launching a ``main`` function. This only requires us to run the |
| 29 |
tests in a UEFI environment. |