summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-12 08:53:42 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-12 08:53:42 +0000
commit7cdfd9ddd425ecd357bfa2138b5ee1bc2e2983ef (patch)
treee27dd6de395d21978f220aad5e4d2a5f6adc7019
parent006a77cbca947a09f3fe1054ff260dcb6ed61b93 (diff)
downloadportage-7cdfd9ddd425ecd357bfa2138b5ee1bc2e2983ef.tar.gz
portage-7cdfd9ddd425ecd357bfa2138b5ee1bc2e2983ef.tar.bz2
portage-7cdfd9ddd425ecd357bfa2138b5ee1bc2e2983ef.zip
Add a new FEATURES=test-fail-continue value which causes ebuild execution
to continue after the test phase has failed. Thanks to Diego Pettenò <flameeyes@g.o> for the suggestion. svn path=/main/trunk/; revision=12214
-rw-r--r--man/make.conf.56
-rw-r--r--pym/_emerge/__init__.py4
-rw-r--r--pym/portage/__init__.py5
3 files changed, 15 insertions, 0 deletions
diff --git a/man/make.conf.5 b/man/make.conf.5
index 159217f54..2f71dac1a 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -338,6 +338,12 @@ the package compiled properly. See \fItest\fR in \fBebuild\fR(1)
and \fIsrc_test()\fR in \fBebuild\fR(5). This feature implies the "test"
\fBUSE\fR flag.
.TP
+.B test\-fail\-continue
+If "test" is enabled \fBFEATURES\fR and the test phase of an ebuild fails,
+continue to execute the remaining phases as if the failure had not occurred.
+Note that the test phase for a specific package may be disabled by masking
+the "test" \fBUSE\fR flag in \fBpackage.use.mask\fR (see \fBportage\fR(5)).
+.TP
.B unmerge\-orphans
If a file is not claimed by another package in the same slot and it is not
protected by \fICONFIG_PROTECT\fR, unmerge it even if the modification time or
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index eb1bd3b7a..3f16150e4 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2927,6 +2927,10 @@ class EbuildProcess(SpawnProcess):
self.returncode = portage._doebuild_exit_status_check_and_log(
self.settings, self.phase, self.returncode)
+ if self.phase == "test" and self.returncode != os.EX_OK and \
+ "test-fail-continue" in self.settings.features:
+ self.returncode = os.EX_OK
+
portage._post_phase_userpriv_perms(self.settings)
class EbuildPhase(CompositeTask):
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index cf966195a..fc42bd3af 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4503,6 +4503,11 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
_check_build_log(mysettings)
if phase_retval == os.EX_OK:
phase_retval = _post_src_install_checks(mysettings)
+
+ if mydo == "test" and phase_retval != os.EX_OK and \
+ "test-fail-continue" in mysettings.features:
+ phase_retval = os.EX_OK
+
return phase_retval
_post_phase_cmds = {