public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-08-29 18:25 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-08-29 18:25 UTC (permalink / raw
  To: gentoo-commits

commit:     e49772302478a05a2df6f8fa6d2086cf7ccd2bc7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 29 18:24:15 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 18:25:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e4977230

Fix PORTDIR in emerge tests.

---
 pym/portage/tests/emerge/test_simple.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 2aca3e3..09972ba 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -72,6 +72,7 @@ class SimpleEmergeTestCase(TestCase):
 		distdir = os.path.join(eprefix, "distdir")
 		fake_bin = os.path.join(eprefix, "bin")
 		portage_tmpdir = os.path.join(eprefix, "var", "tmp", "portage")
+		portdir = settings["PORTDIR"]
 		profile_path = settings.profile_path
 		var_cache_edb = os.path.join(eprefix, "var", "cache", "edb")
 
@@ -106,6 +107,7 @@ class SimpleEmergeTestCase(TestCase):
 			"PORTAGE_GRPNAME" : os.environ["PORTAGE_GRPNAME"],
 			"PORTAGE_TMPDIR" : portage_tmpdir,
 			"PORTAGE_USERNAME" : os.environ["PORTAGE_USERNAME"],
+			"PORTDIR" : portdir,
 			"PYTHONPATH" : pythonpath,
 		}
 



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-08-30  2:13 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-08-30  2:13 UTC (permalink / raw
  To: gentoo-commits

commit:     719f41de41ad6f501842b35a09472130e9c11653
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 02:13:21 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 02:13:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=719f41de

tests/emerge: add USE for installed pkgs

---
 pym/portage/tests/emerge/test_simple.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 09972ba..c8f150a 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -40,12 +40,14 @@ class SimpleEmergeTestCase(TestCase):
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
 				"RDEPEND": "flag? ( dev-libs/B[flag] )",
+				"USE": "flag",
 			},
 			"dev-libs/B-1": {
 				"EAPI" : "4",
 				"IUSE" : "+flag",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
+				"USE": "flag",
 			},
 		}
 



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-08-30 20:47 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-08-30 20:47 UTC (permalink / raw
  To: gentoo-commits

commit:     c20dbcadcfb979842617325e89692e47f8a74e20
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 20:46:55 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 20:46:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c20dbcad

tests/emerge: remove unneeded default_args

---
 pym/portage/tests/emerge/test_simple.py |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index b698fca..f6f5ab0 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -51,7 +51,6 @@ class SimpleEmergeTestCase(TestCase):
 			},
 		}
 
-		default_args = ("--package-moves=n",)
 		test_args = (
 			("--version",),
 			("--info",),
@@ -130,8 +129,7 @@ class SimpleEmergeTestCase(TestCase):
 				f.write("*dev-libs/token-system-pkg")
 			for args in test_args:
 				proc = subprocess.Popen([portage._python_interpreter, "-Wd",
-					os.path.join(PORTAGE_BIN_PATH, "emerge")] + \
-					list(default_args) + list(args),
+					os.path.join(PORTAGE_BIN_PATH, "emerge")] + list(args),
 					env=env, stdout=subprocess.PIPE)
 				output = proc.stdout.readlines()
 				proc.wait()



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-01  6:55 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-01  6:55 UTC (permalink / raw
  To: gentoo-commits

commit:     20af2c9b0e141029ded40d2ac24c4a09042d8b05
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 06:55:06 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 06:55:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=20af2c9b

tests/emerge: add some pkgs for depclean

---
 pym/portage/tests/emerge/test_simple.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index f6f5ab0..f1a1df6 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -49,6 +49,21 @@ class SimpleEmergeTestCase(TestCase):
 				"LICENSE": "GPL-2",
 				"USE": "flag",
 			},
