| 1 | #!/bin/sh |
| 2 | |
| 3 | set -eu |
| 4 | |
| 5 | namespace=SDL2_compat/ |
| 6 | |
| 7 | if [ -z "${HOME-}" ] || ! [ -w "${HOME}" ]; then |
| 8 | export HOME="${AUTOPKGTEST_TMP}" |
| 9 | fi |
| 10 | |
| 11 | export SDL_AUDIODRIVER=dummy |
| 12 | export SDL_VIDEODRIVER=dummy |
| 13 | export SDL2COMPAT_DEBUG_LOGGING=1 |
| 14 | |
| 15 | cd "$AUTOPKGTEST_TMP" |
| 16 | |
| 17 | if [ -z "$(ginsttest-runner -l "$namespace")" ]; then |
| 18 | echo "Error: no installed-tests found matching $namespace" >&2 |
| 19 | exit 1 |
| 20 | fi |
| 21 | |
| 22 | failed=0 |
| 23 | |
| 24 | ginsttest-runner --tap "$namespace" || failed=1 |
| 25 | |
| 26 | # This one fails when we run the whole suite, but succeeds when run |
| 27 | # individually: https://github.com/libsdl-org/sdl2-compat/issues/126. |
| 28 | # Check that it doesn't get any worse. |
| 29 | /usr/libexec/installed-tests/SDL2_compat/testautomation --filter video_getSetWindowGrab || failed=1 |
| 30 | |
| 31 | exit "$failed" |