Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350404 - PMS is missing EAPI 0 code snippet for src_test
Summary: PMS is missing EAPI 0 code snippet for src_test
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: High normal
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-02 20:43 UTC by Petteri Räty (RETIRED)
Modified: 2023-01-31 15:58 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2011-01-02 20:43:21 UTC
20:02 < mgorny> zmedico: why is portage forcing -j1 to make check?
20:13 < scarabeus> mgorny: most packages fail with paralel build in tests
20:14 < mgorny> :P
20:15 < mgorny> but this forces unavoidable de-parallelisation for packages which work fine with parallel-tests
20:29 < scarabeus> which is probably 1 out of 500 packages :D
20:39 < zmedico> mgorny: maybe that's a PMS thing.
20:40 < mgorny> nope, PMS doesn't say a word
20:40 < mgorny> that's why I'm asking
20:40 < zmedico> better ask on the gentoo-dev ml
20:40 < Betelgeuse> mgorny: Is there a default src_test in Portage but PMS has nothing on it?
20:40 < mgorny> Betelgeuse: could you rephrase that?
20:41 < zmedico> does PMS mentions default_src_test?
20:41 < zmedico> if not, it should
20:41 < Betelgeuse> mgorny: It's a PMS bug if Portage provides a default src_test but PMS does not document it
20:41 < Betelgeuse> Assuming the default src_test is an old thing
20:42 < zmedico> ulm: newins patch looks good
20:42 < Betelgeuse> zmedico: How long as there been a default src_test?
20:42 < zmedico> since EAPI 0 :)
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2011-01-02 20:45:06 UTC
There probably should be a code snippet like for other functions.
Comment 2 Ulrich Müller gentoo-dev 2011-08-20 16:57:38 UTC
PMS doesn't have a code snippet for src_test, but a description that seems unambiguous:

# The default implementation used when the ebuild lacks the src_test function
# must, if tests are enabled, run make check if and only if such a target is
# available, or if not run make test, if and only such a target is available.
# In both cases, if make returns non-zero the build must be aborted.

Taken literally, this would translate into code as follows:

src_test() {
    if make -n check >&/dev/null; then
        make check || die "make check failed"
    elif make -n test >&/dev/null; then
        make test || die "make test failed"
    fi
}
Comment 3 Ulrich Müller gentoo-dev 2018-08-08 07:02:37 UTC
Closing per comment #2.