#!/bin/sh
# Builds and runs the tests offscreen: no display, no D-Bus, no scanning.
set -eu

ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
mkdir -p "$ROOT/build/tests"
cd "$ROOT/build/tests"

qmake6 "$ROOT/tests/airgraph_tests.pro"
make -j"$(nproc)"
QT_QPA_PLATFORM=offscreen QT_FORCE_STDERR_LOGGING=1 ./airgraph_tests "$@"
