Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_test/
Date: Tue, 06 Jul 2021 08:03:31
Message-Id: 1625558569.6bf4fb565b28b8041951f3a85d8a75e19ab2042a.ulm@gentoo
1 commit: 6bf4fb565b28b8041951f3a85d8a75e19ab2042a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 23 07:18:16 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 6 08:02:49 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6bf4fb56
7
8 ebuild-writing/functions/src_test: explicitly say USE=test is for only some cases
9
10 It's only needed where we have test dependencies, we want to conditionally
11 build tests, conditionally fetch files, or otherwise alter behaviour based
12 on the fact we're running tests (e.g. usage in RESTRICT).
13
14 Closes: https://github.com/gentoo/devmanual/pull/231
15 Suggested-by: Florian Schmaus <flow <AT> gentoo.org>
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
18
19 ebuild-writing/functions/src_test/text.xml | 8 ++++++++
20 1 file changed, 8 insertions(+)
21
22 diff --git a/ebuild-writing/functions/src_test/text.xml b/ebuild-writing/functions/src_test/text.xml
23 index 0dae1f4..1822c33 100644
24 --- a/ebuild-writing/functions/src_test/text.xml
25 +++ b/ebuild-writing/functions/src_test/text.xml
26 @@ -76,6 +76,14 @@ section on <uri link="::general-concepts/dependencies/#Test Dependencies"/>
27 for more information.
28 </p>
29
30 +<p>
31 +Note that the <c>test</c> USE flag is only necessary if there are
32 +test dependencies, tests are being built conditionally, or it is desirable
33 +to vary behaviour based on whether tests will be run (e.g. downloading large
34 +files in SRC_URI). It is not appropriate to use the flag to simply indicate that
35 +tests exist and are expected to pass.
36 +</p>
37 +
38 <p>
39 Often the default <c>src_test</c> is fine. Sometimes it is necessary
40 to remove certain tests from the list if they cannot be used with a