Tweak the EbuildSpawnProcess test and add comments.
authorZac Medico <zmedico@gentoo.org>
Tue, 17 Aug 2010 14:38:13 +0000 (07:38 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 17 Aug 2010 14:38:13 +0000 (07:38 -0700)
pym/portage/tests/ebuild/test_doebuild_spawn.py

index 32123e2790e0cb584cba4db64072e7398a31ed31..c8a8095d3161ff7d95157bb2906cc8cf353161bd 100644 (file)
@@ -19,7 +19,7 @@ class DoebuildSpawnTestCase(TestCase):
        Invoke portage.package.ebuild.doebuild.spawn() with a
        minimal environment. This gives coverage to some of
        the ebuild execution internals, like ebuild.sh,
-       EbuildSpawnProcess, and EbuildIpcDaemon.
+       AbstractEbuildProcess, and EbuildIpcDaemon.
        """
 
        def testDoebuildSpawn(self):
@@ -54,8 +54,14 @@ class DoebuildSpawnTestCase(TestCase):
 
                        task_scheduler = TaskScheduler()
                        for phase in ('_internal_test',):
-                               rval = doebuild_spawn(
-                                       "%s %s" % (_shell_quote(EBUILD_SH_BINARY), phase),
+
+                               # Test EbuildSpawnProcess by calling doebuild.spawn() with
+                               # returnpid=False. This case is no longer used by portage
+                               # internals since EbuildPhase is used instead and that passes
+                               # returnpid=True to doebuild.spawn().
+                               rval = doebuild_spawn("%s %s" % (_shell_quote(
+                                       os.path.join(settings["PORTAGE_BIN_PATH"],
+                                       os.path.basename(EBUILD_SH_BINARY))), phase),
                                        settings, free=1)
                                self.assertEqual(rval, os.EX_OK)