+			"dev-libs/depclean-me-1": {
+				"EAPI" : "4",
+				"IUSE" : "",
+				"KEYWORDS": "x86",
+				"LICENSE": "GPL-2",
+				"USE": "",
+			},
+			"app-misc/depclean-me-1": {
+				"EAPI" : "4",
+				"IUSE" : "",
+				"KEYWORDS": "x86",
+				"LICENSE": "GPL-2",
+				"RDEPEND": "dev-libs/depclean-me",
+				"USE": "",
+			},
 		}
 
 		test_args = (
@@ -58,6 +73,7 @@ class SimpleEmergeTestCase(TestCase):
 			("--pretend", "dev-libs/A"),
 			("--pretend", "--tree", "--complete-graph", "dev-libs/A"),
 			("-p", "dev-libs/B"),
+			("--oneshot", "dev-libs/B",),
 			("--oneshot", "dev-libs/A",),
 			("--noreplace", "dev-libs/A",),
 			("--pretend", "--depclean", "--verbose", "dev-libs/B"),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-02  1:47 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-02  1:47 UTC (permalink / raw
  To: gentoo-commits

commit:     6feb5a12ed3b501ea5f65dad14d4026105469ad9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 01:43:31 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 01:43:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6feb5a12

tests/emerge: enable arbitrary commands

This will allow us to throw in some test commands for various helpers
related to emerge (things like etc-update, dispatch-conf, quickpkg,
portageq, ebuild, and emaint).

---
 pym/portage/tests/emerge/test_simple.py |   40 +++++++++++++++++--------------
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 99fc96c..9c37699 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -79,21 +79,25 @@ src_install() {
 			},
 		}
 
-		test_args = (
-			("--version",),
-			("--info",),
-			("--info", "--verbose"),
-			("--pretend", "dev-libs/A"),
-			("--pretend", "--tree", "--complete-graph", "dev-libs/A"),
-			("-p", "dev-libs/B"),
-			("--oneshot", "dev-libs/B",),
-			("--oneshot", "dev-libs/A",),
-			("--noreplace", "dev-libs/A",),
-			("--pretend", "--depclean", "--verbose", "dev-libs/B"),
-			("--pretend", "--depclean",),
-			("--depclean",),
-			("--unmerge", "--quiet", "dev-libs/A"),
-			("-C", "--quiet", "dev-libs/B"),
+		portage_python = portage._python_interpreter
+		emerge_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "emerge"))
+
+		test_commands = (
+			emerge_cmd + ("--version",),
+			emerge_cmd + ("--info",),
+			emerge_cmd + ("--info", "--verbose"),
+			emerge_cmd + ("--pretend", "dev-libs/A"),
+			emerge_cmd + ("--pretend", "--tree", "--complete-graph", "dev-libs/A"),
+			emerge_cmd + ("-p", "dev-libs/B"),
+			emerge_cmd + ("--oneshot", "dev-libs/B",),
+			emerge_cmd + ("--oneshot", "dev-libs/A",),
+			emerge_cmd + ("--noreplace", "dev-libs/A",),
+			emerge_cmd + ("--pretend", "--depclean", "--verbose", "dev-libs/B"),
+			emerge_cmd + ("--pretend", "--depclean",),
+			emerge_cmd + ("--depclean",),
+			emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"),
+			emerge_cmd + ("-C", "--quiet", "dev-libs/B"),
 		)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
