commit: d9618cce6ea0dedf198d275eaacea792f28be660 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Mon Jun 12 18:13:46 2017 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Mon Jun 12 18:14:40 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9618cce
dev-python/google-apputils: fix tests Package-Manager: Portage-2.3.6_p7, Repoman-2.3.2_p75 .../google-apputils/files/0.4.2-sh_test-env.patch | 21 +++++++++++++++++++++ .../google-apputils/google-apputils-0.4.2-r2.ebuild | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/dev-python/google-apputils/files/0.4.2-sh_test-env.patch b/dev-python/google-apputils/files/0.4.2-sh_test-env.patch new file mode 100644 index 00000000000..69ebe6278f9 --- /dev/null +++ b/dev-python/google-apputils/files/0.4.2-sh_test-env.patch @@ -0,0 +1,21 @@ +Prevent the environment from being clobbered during sh_test + +diff --git a/tests/sh_test.py b/tests/sh_test.py +index ab41055..d1b08c6 100644 +--- a/tests/sh_test.py ++++ b/tests/sh_test.py +@@ -29,12 +29,8 @@ class ShellScriptTests(basetest.TestCase): + path_with_python = ':'.join(( + os.path.dirname(sys.executable), os.environ.get('PATH'))) + +- env = { +- 'PATH': path_with_python, +- # Setuptools puts dependency eggs in our path, so propagate that. +- 'PYTHONPATH': os.pathsep.join(sys.path), +- 'TEST_TMPDIR': FLAGS.test_tmpdir, +- } ++ env = os.environ.copy() ++ env['TEST_TMPDIR'] = FLAGS.test_tmpdir + p = subprocess.Popen(sh_test_path, cwd=tests_path, env=env) + self.assertEqual(0, p.wait()) + diff --git a/dev-python/google-apputils/google-apputils-0.4.2-r2.ebuild b/dev-python/google-apputils/google-apputils-0.4.2-r2.ebuild index e1fb178d2d2..3b853e95062 100644 --- a/dev-python/google-apputils/google-apputils-0.4.2-r2.ebuild +++ b/dev-python/google-apputils/google-apputils-0.4.2-r2.ebuild @@ -25,6 +25,10 @@ RDEPEND=" DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] test? ( ${RDEPEND} dev-python/mox[${PYTHON_USEDEP}] )" +PATCHES=( + "${FILESDIR}/0.4.2-sh_test-env.patch" +) + src_unpack() { default chmod -R a+rX,u+w,g-w,o-w ${P} || die