fix(ci): run Qt tests headless in Docker/CI

Use QCoreApplication for the race test, set QT_QPA_PLATFORM=offscreen
and QT_MEDIA_BACKEND=ffmpeg for playback tests, and export the same vars
in CI before ctest to avoid subprocess aborts without a display.
This commit is contained in:
Sebastian Palencsar
2026-06-21 08:56:03 +02:00
parent f4b3109c32
commit 722f417c53
4 changed files with 28 additions and 5 deletions

View File

@@ -328,5 +328,14 @@ void RadioBackendPlaybackTest::manual_station_accepts_http_and_https()
QCOMPARE(backend.stations().size(), 2);
}
QTEST_MAIN(RadioBackendPlaybackTest)
int main(int argc, char *argv[])
{
qputenv("QT_QPA_PLATFORM", "offscreen");
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
QApplication app(argc, argv);
RadioBackendPlaybackTest test;
return QTest::qExec(&test, argc, argv);
}
#include "radiobackend_playback_test.moc"