Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499580 - autotools-utils_src_test sometimes doesn't work e.g. sci-libs/xkaapi
Summary: autotools-utils_src_test sometimes doesn't work e.g. sci-libs/xkaapi
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 13:00 UTC by Justin Lecher (RETIRED)
Modified: 2023-01-31 15:58 UTC (History)
1 user (show)

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 Justin Lecher (RETIRED) gentoo-dev 2014-01-28 13:00:23 UTC
Please apply

Index: xkaapi-2.1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sci-libs/xkaapi/xkaapi-2.1.ebuild,v
retrieving revision 1.1
diff -u -B -b -u -p -r1.1 xkaapi-2.1.ebuild
--- xkaapi-2.1.ebuild   28 Jan 2014 12:47:39 -0000  1.1
+++ xkaapi-2.1.ebuild   28 Jan 2014 12:58:58 -0000
@@ -57,7 +57,7 @@ src_configure() {
    autotools-utils_src_configure
 }
 
-src_test() {
+_src_test() {
    cd "${BUILD_DIR}" || die
    emake check
 }


And test run the test. It doesn't work although the defined src_test() basically reassembles what the eclass does. Ithink there is a bug somewhere in the eclass code
Comment 1 Maciej Mrozowski gentoo-dev 2014-07-31 23:19:42 UTC
There's a problem with:

make -n check "${@}" &>/dev/null in eclass src_test

For some reasons, make check fails in 'dry run' mode.
Sounds like a 'make' bug to me.
We can work it around with -i parameter (will ignore recipe error and yet properly fail when target 'check' is not supported, still it should _not_ be necessary in dry-run mode)

@Michał
I'm going to commit the following:

Index: autotools-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v
retrieving revision 1.73
diff -u -B -r1.73 autotools-utils.eclass
--- autotools-utils.eclass      11 Mar 2014 23:55:44 -0000      1.73
+++ autotools-utils.eclass      31 Jul 2014 23:18:02 -0000
@@ -468,9 +468,9 @@
        _check_build_dir
        pushd "${BUILD_DIR}" > /dev/null || die
 
-       if make -n check "${@}" &>/dev/null; then
+       if make -ni check "${@}" &>/dev/null; then
                emake check "${@}" || die 'emake check failed.'
-       elif make -n test "${@}" &>/dev/null; then
+       elif make -ni test "${@}" &>/dev/null; then
                emake test "${@}" || die 'emake test failed.'
        fi
Comment 2 Maciej Mrozowski gentoo-dev 2014-07-31 23:27:06 UTC
" -n, --just-print, --dry-run, --recon
            Print the commands that would be executed, but do not execute them (except in certain circumstances)."

We are hitting those "certain circumstances" it seems.
Commiting then.
Comment 3 Maciej Mrozowski gentoo-dev 2014-07-31 23:34:39 UTC
Also commited:

@@ -56,8 +56,3 @@
        )
        autotools-utils_src_configure
 }
-
-src_test() {
-       cd "${BUILD_DIR}" || die
-       emake check
-}
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-01 06:58:17 UTC
I'd dare say it's worth reporting to PMS.