summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-09-14 11:40:06 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-14 11:40:06 -0700
commitf6ccf1ef3886bebbc07b9c177819887abdc9f303 (patch)
tree036c0042f1bff4b133cb079117d0ac37638b37a0
parent280f10d42a8fbfe3b4b34eb18e6ea5f8dd3ff484 (diff)
downloadportage-f6ccf1ef3886bebbc07b9c177819887abdc9f303.tar.gz
portage-f6ccf1ef3886bebbc07b9c177819887abdc9f303.tar.bz2
portage-f6ccf1ef3886bebbc07b9c177819887abdc9f303.zip
repoman: test symlinked repo pathv2.2.0_alpha57
-rw-r--r--pym/portage/tests/repoman/test_simple.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 27e7d0e6d..7717f3678 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -93,6 +93,7 @@ class SimpleRepomanTestCase(TestCase):
playground = ResolverPlayground(ebuilds=ebuilds)
settings = playground.settings
eprefix = settings["EPREFIX"]
+ eroot = settings["EROOT"]
distdir = os.path.join(eprefix, "distdir")
portdir = settings["PORTDIR"]
profiles_dir = os.path.join(portdir, "profiles")
@@ -139,11 +140,15 @@ class SimpleRepomanTestCase(TestCase):
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)
+ # Use a symlink to portdir, in order to trigger bugs
+ # involving cannonical vs. non-canonical paths.
+ portdir_symlink = os.path.join(eroot, "portdir_symlink")
+ os.symlink(portdir, portdir_symlink)
# repoman checks metadata.dtd for recent CTIME, so copy the file in
# order to ensure that the CTIME is current
shutil.copyfile(metadata_dtd, os.path.join(distdir, "metadata.dtd"))
for cwd in ("", "dev-libs", "dev-libs/A", "dev-libs/B"):
- abs_cwd = os.path.join(portdir, cwd)
+ abs_cwd = os.path.join(portdir_symlink, cwd)
proc = subprocess.Popen([portage._python_interpreter, "-Wd",
os.path.join(PORTAGE_BIN_PATH, "repoman"), "full"],
cwd=abs_cwd, env=env, stdout=subprocess.PIPE)