Migrate to TMT-style gating in C9S
This is required for RHIVOS, see VROOM-23635.
This commit is contained in:
parent
11df222a2d
commit
f032718be1
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
@ -1,6 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/fedora.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}
|
||||
|
6
plans/fedora.fmf
Normal file
6
plans/fedora.fmf
Normal file
@ -0,0 +1,6 @@
|
||||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/gzip.git
|
||||
execute:
|
||||
how: tmt
|
11
plans/tier1-internal.fmf
Normal file
11
plans/tier1-internal.fmf
Normal file
@ -0,0 +1,11 @@
|
||||
summary: Internal gating tests plan
|
||||
discover:
|
||||
- name: Internal gating tests
|
||||
how: fmf
|
||||
filter: 'tag: CI-Tier-1'
|
||||
url: https://pkgs.devel.redhat.com/git/tests/gzip
|
||||
execute:
|
||||
how: tmt
|
||||
adjust:
|
||||
enabled: false
|
||||
when: distro == centos-stream or distro == fedora
|
2
tests/.gitignore
vendored
2
tests/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.swp
|
||||
*.retry
|
@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
passed=0
|
||||
subtests=(./gzip ./gunzip ./gzexe ./zcat ./zcmp ./zdiff ./zegrep ./zfgrep ./zforce ./zgrep ./zless ./zmore ./znew)
|
||||
total=${#subtests[@]}
|
||||
|
||||
for subtest in ${subtests[@]}
|
||||
do
|
||||
pushd $subtest >/dev/null
|
||||
./test.sh
|
||||
result=$?
|
||||
echo "Test $subtest result: $result"
|
||||
if [ "$result" == "0" ]
|
||||
then
|
||||
((passed++))
|
||||
fi
|
||||
popd >/dev/null
|
||||
done
|
||||
|
||||
echo "Passed $passed/$total tests"
|
||||
[[ $total == $passed ]] || exit 1
|
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -k ./in
|
||||
gunzip -c ./in.gz > ./out
|
||||
diff ./in ./out
|
||||
result=$?
|
||||
rm -f *.gz ./out ./in
|
||||
exit $result
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
cat <<EOF >./in
|
||||
#!/bin/bash
|
||||
echo "Hello World!"
|
||||
EOF
|
||||
chmod +x ./in
|
||||
./in >./expected
|
||||
|
||||
gzexe ./in 2>/dev/null
|
||||
/bin/bash ./in >./out
|
||||
diff ./out ./expected
|
||||
result=$?
|
||||
rm -f ./in ./in~ ./out ./expected
|
||||
exit $result
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -c ./in >/dev/null
|
||||
result=$?
|
||||
rm -f ./in *.gz
|
||||
exit $result
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello" > ./in
|
||||
echo "World!" > ./in2
|
||||
echo "Hello" > ./exp
|
||||
echo "World!" >> ./exp
|
||||
gzip -f -k ./in
|
||||
gzip -f -k ./in2
|
||||
zcat ./in.gz ./in2.gz >out
|
||||
diff ./exp ./out
|
||||
result=$?
|
||||
rm -f ./in ./in2 *.gz ./out ./exp
|
||||
exit $result
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -k ./in
|
||||
zcmp ./in ./in.gz
|
||||
result=$?
|
||||
rm -f *.gz ./out ./in
|
||||
exit $result
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -k ./in
|
||||
zdiff ./in ./in.gz
|
||||
result=$?
|
||||
rm -f *.gz ./out ./in
|
||||
exit $result
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -k ./in
|
||||
zegrep "ello" ./in.gz >/dev/null
|
||||
result=$?
|
||||
rm -f *.gz ./out ./in
|
||||
exit $result
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -k ./in
|
||||
zfgrep "ello" ./in.gz >/dev/null
|
||||
result=$?
|
||||
rm -f *.gz ./out ./in
|
||||
exit $result
|
||||
|
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -c ./in > ./out
|
||||
zforce ./out > /dev/null
|
||||
ls ./out.gz >/dev/null
|
||||
result=$?
|
||||
rm -f ./in *.gz
|
||||
exit $result
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Hello World!" > ./in
|
||||
gzip -f -k ./in
|
||||
zgrep "ello" ./in.gz >/dev/null
|
||||
result=$?
|
||||
rm -f *.gz ./out ./in
|
||||
exit $result
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
zless --help >/dev/null
|
||||
result=$?
|
||||
exit $result
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
zmore --help >/dev/null
|
||||
result=$?
|
||||
exit $result
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
znew --help >/dev/null
|
||||
result=$?
|
||||
exit $result
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
- artifacts: ./artifacts
|
||||
remote_user: root
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- atomic
|
||||
- classic
|
||||
- container
|
||||
tests:
|
||||
- simple:
|
||||
dir: gating
|
||||
run: ./all.sh
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# exercise installed gzip/gunzip programs
|
||||
echo "Bla" > bla.file
|
||||
cp bla.file bla.file.orig
|
||||
gzip bla.file
|
||||
gunzip bla.file.gz
|
||||
cmp bla.file bla.file.orig
|
||||
echo "hi"
|
||||
rm bla.file bla.file.orig
|
@ -1,32 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
- artifacts: ./artifacts
|
||||
tags:
|
||||
- atomic
|
||||
- classic
|
||||
- container
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: Create the folder where we will store the tests
|
||||
action: file state=directory path={{ item }}
|
||||
owner=root group=root
|
||||
with_items:
|
||||
- /usr/local/bin
|
||||
|
||||
- name: Install the test files
|
||||
copy: src={{ item.file }} dest=/usr/local/bin/{{ item.dest }}
|
||||
mode=0755
|
||||
with_items:
|
||||
- {file: test-simple, dest: test-simple }
|
||||
|
||||
- name: Execute the tests
|
||||
block:
|
||||
- shell: exec > /tmp/test.log && /usr/local/bin/test-simple 2>&1
|
||||
|
||||
always:
|
||||
- name: Pull out the logs
|
||||
fetch:
|
||||
dest: "{{ artifacts }}/"
|
||||
src: "/tmp/test.log"
|
||||
flat: true
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
- import_playbook: test_simple.yml
|
||||
- import_playbook: sanity.yml
|
Loading…
Reference in New Issue
Block a user