Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 735570 - The page on src_test should link to the "Test Dependencies" paragraph
Summary: The page on src_test should link to the "Test Dependencies" paragraph
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Devmanual Team
URL: https://devmanual.gentoo.org/ebuild-w...
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks:
 
Reported: 2020-08-02 18:14 UTC by Florian Schmaus
Modified: 2020-12-15 08:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-src_test-link-to-general-concepts-dependencies-Test-.patch (0001-src_test-link-to-general-concepts-dependencies-Test-.patch,1.45 KB, patch)
2020-08-02 18:15 UTC, Florian Schmaus
Details | Diff
0001-src_test-re-organize-merge-sections.patch (0001-src_test-re-organize-merge-sections.patch,4.23 KB, patch)
2020-08-03 13:21 UTC, Florian Schmaus
Details | Diff
0001-src_test-re-organize-merge-sections.patch (0001-src_test-re-organize-merge-sections.patch,4.23 KB, patch)
2020-08-04 18:19 UTC, Florian Schmaus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Schmaus gentoo-dev 2020-08-02 18:14:27 UTC
The next important topic besides the default and a sample src_test
implementation is probably the declaration of test-only
dependencies (and idioms like RESTRICT="!test? ( test )"). The
documentation of src_test is currently silent about that topic, while
we have a good "Test Dependencies" documentation at a different
section of the devmanual.

Attached is a patch that forwards the interested reader of the src_test documentation to the related paragraph on test dependencies. Another option would be to move the paragraph "Test Dependencies" from general-concepts/dependencies/#Test Dependencies to ebuild-writing/functions/src_test, *or* create an extra page about ebuild testsuites (ebuild-writing/testing ?).

Reproducible: Always
Comment 1 Florian Schmaus gentoo-dev 2020-08-02 18:15:24 UTC
Created attachment 652386 [details, diff]
0001-src_test-link-to-general-concepts-dependencies-Test-.patch
Comment 2 Ulrich Müller gentoo-dev 2020-08-02 21:04:32 UTC
Adding a section just for a single cross reference seems a bit much. Maybe it could be added to one of the existing sections instead?
Comment 3 Florian Schmaus gentoo-dev 2020-08-03 07:47:16 UTC
I considered that but did not find any matching section. Eventually the "Skipping Tests" is of same length. How about merging the sections "Common src_test Tasks", "Skipping Tests", "Sample src_test" and the new "Test Dependencies" into one new section "Writing ebuilds with the 'test' feature enabled", placed right after "Default src_test"?
Comment 4 Ulrich Müller gentoo-dev 2020-08-03 11:11:48 UTC
The "Default ..." and "Sample ..." appear in all chapters about ebuild functions, so I'd rather leave them in place.

"Common src_test Tasks", "Skipping Tests", and "Test Dependencies" could be joined though. If they are, the new section should indeed be moved up and placed right after "Sample src_test".
Comment 5 Florian Schmaus gentoo-dev 2020-08-03 13:21:03 UTC
Created attachment 652700 [details, diff]
0001-src_test-re-organize-merge-sections.patch

Merged the sections and the information on "Test Dependencies" into a new section right placed after "Sample src_test".
Comment 6 Ulrich Müller gentoo-dev 2020-08-04 10:12:07 UTC
(In reply to Florian Schmaus from comment #5)
> Created attachment 652700 [details, diff] [details, diff]
> 0001-src_test-re-organize-merge-sections.patch

+If the packaged software is equipped with a test suite, it is sensible
+to make the package aware of this test suite, allowing the package
+manager to run the test suite. Packages with a test suite must announce
+the "test" USE flag.

Four times "test suite" in two sentences. Certainly this could be worded better?

Also, please don't remove the blank lines before block-level elements like <p>. (See the DevBook XML Guide: https://devmanual.gentoo.org/appendices/devbook-guide/index.html#coding-style)
Comment 7 Florian Schmaus gentoo-dev 2020-08-04 18:19:25 UTC
Created attachment 652940 [details, diff]
0001-src_test-re-organize-merge-sections.patch

Your are right, changed the text to

If the packaged software is equipped with a test suite, it is sensible
to make the package aware of it. This allows the package manager to
run the software's unit tests. Packages with a test suite must
announce the "test" USE flag.

Hope that is better.
Comment 8 Ulrich Müller gentoo-dev 2020-08-04 19:43:45 UTC
Devmanual team, please review.
Comment 9 Florian Schmaus gentoo-dev 2020-08-04 20:51:57 UTC
FYI I forgot to re-add the blank lines before the block-level elements. Will do so in the next iteration after the review.
Comment 10 Larry the Git Cow gentoo-dev 2020-08-19 17:32:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b2ad7639d04e296312820025c9b8f77d22272028

commit b2ad7639d04e296312820025c9b8f77d22272028
Author:     Florian Schmaus <flo@geekplace.eu>
AuthorDate: 2020-08-02 17:17:15 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2020-08-19 17:29:42 +0000

    ebuild-writing/functions/src_test: re-organize, merge sections
    
    Merge "Common src_test Tasks" and "Skipping Tests" sections into a new
    section right after "Sample src_test".
    
    Also forward the reader to the related paragraph on test-only
    dependencies in this new section. Before that, the src_test
    documentation page was silent about that, rather important,
    topic. This also includes the RESTRICT="!test? ( test )" idiom.
    
    Signed-off-by: Florian Schmaus <flo@geekplace.eu>
    Closes: https://bugs.gentoo.org/735570
    [Whitespace changes]
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ebuild-writing/functions/src_test/text.xml | 108 ++++++++++++++++-------------
 1 file changed, 60 insertions(+), 48 deletions(-)
Comment 11 Ulrich Müller gentoo-dev 2020-08-19 17:33:38 UTC
Merged. Thank you for the contribution.

(In reply to Florian Schmaus from comment #9)
> FYI I forgot to re-add the blank lines before the block-level elements. Will
> do so in the next iteration after the review.

Done.