From 9ba323ca58c1ab47f20b1ca46073e5e938997385 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 21 May 2010 19:01:44 -0700 Subject: Bug #320755 - Make sure src_test only runs once when ebuild(1) is used to explicitly run the test phase along with other phases. --- bin/ebuild.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'bin') 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}" -- cgit v1.2.3-1-g7c22