From: Zac Medico Date: Sat, 22 May 2010 02:01:44 +0000 (-0700) Subject: Bug #320755 - Make sure src_test only runs once when ebuild(1) X-Git-Tag: v2.2_rc68~583 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ba323ca58c1ab47f20b1ca46073e5e938997385;p=portage.git Bug #320755 - Make sure src_test only runs once when ebuild(1) is used to explicitly run the test phase along with other phases. --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 43f310cb9..d7ff593a4 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -980,16 +980,19 @@ dyn_compile() { } dyn_test() { + + if [[ -e $PORTAGE_BUILDDIR/.tested ]] ; then + vecho ">>> It appears that ${PN} has already been tested; skipping." + vecho ">>> Remove '${PORTAGE_BUILDDIR}/.tested' to force test." + return + fi + 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 - if [[ -e $PORTAGE_BUILDDIR/.tested ]] ; then - vecho ">>> It appears that ${PN} has already been tested; skipping." - return - fi + trap "abort_test" SIGINT SIGQUIT if [ -d "${S}" ]; then cd "${S}"