[llvm] [docs] Refresh Developer Policy text (PR #136198)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 18 04:26:38 PDT 2025
================
@@ -220,27 +218,34 @@ Test Cases
Developers are required to create test cases for any bugs fixed and any new
features added. Some tips for getting your testcase approved:
-* All feature and regression test cases are added to the ``llvm/test``
- directory. The appropriate sub-directory should be selected (see the
+* All feature and regression test cases are added to the ``test`` subdirectory
+ of each LLVM subproject, i.e. ``llvm-project/llvm/test`` for LLVM itself. The
+ appropriate sub-directory should be selected (see the
:doc:`Testing Guide <TestingGuide>` for details).
-* Test cases should be written in :doc:`LLVM assembly language <LangRef>`.
+* Changes to libraries, such as Support, which are not directly observable
+ through tool invocations, are often best tested with unit tests. Unit tests
+ are located under the ``unittests`` subdirectory of each subproject.
-* Test cases, especially for regressions, should be reduced as much as possible,
- by :doc:`bugpoint <Bugpoint>` or manually. It is unacceptable to place an
- entire failing program into ``llvm/test`` as this creates a *time-to-test*
- burden on all developers. Please keep them short.
+* Test cases are written in the relevant input language of the relevant
+ component. For LLVM, this is typically the :doc:`LLVM assembly language
+ <LangRef>`. For Clang, it is often C/C++/ObjC.
+
+* Test cases should be targeted. Large inputs exhibiting bugs should be reduced
+ with tools like ``llvm-reduce`` before committing them to the suite. It is not
+ acceptable to place an entire failing program into ``llvm/test`` as this
+ creates a *time-to-test* burden on all developers. Please keep them short.
* Avoid adding links to resources that are not available to the entire
community, such as links to private bug trackers, internal corporate
documentation, etc. Instead, add sufficient comments to the test to provide
the context behind such links.
-Note that llvm/test and clang/test are designed for regression and small feature
-tests only. More extensive test cases (e.g., entire applications, benchmarks,
-etc) should be added to the ``llvm-test`` test suite. The llvm-test suite is
-for coverage (correctness, performance, etc) testing, not feature or regression
-testing.
+Note that ``llvm/test`` and ``clang/test`` are designed for regression and small
+feature tests only. More extensive test cases (e.g., entire applications,
+benchmarks, etc) should be added to the ``llvm-test`` test suite. The ``llvm-test``
+suite is for integration and application testing (correctness, performance, etc)
+testing, not feature or regression testing.
----------------
AaronBallman wrote:
Do we also want to mention that it's the place to put tests which are incompatible with the license from the main LLVM repo?
https://github.com/llvm/llvm-project/pull/136198
More information about the llvm-commits
mailing list