summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-01-09 01:21:19 +0000
committerMarius Mauch <genone@gentoo.org>2007-01-09 01:21:19 +0000
commit9b7308d1554bfa7f9ed2fa0b5b6415d31989309a (patch)
treee8ee2534151fccac61ee3cce0e79f93217e857a1 /bin
parent6878038bab3ec42f517fd14a3fed63fe6ec42c30 (diff)
downloadportage-9b7308d1554bfa7f9ed2fa0b5b6415d31989309a.tar.gz
portage-9b7308d1554bfa7f9ed2fa0b5b6415d31989309a.tar.bz2
portage-9b7308d1554bfa7f9ed2fa0b5b6415d31989309a.zip
Always run src_test when calling 'ebuild foo test'
svn path=/main/trunk/; revision=5487
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild4
-rwxr-xr-xbin/ebuild.sh3
2 files changed, 6 insertions, 1 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 55bb0fb81..f5c8d1f69 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -126,6 +126,10 @@ def discard_digests(myebuild, mysettings, mydbapi):
for arg in pargs:
try:
tmpsettings = portage.config(clone=portage.settings)
+ if arg == "test" and not "test" in tmpsettings.features:
+ print "Forcing test."
+ tmpsettings["EBUILD_FORCE_TEST"] = "1"
+ tmpsettings.backupenv["EBUILD_FORCE_TEST"] = "1"
if arg == "digest" and force:
discard_digests(ebuild, tmpsettings, portage.portdb)
a = portage.doebuild(ebuild, arg, portage.root, tmpsettings,
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 1a9381682..5abc44bf9 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1010,6 +1010,7 @@ dyn_compile() {
}
dyn_test() {
+ [ "${EBUILD_FORCE_TEST}" == "1" ] && rm -f "${PORTAGE_BUILDDIR}/.tested"
[ "$(type -t pre_src_test)" == "function" ] && qa_call pre_src_test
if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ]; then
vecho ">>> It appears that ${PN} has already been tested; skipping."
@@ -1020,7 +1021,7 @@ dyn_test() {
if [ -d "${S}" ]; then
cd "${S}"
fi
- if ! hasq test $FEATURES; then
+ if ! hasq test $FEATURES && [ "${EBUILD_FORCE_TEST}" != "1" ]; then
vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
elif hasq test $RESTRICT; then
ewarn "Skipping make test/check due to ebuild restriction."