diff --git a/plans/gating-multiarch.fmf b/plans/gating-multiarch.fmf new file mode 100644 index 0000000..d2e524c --- /dev/null +++ b/plans/gating-multiarch.fmf @@ -0,0 +1,14 @@ +summary: Run s390utils multiarch gating tests + +discover: + how: fmf + test: + - "^/tests/sanity-multiarch" + +execute: + how: tmt + +adjust: + - when: arch = s390x + enabled: false + because: The s390utils package here is for non-s390x platforms only. diff --git a/tests/sanity-multiarch/main.fmf b/tests/sanity-multiarch/main.fmf new file mode 100644 index 0000000..f1b67d3 --- /dev/null +++ b/tests/sanity-multiarch/main.fmf @@ -0,0 +1,16 @@ +summary: sanity-multiarch +description: | + Basic test for multiarch s390utils +contact: Daniel Horak +component: + - s390utils +test: ./runtest.sh +framework: beakerlib +require: + - s390utils +duration: 5m +enabled: true +adjust: + - when: arch = s390x + enabled: false + because: This test applies to the multiarch tools. diff --git a/tests/sanity-multiarch/runtest.sh b/tests/sanity-multiarch/runtest.sh new file mode 100755 index 0000000..90b1e7c --- /dev/null +++ b/tests/sanity-multiarch/runtest.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/s390utils/Sanity/smoke-functionality +# Description: Smoke, Sanity and function tests +# Author: Dan HorĂ¡k +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2025 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="s390utils" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest "General tests" + rlRun "genprotimg --version" + rlRun "pvattest --version" + rlRun "pvimg --version" + rlRun "pvsecret --version" + rlPhaseEnd + + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd