diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 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/plans/build-iso.fmf b/plans/build-iso.fmf new file mode 100644 index 0000000..e40f150 --- /dev/null +++ b/plans/build-iso.fmf @@ -0,0 +1,3 @@ +summary: Run pbzip2 tests +execute: + script: ./tests/scripts/run_tests.sh diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100755 index 0000000..86ba7be --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -eux + +# Test basic pbzip2 operations + +# Just some text we know is present +cat /usr/share/doc/pbzip2/* > test-file.txt +sha256sum test-file.txt > test-file.txt.sha256 + +# Compress a stream from stdin +pbzip2 -p4 < test-file.txt > test-stream.bz2 +[ -e test-stream.bz2 ] || exit 1 + +# Uncompress and check it +pbzip2 -p4 -dc < test-stream.bz2 > test-file.txt +sha256sum -c test-file.txt.sha256 + +# Compress a file (removes original) +pbzip2 -p4 test-file.txt +[ -e test-file.txt.bz2 ] || exit 1 + +# Uncompress and check it +pbzip2 -p4 -df test-file.txt.bz2 +sha256sum -c test-file.txt.sha256 + +echo "PASS" +exit 0