Skip to content

Commit

Permalink
tools: Enable Python bridge on Fedora 38
Browse files Browse the repository at this point in the history
We have gotten no regression reports in the last two weeks, so get a bit
bolder.

Switch TestClient to a "skip" instead of an "only" list, which is more
robust. This also enables the test on arch, which runs the Python bridge
now.

We are not yet ready to enable this on CoreOS though, so keep the
pybridge disabled on fedora-coreos and rhel4edge for now.
  • Loading branch information
martinpitt committed Jun 27, 2023
1 parent 80bd963 commit 8e7ded8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 6 additions & 3 deletions test/image-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST_DIR = f'{BASE_DIR}/test'
BOTS_DIR = f'{BASE_DIR}/bots'


def build_rpms(dist_tar, image, verbose, quick):
def build_rpms(dist_tar, image, verbose, quick, *, disable_pybridge=False):
"""build RPMs from a tarball in an image
Return local rpm path list.
Expand All @@ -54,9 +54,10 @@ def build_rpms(dist_tar, image, verbose, quick):

# build rpms
mock_opts = ("--verbose" if verbose else "") + (" --nocheck" if quick else "")
defines = '--define "cockpit_enable_python 0"' if disable_pybridge else ""
machine.execute(fr"""
su builder -c 'mock --no-clean --disablerepo=* --offline \
--resultdir /var/tmp/build {mock_opts} \
--resultdir /var/tmp/build {mock_opts} {defines} \
--rebuild /var/tmp/build/SRPMS/*.src.rpm'
""", timeout=1800)

Expand Down Expand Up @@ -124,7 +125,9 @@ def build_install_ostree(dist_tar, image, verbose, quick):
OSTree image can't build packages, build them on corresponding OSes and invoke
test/ostree.install to install them into the OSTree and the cockpit/ws container.
"""
rpms = build_rpms(dist_tar, testmap.get_build_image(image), verbose, quick)
# fedora-coreos and rhel4edge not yet ready for pybridge
rpms = build_rpms(dist_tar, testmap.get_build_image(image), verbose, quick,
disable_pybridge=image in ["fedora-coreos", "rhel4edge"])
args = []
for rpm in rpms:
args += ["--upload", f"{rpm}:/var/tmp/"]
Expand Down
4 changes: 2 additions & 2 deletions test/verify/check-client
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import testlib


# Run this on more OSes as we roll out the pybridge
@testlib.onlyImage("needs pybridge", "debian-testing", "ubuntu-stable")
@testlib.skipImage("needs pybridge", "debian-stable", "ubuntu-2204", "fedora-37", "fedora-coreos",
"rhel-8*", "centos-8*", "rhel-9*", "centos-9*", "rhel4edge")
class TestClient(testlib.MachineCase):

provision = {
Expand Down
5 changes: 3 additions & 2 deletions tools/cockpit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ Version: 0
Release: 1%{?dist}
Source0: https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-%{version}.tar.xz

# Use Python bridge on non-stable versions
%if 0%{?fedora} >= 39
%if !%{defined cockpit_enable_python}
%if 0%{?fedora} >= 38
%define cockpit_enable_python 1
%endif
%endif

%if !%{defined cockpit_enable_python}
%define cockpit_enable_python 0
Expand Down

0 comments on commit 8e7ded8

Please sign in to comment.