@@ -137,6 +141,7 @@ src_install() {
 			"PORTAGE_GRPNAME" : os.environ["PORTAGE_GRPNAME"],
 			"PORTAGE_INST_GID" : str(portage.data.portage_gid),
 			"PORTAGE_INST_UID" : str(portage.data.portage_uid),
+			"PORTAGE_PYTHON" : portage_python,
 			"PORTAGE_TMPDIR" : portage_tmpdir,
 			"PORTAGE_USERNAME" : os.environ["PORTAGE_USERNAME"],
 			"PORTDIR" : portdir,
@@ -158,9 +163,8 @@ src_install() {
 			# non-empty system set keeps --depclean quiet
 			with open(os.path.join(profile_path, "packages"), 'w') as f:
 				f.write("*dev-libs/token-system-pkg")
-			for args in test_args:
-				proc = subprocess.Popen([portage._python_interpreter, "-Wd",
-					os.path.join(PORTAGE_BIN_PATH, "emerge")] + list(args),
+			for args in test_commands:
+				proc = subprocess.Popen(args,
 					env=env, stdout=subprocess.PIPE)
 				output = proc.stdout.readlines()
 				proc.wait()



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-02  2:51 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-02  2:51 UTC (permalink / raw
  To: gentoo-commits

commit:     a9a50ee57b7fe7a85d7ee01f686e3572c3a89d3a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 02:50:42 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 02:50:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a9a50ee5

tests/emerge: test binary packages and emaint

---
 pym/portage/tests/emerge/test_simple.py |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 9c37699..3c3f3ec 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -82,6 +82,10 @@ src_install() {
 		portage_python = portage._python_interpreter
 		emerge_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "emerge"))
+		emaint_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "emaint"))
+		quickpkg_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "quickpkg"))
 
 		test_commands = (
 			emerge_cmd + ("--version",),
@@ -90,12 +94,17 @@ src_install() {
 			emerge_cmd + ("--pretend", "dev-libs/A"),
 			emerge_cmd + ("--pretend", "--tree", "--complete-graph", "dev-libs/A"),
 			emerge_cmd + ("-p", "dev-libs/B"),
-			emerge_cmd + ("--oneshot", "dev-libs/B",),
+			emerge_cmd + ("-B", "dev-libs/B",),
+			emerge_cmd + ("--oneshot", "--usepkg", "dev-libs/B",),
 			emerge_cmd + ("--oneshot", "dev-libs/A",),
 			emerge_cmd + ("--noreplace", "dev-libs/A",),
 			emerge_cmd + ("--pretend", "--depclean", "--verbose", "dev-libs/B"),
 			emerge_cmd + ("--pretend", "--depclean",),
 			emerge_cmd + ("--depclean",),
+			quickpkg_cmd + ("dev-libs/A",),
+			emerge_cmd + ("--usepkgonly", "dev-libs/A"),
+			emaint_cmd + ("--check", "all"),
+			emaint_cmd + ("--fix", "all"),
 			emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"),
 			emerge_cmd + ("-C", "--quiet", "dev-libs/B"),
 		)
@@ -104,6 +113,7 @@ src_install() {
 		settings = playground.settings
 		eprefix = settings["EPREFIX"]
 		distdir = os.path.join(eprefix, "distdir")
+		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"]
@@ -138,6 +148,7 @@ src_install() {
 			"INFODIR" : "",
 			"INFOPATH" : "",
 			"PATH" : path,
+			"PKGDIR" : pkgdir,
 			"PORTAGE_GRPNAME" : os.environ["PORTAGE_GRPNAME"],
 			"PORTAGE_INST_GID" : str(portage.data.portage_gid),
 			"PORTAGE_INST_UID" : str(portage.data.portage_uid),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-02  6:34 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-02  6:34 UTC (permalink / raw
  To: gentoo-commits

commit:     2f43793ee2d3103b2841bc398da5b04e781f36fd
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 06:34:06 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 06:34:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2f43793e

tests/emerge: disable unmerge delays

---
 pym/portage/tests/emerge/test_simple.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 3c3f3ec..acd97eb 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -144,7 +144,9 @@ src_install() {
 
 		env = {
 			"__PORTAGE_TEST_EPREFIX" : eprefix,
+			"CLEAN_DELAY" : "0",
 			"DISTDIR" : distdir,
+			"EMERGE_WARNING_DELAY" : "0",
 			"INFODIR" : "",
 			"INFOPATH" : "",
 			"PATH" : path,



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-04 17:22 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-04 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     8b977710e7725d395d4d970d17a2d5192df86bbc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  4 17:21:57 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Sep  4 17:21:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8b977710

tests/emerge: auto-disable sandbox if necessary

---
 pym/portage/tests/emerge/test_simple.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index cfb6cae..1afa047 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -188,6 +188,12 @@ src_install() {
 			"PYTHONPATH" : pythonpath,
 		}
 
+		features = []
+		if not portage.process.sandbox_capable:
+			features.append("-sandbox")
+		if features:
+			env["FEATURES"] = " ".join(features)
+
 		dirs = [distdir, fake_bin, portage_tmpdir, var_cache_edb]
 		true_symlinks = ["chown", "chgrp"]
 		true_binary = find_binary("true")



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-05 21:28 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-05 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     1843d7f56d682003b09189c142899b2550427a28
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  5 21:27:35 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 21:27:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1843d7f5

tests/emerge: test directory with latin-1 enc

---
 pym/portage/tests/emerge/test_simple.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 1afa047..00c395d 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -33,8 +33,10 @@ 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).
-	echo "blah blah blah" > "${ED}"/usr/lib/${P}/latin-1-$(printf "\\xa9")-regular-file || die
-	ln -s latin-1-$(printf "\\xa9")-regular-file "${ED}"/usr/lib/${P}/latin-1-$(printf "\\xa9")-symlink || die
+	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
 }
 """
 



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-05 21:43 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-05 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     c39406adff994d6483a08edf59c9bf6b84191f68
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  5 21:43:42 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 21:43:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c39406ad

tests/emerge: add a debug mode that shows stdout

---
 pym/portage/tests/emerge/test_simple.py |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 00c395d..20cfa8f 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -17,6 +17,8 @@ class SimpleEmergeTestCase(TestCase):
 
 	def testSimple(self):
 
+		debug = False
+
 		install_something = """
 S="${WORKDIR}"
 src_install() {
@@ -214,15 +216,30 @@ src_install() {
 			for cp, xml_data in metadata_xml_files:
 				with open(os.path.join(portdir, cp, "metadata.xml"), 'w') as f:
 					f.write(playground.metadata_xml_template % xml_data)
+
+			if debug:
+				# The subprocess inherits both stdout and stderr, for
+				# debugging purposes.
+				stdout = None
+			else:
+				# The subprocess inherits stderr so that any warnings
+				# triggered by python -Wd will be visible.
+				stdout = subprocess.PIPE
+
 			for args in test_commands:
+
 				proc = subprocess.Popen(args,
-					env=env, stdout=subprocess.PIPE)
-				output = proc.stdout.readlines()
-				proc.wait()
-				proc.stdout.close()
-				if proc.returncode != os.EX_OK:
-					for line in output:
-						sys.stderr.write(_unicode_decode(line))
+					env=env, stdout=stdout)
+
+				if debug:
+					proc.wait()
+				else:
+					output = proc.stdout.readlines()
+					proc.wait()
+					proc.stdout.close()
+					if proc.returncode != os.EX_OK:
+						for line in output:
+							sys.stderr.write(_unicode_decode(line))
 
 				self.assertEqual(os.EX_OK, proc.returncode,
 					"emerge failed with args %s" % (args,))



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-05 23:06 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-05 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     b2607fa29ce49e08b4957babce1fb1204ca5a1ad
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  5 23:06:44 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 23:06:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b2607fa2

tests/emerge: test portageq

---
 pym/portage/tests/emerge/test_simple.py |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 3f7a3be..62cb46c 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -118,6 +118,12 @@ src_install() {
 			),
 		)
 
+		playground = ResolverPlayground(
+			ebuilds=ebuilds, installed=installed, debug=debug)
+		settings = playground.settings
+		eprefix = settings["EPREFIX"]
+		eroot = settings["EROOT"]
+
 		portage_python = portage._python_interpreter
 		egencache_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "egencache"))
@@ -125,6 +131,8 @@ src_install() {
 			os.path.join(PORTAGE_BIN_PATH, "emerge"))
 		emaint_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "emaint"))
