tests: Add gating test
Do a basic test on pbzip2 for gating. Resolves: RHEL-53370
This commit is contained in:
parent
1e8e878d56
commit
9b7fd16b8b
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
6
gating.yaml
Normal file
6
gating.yaml
Normal 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}
|
||||
3
plans/build-iso.fmf
Normal file
3
plans/build-iso.fmf
Normal file
@ -0,0 +1,3 @@
|
||||
summary: Run pbzip2 tests
|
||||
execute:
|
||||
script: ./tests/scripts/run_tests.sh
|
||||
27
tests/scripts/run_tests.sh
Executable file
27
tests/scripts/run_tests.sh
Executable file
@ -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
|
||||
Loading…
Reference in New Issue
Block a user