From 83b3cdefe3df272d88232d1fdfbb3b6f1783d0d6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 12 Dec 2008 21:51:45 +0000 Subject: =?UTF-8?q?Add=20a=20new=20FEATURES=3Dtest-fail-continue=20value?= =?UTF-8?q?=20which=20causes=20ebuild=20execution=20to=20continue=20after?= =?UTF-8?q?=20the=20test=20phase=20has=20failed.=20Thanks=20to=20Diego=20P?= =?UTF-8?q?etten=C3=B2=20=20for=20the=20suggestion.=20(trun?= =?UTF-8?q?k=20r12214)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/branches/2.1.6/; revision=12245 --- man/make.conf.5 | 6 ++++++ pym/_emerge/__init__.py | 4 ++++ pym/portage/__init__.py | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/man/make.conf.5 b/man/make.conf.5 index b5c201ec5..07ecba6f8 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -334,6 +334,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 418acebb7..aa944d267 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2908,6 +2908,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 582b65417..48f0b69e6 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4493,6 +4493,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 = { -- cgit v1.2.3-1-g7c22