commit:     6bf4fb565b28b8041951f3a85d8a75e19ab2042a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 23 07:18:16 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Jul  6 08:02:49 2021 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6bf4fb56

ebuild-writing/functions/src_test: explicitly say USE=test is for only some 
cases

It's only needed where we have test dependencies, we want to conditionally
build tests, conditionally fetch files, or otherwise alter behaviour based
on the fact we're running tests (e.g. usage in RESTRICT).

Closes: https://github.com/gentoo/devmanual/pull/231
Suggested-by: Florian Schmaus <flow <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ebuild-writing/functions/src_test/text.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ebuild-writing/functions/src_test/text.xml 
b/ebuild-writing/functions/src_test/text.xml
index 0dae1f4..1822c33 100644
--- a/ebuild-writing/functions/src_test/text.xml
+++ b/ebuild-writing/functions/src_test/text.xml
@@ -76,6 +76,14 @@ section on <uri link="::general-concepts/dependencies/#Test 
Dependencies"/>
 for more information.
 </p>
 
+<p>
+Note that the <c>test</c> USE flag is only necessary if there are
+test dependencies, tests are being built conditionally, or it is desirable
+to vary behaviour based on whether tests will be run (e.g. downloading large
+files in SRC_URI). It is not appropriate to use the flag to simply indicate 
that
+tests exist and are expected to pass.
+</p>
+
 <p>
 Often the default <c>src_test</c> is fine. Sometimes it is necessary
 to remove certain tests from the list if they cannot be used with a

Reply via email to