From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
Date: Mon, 17 Oct 2011 01:47:00 +0000 (UTC) [thread overview]
Message-ID: <c2025582e2abce8422ed6a191202fb899820b525.zmedico@gentoo> (raw)
commit: c2025582e2abce8422ed6a191202fb899820b525
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 01:46:41 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 01:46:41 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c2025582
tests/emerge: test --regen and --metadata
---
pym/portage/tests/emerge/test_simple.py | 42 +++++++++++++++++++++++++++---
1 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 70d4918..ccaf580 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -126,6 +126,10 @@ src_install() {
trees = playground.trees
root = playground.root
portdb = trees[root]["porttree"].dbapi
+ portdir = settings["PORTDIR"]
+ var_cache_edb = os.path.join(eprefix, "var", "cache", "edb")
+ cachedir = os.path.join(var_cache_edb, "dep")
+ cachedir_pregen = os.path.join(portdir, "metadata", "cache")
portage_python = portage._python_interpreter
ebuild_cmd = (portage_python, "-Wd",
@@ -147,6 +151,11 @@ src_install() {
regenworld_cmd = (portage_python, "-Wd",
os.path.join(PORTAGE_BIN_PATH, "regenworld"))
+ rm_binary = find_binary("rm")
+ self.assertEqual(rm_binary is None, False,
+ "rm command not found")
+ rm_cmd = (rm_binary,)
+
egencache_extra_args = []
if self._have_python_xml():
egencache_extra_args.append("--update-use-local-desc")
@@ -156,10 +165,27 @@ src_install() {
test_commands = (
env_update_cmd,
- egencache_cmd + ("--update",) + tuple(egencache_extra_args),
emerge_cmd + ("--version",),
emerge_cmd + ("--info",),
emerge_cmd + ("--info", "--verbose"),
+ rm_cmd + ("-rf", cachedir),
+ rm_cmd + ("-rf", cachedir_pregen),
+ emerge_cmd + ("--regen",),
+ rm_cmd + ("-rf", cachedir),
+ ({"FEATURES" : "metadata-transfer"},) + \
+ emerge_cmd + ("--regen",),
+ rm_cmd + ("-rf", cachedir),
+ ({"FEATURES" : "metadata-transfer parse-eapi-ebuild-head"},) + \
+ emerge_cmd + ("--regen",),
+ rm_cmd + ("-rf", cachedir),
+ egencache_cmd + ("--update",) + tuple(egencache_extra_args),
+ ({"FEATURES" : "metadata-transfer"},) + \
+ emerge_cmd + ("--metadata",),
+ rm_cmd + ("-rf", cachedir),
+ ({"FEATURES" : "metadata-transfer"},) + \
+ emerge_cmd + ("--metadata",),
+ emerge_cmd + ("--metadata",),
+ rm_cmd + ("-rf", cachedir),
emerge_cmd + ("--pretend", "dev-libs/A"),
ebuild_cmd + (test_ebuild, "manifest", "clean", "package", "merge"),
emerge_cmd + ("--pretend", "--tree", "--complete-graph", "dev-libs/A"),
@@ -193,10 +219,8 @@ src_install() {
pkgdir = os.path.join(eprefix, "pkgdir")
fake_bin = os.path.join(eprefix, "bin")
portage_tmpdir = os.path.join(eprefix, "var", "tmp", "portage")
- portdir = settings["PORTDIR"]
profile_path = settings.profile_path
user_config_dir = os.path.join(os.sep, eprefix, USER_CONFIG_PATH)
- var_cache_edb = os.path.join(eprefix, "var", "cache", "edb")
features = []
if not portage.process.sandbox_capable:
@@ -250,7 +274,8 @@ src_install() {
}
updates_dir = os.path.join(portdir, "profiles", "updates")
- dirs = [distdir, fake_bin, portage_tmpdir, updates_dir,
+ dirs = [cachedir, cachedir_pregen, distdir, fake_bin,
+ portage_tmpdir, updates_dir,
user_config_dir, var_cache_edb]
true_symlinks = ["chown", "chgrp"]
true_binary = find_binary("true")
@@ -289,8 +314,15 @@ move dev-util/git dev-vcs/git
for args in test_commands:
+ if isinstance(args[0], dict):
+ local_env = env.copy()
+ local_env.update(args[0])
+ args = args[1:]
+ else:
+ local_env = env
+
proc = subprocess.Popen(args,
- env=env, stdout=stdout)
+ env=local_env, stdout=stdout)
if debug:
proc.wait()
next reply other threads:[~2011-10-17 1:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 1:47 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-01 17:52 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/ Zac Medico
2013-06-20 0:01 Zac Medico
2013-03-21 7:51 Zac Medico
2012-07-05 8:45 Zac Medico
2011-12-16 23:29 Zac Medico
2011-11-08 16:13 Zac Medico
2011-10-25 6:28 Zac Medico
2011-10-25 0:16 Zac Medico
2011-10-23 22:24 Zac Medico
2011-10-23 22:17 Zac Medico
2011-10-23 22:16 Zac Medico
2011-09-26 19:42 Zac Medico
2011-09-05 23:26 Zac Medico
2011-09-05 23:22 Zac Medico
2011-09-05 23:06 Zac Medico
2011-09-05 21:43 Zac Medico
2011-09-05 21:28 Zac Medico
2011-09-04 17:22 Zac Medico
2011-09-02 6:34 Zac Medico
2011-09-02 2:51 Zac Medico
2011-09-02 1:47 Zac Medico
2011-09-01 6:55 Zac Medico
2011-08-30 20:47 Zac Medico
2011-08-30 2:13 Zac Medico
2011-08-29 18:25 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2025582e2abce8422ed6a191202fb899820b525.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox