summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-11-01 19:17:19 -0700
committerZac Medico <zmedico@gentoo.org>2011-11-01 19:17:19 -0700
commit1af0c40b1300651ca03a7509f49f152c1e595736 (patch)
tree6d967ae665bf98c9ba8219fb812a9678a127a57e /pym/portage/tests/emerge
parent889853171246ab1063bb5015caf41a41761f5424 (diff)
downloadportage-1af0c40b1300651ca03a7509f49f152c1e595736.tar.gz
portage-1af0c40b1300651ca03a7509f49f152c1e595736.tar.bz2
portage-1af0c40b1300651ca03a7509f49f152c1e595736.zip
Add EPREFIX and ED support in all ebuild helpers.
This allows our prefix tests to use helpers like insinto, doins, and dosym.
Diffstat (limited to 'pym/portage/tests/emerge')
-rw-r--r--pym/portage/tests/emerge/test_simple.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 7ed679d62..d108959ca 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -36,11 +36,10 @@ pkg_pretend() {
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} || die
- echo "blah blah blah" > "${ED}"/usr/lib/${P}/regular-file || die
- ln -s regular-file "${ED}"/usr/lib/${P}/symlink || die
+ insinto /usr/lib/${P}
+ echo "blah blah blah" > "${T}"/regular-file
+ doins "${T}"/regular-file
+ dosym regular-file /usr/lib/${P}/symlink || die
# Test code for bug #381629, using a copyright symbol encoded with latin-1.
# We use $(printf "\\xa9") rather than $'\\xa9', since printf apparently
@@ -48,10 +47,11 @@ src_install() {
# some conditions. TODO: Find out why it transforms to \\xef\\xbf\\xbd when
# running tests for Python 3.2 (even though it's bash that is ultimately
# responsible for performing the transformation).
- local latin_1_dir=${ED}/usr/lib/${P}/latin-1-$(printf "\\xa9")-directory
- mkdir "${latin_1_dir}"
- echo "blah blah blah" > ${latin_1_dir}/latin-1-$(printf "\\xa9")-regular-file || die
- ln -s latin-1-$(printf "\\xa9")-regular-file ${latin_1_dir}/latin-1-$(printf "\\xa9")-symlink || die
+ local latin_1_dir=/usr/lib/${P}/latin-1-$(printf "\\xa9")-directory
+ insinto "${latin_1_dir}"
+ echo "blah blah blah" > "${T}"/latin-1-$(printf "\\xa9")-regular-file || die
+ doins "${T}"/latin-1-$(printf "\\xa9")-regular-file
+ dosym latin-1-$(printf "\\xa9")-regular-file ${latin_1_dir}/latin-1-$(printf "\\xa9")-symlink || die
}
pkg_config() {
@@ -80,6 +80,11 @@ pkg_info() {
"LICENSE": "GPL-2",
"MISC_CONTENT": install_something,
},
+ "virtual/foo-0": {
+ "EAPI" : "4",
+ "KEYWORDS": "x86",
+ "LICENSE": "GPL-2",
+ },
}
installed = {
@@ -201,6 +206,7 @@ pkg_info() {
emerge_cmd + ("--metadata",),
emerge_cmd + ("--metadata",),
rm_cmd + ("-rf", cachedir),
+ emerge_cmd + ("--oneshot", "virtual/foo"),
emerge_cmd + ("--pretend", "dev-libs/A"),
ebuild_cmd + (test_ebuild, "manifest", "clean", "package", "merge"),
emerge_cmd + ("--pretend", "--tree", "--complete-graph", "dev-libs/A"),