osbuild-composer/tests/scripts/run_tests.sh
Achilleas Koutsou bd2ed33a5b Update to 38
Resolves: rhbz#2011877

Enabled all tests:
- Copied script from RHEL 8.6.0 branch.
- Added nightly RHEL 9.0 repositories.
- Don't install EPEL for RHEL 9.0: Koji and Ansible aren't required for
  any of the enabled tests.

Unmount /tmp before running tests:
/tmp is too small to contain the results of image building tests.
Unmounting the partition makes it part of the underlying root partition,
which is much larger.
2021-11-19 13:29:14 +01:00

51 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
set -euxo pipefail
TOPDIR=$1
# Print some information about the machine
df -h
free -h
# 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 "22" ] || 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/filesystem.sh
/usr/libexec/tests/osbuild-composer/regression.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 \
-skip-selinux-ctx-check \
/usr/share/tests/osbuild-composer/manifests/rhel_90-*
# tests not invoked:
# - api.sh - requires secrets, we cannot pass them safely in OSCI.
# - aws.sh - requires secrets, we cannot pass them safely in OSCI.
# - azure*.sh - requires secrets, we cannot pass them safely in OSCI.
# - installers.sh - requires nested virtualization, not available in OSCI.
# - koji.sh - not supported on RHEL.
# - libvirt.sh - requires nested virtualization (8.5+), not available in OSCI.
# (see https://bugzilla.redhat.com/show_bug.cgi?id=1975242 )
# - ostree.sh - requires nested virtualization, not available in OSCI.
# - ostree-ng.sh - requires nested virtualization, not available in OSCI.
# - ostree-raw-image.sh - requires nested virtualization, not available in OSCI.
# - ostree-simplified-installer.sh - requires nested virtualization, not available in OSCI.
# - vmware.sh - requires secrets, we cannot pass them safely in OSCI.