Add gating tests for libfprint

This commit is contained in:
Benjamin Berg 2019-10-08 15:58:12 +02:00
parent 5c95bf2fe1
commit 7ca8bce3e8
3 changed files with 64 additions and 0 deletions

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
rules:
- !PassingTestCaseRule {test_case_name: dist.depcheck}

34
tests/run-umockdev.sh Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/bash
set -u
# Switch into the tests directory
cd source/tests || exit 1
# 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
# Each directory in source/tests is a umockdev based test
# discover them
declare -a TESTS=()
for f in *; do
test -d $f && TESTS+=( "$f" )
done
export FP_DEVICE_EMULATION=1
# execute all the tests, one by one
RESULT=0
for test in ${TESTS[@]}; do
echo "$test"
./umockdev-test.py "$test"
((RESULT += $?))
done
exit $RESULT

24
tests/tests.yml Normal file
View File

@ -0,0 +1,24 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- atomic
- classic
required_packages:
- bolt
- pygobject3-devel
- python3-dbus
- python3-dbusmock
- umockdev-devel
tests:
- virtual_image:
dir: .
run: source/tests/virtual-image.py
- umockdev:
dir: .
run: run-umockdev.sh