Skip to content

Commit

Permalink
tests: stop hardcoding the payload for fedora-rawhide only
Browse files Browse the repository at this point in the history
Payload needs to be set per-image variant.
  • Loading branch information
KKoukiou committed Feb 11, 2025
1 parent 4a20f2c commit fceabd6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ endif
TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0

# Anaconda specific variables
ifeq ($(TEST_OS),)
PAYLOAD=fedora-rawhide-anaconda-payload
else
VARIANT=$(shell echo $(TEST_OS) | sed 's/-boot//')
PAYLOAD=$(VARIANT)-anaconda-payload
endif

GITHUB_BASE=rhinstaller/anaconda-webui
UPDATES_IMG=updates.img
TEST_LIVE_OS=fedora-rawhide-live-boot
Expand Down Expand Up @@ -191,7 +197,7 @@ payload: bots
.PHONY: images
images: bots
# Download cloud images
bots/image-download debian-stable ubuntu-stable fedora-41
bots/image-download debian-stable ubuntu-stable fedora-41 fedora-42
# Downoad ISO images: if a compose if specified download from
# the compose otherwise download the ISO from Cockpit image server
if [ -n "$(TEST_COMPOSE)" ]; then \
Expand Down
3 changes: 2 additions & 1 deletion test/machine_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def _write_interactive_defaults_ks(self, updates_image, updates_image_edited):

def start(self):
self.is_efi = os.environ.get("TEST_FIRMWARE", "bios") == "efi"
self.os = os.environ.get("TEST_OS", "fedora-rawhide-boot").split("-boot")[0]

self.payload_path = os.path.join(BOTS_DIR, "./images/fedora-rawhide-anaconda-payload")
self.payload_path = os.path.join(BOTS_DIR, f"./images/{self.os}-anaconda-payload")
if not os.path.exists(self.payload_path):
raise FileNotFoundError(f"Missing payload file {self.payload_path}; use 'make payload'.")

Expand Down
2 changes: 1 addition & 1 deletion test/vm.install
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def vm_install(image, compose, verbose, quick):
machine.execute("su builder -c 'mock --no-clean --disablerepo=* --offline --resultdir /var/tmp/build "
f"{mock_opts} --rebuild /var/tmp/build/SRPMS/*.src.rpm'", timeout=1800)

if compose:
if compose or image == "fedora-rawhide":
# If we are testing a custom compose do *not* download the anaconda packages, they are in the ISO already
pass
elif scenario and scenario.startswith("anaconda-pr-"):
Expand Down

0 comments on commit fceabd6

Please sign in to comment.