Skip to content

Commit ba30024

Browse files
committed
Nuance is good
1 parent 20ad5df commit ba30024

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

llvm/docs/TestSuiteGuide.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -356,22 +356,42 @@ Included Test Suites
356356
--------------------
357357

358358
The LLVM Test Suite repository includes a number of test suites that we have
359-
copied into the repository from external sources, and hand-written CMake files
360-
to hook into the LLVM Test Suite system. For example, these include GCC's C
361-
and Fortran Torture test suites.
359+
copied into the repository from external sources, and written our own CMake
360+
configuration to hook into the LLVM Test Suite system.
362361

363362
In some cases, these external tests have a different license to other code in
364363
the llvm-test-suite repository, which must be documented in `LICENSE.TXT` in the
365364
root of the test suite repository, under the heading "Software from third
366365
parties included in the LLVM Project".
367366

368-
The only changes we can accept to the tests in these suites are where we bring
369-
in all the changes from the external sources. Users should not make individual
370-
downstream changes to these tests.
367+
When there are problems with a test suite that require changes to the code,
368+
there are different approaches (given here in order of preference):
369+
370+
1. Attempt to contribute the changes back to the external source and then update
371+
the test suite to bring it in line with the external source again. This is
372+
the best approach as we interact with other open source projects, but there
373+
might be circumstances where it does not work (the external source may not
374+
accept modifications, or may take a long time to accept them).
375+
376+
2. We can update the CMake to either disable the test, or to provide additional
377+
compiler options to work around the problem.
378+
379+
3. We can commit changes to the tests' sources. This is acceptable for almost
380+
all external sources in the LLVM Test Suite repository, but notable
381+
exceptions are the GCC and GFortran test suites, which we do not accept
382+
changes for.
383+
384+
Even when deciding to follow options 2 and 3, the problem should be reported
385+
back to the external source if it is relevant to them, so they have the
386+
opportunity to fix it.
387+
388+
When updating external sources, the PR should audit any changes to the tests'
389+
source code that we have made within the llvm-test-suite repository, and only
390+
reapply the changes that are still required. This is also a good moment to
391+
review any tests that have been disabled with CMake or that are configured to
392+
use additional compiler options.
393+
371394

372-
We do accept changes to the CMake integration files for these tests, and where a
373-
test is wrong/broken, we should have the ability to exclude the test from our
374-
integration with the suite.
375395

376396
External Suites
377397
---------------

0 commit comments

Comments
 (0)