diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2010-08-16 21:22:14 +0200 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2010-08-16 21:22:14 +0200 |
commit | b7bc7fc59c1377337ab1cf1df72d417d66b72302 (patch) | |
tree | 9bf84ce7b4dfd599bb0ab6f2f70270443a028ce6 /pym/portage/tests/ebuild | |
parent | Fix typos in comments. (diff) | |
download | portage-b7bc7fc59c1377337ab1cf1df72d417d66b72302.tar.gz portage-b7bc7fc59c1377337ab1cf1df72d417d66b72302.tar.bz2 portage-b7bc7fc59c1377337ab1cf1df72d417d66b72302.zip |
Expand sys.executable earlier, so that change of sys.executable symlink
between starting main Portage process and starting ebuild.sh process
doesn't affect ebuild.sh subprocesses.
Diffstat (limited to 'pym/portage/tests/ebuild')
-rw-r--r-- | pym/portage/tests/ebuild/test_doebuild_spawn.py | 3 | ||||
-rw-r--r-- | pym/portage/tests/ebuild/test_ipc_daemon.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/tests/ebuild/test_doebuild_spawn.py b/pym/portage/tests/ebuild/test_doebuild_spawn.py index 8d40bf7ea..6e5c28a36 100644 --- a/pym/portage/tests/ebuild/test_doebuild_spawn.py +++ b/pym/portage/tests/ebuild/test_doebuild_spawn.py @@ -3,6 +3,7 @@ import sys from portage import os +from portage import _python_interpreter from portage import _shell_quote from portage.const import EBUILD_SH_BINARY from portage.package.ebuild.config import config @@ -40,7 +41,7 @@ class DoebuildSpawnTestCase(TestCase): metadata=metadata, root_config=root_config, type_name='ebuild') settings.setcpv(pkg) - settings['PORTAGE_PYTHON'] = os.path.realpath(sys.executable) + settings['PORTAGE_PYTHON'] = _python_interpreter settings['PORTAGE_BUILDDIR'] = os.path.join( settings['PORTAGE_TMPDIR'], cpv) settings['T'] = os.path.join( diff --git a/pym/portage/tests/ebuild/test_ipc_daemon.py b/pym/portage/tests/ebuild/test_ipc_daemon.py index a17760394..0a9a9a929 100644 --- a/pym/portage/tests/ebuild/test_ipc_daemon.py +++ b/pym/portage/tests/ebuild/test_ipc_daemon.py @@ -1,10 +1,10 @@ # Copyright 2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -import sys import shutil import tempfile from portage import os +from portage import _python_interpreter from portage.tests import TestCase from portage.const import PORTAGE_BIN_PATH from portage.const import PORTAGE_PYM_PATH @@ -28,7 +28,7 @@ class IpcDaemonTestCase(TestCase): if 'PORTAGE_GRPNAME' in os.environ: env['PORTAGE_GRPNAME'] = os.environ['PORTAGE_GRPNAME'] - env['PORTAGE_PYTHON'] = os.path.realpath(sys.executable) + env['PORTAGE_PYTHON'] = _python_interpreter env['PORTAGE_BIN_PATH'] = PORTAGE_BIN_PATH env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH env['PORTAGE_BUILDDIR'] = tmpdir |