Make sure USE=test is properly enabled when the test phase is forced via the ebuild...
authorZac Medico <zmedico@gentoo.org>
Thu, 10 May 2007 05:33:57 +0000 (05:33 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 10 May 2007 05:33:57 +0000 (05:33 -0000)
svn path=/main/trunk/; revision=6513

bin/ebuild.sh

index f4556da0023898193619f01e9fb333f12e113819..6fc32bb649b259b9e7c3f479208e8be48d2bddfd 100755 (executable)
@@ -928,7 +928,12 @@ dyn_compile() {
 }
 
 dyn_test() {
-       [ "${EBUILD_FORCE_TEST}" == "1" ] && rm -f "${PORTAGE_BUILDDIR}/.tested"
+       if [ "${EBUILD_FORCE_TEST}" == "1" ] ; then
+               rm -f "${PORTAGE_BUILDDIR}/.tested"
+               # If USE came from ${T}/environment then it might not have USE=test
+               # like it's supposed to here.
+               ! hasq test ${USE} && export USE="${USE} test"
+       fi
        [ "$(type -t pre_src_test)" == "function" ] && qa_call pre_src_test
        if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ]; then
                vecho ">>> It appears that ${PN} has already been tested; skipping."