mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
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:
@@ -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"
|
||||
Reference in New Issue
Block a user