+		portageq_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "portageq"))
 		quickpkg_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "quickpkg"))
 
@@ -151,13 +159,18 @@ src_install() {
 			emerge_cmd + ("--usepkgonly", "dev-libs/A"),
 			emaint_cmd + ("--check", "all"),
 			emaint_cmd + ("--fix", "all"),
+			portageq_cmd + ("match", "/", "dev-libs/A"),
+			portageq_cmd + ("best_visible", "/", "dev-libs/A"),
+			portageq_cmd + ("best_visible", "/", "binary", "dev-libs/A"),
+			portageq_cmd + ("contents", "/", "dev-libs/A-1"),
+			portageq_cmd + ("metadata", "/", "ebuild", "dev-libs/A-1", "EAPI", "IUSE", "RDEPEND"),
+			portageq_cmd + ("metadata", "/", "binary", "dev-libs/A-1", "EAPI", "USE", "RDEPEND"),
+			portageq_cmd + ("metadata", "/", "installed", "dev-libs/A-1", "EAPI", "USE", "RDEPEND"),
+			portageq_cmd + ("owners", "/", eroot + "usr"),
 			emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"),
 			emerge_cmd + ("-C", "--quiet", "dev-libs/B"),
 		)
 
-		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
-		settings = playground.settings
-		eprefix = settings["EPREFIX"]
 		distdir = os.path.join(eprefix, "distdir")
 		pkgdir = os.path.join(eprefix, "pkgdir")
 		fake_bin = os.path.join(eprefix, "bin")



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-05 23:22 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-05 23:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d7a07a90a06de61563c6041eebde7a4198b643cf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  5 23:22:11 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 23:22:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d7a07a90

tests/emerge: test fixpackages

---
 pym/portage/tests/emerge/test_simple.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index a3b730b..3024dc6 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -133,6 +133,8 @@ src_install() {
 			os.path.join(PORTAGE_BIN_PATH, "emaint"))
 		env_update_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "env-update"))
+		fixpackages_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "fixpackages"))
 		portageq_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "portageq"))
 		quickpkg_cmd = (portage_python, "-Wd",
@@ -162,6 +164,7 @@ src_install() {
 			emerge_cmd + ("--usepkgonly", "dev-libs/A"),
 			emaint_cmd + ("--check", "all"),
 			emaint_cmd + ("--fix", "all"),
+			fixpackages_cmd,
 			portageq_cmd + ("match", "/", "dev-libs/A"),
 			portageq_cmd + ("best_visible", "/", "dev-libs/A"),
 			portageq_cmd + ("best_visible", "/", "binary", "dev-libs/A"),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-05 23:26 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-05 23:26 UTC (permalink / raw
  To: gentoo-commits

commit:     8ce21665b856e24815274240011a4aa81826113a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  5 23:26:05 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 23:26:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8ce21665

tests/emerge: test regenworld

---
 pym/portage/tests/emerge/test_simple.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 3024dc6..f3c9320 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -139,6 +139,8 @@ src_install() {
 			os.path.join(PORTAGE_BIN_PATH, "portageq"))
 		quickpkg_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "quickpkg"))
+		regenworld_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "regenworld"))
 
 		egencache_extra_args = []
 		if self._have_python_xml():
