#!/bin/sh

set -eu

# Use the dummy driver unless told otherwise: this is the only one that
# can be expected to work in CI containers, but isn't selected unless
# explicitly requested.
#
# Can be overridden with e.g.
# SDL_AUDIODRIVER='pulseaudio,pipewire,alsa,dummy'
# for manual testing.
if [ -z "${SDL_AUDIODRIVER-}" ]; then
    export SDL_AUDIODRIVER=dummy
fi

triplet=$(dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
/usr/lib/$triplet/faudio/faudio_tests
