53 lines
2.2 KiB
Bash
53 lines
2.2 KiB
Bash
|
#!/bin/bash
|
||
|
set -euxo pipefail
|
||
|
|
||
|
TOPDIR=$1
|
||
|
|
||
|
# Print some information about the machine
|
||
|
df -h
|
||
|
free -h
|
||
|
|
||
|
# osbuild-composer-tests requires koji and ansible packages not available in
|
||
|
# RHEL. Let's enable EPEL and install them.
|
||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||
|
dnf repolist -v
|
||
|
dnf config-manager --enable epel
|
||
|
dnf repolist -v
|
||
|
dnf install -y koji ansible
|
||
|
|
||
|
# osbuild-composer-tests contains repo overrides for testing. Override the
|
||
|
# overrides with latest compose. (We don't want to rely on latest compose
|
||
|
# upstream as it randomly breaks the CI.)
|
||
|
cp $TOPDIR/repositories/* /usr/share/tests/osbuild-composer/repositories/
|
||
|
|
||
|
# The tests put logs in WORKSPACE, create a temporary dir for this purpose.
|
||
|
# See https://github.com/osbuild/osbuild-composer/issues/1096
|
||
|
mkdir /tmp/osbuild-composer-tests
|
||
|
export WORKSPACE=/tmp/osbuild-composer-tests
|
||
|
|
||
|
# Check that there are no new test executables.
|
||
|
[ $(find /usr/libexec/tests/osbuild-composer/ -maxdepth 1 -type f | wc -l) -eq "9" ] || exit 5
|
||
|
|
||
|
# In a perfect world, we should be able to run all test executables just by
|
||
|
# iterating over them. Sadly, this is not possible, see the comments.
|
||
|
/usr/libexec/tests/osbuild-composer/base_tests.sh
|
||
|
/usr/libexec/tests/osbuild-composer/koji.sh
|
||
|
/usr/libexec/tests/osbuild-composer/libvirt.sh
|
||
|
|
||
|
# /usr/libexec/tests/osbuild-composer/image_tests.sh requires nested virt
|
||
|
# not available in OSCI and it also doesn't support turning off the booting
|
||
|
# test. Work around it by calling the underlying executable directly as
|
||
|
# it supports the -disable-local-boot argument.
|
||
|
/usr/libexec/osbuild-composer-test/osbuild-image-tests \
|
||
|
-disable-local-boot -fail-local-boot=false \
|
||
|
/usr/share/tests/osbuild-composer/manifests/rhel_84-*
|
||
|
|
||
|
# tests not invoked:
|
||
|
# - ostree.sh - sadly, virt-install for RHEL 8 creates a VM with 3 GB
|
||
|
# of memory. That much memory isn't available in OSCI.
|
||
|
# Also, missing nested virt support is a big issue.
|
||
|
# - ostree-ng.sh - Same as above.
|
||
|
# - api.sh - requires secrets, we cannot pass them safely in OSCI.
|
||
|
# - aws.sh - requires secrets, we cannot pass them safely in OSCI.
|
||
|
# - vmware.sh - requires secrets, we cannot pass them safely in OSCI.
|