FEATURES=test: test flag respect IUSE_FFECTIVE
authorZac Medico <zmedico@gentoo.org>
Thu, 13 Sep 2012 18:24:54 +0000 (11:24 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 13 Sep 2012 18:24:54 +0000 (11:24 -0700)
bin/phase-functions.sh
pym/portage/package/ebuild/config.py

index ad9ba6bb0c2ef4be88c33a25b4e703903a0f98f3..0883ccd99603b12eb6ae633576ff7d5d5f538eeb 100644 (file)
@@ -478,7 +478,7 @@ dyn_test() {
                return
        fi
 
-       if [ "${EBUILD_FORCE_TEST}" == "1" ] ; then
+       if [[ ${EBUILD_FORCE_TEST} == 1 && test =~ $PORTAGE_IUSE ]]; then
                # If USE came from ${T}/environment then it might not have USE=test
                # like it's supposed to here.
                ! has test ${USE} && export USE="${USE} test"
index ffebd22d1dacacd0c044a0f09b2365641e1172f2..6ca1cb5b8a569b2a86b7630da6465b39c51072c9 100644 (file)
@@ -1465,7 +1465,8 @@ class config(object):
                        not hasattr(self, "_ebuild_force_test_msg_shown"):
                                self._ebuild_force_test_msg_shown = True
                                writemsg(_("Forcing test.\n"), noiselevel=-1)
-               if "test" in self.features:
+               if "test" in self.features and \
+                       ("test" in explicit_iuse or iuse_implicit_match("test")):
                        if "test" in self.usemask and not ebuild_force_test:
                                # "test" is in IUSE and USE=test is masked, so execution
                                # of src_test() probably is not reliable. Therefore,