PKGBUILD work in preparation for release.
This commit is contained in:
@@ -12,14 +12,15 @@ class ArchPkgbuildOptionalWineTests(unittest.TestCase):
|
||||
]
|
||||
cls.helperPkgbuilds = [
|
||||
repository / "distro-packages" / "Arch-Linux" / name / "PKGBUILD"
|
||||
for name in ("cthulhu-wine-access", "cthulhu-wine-access-git")
|
||||
for name in ("cthulhu-wine-access-git",)
|
||||
]
|
||||
|
||||
def test_main_packages_disable_wine_helper_build(self):
|
||||
for pkgbuild in self.pkgbuilds:
|
||||
with self.subTest(pkgbuild=pkgbuild):
|
||||
contents = pkgbuild.read_text(encoding="utf-8")
|
||||
self.assertIn("-Dwine-access=disabled", contents)
|
||||
stableContents = self.pkgbuilds[0].read_text(encoding="utf-8")
|
||||
self.assertNotIn("wine-access", stableContents)
|
||||
|
||||
gitContents = self.pkgbuilds[1].read_text(encoding="utf-8")
|
||||
self.assertIn("-Dwine-access=disabled", gitContents)
|
||||
|
||||
def test_main_packages_do_not_depend_on_wine(self):
|
||||
for pkgbuild in self.pkgbuilds:
|
||||
@@ -33,6 +34,21 @@ class ArchPkgbuildOptionalWineTests(unittest.TestCase):
|
||||
}
|
||||
self.assertNotIn("wine", dependencyLines)
|
||||
|
||||
def test_main_packages_advertise_matching_optional_helper(self):
|
||||
stableContents = self.pkgbuilds[0].read_text(encoding="utf-8")
|
||||
self.assertNotIn("cthulhu-wine-access", stableContents)
|
||||
|
||||
gitContents = self.pkgbuilds[1].read_text(encoding="utf-8")
|
||||
self.assertIn(
|
||||
"'cthulhu-wine-access-git: Wine, Proton, NVDA Controller, and Tolk integration'",
|
||||
gitContents,
|
||||
)
|
||||
self.assertNotIn("optdepends_x86_64", gitContents)
|
||||
|
||||
def test_stable_packages_use_current_release_version(self):
|
||||
contents = self.pkgbuilds[0].read_text(encoding="utf-8")
|
||||
self.assertRegex(contents, r"(?m)^pkgver=2026\.05\.25$")
|
||||
|
||||
def test_optional_helper_packages_own_the_wine_dependency(self):
|
||||
for pkgbuild in self.helperPkgbuilds:
|
||||
with self.subTest(pkgbuild=pkgbuild):
|
||||
@@ -40,6 +56,22 @@ class ArchPkgbuildOptionalWineTests(unittest.TestCase):
|
||||
self.assertIn("-Dwine-access=enabled", contents)
|
||||
self.assertRegex(contents, r"(?m)^ wine$")
|
||||
|
||||
def test_optional_helper_packages_disable_lto(self):
|
||||
for pkgbuild in self.helperPkgbuilds:
|
||||
with self.subTest(pkgbuild=pkgbuild):
|
||||
contents = pkgbuild.read_text(encoding="utf-8")
|
||||
self.assertRegex(contents, r"(?m)^options=\(!lto\)$")
|
||||
|
||||
def test_git_sources_declare_git_as_a_build_dependency(self):
|
||||
for pkgbuild in self.pkgbuilds + self.helperPkgbuilds:
|
||||
with self.subTest(pkgbuild=pkgbuild):
|
||||
contents = pkgbuild.read_text(encoding="utf-8")
|
||||
self.assertIn("git+", contents)
|
||||
makeDependencies = contents.split("makedepends=(", 1)[1].split(
|
||||
")", 1
|
||||
)[0]
|
||||
self.assertRegex(makeDependencies, r"(?m)^ git$")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user