diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-09-01 00:17:36 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-09-01 00:17:36 -0700 |
commit | 806b8431c600bbeb7831a4ec200a599d215cd4e0 (patch) | |
tree | e5d219ed9a3b62115ec4272dab18e5f98951ad88 /pym/portage/tests/emerge | |
parent | 20af2c9b0e141029ded40d2ac24c4a09042d8b05 (diff) | |
download | portage-806b8431c600bbeb7831a4ec200a599d215cd4e0.tar.gz portage-806b8431c600bbeb7831a4ec200a599d215cd4e0.tar.bz2 portage-806b8431c600bbeb7831a4ec200a599d215cd4e0.zip |
tests/emerge: install some files
Diffstat (limited to 'pym/portage/tests/emerge')
-rw-r--r-- | pym/portage/tests/emerge/test_simple.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index f1a1df63c..99fc96cba 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -17,12 +17,24 @@ class SimpleEmergeTestCase(TestCase): def testSimple(self): + install_something = """ +S="${WORKDIR}" +src_install() { + einfo "installing something..." + # TODO: Add prefix support to shell code/helpers, so we + # can use things like dodir and doins here. + mkdir -p "${ED}"/usr/lib/${P} + echo "blah blah blah" > "${ED}"/usr/lib/${P}/regular-file +} +""" + ebuilds = { "dev-libs/A-1": { "EAPI" : "4", "IUSE" : "+flag", "KEYWORDS": "x86", "LICENSE": "GPL-2", + "MISC_CONTENT": install_something, "RDEPEND": "flag? ( dev-libs/B[flag] )", }, "dev-libs/B-1": { @@ -30,6 +42,7 @@ class SimpleEmergeTestCase(TestCase): "IUSE" : "+flag", "KEYWORDS": "x86", "LICENSE": "GPL-2", + "MISC_CONTENT": install_something, }, } @@ -122,6 +135,8 @@ class SimpleEmergeTestCase(TestCase): "INFOPATH" : "", "PATH" : path, "PORTAGE_GRPNAME" : os.environ["PORTAGE_GRPNAME"], + "PORTAGE_INST_GID" : str(portage.data.portage_gid), + "PORTAGE_INST_UID" : str(portage.data.portage_uid), "PORTAGE_TMPDIR" : portage_tmpdir, "PORTAGE_USERNAME" : os.environ["PORTAGE_USERNAME"], "PORTDIR" : portdir, |