CI: add test_systemd_stage0_version
Add a test that ensures systemd-stage0 and systemd have the same pkgver. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440 [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
991d91e0a5
commit
8a3b3e8092
1 changed files with 25 additions and 0 deletions
25
.ci/testcases/test_systemd.py
Normal file
25
.ci/testcases/test_systemd.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright 2025 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import logging
|
||||
import os
|
||||
|
||||
import pmb.parse
|
||||
from pmb.core.context import get_context
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_systemd_stage0_version():
|
||||
"""Ensure systemd-stage0 and systemd have the same pkgver."""
|
||||
# Don't clutter output with verbose APKBUILD parsing messages
|
||||
logging.getLogger().setLevel(logging.DEBUG)
|
||||
|
||||
config = get_context().config
|
||||
pma_systemd = os.path.join(config.aports[0], "extra-repos/systemd")
|
||||
|
||||
sd0 = pmb.parse.apkbuild(Path(os.path.join(pma_systemd, "systemd-stage0/APKBUILD")))
|
||||
sd1 = pmb.parse.apkbuild(Path(os.path.join(pma_systemd, "systemd/APKBUILD")))
|
||||
|
||||
assert sd0["pkgver"] == sd1["pkgver"], (
|
||||
f"systemd-stage0 pkgver ({sd0['pkgver']}) doesn't match systemd pkgver ({sd1['pkgver']})!"
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue