From 823bc78a5015174fcb89268b812788f200629e54 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Mon, 22 Jul 2024 17:03:16 +0200 Subject: [PATCH] Copy the gating tests from rhel-9 --- gating.yaml | 6 ++++++ tests/gating/all.sh | 21 +++++++++++++++++++++ tests/gating/compress/test.sh | 10 ++++++++++ tests/gating/decompress/test.sh | 15 +++++++++++++++ tests/tests.yml | 15 +++++++++++++++ zstd.spec | 6 +++++- 6 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 gating.yaml create mode 100755 tests/gating/all.sh create mode 100755 tests/gating/compress/test.sh create mode 100755 tests/gating/decompress/test.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4ca9235 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-10 +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 3c8aa20..d1380cc 100644 --- a/zstd.spec +++ b/zstd.spec @@ -18,7 +18,7 @@ Name: zstd Version: 1.5.5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Zstd compression library 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} %changelog +* Mon Jul 22 2024 Jakub Martisko - 1.5.5-7 +- Add the gating test from rhel-9 +Related: RHEL-50092 + * Mon Jun 24 2024 Troy Dawson - 1.5.5-6 - Bump release for June 2024 mass rebuild