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:
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <QtTest>
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QSignalSpy>
|
||||
#include <QTemporaryDir>
|
||||
#include <QDir>
|
||||
@@ -100,5 +100,11 @@ void RadioBrowserRaceTest::latest_request_wins_after_rapid_category_switch()
|
||||
|| finalName == QStringLiteral("NL Station"));
|
||||
}
|
||||
|
||||
QTEST_MAIN(RadioBrowserRaceTest)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
RadioBrowserRaceTest test;
|
||||
return QTest::qExec(&test, argc, argv);
|
||||
}
|
||||
|
||||
#include "radiobrowser_race_test.moc"
|
||||
Reference in New Issue
Block a user