Compare commits

...
Sign in to create a new pull request.

8 commits

Author SHA1 Message Date
Christian Kellner
86f0dd3980 ci: it is .yAml not .yml for gating.yaml
And apparently that is important.
2019-06-14 15:35:03 +02:00
Christian Kellner
4058e23695 bolt 0.8 release
Major new feature is iommu support. Package the new CHANGELOG.md
and adapt for the dbus configuration file move to /usr from /etc.
2019-06-14 14:45:20 +02:00
Christian Kellner
e30fba1fac ci: add support for running on rhel
This is so we have one script for Fedora/RHEL. It can also handle
bolt < 0.6 now, after which the test-integration list-test output
changed.
2019-06-03 15:19:59 +02:00
Christian Kellner
52f1373438 ci: add -atomic to the tags
Can't hurt.
2019-06-03 15:19:59 +02:00
Christian Kellner
779d5c5d1a 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.
2019-05-28 20:23:56 +02:00
Christian Kellner
82ab8ea99b ci: enable gating
Now that we have some basic tests, let's gate on them.
2019-05-28 18:22:55 +02:00
Christian Kellner
757c1edc2d gitignore: add test related directories to ignore
For no artifacts/ and source/ in the test/ dir.
2019-05-28 18:22:46 +02:00
Christian Kellner
216de67120 ci: add basic smoke test for bolt
Just execute 'boltctl --version' to check we can at least run.
2019-05-28 18:22:40 +02:00
6 changed files with 95 additions and 5 deletions

5
.gitignore vendored
View file

@ -4,6 +4,10 @@ results_bolt/
*.log
*.rpm
#testing
tests/artifacts/
tests/source/
#tarballs
/bolt-0.1.tar.gz
/bolt-0.2.tar.gz
@ -12,3 +16,4 @@ results_bolt/
/bolt-0.5.tar.gz
/bolt-0.6.tar.gz
/bolt-0.7.tar.gz
/bolt-0.8.tar.gz

View file

@ -1,6 +1,6 @@
Name: bolt
Version: 0.7
Release: 2%{?dist}
Version: 0.8
Release: 1%{?dist}
Summary: Thunderbolt device manager
License: LGPLv2+
URL: https://gitlab.freedesktop.org/bolt/bolt
@ -61,12 +61,12 @@ mentioned tasks.
%files
%license COPYING
%doc README.md
%doc README.md CHANGELOG.md
%{_bindir}/boltctl
%{_libexecdir}/boltd
%{_unitdir}/%{name}.service
%{_udevrulesdir}/*-%{name}.rules
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.bolt.conf
%{_datadir}/dbus-1/system.d/org.freedesktop.bolt.conf
%{_datadir}/dbus-1/interfaces/org.freedesktop.bolt.xml
%{_datadir}/polkit-1/actions/org.freedesktop.bolt.policy
%{_datadir}/polkit-1/rules.d/org.freedesktop.bolt.rules
@ -76,6 +76,11 @@ mentioned tasks.
%ghost %dir %{_localstatedir}/lib/boltd
%changelog
* Thu Jun 13 2019 Christian Kellner <ckellner@redhat.com> - 0.8-1
- bolt 0.8 release
D-Bus Configuration moved from sysconfdir to datadir.
Package new CHNAGELOG.md.
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

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}

View file

@ -1 +1 @@
SHA512 (bolt-0.7.tar.gz) = 6786f701501cc2680fac52cda7cdfe37971044abcf058b5c83bfa9f1d0a0381ba00e3377cfc97fcccf53760a2eafc1f8f6d0754f0e121d94201711ad8e40a135
SHA512 (bolt-0.8.tar.gz) = 0fdbc026178a4ca6a8c53aa46933d1c411eb04e350955f8b10c7faff814576d0796dd28e56b968648e549c79cf5fa13d43970d797595af0f66457abaef8ace09

51
tests/run-it.sh Executable file
View file

@ -0,0 +1,51 @@
#!/usr/bin/bash
set -u
# helper functions
vcmp_lt () {
# argument $1 is less than $2
MV=$(echo "$@" | tr " " "\n" | sort -rV | head -n1)
test "$1" != "$MV"
}
# main script
IT="${1:-source/tests/test-integration}"
# 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
BOLT_VERSION=$(boltctl --version | cut -d " " -f2)
# check if we can even discover the tests
"$IT" list-tests > /dev/null || exit 1
# The format of "list-tests" changed with 0.6
if vcmp_lt $BOLT_VERSION 0.6; then
echo "Old style integration test names"
DELIM=" "
else
DELIM=$'\n'
fi
# discover all the tests
declare -a TESTS=()
while IFS= read -r -d "$DELIM" line; do
TESTS+=( "${line% *}" )
done < <( $IT 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

23
tests/tests.yml Normal file
View file

@ -0,0 +1,23 @@
---
- 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:
- smoke:
dir: smoke
run: boltctl --version
- integration:
dir: .
run: ./run-it.sh source/tests/test-integration