aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-08-28 20:43:08 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2023-08-28 20:43:08 +0300
commitd00711f2d6cbae14a57088ef78caa3daf72069aa (patch)
treec57987668a3db7bfe48e9c46ff51d474d4aeab8c /tests
parentoperations.format.fetch_base: fix for when no proxy (diff)
downloadpkgcore-d00711f2d6cbae14a57088ef78caa3daf72069aa.tar.gz
pkgcore-d00711f2d6cbae14a57088ef78caa3daf72069aa.tar.bz2
pkgcore-d00711f2d6cbae14a57088ef78caa3daf72069aa.zip
ebuild.repository: add support for stabilization groups
This is a special metadata files that can be used to group packages for stabilization bugs. Resolves: https://github.com/pkgcore/pkgcore/issues/411 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ebuild/test_repository.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ebuild/test_repository.py b/tests/ebuild/test_repository.py
index 85a248d8d..fceb70b37 100644
--- a/tests/ebuild/test_repository.py
+++ b/tests/ebuild/test_repository.py
@@ -199,6 +199,31 @@ class TestUnconfiguredTree:
atom("<just/newer-than-42"),
}
+ def test_stabilization_groups(self, tmp_path, caplog):
+ base = tmp_path / "metadata/stabilization-groups"
+ (base / "pkgcore").mkdir(parents=True)
+ (base / "gentoo").write_text(
+ textwrap.dedent(
+ """\
+ # some text here
+ dev-python/pkgcore
+ dev-python/pytest # comment
+ @bad_atom@
+ """
+ )
+ )
+ (base / "pkgcore" / "snakeoil").write_text("""dev-python/snakeoil # comment""")
+ mirrors = self.mk_tree(tmp_path).stabilization_groups
+ assert set(mirrors.keys()) == {"gentoo", "pkgcore/snakeoil"}
+ assert set(mirrors["gentoo"]) == {
+ atom("dev-python/pkgcore"),
+ atom("dev-python/pytest"),
+ }
+ assert set(mirrors["pkgcore/snakeoil"]) == {
+ atom("dev-python/snakeoil"),
+ }
+ assert "line 4: parsing error:" in caplog.text
+
class TestSlavedTree(TestUnconfiguredTree):
def mk_tree(self, path, *args, **kwds):