diff --git a/debian/tests/control b/debian/tests/control index 956fb86ec623076ff85b52377f26820d27649aed..56dee881698b8b08f65ffe8b6638f55025e37056 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -2,6 +2,10 @@ Tests: build Restrictions: allow-stderr Depends: libsteam-runtime-tools-0-dev +Tests: run +Restrictions: allow-stderr +Depends: libsteam-runtime-tools-0-tests + Tests: gnome-desktop-testing Restrictions: allow-stderr Depends: gnome-desktop-testing, libsteam-runtime-tools-0-tests diff --git a/debian/tests/run b/debian/tests/run new file mode 100755 index 0000000000000000000000000000000000000000..2b5b27134ceedb569a5e97892e1600a849e71362 --- /dev/null +++ b/debian/tests/run @@ -0,0 +1,40 @@ +#!/bin/sh + +# Copyright © 2019 Collabora Ltd. +# +# SPDX-License-Identifier: MIT +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# This is basically a small reimplementation of gnome-desktop-testing-runner, +# for older runtimes that don't have it. + +set -eu + +fail= + +for t in /usr/share/installed-tests/steam-runtime-tools-0/*.test; do + exec="$(sed -ne 's/^Exec=//p' "$t")" + $exec || fail=yes +done + +if [ -n "$fail" ]; then + exit 1 +fi