Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ endif
export TEST_OS
VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)

ifeq ($(REPOS_DIR),)
REPOS_DIR = /etc/yum.repos.d
endif

default: all

src/pylorax/version.py: lorax.spec
Expand Down Expand Up @@ -174,9 +170,7 @@ $(VM_IMAGE): srpm bots
vm: $(VM_IMAGE)
echo $(VM_IMAGE)

# grab all repositories from the host system, overwriting what's inside the VM
# and update the image. Mostly used when testing downstream snapshots to make
# sure VM_IMAGE is as close as possible to the host!
# legacy compatibility, used to do different stuff with repos
vm-local-repos: vm

vm-reset:
Expand Down
3 changes: 0 additions & 3 deletions share/templates.d/99-generic/runtime-postinstall.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ SOURCE_DATE_EPOCH = os.environ.get('SOURCE_DATE_EPOCH', str(int(time.time())))
## move_stubs()
move usr/share/anaconda/list-harddrives-stub usr/bin/list-harddrives

## move_repos()
move etc/yum.repos.d etc/anaconda.repos.d

## Setup mdadm config to turn off homehost
remove etc/mdadm.conf
append etc/mdadm.conf "HOMEHOST <ignore>\n"
Expand Down
8 changes: 0 additions & 8 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ To delete the generated image, run
Base images are stored in `bots/images`. Set `TEST_DATA` to override this
directory.

To configure the image with all repositories found on the host system use

$ make vm-local-repos

You may also define `REPOS_DIR` variable to point to another directory
containing yum .repo files. By default the value is `/etc/yum.repos.d`!
This is mostly useful when running tests by hand on a downstream snapshot!

## Running tests

After building a test image, run
Expand Down
8 changes: 4 additions & 4 deletions test/vm.install
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ if ! rpm -q beakerlib; then
fi

# disable mirrors & re-enable direct download
sed -i "s/metalink.*//" /etc/yum.repos.d/*.repo
sed -i "s/#\(baseurl=.*\)/\1/" /etc/yum.repos.d/*.repo
sed -i "s/download.fedoraproject/dl.fedoraproject/" /etc/yum.repos.d/*.repo
sed -i "s/metalink.*//" /etc/yum.repos.d/*.repo /usr/share/dnf5/repos.d/*.repo
sed -i "s/#\(baseurl=.*\)/\1/" /etc/yum.repos.d/*.repo /usr/share/dnf5/repos.d/*.repo
sed -i "s/download.fedoraproject/dl.fedoraproject/" /etc/yum.repos.d/*.repo /usr/share/dnf5/repos.d/*.repo

# HACK: Fedora ships baseurl with `example.com` as domain
# Example: `#baseurl=http://download.example/pub/fedora/linux/updates/$releasever/Everything/$basearch/`
sed -i "s/download.example/dl.fedoraproject.org/" /etc/yum.repos.d/*.repo
sed -i "s/download.example/dl.fedoraproject.org/" /etc/yum.repos.d/*.repo /usr/share/dnf5/repos.d/*.repo

# Grow root partition on LVM test images to make room for built images
PVS=$(pvs --noheadings -opv_name)
Expand Down
6 changes: 4 additions & 2 deletions tests/lorax/test_build_bootiso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ set -e
. "$(dirname $0)/lib/lib.sh"

CLI="${CLI:-./src/bin/lorax}"
REPODIR="/etc/yum.repos.d"
test -f /usr/share/dnf5/repos.d/fedora.repo && REPODIR="/usr/share/dnf5/repos.d"

# Make up a name (slightly unsafe), should not exist before running lorax so use -u
rlJournalStart
rlPhaseStartTest "Build lorax boot.iso"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
lorax -p Fedora-Lorax-Test -v "$RELEASE" -r "$RELEASE" \
--repo /etc/yum.repos.d/fedora.repo \
--repo /etc/yum.repos.d/fedora-updates.repo \
--repo $REPODIR/fedora.repo \
--repo $REPODIR/fedora-updates.repo \
--sharedir "$SHARE_DIR" /var/tmp/test-results/
rlAssertEquals "exit code should be zero" $? 0
IMAGE="/var/tmp/test-results/images/boot.iso"
Expand Down
Loading