Copy the gating tests from rhel-9

This commit is contained in:
Jakub Martisko 2024-07-22 17:03:16 +02:00
parent cd128706a6
commit 823bc78a50
6 changed files with 72 additions and 1 deletions

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

21
tests/gating/all.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
passed=0
subtests=(./compress ./decompress)
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

10
tests/gating/compress/test.sh Executable file
View File

@ -0,0 +1,10 @@
rm -rf ./in ./out
echo "Hello world" > ./in
zstd ./in -o ./out || exit 1
ls ./out || exit 1
rm -rf ./in ./out
exit 0

15
tests/gating/decompress/test.sh Executable file
View File

@ -0,0 +1,15 @@
rm -rf in out exp
echo "Hello World" > in
echo "Hello World" > exp
zstd ./in -o ./out
rm in
zstd -d ./out -o ./in
diff ./in ./exp || exit 1
rm -rf in out exp
exit 0

15
tests/tests.yml Normal file
View File

@ -0,0 +1,15 @@
---
- hosts: localhost
vars:
- artifacts: ./artifacts
remote_user: root
roles:
- role: standard-test-basic
tags:
- atomic
- classic
- container
tests:
- simple:
dir: gating
run: ./all.sh

View File

@ -18,7 +18,7 @@
Name: zstd Name: zstd
Version: 1.5.5 Version: 1.5.5
Release: 6%{?dist} Release: 7%{?dist}
Summary: Zstd compression library Summary: Zstd compression library
License: BSD-3-Clause AND GPL-2.0-only License: BSD-3-Clause AND GPL-2.0-only
@ -140,6 +140,10 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%ldconfig_scriptlets -n lib%{name} %ldconfig_scriptlets -n lib%{name}
%changelog %changelog
* Mon Jul 22 2024 Jakub Martisko <jamartis@redhat.com> - 1.5.5-7
- Add the gating test from rhel-9
Related: RHEL-50092
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.5.5-6 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.5.5-6
- Bump release for June 2024 mass rebuild - Bump release for June 2024 mass rebuild