summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-19 15:39:15 -0800
committerZac Medico <zmedico@gentoo.org>2013-01-19 15:39:15 -0800
commit8f0d30e96a69c689577f8eb43b160d134d1f30f2 (patch)
treedb4bcab78e7f464a58ee65217dc667bf454a9d48 /pym
parent00c9dd27618d20acdb9a700fbef09e292c329fe3 (diff)
downloadportage-8f0d30e96a69c689577f8eb43b160d134d1f30f2.tar.gz
portage-8f0d30e96a69c689577f8eb43b160d134d1f30f2.tar.bz2
portage-8f0d30e96a69c689577f8eb43b160d134d1f30f2.zip
tests/repoman: add dev and exp profiles
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/repoman/test_simple.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 908fb2d20..420297caa 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -76,6 +76,8 @@ class SimpleRepomanTestCase(TestCase):
profiles = (
("x86", "default/linux/x86/test_profile", "stable"),
+ ("x86", "default/linux/x86/test_dev", "dev"),
+ ("x86", "default/linux/x86/test_exp", "exp"),
)
profile = {
@@ -192,6 +194,7 @@ class SimpleRepomanTestCase(TestCase):
("", git_cmd + ("init-db",)),
("", git_cmd + ("add", ".")),
("", git_cmd + ("commit", "-a", "-m", "add whole repo")),
+ ("", repoman_cmd + ("full", "-d")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "2.ebuild")),
("", git_cmd + ("add", test_ebuild[:-8] + "2.ebuild")),
("", repoman_cmd + ("commit", "-m", "bump to version 2")),
@@ -242,6 +245,18 @@ class SimpleRepomanTestCase(TestCase):
with open(os.path.join(profiles_dir, "profiles.desc"), 'w') as f:
for x in profiles:
f.write("%s %s %s\n" % x)
+
+ # ResolverPlayground only created the first profile,
+ # so create the remaining ones.
+ for x in profiles[1:]:
+ sub_profile_dir = os.path.join(profiles_dir, x[1])
+ ensure_dirs(sub_profile_dir)
+ for config_file, lines in profile.items():
+ file_name = os.path.join(sub_profile_dir, config_file)
+ with open(file_name, "w") as f:
+ for line in lines:
+ f.write("%s\n" % line)
+
for x in licenses:
open(os.path.join(license_dir, x), 'wb').close()
with open(os.path.join(profiles_dir, "arch.list"), 'w') as f: