udisks2/plans/udisks2.fmf

75 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

summary: udisks2 gating tests
2024-05-14 09:41:06 +00:00
environment-file:
- plans/env.yaml
prepare:
how: install
package:
- rpm-build
2024-05-14 09:41:06 +00:00
- 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
2024-05-14 09:41:06 +00:00
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: |
2024-05-14 09:41:06 +00:00
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"
2024-05-14 09:41:06 +00:00
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
2024-05-14 09:41:06 +00:00
execute:
- how: tmt
adjust:
enabled: false
when: distro == fedora
because: They don't have access to internal repos.