summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-16 18:16:56 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-16 18:16:56 -0700
commit36c0b4e9cb43196c7d1a2701c8f052f64f6ac504 (patch)
tree2159c3e224a37601ecadc4a88ae189fea83491ad
parentc9f7930883d62fc26af72bff0c4623db0bbc8221 (diff)
downloadportage-36c0b4e9cb43196c7d1a2701c8f052f64f6ac504.tar.gz
portage-36c0b4e9cb43196c7d1a2701c8f052f64f6ac504.tar.bz2
portage-36c0b4e9cb43196c7d1a2701c8f052f64f6ac504.zip
Add a MiscFunctionsProcess test.
-rw-r--r--pym/portage/tests/ebuild/test_doebuild_spawn.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage/tests/ebuild/test_doebuild_spawn.py b/pym/portage/tests/ebuild/test_doebuild_spawn.py
index 6e5c28a36..76d114ddf 100644
--- a/pym/portage/tests/ebuild/test_doebuild_spawn.py
+++ b/pym/portage/tests/ebuild/test_doebuild_spawn.py
@@ -1,7 +1,6 @@
# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import sys
from portage import os
from portage import _python_interpreter
from portage import _shell_quote
@@ -11,6 +10,7 @@ from portage.package.ebuild.doebuild import spawn as doebuild_spawn
from portage.tests import TestCase
from portage.tests.resolver.ResolverPlayground import ResolverPlayground
from _emerge.EbuildPhase import EbuildPhase
+from _emerge.MiscFunctionsProcess import MiscFunctionsProcess
from _emerge.Package import Package
from _emerge.TaskScheduler import TaskScheduler
@@ -58,11 +58,19 @@ class DoebuildSpawnTestCase(TestCase):
self.assertEqual(rval, os.EX_OK)
task_scheduler = TaskScheduler()
- ebuild_phase = EbuildPhase(background=True,
+ ebuild_phase = EbuildPhase(background=False,
phase=phase, scheduler=task_scheduler.sched_iface,
settings=settings)
task_scheduler.add(ebuild_phase)
task_scheduler.run()
self.assertEqual(ebuild_phase.returncode, os.EX_OK)
+
+ task_scheduler = TaskScheduler()
+ ebuild_phase = MiscFunctionsProcess(background=False,
+ commands=['success_hooks'],
+ scheduler=task_scheduler.sched_iface, settings=settings)
+ task_scheduler.add(ebuild_phase)
+ task_scheduler.run()
+ self.assertEqual(ebuild_phase.returncode, os.EX_OK)
finally:
playground.cleanup()