From 41de10c78419006249c73e8eb52df1aab86f6d9f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 18 May 2013 16:24:58 -0700 Subject: [PATCH] Fix RESTRICT=test message for bug #469332. --- bin/phase-functions.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index ea717fe7c..6d75ef10f 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -461,12 +461,6 @@ __dyn_test() { return fi - 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" - fi - trap "__abort_test" SIGINT SIGQUIT if [ -d "${S}" ]; then cd "${S}" @@ -474,12 +468,22 @@ __dyn_test() { cd "${WORKDIR}" fi - if ! has test $FEATURES && [ "${EBUILD_FORCE_TEST}" != "1" ]; then - __vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}" - elif has test $RESTRICT; then + if has test ${RESTRICT} ; then einfo "Skipping make test/check due to ebuild restriction." - __vecho ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}" + __vecho ">>> Test phase [disabled because of RESTRICT=test]: ${CATEGORY}/${PF}" + + # If ${EBUILD_FORCE_TEST} == 1 and FEATURES came from ${T}/environment + # then it might not have FEATURES=test like it's supposed to here. + elif [[ ${EBUILD_FORCE_TEST} != 1 ]] && ! has test ${FEATURES} ; then + __vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}" else + # If ${EBUILD_FORCE_TEST} == 1 and USE came from ${T}/environment + # then it might not have USE=test like it's supposed to here. + if [[ ${EBUILD_FORCE_TEST} == 1 && test =~ ${PORTAGE_IUSE} ]] && \ + ! has test ${USE} ; then + export USE="${USE} test" + fi + local save_sp=${SANDBOX_PREDICT} addpredict / __ebuild_phase pre_src_test -- 2.26.2