diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..bfd22ab --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + + diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..37f62ed --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,12 @@ +summary: Basic smoke test +discover: + how: fmf + dist-git-source: true + dist-git-install-builddeps: true +prepare: + name: tmt + how: install + package: + - fmt +execute: + how: tmt diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..1718d52 --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1,4 @@ +summary: Concise summary describing what the test does +duration: 30m +test: ./test.sh +framework: beakerlib diff --git a/tests/basic/test.sh b/tests/basic/test.sh new file mode 100755 index 0000000..d1cb31a --- /dev/null +++ b/tests/basic/test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlPhaseEnd + + rlPhaseStartTest + BUILD_PATH=$(rpm -q --qf '%{NAME}-%{VERSION}' fmt) + echo $BUILD_PATH > output + rlAssertNotGrep "installed" output + rlRun "rpmbuild -bc --define \"_sourcedir $TMT_SOURCE_DIR\" --define \"_builddir $TMT_SOURCE_DIR/BUILD\" $TMT_SOURCE_DIR/fmt.spec" 0 "Build" + rlRun "ctest --test-dir $TMT_SOURCE_DIR/BUILD/$BUILD_PATH/redhat-linux-build --output-on-failure --force-new-ctest-process" 0 "Test" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd