ci: execute integration tests

Run the integration tests for the 'boltd' installed on the system.
A custom script is used so that each tests gets run individually.
This commit is contained in:
Christian Kellner 2019-05-28 18:38:31 +02:00
parent 1141b22b95
commit f0321d2d5a
2 changed files with 30 additions and 0 deletions

20
tests/run-it.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/bash
set -u
IT="$1"
# discover all the tests
TESTS=()
while IFS= read -r line; do
TESTS+=( "${line% *}" )
done < <( "$1" list-tests )
# execute all the tests, one by one
RESULT=0
for test in ${TESTS[@]}; do
echo "$test"
umockdev-wrapper "$IT" "$test"
((RESULT += $?))
done
exit $RESULT

View File

@ -1,12 +1,22 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- classic
required_packages:
- bolt
- pygobject3-devel
- python3-dbus
- python3-dbusmock
- umockdev-devel
tests:
- smoke:
dir: smoke
run: boltctl --version
- integration:
dir: .
run: ./run-it.sh source/tests/test-integration