Return RPMs added to -devel module in GatherSourceModule.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
parent
31bafa29c5
commit
c3aa297d8c
@ -142,6 +142,7 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
|
|||||||
)
|
)
|
||||||
added_rpms.setdefault(nsvc_devel, [])
|
added_rpms.setdefault(nsvc_devel, [])
|
||||||
added_rpms[nsvc_devel].append(str(rpm_obj.nevra))
|
added_rpms[nsvc_devel].append(str(rpm_obj.nevra))
|
||||||
|
packages.add((rpm_obj, None))
|
||||||
log.write("Adding %s to %s module\n" % (rpm_obj, nsvc_devel))
|
log.write("Adding %s to %s module\n" % (rpm_obj, nsvc_devel))
|
||||||
|
|
||||||
# GatherSource returns all the packages in variant and does not
|
# GatherSource returns all the packages in variant and does not
|
||||||
|
@ -80,3 +80,25 @@ class TestGatherSourceModule(helpers.PungiTestCase):
|
|||||||
variant = self.compose.variants["Server"]
|
variant = self.compose.variants["Server"]
|
||||||
arch_mmd = variant.arch_mmds["x86_64"]["testmodule:master:1:2017"]
|
arch_mmd = variant.arch_mmds["x86_64"]["testmodule:master:1:2017"]
|
||||||
self.assertEqual(len(arch_mmd.get_rpm_artifacts().get()), 0)
|
self.assertEqual(len(arch_mmd.get_rpm_artifacts().get()), 0)
|
||||||
|
|
||||||
|
def test_gather_filtered_module_include_devel_modules(self):
|
||||||
|
self.compose.conf['include_devel_modules'] = {
|
||||||
|
"Server": ["testmodule-devel:master"]}
|
||||||
|
|
||||||
|
filter_set = Modulemd.SimpleSet()
|
||||||
|
filter_set.add("pkg")
|
||||||
|
self.mmd.set_rpm_filter(filter_set)
|
||||||
|
|
||||||
|
source = GatherSourceModule(self.compose)
|
||||||
|
packages, groups = source("x86_64", self.compose.variants["Server"])
|
||||||
|
|
||||||
|
# Two packages, because -devel for x86_64 includes both x86_64
|
||||||
|
# and i686.
|
||||||
|
self.assertEqual(len(packages), 2)
|
||||||
|
self.assertEqual(len(groups), 0)
|
||||||
|
|
||||||
|
variant = self.compose.variants["Server"]
|
||||||
|
arch_mmd = variant.arch_mmds["x86_64"]["testmodule:master:1:2017"]
|
||||||
|
self.assertEqual(len(arch_mmd.get_rpm_artifacts().get()), 0)
|
||||||
|
arch_mmd = variant.arch_mmds["x86_64"]["testmodule-devel:master:1:2017"]
|
||||||
|
self.assertEqual(len(arch_mmd.get_rpm_artifacts().get()), 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user