#!/bin/bash## kola:## tags: "platform-independent needs-internet"## # This test only runs on FCOS as OS extensions are implemented differently on RHCOS.## distros: fcos## # This is dependent on network and disk speed but we've seen the## # test take longer than 10 minutes in our aarch64 qemu tests.## timeoutMin: 15## minMemory: 1536## description: Verify that we can install some common tools as OS extensions.set -xeuo pipefail# shellcheck disable=SC1091. "$KOLA_EXT_DATA/commonlib.sh"commands=('htop''strace''tcpdump''tree''crio')# Also try some OS extensions which have host bindings. These can only# work on streams that are sure to have the archive repo available# (mostly streams based on Fedora stable releases). Since `next`# rebases early to the next major Fedora and the other streams operate# continuously on non-stable Fedora we'll just limit this to# `stable`/`testing`/`testing-devel`. It's possible that this test will# fail on one of those streams if we fast track one of these and they're# not availabe in any repo, but we can just snooze the entire test in# that case.case "$(get_fcos_stream)" in"stable"|"testing"|"testing-devel") commands+=('vim' 'gdb') ;;*) ;;esacrpm-ostree install -y --apply-live "${commands[@]}"failed=""for c in "${commands[@]}"; doif [[ -z "$(command -v "${c}")" ]]; thenecho "Could not find: ${c}"failed+=" ${1}"fidoneif [[ -n "${failed}" ]]; thenfatal "could not install: ${failed}"fiok "successfully installed os rpm package extensions"