rpm-ostree/ci/composepost-checks.sh
Colin Walters f6f6ac5ff3 ci: Add composepost-checks.sh, drop a compose test
The compose tests are expensive; each run involves running
all the `%post` scripts and `dracut` etc.  This is definitely
a source of timeouts in CCI.

Remove `test-boot-location-modules.sh` - it's the default
now and is used by FCOS.  Add dedicated script where we can
test all these things by default after a `cosa build`.

This aims to move the compose tests to only cover bits *not*
in cosa like the non-unified-core path.
2021-03-12 15:53:01 -05:00

29 lines
1011 B
Bash
Executable File

#!/bin/bash
# This script expects a coreos-assembler working directory
# and will validate parts of the generated ostree commit.
set -xeuo pipefail
dn=$(cd "$(dirname "$0")" && pwd)
commondir=$(cd "$dn/../tests/common" && pwd)
. "${commondir}/libtest-core.sh"
repo=tmp/repo
ref=$(cosa meta --get-value ref)
# Nothing in /boot (but it should exist)
ostree --repo="${repo}" ls -R "${ref}" /boot > tmp/bootls.txt
cat >tmp/bootls-expected.txt <<EOF
d00755 0 0 0 /boot
EOF
diff -u tmp/bootls{-expected,}.txt
# Verify /usr/lib/ostree-boot
ostree --repo="${repo}" ls -R "${ref}" /usr/lib/ostree-boot > tmp/bootls.txt
assert_not_file_has_content tmp/bootls.txt vmlinuz-
assert_not_file_has_content tmp/bootls.txt initramfs-
# And use the kver to find the kernel in /usr/lib/modules
ostree --repo="${repo}" ls -R "${ref}" /usr/lib/modules > tmp/modules-lsr.txt
assert_file_has_content tmp/modules-lsr.txt '/vmlinuz$'
assert_file_has_content tmp/modules-lsr.txt '/initramfs.img$'
echo "ok boot location modules"