diff options
author | Michael Platings <michael.platings@arm.com> | 2019-01-24 15:11:26 +0000 |
---|---|---|
committer | Michael Platings <michael.platings@arm.com> | 2019-01-24 15:11:26 +0000 |
commit | 7e552761f39b9b2565845f4625915471c00f1a09 (patch) | |
tree | 9fd3aaab89d4fa610630af50c73dc878c3d2bad5 | |
parent | c5cb2bed58b2732067d63b177fbabbddfcd3f37d (diff) | |
download | bcm5719-llvm-7e552761f39b9b2565845f4625915471c00f1a09.tar.gz bcm5719-llvm-7e552761f39b9b2565845f4625915471c00f1a09.zip |
[Docs] Add information about unit tests to the testing guide
Differential Revision: https://reviews.llvm.org/D57088
llvm-svn: 352052
-rw-r--r-- | llvm/docs/TestingGuide.rst | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst index ceb2023e750..6f24c9d2973 100644 --- a/llvm/docs/TestingGuide.rst +++ b/llvm/docs/TestingGuide.rst @@ -29,10 +29,11 @@ later. LLVM Testing Infrastructure Organization ======================================== -The LLVM testing infrastructure contains two major categories of tests: -regression tests and whole programs. The regression tests are contained -inside the LLVM repository itself under ``llvm/test`` and are expected -to always pass -- they should be run before every commit. +The LLVM testing infrastructure contains three major categories of tests: +unit tests, regression tests and whole programs. The unit tests and regression +tests are contained inside the LLVM repository itself under ``llvm/unittests`` +and ``llvm/test`` respectively and are expected to always pass -- they should be +run before every commit. The whole programs tests are referred to as the "LLVM test suite" (or "test-suite") and are in the ``test-suite`` module in subversion. For @@ -40,6 +41,13 @@ historical reasons, these tests are also referred to as the "nightly tests" in places, which is less ambiguous than "test-suite" and remains in use although we run them much more often than nightly. +Unit tests +---------- + +Unit tests are written using `Google Test <https://github.com/google/googletest/blob/master/googletest/docs/primer.md>`_ +and `Google Mock <https://github.com/google/googletest/blob/master/googlemock/docs/ForDummies.md>`_ +and are located in the ``llvm/unittests`` directory. + Regression tests ---------------- @@ -90,16 +98,23 @@ test suite for more information . This test suite is located in the Quick start =========== -The tests are located in two separate Subversion modules. The -regressions tests are in the main "llvm" module under the directory -``llvm/test`` (so you get these tests for free with the main LLVM tree). -Use ``make check-all`` to run the regression tests after building LLVM. +The tests are located in two separate Subversion modules. The unit and +regression tests are in the main "llvm" module under the directories +``llvm/unittests`` and ``llvm/test`` (so you get these tests for free with the +main LLVM tree). Use ``make check-all`` to run the unit and regression tests +after building LLVM. The ``test-suite`` module contains more comprehensive tests including whole C and C++ programs. See the :doc:`TestSuiteGuide` for details. -Regression tests ----------------- +Unit and Regression tests +------------------------- + +To run all of the LLVM unit tests use the check-llvm-unit target: + +.. code-block:: bash + + % make check-llvm-unit To run all of the LLVM regression tests use the check-llvm target: |