Related: #1982198 - implement a gating test
... based on `fmf` and `tmt`
This commit is contained in:
parent
1466fcfa11
commit
35e5f1aae8
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
6
ci.fmf
Normal file
6
ci.fmf
Normal file
@ -0,0 +1,6 @@
|
||||
summary:
|
||||
Run all tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
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}
|
2
tests/tree-smoke/.gitignore
vendored
Normal file
2
tests/tree-smoke/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/dir-tree
|
||||
/tree.out
|
7
tests/tree-smoke/main.fmf
Normal file
7
tests/tree-smoke/main.fmf
Normal file
@ -0,0 +1,7 @@
|
||||
summary: Check whether `tree` works as expected.
|
||||
test: ./runtest.sh
|
||||
require:
|
||||
- bash
|
||||
- coreutils
|
||||
- diffutils
|
||||
- tree
|
39
tests/tree-smoke/runtest.sh
Executable file
39
tests/tree-smoke/runtest.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# exit immediately if any command returns non-zero exit code
|
||||
set -e
|
||||
|
||||
# print commands as they are executed by the shell interpreter
|
||||
set -x
|
||||
|
||||
# set locale
|
||||
export LANG=C
|
||||
export LC_ALL=C
|
||||
locale
|
||||
|
||||
# print basic info about `tree`
|
||||
rpm -q tree
|
||||
command -v tree
|
||||
tree --version
|
||||
ldd /usr/bin/tree
|
||||
|
||||
# create a testing directory tree
|
||||
rm -rf dir-tree
|
||||
mkdir dir-tree
|
||||
(
|
||||
set +x
|
||||
cd dir-tree
|
||||
for level in {1..16}; do
|
||||
subdir=subdir-l${level}
|
||||
touch {A,Z,a,z}-regular
|
||||
ln -s a-regular symlink
|
||||
ln -s $subdir dir-symlink
|
||||
ln -s .. parent-dir-symlink
|
||||
ln -s / root-dir-symlink
|
||||
ln -s invalid danglging-symlink
|
||||
mkdir -p $subdir
|
||||
cd $subdir
|
||||
done
|
||||
)
|
||||
tree dir-tree > tree.out
|
||||
diff -u tree.{exp,out}
|
10
tests/tree-smoke/sync.sh
Executable file
10
tests/tree-smoke/sync.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# print commands as they are executed by the shell interpreter
|
||||
set -x
|
||||
|
||||
# run the test
|
||||
./runtest.sh
|
||||
|
||||
# save current out put as the expected output
|
||||
mv -v tree.{out,exp}
|
163
tests/tree-smoke/tree.exp
Normal file
163
tests/tree-smoke/tree.exp
Normal file
@ -0,0 +1,163 @@
|
||||
dir-tree
|
||||
|-- A-regular
|
||||
|-- Z-regular
|
||||
|-- a-regular
|
||||
|-- danglging-symlink -> invalid
|
||||
|-- dir-symlink -> subdir-l1
|
||||
|-- parent-dir-symlink -> ..
|
||||
|-- root-dir-symlink -> /
|
||||
|-- subdir-l1
|
||||
| |-- A-regular
|
||||
| |-- Z-regular
|
||||
| |-- a-regular
|
||||
| |-- danglging-symlink -> invalid
|
||||
| |-- dir-symlink -> subdir-l2
|
||||
| |-- parent-dir-symlink -> ..
|
||||
| |-- root-dir-symlink -> /
|
||||
| |-- subdir-l2
|
||||
| | |-- A-regular
|
||||
| | |-- Z-regular
|
||||
| | |-- a-regular
|
||||
| | |-- danglging-symlink -> invalid
|
||||
| | |-- dir-symlink -> subdir-l3
|
||||
| | |-- parent-dir-symlink -> ..
|
||||
| | |-- root-dir-symlink -> /
|
||||
| | |-- subdir-l3
|
||||
| | | |-- A-regular
|
||||
| | | |-- Z-regular
|
||||
| | | |-- a-regular
|
||||
| | | |-- danglging-symlink -> invalid
|
||||
| | | |-- dir-symlink -> subdir-l4
|
||||
| | | |-- parent-dir-symlink -> ..
|
||||
| | | |-- root-dir-symlink -> /
|
||||
| | | |-- subdir-l4
|
||||
| | | | |-- A-regular
|
||||
| | | | |-- Z-regular
|
||||
| | | | |-- a-regular
|
||||
| | | | |-- danglging-symlink -> invalid
|
||||
| | | | |-- dir-symlink -> subdir-l5
|
||||
| | | | |-- parent-dir-symlink -> ..
|
||||
| | | | |-- root-dir-symlink -> /
|
||||
| | | | |-- subdir-l5
|
||||
| | | | | |-- A-regular
|
||||
| | | | | |-- Z-regular
|
||||
| | | | | |-- a-regular
|
||||
| | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | |-- dir-symlink -> subdir-l6
|
||||
| | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | |-- root-dir-symlink -> /
|
||||
| | | | | |-- subdir-l6
|
||||
| | | | | | |-- A-regular
|
||||
| | | | | | |-- Z-regular
|
||||
| | | | | | |-- a-regular
|
||||
| | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | |-- dir-symlink -> subdir-l7
|
||||
| | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | |-- subdir-l7
|
||||
| | | | | | | |-- A-regular
|
||||
| | | | | | | |-- Z-regular
|
||||
| | | | | | | |-- a-regular
|
||||
| | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | |-- dir-symlink -> subdir-l8
|
||||
| | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | |-- subdir-l8
|
||||
| | | | | | | | |-- A-regular
|
||||
| | | | | | | | |-- Z-regular
|
||||
| | | | | | | | |-- a-regular
|
||||
| | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | |-- dir-symlink -> subdir-l9
|
||||
| | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | |-- subdir-l9
|
||||
| | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | |-- dir-symlink -> subdir-l10
|
||||
| | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | |-- subdir-l10
|
||||
| | | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | | |-- dir-symlink -> subdir-l11
|
||||
| | | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | | |-- subdir-l11
|
||||
| | | | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | | | |-- dir-symlink -> subdir-l12
|
||||
| | | | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | | | |-- subdir-l12
|
||||
| | | | | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | | | | |-- dir-symlink -> subdir-l13
|
||||
| | | | | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | | | | |-- subdir-l13
|
||||
| | | | | | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | | | | | |-- dir-symlink -> subdir-l14
|
||||
| | | | | | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | | | | | |-- subdir-l14
|
||||
| | | | | | | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | | | | | | |-- dir-symlink -> subdir-l15
|
||||
| | | | | | | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | | | | | | |-- subdir-l15
|
||||
| | | | | | | | | | | | | | | |-- A-regular
|
||||
| | | | | | | | | | | | | | | |-- Z-regular
|
||||
| | | | | | | | | | | | | | | |-- a-regular
|
||||
| | | | | | | | | | | | | | | |-- danglging-symlink -> invalid
|
||||
| | | | | | | | | | | | | | | |-- dir-symlink -> subdir-l16
|
||||
| | | | | | | | | | | | | | | |-- parent-dir-symlink -> ..
|
||||
| | | | | | | | | | | | | | | |-- root-dir-symlink -> /
|
||||
| | | | | | | | | | | | | | | |-- subdir-l16
|
||||
| | | | | | | | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | | | | | | | `-- z-regular
|
||||
| | | | | | | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | | | | | | `-- z-regular
|
||||
| | | | | | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | | | | | `-- z-regular
|
||||
| | | | | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | | | | `-- z-regular
|
||||
| | | | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | | | `-- z-regular
|
||||
| | | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | | `-- z-regular
|
||||
| | | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | | `-- z-regular
|
||||
| | | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | | `-- z-regular
|
||||
| | | | | | | |-- symlink -> a-regular
|
||||
| | | | | | | `-- z-regular
|
||||
| | | | | | |-- symlink -> a-regular
|
||||
| | | | | | `-- z-regular
|
||||
| | | | | |-- symlink -> a-regular
|
||||
| | | | | `-- z-regular
|
||||
| | | | |-- symlink -> a-regular
|
||||
| | | | `-- z-regular
|
||||
| | | |-- symlink -> a-regular
|
||||
| | | `-- z-regular
|
||||
| | |-- symlink -> a-regular
|
||||
| | `-- z-regular
|
||||
| |-- symlink -> a-regular
|
||||
| `-- z-regular
|
||||
|-- symlink -> a-regular
|
||||
`-- z-regular
|
||||
|
||||
64 directories, 96 files
|
@ -1,7 +1,7 @@
|
||||
Summary: File system tree viewer
|
||||
Name: tree-pkg
|
||||
Version: 1.8.0
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
|
||||
# The entire source code is GPLv2+ except strverscmp.c which is LGPLv2+
|
||||
License: GPLv2+ and LGPLv2+
|
||||
@ -74,7 +74,7 @@ chmod -x $RPM_BUILD_ROOT%{_mandir}/man1/tree.1
|
||||
%doc README
|
||||
|
||||
%changelog
|
||||
* Fri Sep 17 2021 Kamil Dudka <kdudka@redhat.com> - 1.8.0-9
|
||||
* Fri Sep 17 2021 Kamil Dudka <kdudka@redhat.com> - 1.8.0-10
|
||||
- reflect review comments from Fedora Review (#2001467)
|
||||
|
||||
* Fri Sep 03 2021 Kamil Dudka <kdudka@redhat.com> - 1.8.0-8
|
||||
|
Loading…
Reference in New Issue
Block a user