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}"
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