[llvm] [docs] Refresh Developer Policy text (PR #136198)

Oleksandr Alex Zinenko via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 01:23:58 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
----------------
ftynse wrote:

Maybe we want to highlight more prominently that, whenever possible, tests should be written against a tool such as `opt`rather than as unit tests and use command-line tools such as `FileCheck` to verify the output for testing efficiency reasons.

https://github.com/llvm/llvm-project/pull/136198


More information about the llvm-commits mailing list