Add gating tests
This commit is contained in:
parent
e29c76823f
commit
dcda9fe564
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
21
tests/gating/all.sh
Executable file
21
tests/gating/all.sh
Executable 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
10
tests/gating/compress/test.sh
Executable 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
15
tests/gating/decompress/test.sh
Executable 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
15
tests/tests.yml
Normal 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
|
@ -34,7 +34,7 @@
|
||||
|
||||
Name: zstd
|
||||
Version: 1.5.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Zstd compression library
|
||||
|
||||
License: BSD and GPLv2
|
||||
@ -163,6 +163,10 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
|
||||
%ldconfig_scriptlets -n lib%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Feb 07 2022 Jakub Martisko <jamartis@redhat.com> - 1.5.1-2
|
||||
- Add some basic gating tests
|
||||
Resolves: rhbz#2050272
|
||||
|
||||
* Wed Jan 12 2022 Michel Alexandre Salim <salimma@centosproject.org> - 1.5.1-1
|
||||
- Rebase to the latest upstream version
|
||||
- Enable optional gz, xz/lzma, and lz4 support in the zstd tool
|
||||
|
Loading…
Reference in New Issue
Block a user