summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-05-21 19:01:44 -0700
committerZac Medico <zmedico@gentoo.org>2010-05-21 19:01:44 -0700
commit9ba323ca58c1ab47f20b1ca46073e5e938997385 (patch)
tree4a933e84880d5d76cce3c03f5174269c951e9ee9
parentb4f474b4ffac07f9059a8a1a070c4145458321d9 (diff)
downloadportage-9ba323ca58c1ab47f20b1ca46073e5e938997385.tar.gz
portage-9ba323ca58c1ab47f20b1ca46073e5e938997385.tar.bz2
portage-9ba323ca58c1ab47f20b1ca46073e5e938997385.zip
Bug #320755 - Make sure src_test only runs once when ebuild(1)
is used to explicitly run the test phase along with other phases.
-rwxr-xr-xbin/ebuild.sh13
1 files changed, 8 insertions, 5 deletions
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}"