diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/gating/all.sh b/tests/gating/all.sh new file mode 100755 index 0000000..f8621c3 --- /dev/null +++ b/tests/gating/all.sh @@ -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 diff --git a/tests/gating/compress/test.sh b/tests/gating/compress/test.sh new file mode 100755 index 0000000..2145407 --- /dev/null +++ b/tests/gating/compress/test.sh @@ -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 diff --git a/tests/gating/decompress/test.sh b/tests/gating/decompress/test.sh new file mode 100755 index 0000000..7191225 --- /dev/null +++ b/tests/gating/decompress/test.sh @@ -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 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..da0d623 --- /dev/null +++ b/tests/tests.yml @@ -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 diff --git a/zstd.spec b/zstd.spec index 07badb5..23ec4fc 100644 --- a/zstd.spec +++ b/zstd.spec @@ -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 - 1.5.1-2 +- Add some basic gating tests + Resolves: rhbz#2050272 + * Wed Jan 12 2022 Michel Alexandre Salim - 1.5.1-1 - Rebase to the latest upstream version - Enable optional gz, xz/lzma, and lz4 support in the zstd tool