eabec01e38
Greatly reworked tmt gating tests, added missing dependencies and made the test run more resilient to interruptions. Resolves: RHEL-35571
75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
summary: udisks2 gating tests
|
|
environment-file:
|
|
- plans/env.yaml
|
|
|
|
prepare:
|
|
how: install
|
|
package:
|
|
- rpm-build
|
|
- dbus-daemon
|
|
- python3-blivet
|
|
- python3-bytesize
|
|
- python3-systemd
|
|
- targetcli
|
|
- smartmontools
|
|
- xfsprogs
|
|
- dosfstools
|
|
- e2fsprogs
|
|
- cryptsetup
|
|
- python3-six
|
|
- sqlite
|
|
- libstoragemgmt
|
|
- python3-libstoragemgmt
|
|
- udisks2-iscsi
|
|
- udisks2-lsm
|
|
- udisks2-lvm2
|
|
- nvme-cli
|
|
- nvmetcli
|
|
|
|
discover:
|
|
how: shell
|
|
url: https://gitlab.com/redhat/centos-stream/rpms/udisks2.git
|
|
ref: c10s
|
|
dist-git-source: true
|
|
dist-git-install-builddeps: true
|
|
tests:
|
|
- name: regression tests
|
|
test: |
|
|
set -x
|
|
if [ -z "$PKG_VER" ]; then
|
|
PKG_VER=`rpmspec -q --srpm --qf "%{version}" udisks2.spec`
|
|
fi
|
|
if [ -z "$PKG_VER" ]; then
|
|
echo "Error: Unable to extract package version"
|
|
exit 1
|
|
fi
|
|
pushd "$TMT_SOURCE_DIR/udisks-$PKG_VER"
|
|
find -path './src/tests/*.py' -or -path './src/tests/integration-test' | while read i; do sed -e 's/time\\.sleep(/time.sleep(5*/' -i "$i"; done
|
|
echo "UDISKS_MODULES_ENABLED = { 'lvm2', 'iscsi', 'lsm' }" > src/tests/dbus-tests/config_h.py
|
|
echo "PACKAGE_SYSCONF_DIR = '/etc/'" >> src/tests/dbus-tests/config_h.py
|
|
sed -i src/tests/dbus-tests/udiskstestcase.py -e "s!flight_record.log!$TMT_TEST_DATA/flight_record.log!"
|
|
sed -i src/tests/dbus-tests/run_tests.py -e "s!journaldump.log!$TMT_TEST_DATA/journaldump.log!"
|
|
|
|
# prepare system services
|
|
systemctl restart libstoragemgmt.service
|
|
systemctl restart iscsi-init.service
|
|
systemctl restart udisks2.service
|
|
udisksctl dump &> "$TMT_TEST_DATA/pre-udisksctl_dump.log"
|
|
|
|
# d-bus test
|
|
targetcli clearconfig confirm=True
|
|
python3 src/tests/dbus-tests/run_tests.py --system
|
|
targetcli clearconfig confirm=True
|
|
|
|
# integration test
|
|
pushd src/tests
|
|
python3 ./integration-test --log-file="$TMT_TEST_DATA/integration-tests.log" 2>&1
|
|
popd
|
|
|
|
execute:
|
|
- how: tmt
|
|
adjust:
|
|
enabled: false
|
|
when: distro == fedora
|
|
because: They don't have access to internal repos.
|