diff --git a/.gitignore b/.gitignore index 3bf8b9c..7b697d4 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bolt.spec b/bolt.spec index 0bd4219..2122660 100644 --- a/bolt.spec +++ b/bolt.spec @@ -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 - 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 - 0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..d71584a --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +rules: + - !PassingTestCaseRule {test_case_name: dist.depcheck} diff --git a/sources b/sources index d79317f..1e80b94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bolt-0.7.tar.gz) = 6786f701501cc2680fac52cda7cdfe37971044abcf058b5c83bfa9f1d0a0381ba00e3377cfc97fcccf53760a2eafc1f8f6d0754f0e121d94201711ad8e40a135 +SHA512 (bolt-0.8.tar.gz) = 0fdbc026178a4ca6a8c53aa46933d1c411eb04e350955f8b10c7faff814576d0796dd28e56b968648e549c79cf5fa13d43970d797595af0f66457abaef8ace09 diff --git a/tests/run-it.sh b/tests/run-it.sh new file mode 100755 index 0000000..5153471 --- /dev/null +++ b/tests/run-it.sh @@ -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 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..c3c996b --- /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: + - 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