diff --git a/.gitignore b/.gitignore index b66659e..e9a3704 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +#testing +tests/artifacts/ +tests/source/ + upower-0.9.5.tar.bz2 /upower-0.9.6.tar.bz2 /upower-0.9.7.tar.bz2 diff --git a/tests/run-it.sh b/tests/run-it.sh new file mode 100755 index 0000000..5db3a05 --- /dev/null +++ b/tests/run-it.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash +set -u + +# main script +IT="${1:-source/src/linux/integration-test}" + +# check if we need to install additional packages +# which is the case if we are on RHEL 8 +source /etc/os-release || exit 1 + +if [[ "$ID" = *"rhel"* ]] && [[ "$VERSION_ID" == *"8"* ]]; then + dnf config-manager -y --add-repo umockdev.repo + dnf install -y umockdev-devel python3-gobject-base + pip3 install python-dbusmock +fi + +# execute the integration test via umockdev-wrapper +exec umockdev-wrapper "$IT" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..627611a --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,23 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + - role: standard-test-basic + tags: + - atomic + - classic + required_packages: + - upower + - pygobject3-devel + - python3-dbus + - python3-dbusmock + - umockdev-devel + tests: + - smoke: + dir: smoke + run: upower -d + - integration: + dir: . + run: ./run-it.sh source/src/linux/integration-test