Add gating.yaml and tmt test case
Resolves: RHELMISC-5979
This commit is contained in:
parent
00abb22ed7
commit
a78a50e5e1
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
8
gating.yaml
Normal file
8
gating.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
|
|
||||||
|
|
12
plans/basic.fmf
Normal file
12
plans/basic.fmf
Normal file
@ -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
|
4
tests/basic/main.fmf
Normal file
4
tests/basic/main.fmf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
summary: Concise summary describing what the test does
|
||||||
|
duration: 30m
|
||||||
|
test: ./test.sh
|
||||||
|
framework: beakerlib
|
24
tests/basic/test.sh
Executable file
24
tests/basic/test.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user