@@ -165,6 +167,7 @@ src_install() {
 			emaint_cmd + ("--check", "all"),
 			emaint_cmd + ("--fix", "all"),
 			fixpackages_cmd,
+			regenworld_cmd,
 			portageq_cmd + ("match", "/", "dev-libs/A"),
 			portageq_cmd + ("best_visible", "/", "dev-libs/A"),
 			portageq_cmd + ("best_visible", "/", "binary", "dev-libs/A"),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-09-26 19:42 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-09-26 19:42 UTC (permalink / raw
  To: gentoo-commits

commit:     e20dcd3e3c6f0bbe8c3d51bca35080d5a987c42f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 26 19:41:53 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 26 19:41:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e20dcd3e

tests/emerge: call ebuild(1)

---
 pym/portage/tests/emerge/test_simple.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 6810d05..134d889 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -123,8 +123,13 @@ src_install() {
 		settings = playground.settings
 		eprefix = settings["EPREFIX"]
 		eroot = settings["EROOT"]
+		trees = playground.trees
+		root = playground.root
+		portdb = trees[root]["porttree"].dbapi
 
 		portage_python = portage._python_interpreter
+		ebuild_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "ebuild"))
 		egencache_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "egencache"))
 		emerge_cmd = (portage_python, "-Wd",
@@ -146,6 +151,9 @@ src_install() {
 		if self._have_python_xml():
 			egencache_extra_args.append("--update-use-local-desc")
 
+		test_ebuild = portdb.findname("dev-libs/A-1")
+		self.assertFalse(test_ebuild is None)
+
 		test_commands = (
 			env_update_cmd,
 			egencache_cmd + ("--update",) + tuple(egencache_extra_args),
@@ -153,6 +161,7 @@ src_install() {
 			emerge_cmd + ("--info",),
 			emerge_cmd + ("--info", "--verbose"),
 			emerge_cmd + ("--pretend", "dev-libs/A"),
+			ebuild_cmd + (test_ebuild, "manifest", "clean", "package", "merge"),
 			emerge_cmd + ("--pretend", "--tree", "--complete-graph", "dev-libs/A"),
 			emerge_cmd + ("-p", "dev-libs/B"),
 			emerge_cmd + ("-B", "dev-libs/B",),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-10-17  1:47 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-10-17  1:47 UTC (permalink / raw
  To: gentoo-commits

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()



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-10-23 22:16 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-10-23 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     32282d6a5105ebcd0f5ed0229803ec194025f6d6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 22:15:34 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 22:15:34 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=32282d6a

test bug #388187

---
 pym/portage/tests/emerge/test_global_updates.py |   37 +++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_global_updates.py b/pym/portage/tests/emerge/test_global_updates.py
new file mode 100644
index 0000000..add4590
--- /dev/null
+++ b/pym/portage/tests/emerge/test_global_updates.py
@@ -0,0 +1,37 @@
+# Copyright 2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.tests import TestCase
+from portage.update import parse_updates
+from portage.dep import Atom
+
+class ParseUpdatesTestCase(TestCase):
+
+	def testParseUpdates(self):
+		test_cases = (
+		(
+			"""
+slotmove invalid_atom 0 3
+slotmove !=invalid/blocker-3* 0 3
+slotmove =valid/atom-3* 0 3 invalid_extra_token
+slotmove =valid/atom-3* 0 3
+move valid/atom1 valid/atom2 invalid_extra_token
+move valid/atom1 invalid_atom2
+move invalid_atom1 valid/atom2
+move !invalid/blocker1 valid/atom2
+move valid/atom1 !invalid/blocker2
+move valid/atom1 valid/atom2
+""",
+			[
+				['slotmove', Atom('=valid/atom-3*'), '0', '3'],
+				['move', 'valid/atom1', 'valid/atom2'],
+			],
+			8,
+		),
+
+		)
+
+		for input_content, expected_output, expected_error_count in test_cases:
+			output_data, errors = parse_updates(input_content)
+			self.assertEqual(output_data, expected_output)
+			self.assertEqual(len(errors), expected_error_count)



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-10-23 22:17 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-10-23 22:17 UTC (permalink / raw
  To: gentoo-commits

commit:     a3ce1fac95836a067f9b8aee11ab3b4a70b8ef7b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 22:17:10 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 22:17:10 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a3ce1fac

test_global_updates: add missing Atom constructor

---
 pym/portage/tests/emerge/test_global_updates.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/emerge/test_global_updates.py b/pym/portage/tests/emerge/test_global_updates.py
index add4590..b2810d0 100644
--- a/pym/portage/tests/emerge/test_global_updates.py
+++ b/pym/portage/tests/emerge/test_global_updates.py
@@ -24,7 +24,7 @@ move valid/atom1 valid/atom2
 """,
 			[
 				['slotmove', Atom('=valid/atom-3*'), '0', '3'],
-				['move', 'valid/atom1', 'valid/atom2'],
+				['move', Atom('valid/atom1'), Atom('valid/atom2')],
 			],
 			8,
 		),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-10-23 22:24 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-10-23 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     47232e37f2b7f63d670de54d1a10f4c1e0dcec99
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 22:23:25 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 22:23:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=47232e37

test_global_updates: test move with operator

---
 pym/portage/tests/emerge/test_global_updates.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/emerge/test_global_updates.py b/pym/portage/tests/emerge/test_global_updates.py
index b2810d0..7355621 100644
--- a/pym/portage/tests/emerge/test_global_updates.py
+++ b/pym/portage/tests/emerge/test_global_updates.py
@@ -20,13 +20,15 @@ move valid/atom1 invalid_atom2
 move invalid_atom1 valid/atom2
 move !invalid/blocker1 valid/atom2
 move valid/atom1 !invalid/blocker2
+move =invalid/operator-1* valid/atom2
+move valid/atom1 =invalid/operator-2*
 move valid/atom1 valid/atom2
 """,
 			[
 				['slotmove', Atom('=valid/atom-3*'), '0', '3'],
 				['move', Atom('valid/atom1'), Atom('valid/atom2')],
 			],
-			8,
+			10,
 		),
 
 		)



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-10-25  0:16 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-10-25  0:16 UTC (permalink / raw
  To: gentoo-commits

commit:     ae0255f656d2371cabaccabb1d70f579ddbc1bac
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 00:15:51 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 00:15:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ae0255f6

tests/emerge: test file owner lookup

---
 pym/portage/tests/emerge/test_simple.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index ccaf580..9b5656e 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -211,6 +211,8 @@ src_install() {
 			portageq_cmd + ("metadata", "/", "binary", "dev-libs/A-1", "EAPI", "USE", "RDEPEND"),
 			portageq_cmd + ("metadata", "/", "installed", "dev-libs/A-1", "EAPI", "USE", "RDEPEND"),
 			portageq_cmd + ("owners", "/", eroot + "usr"),
+			emerge_cmd + ("-p", eroot + "usr"),
+			emerge_cmd + ("-p", "--unmerge", "-q", eroot + "usr"),
 			emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"),
 			emerge_cmd + ("-C", "--quiet", "dev-libs/B"),
 		)



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-10-25  6:28 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-10-25  6:28 UTC (permalink / raw
  To: gentoo-commits

commit:     9cee1292597eca5166b5eb6867c825040bd31061
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 06:27:58 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 06:27:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9cee1292

tests/emerge: test pkg_config and pkg_info

---
 pym/portage/tests/emerge/test_simple.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 9b5656e..c2c57a3 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -48,6 +48,15 @@ src_install() {
 	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
 }
+
+pkg_config() {
+	einfo "called pkg_config for $CATEGORY/$PF"
+}
+
+pkg_info() {
+	einfo "called pkg_info for $CATEGORY/$PF"
+}
+
 """
 
 		ebuilds = {
@@ -194,6 +203,8 @@ src_install() {
 			emerge_cmd + ("--oneshot", "--usepkg", "dev-libs/B",),
 			emerge_cmd + ("--oneshot", "dev-libs/A",),
 			emerge_cmd + ("--noreplace", "dev-libs/A",),
+			emerge_cmd + ("--config", "dev-libs/A",),
+			emerge_cmd + ("--info", "dev-libs/A", "dev-libs/B"),
 			emerge_cmd + ("--pretend", "--depclean", "--verbose", "dev-libs/B"),
 			emerge_cmd + ("--pretend", "--depclean",),
 			emerge_cmd + ("--depclean",),



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-11-08 16:13 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-11-08 16:13 UTC (permalink / raw
  To: gentoo-commits

commit:     450711a0d78a8ccc4d837cb39b85c2871d17ccf2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  8 16:13:32 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov  8 16:13:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=450711a0

tests/emerge: best/has_version with prefix EAPI

---
 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 d108959..db3f496 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -62,6 +62,21 @@ pkg_info() {
 	einfo "called pkg_info for $CATEGORY/$PF"
 }
 
+pkg_preinst() {
+	einfo "called pkg_preinst for $CATEGORY/$PF"
+
+	# Test that has_version and best_version work correctly with
+	# prefix (involves internal ROOT -> EROOT calculation in order
+	# to support ROOT override via the environment with EAPIs 3
+	# and later which support prefix).
+	if has_version $CATEGORY/$PN:$SLOT ; then
+		einfo "has_version detects an installed instance of $CATEGORY/$PN:$SLOT"
+		einfo "best_version reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)"
+	else
+		einfo "has_version does not detect an installed instance of $CATEGORY/$PN:$SLOT"
+	fi
+}
+
 """
 
 		ebuilds = {



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2011-12-16 23:29 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2011-12-16 23:29 UTC (permalink / raw
  To: gentoo-commits

commit:     bbb61dae0317ddd49c7db550e87f5231d60fdb7e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 16 23:29:24 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Dec 16 23:29:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bbb61dae

tests/emerge: PORTAGE_GRPNAME/USERNAME make.conf

---
 pym/portage/tests/emerge/test_simple.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 8691950..28ac098 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -276,6 +276,8 @@ pkg_preinst() {
 		make_conf = (
 			"FEATURES=\"%s\"\n" % (" ".join(features),),
 			"PORTDIR=\"%s\"\n" % (portdir,),
+			"PORTAGE_GRPNAME=\"%s\"\n" % (os.environ["PORTAGE_GRPNAME"],),
+			"PORTAGE_USERNAME=\"%s\"\n" % (os.environ["PORTAGE_USERNAME"],),
 		)
 
 		path =  os.environ.get("PATH")
@@ -309,12 +311,10 @@ pkg_preinst() {
 			"INFOPATH" : "",
 			"PATH" : path,
 			"PKGDIR" : pkgdir,
-			"PORTAGE_GRPNAME" : os.environ["PORTAGE_GRPNAME"],
 			"PORTAGE_INST_GID" : str(portage.data.portage_gid),
 			"PORTAGE_INST_UID" : str(portage.data.portage_uid),
 			"PORTAGE_PYTHON" : portage_python,
 			"PORTAGE_TMPDIR" : portage_tmpdir,
-			"PORTAGE_USERNAME" : os.environ["PORTAGE_USERNAME"],
 			"PYTHONPATH" : pythonpath,
 		}
 



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2012-07-05  8:45 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2012-07-05  8:45 UTC (permalink / raw
  To: gentoo-commits

commit:     31beb09d14dc29b84a234fc9fa8f44e42a6c4204
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  5 08:45:10 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul  5 08:45:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=31beb09d

SlotAbiEmergeTestCase: test new downgrade code

---
 pym/portage/tests/emerge/test_emerge_slot_abi.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/emerge/test_emerge_slot_abi.py b/pym/portage/tests/emerge/test_emerge_slot_abi.py
index 005c5d3..f18bd12 100644
--- a/pym/portage/tests/emerge/test_emerge_slot_abi.py
+++ b/pym/portage/tests/emerge/test_emerge_slot_abi.py
@@ -66,6 +66,8 @@ class SlotAbiEmergeTestCase(TestCase):
 		vardb = trees[eroot]["vartree"].dbapi
 		portdir = settings["PORTDIR"]
 		var_cache_edb = os.path.join(eprefix, "var", "cache", "edb")
+		user_config_dir = os.path.join(eprefix, USER_CONFIG_PATH)
+		package_mask_path = os.path.join(user_config_dir, "package.mask")
 
 		portage_python = portage._python_interpreter
 		ebuild_cmd = (portage_python, "-Wd",
@@ -79,8 +81,10 @@ class SlotAbiEmergeTestCase(TestCase):
 		test_commands = (
 			emerge_cmd + ("--oneshot", "dev-libs/glib",),
 			(lambda: "dev-libs/glib:2/2.32=" in vardb.aux_get("dev-libs/dbus-glib-0.98", ["RDEPEND"])[0],),
-			emerge_cmd + ("--oneshot", "=dev-libs/glib-2.30.2",  "--ignore-built-slot-abi-deps", "y"),
-			emerge_cmd + ("--oneshot", "dev-libs/dbus-glib"),
+			(BASH_BINARY, "-c", "echo %s >> %s" %
+				tuple(map(portage._shell_quote,
+				(">=dev-libs/glib-2.32", package_mask_path,)))),
+			emerge_cmd + ("--oneshot", "dev-libs/glib",),
 			(lambda: "dev-libs/glib:2/2.30=" in vardb.aux_get("dev-libs/dbus-glib-0.98", ["RDEPEND"])[0],),
 		)
 
@@ -89,7 +93,6 @@ class SlotAbiEmergeTestCase(TestCase):
 		fake_bin = os.path.join(eprefix, "bin")
 		portage_tmpdir = os.path.join(eprefix, "var", "tmp", "portage")
 		profile_path = settings.profile_path
-		user_config_dir = os.path.join(os.sep, eprefix, USER_CONFIG_PATH)
 
 		features = []
 		if not portage.process.sandbox_capable or \



^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2013-03-21  7:51 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2013-03-21  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     cfbad217dea19df9966b6dc29f8f06f4f0541d65
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 21 07:51:08 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 21 07:51:08 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cfbad217

Test dispatch-conf.

---
 pym/portage/tests/emerge/test_simple.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index fea8b73..c1abd52 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -7,7 +7,7 @@ import sys
 import portage
 from portage import os
 from portage import _unicode_decode
-from portage.const import (BASH_BINARY,
+from portage.const import (BASH_BINARY, PORTAGE_BASE_PATH,
 	PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH)
 from portage.process import find_binary
 from portage.tests import TestCase
@@ -166,6 +166,8 @@ pkg_preinst() {
 		cachedir_pregen = os.path.join(portdir, "metadata", "md5-cache")
 
 		portage_python = portage._python_interpreter
+		dispatch_conf_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "dispatch-conf"))
 		ebuild_cmd = (portage_python, "-Wd",
 			os.path.join(PORTAGE_BIN_PATH, "ebuild"))
 		egencache_cmd = (portage_python, "-Wd",
@@ -204,6 +206,7 @@ pkg_preinst() {
 			portageq_cmd + ("envvar", "-v", "CONFIG_PROTECT", "EROOT",
 				"PORTAGE_CONFIGROOT", "PORTAGE_TMPDIR", "USERLAND"),
 			etc_update_cmd,
+			dispatch_conf_cmd,
 			emerge_cmd + ("--version",),
 			emerge_cmd + ("--info",),
 			emerge_cmd + ("--info", "--verbose"),
@@ -319,6 +322,7 @@ pkg_preinst() {
 		dirs = [cachedir, cachedir_pregen, distdir, fake_bin,
 			portage_tmpdir, updates_dir,
 			user_config_dir, var_cache_edb]
+		etc_symlinks = ("dispatch-conf.conf", "etc-update.conf")
 		# Override things that may be unavailable, or may have portability
 		# issues when running tests in exotic environments.
 		#   prepstrip - bug #447810 (bash read builtin EINTR problem)
@@ -331,6 +335,9 @@ pkg_preinst() {
 				ensure_dirs(d)
 			for x in true_symlinks:
 				os.symlink(true_binary, os.path.join(fake_bin, x))
+			for x in etc_symlinks:
+				os.symlink(os.path.join(PORTAGE_BASE_PATH, "cnf", x),
+					os.path.join(eprefix, "etc", x))
 			with open(os.path.join(var_cache_edb, "counter"), 'wb') as f:
 				f.write(b"100")
 			# non-empty system set keeps --depclean quiet


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2013-06-20  0:01 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2013-06-20  0:01 UTC (permalink / raw
  To: gentoo-commits

commit:     8dcc3684f21508d7dfd940066c0b4e9c8133198a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 20 00:00:58 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 00:00:58 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8dcc3684

Test cross-prefix best/has_version --host-root.

---
 pym/portage/tests/emerge/test_simple.py | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index dc7ddb7..bbff6d8 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -76,13 +76,21 @@ pkg_preinst() {
 	else
 		einfo "has_version does not detect an installed instance of $CATEGORY/$PN:$SLOT"
 	fi
+	if [[ ${EPREFIX} != ${PORTAGE_OVERRIDE_EPREFIX} ]] ; then
+		if has_version --host-root $CATEGORY/$PN:$SLOT ; then
+			einfo "has_version --host-root detects an installed instance of $CATEGORY/$PN:$SLOT"
+			einfo "best_version --host-root reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)"
+		else
+			einfo "has_version --host-root does not detect an installed instance of $CATEGORY/$PN:$SLOT"
+		fi
+	fi
 }
 
 """
 
 		ebuilds = {
 			"dev-libs/A-1": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"IUSE" : "+flag",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
@@ -90,14 +98,14 @@ pkg_preinst() {
 				"RDEPEND": "flag? ( dev-libs/B[flag] )",
 			},
 			"dev-libs/B-1": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"IUSE" : "+flag",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
 				"MISC_CONTENT": install_something,
 			},
 			"virtual/foo-0": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
 			},
@@ -105,7 +113,7 @@ pkg_preinst() {
 
 		installed = {
 			"dev-libs/A-1": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"IUSE" : "+flag",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
@@ -113,21 +121,21 @@ pkg_preinst() {
 				"USE": "flag",
 			},
 			"dev-libs/B-1": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"IUSE" : "+flag",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
 				"USE": "flag",
 			},
 			"dev-libs/depclean-me-1": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"IUSE" : "",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",
 				"USE": "",
 			},
 			"app-misc/depclean-me-1": {
-				"EAPI" : "4",
+				"EAPI" : "5",
 				"IUSE" : "",
 				"KEYWORDS": "x86",
 				"LICENSE": "GPL-2",


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/
@ 2018-05-01 17:52 Zac Medico
  0 siblings, 0 replies; 26+ messages in thread
From: Zac Medico @ 2018-05-01 17:52 UTC (permalink / raw
  To: gentoo-commits

commit:     844998daa50e9db0a337bc0cf9f665d224779665
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue May  1 17:49:07 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue May  1 17:52:02 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=844998da

SimpleEmergeTestCase: EAPI 7_pre1 has/best_version -b

 pym/portage/tests/emerge/test_simple.py | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index f99c77927..17dcd548d 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -69,6 +69,12 @@ pkg_info() {
 }
 
 pkg_preinst() {
+	local root_arg
+	if ___eapi_best_version_and_has_version_support_-b_-d_-r; then
+		root_arg="-b"
+	else
+		root_arg="--host-root"
+	fi
 	einfo "called pkg_preinst for $CATEGORY/$PF"
 
 	# Test that has_version and best_version work correctly with
@@ -82,11 +88,11 @@ pkg_preinst() {
 		einfo "has_version does not detect an installed instance of $CATEGORY/$PN:$SLOT"
 	fi
 	if [[ ${EPREFIX} != ${PORTAGE_OVERRIDE_EPREFIX} ]] ; then
-		if has_version --host-root $CATEGORY/$PN:$SLOT ; then
-			einfo "has_version --host-root detects an installed instance of $CATEGORY/$PN:$SLOT"
-			einfo "best_version --host-root reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)"
+		if has_version ${root_arg} $CATEGORY/$PN:$SLOT ; then
+			einfo "has_version ${root_arg} detects an installed instance of $CATEGORY/$PN:$SLOT"
+			einfo "best_version ${root_arg} reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)"
 		else
-			einfo "has_version --host-root does not detect an installed instance of $CATEGORY/$PN:$SLOT"
+			einfo "has_version ${root_arg} does not detect an installed instance of $CATEGORY/$PN:$SLOT"
 		fi
 	fi
 }
@@ -110,12 +116,12 @@ pkg_preinst() {
 				"MISC_CONTENT": install_something,
 			},
 			"dev-libs/C-1": {
-				"EAPI" : "6",
+				"EAPI" : "7_pre1",
 				"KEYWORDS": "~x86",
 				"RDEPEND": "dev-libs/D[flag]",
 			},
 			"dev-libs/D-1": {
-				"EAPI" : "6",
+				"EAPI" : "7_pre1",
 				"KEYWORDS": "~x86",
 				"IUSE" : "flag",
 			},


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2018-05-01 17:52 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21  7:51 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2018-05-01 17:52 Zac Medico
2013-06-20  0:01 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-10-17  1:47 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox