Skip to content

Commit

Permalink
Tests: run tests on Android target
Browse files Browse the repository at this point in the history
From some time tests were not run on Android. This patch turn them on
again.

Task-number: QTBUG-118571
Task-number: QTBUG-118572
Task-number: QTBUG-118573
Pick-to: 6.6 6.5
Change-Id: I7b61d546966a8b43a6fddc0db27e62ad3485fbed
Reviewed-by: Assam Boudjelthia <[email protected]>
  • Loading branch information
Bartlomiej Moskal committed Nov 29, 2023
1 parent 2998494 commit f5102ab
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions coin/instructions/run_ffmpeg_backend_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ enable_if:
- condition: runtime
env_var: TARGET_OSVERSION_COIN
contains_value: opensuse
- condition: runtime
env_var: TARGET_OSVERSION_COIN
contains_value: android_any
- condition: runtime
env_var: NON_QTBASE_CMAKE_ARGS
contains_value: "-DFFMPEG_DIR=/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ void tst_QAudioDecoderBackend::init()

void tst_QAudioDecoderBackend::initTestCase()
{
#ifdef Q_OS_ANDROID
QSKIP("SKIP initTestCase on CI, because of QTBUG-118572");
#endif
QAudioDecoder d;
if (!d.isSupported())
QSKIP("Audio decoder service is not available");
Expand Down
3 changes: 3 additions & 0 deletions tests/auto/integration/qaudiosink/tst_qaudiosink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ void tst_QAudioSink::generate_audiofile_testrows()

void tst_QAudioSink::initTestCase()
{
#ifdef Q_OS_ANDROID
QSKIP("SKIP initTestCase on CI, because of QTBUG-118572");
#endif
// Only perform tests if audio output device exists
const QList<QAudioDevice> devices = QMediaDevices::audioOutputs();

Expand Down
4 changes: 4 additions & 0 deletions tests/auto/integration/qaudiosource/tst_qaudiosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ QString tst_QAudioSource::formatToFileName(const QAudioFormat &format)
void tst_QAudioSource::initTestCase()
{
m_inCISystem = qEnvironmentVariable("QTEST_ENVIRONMENT").toLower() == "ci";
#ifdef Q_OS_ANDROID
// SKIP initTestCase because of QTBUG-118572
m_inCISystem = true;
#endif

if (m_inCISystem)
QSKIP("SKIP initTestCase on CI. To be fixed");
Expand Down
3 changes: 3 additions & 0 deletions tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public Q_SLOTS:

void tst_QCameraBackend::initTestCase()
{
#ifdef Q_OS_ANDROID
QSKIP("SKIP initTestCase on CI, because of QTBUG-118571");
#endif
QCamera camera;
noCamera = !camera.isAvailable();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class tst_QMediaCaptureSession: public QObject

private slots:

#ifdef Q_OS_ANDROID
void initTestCase() { QSKIP("SKIP initTestCase on CI, because of QTBUG-118571"); }
#endif
void testAudioMute();
void stress_test_setup_and_teardown();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ bool tst_QMediaPlayerBackend::canCreateRtspStream() const

void tst_QMediaPlayerBackend::initTestCase()
{
#ifdef Q_OS_ANDROID
QSKIP("SKIP initTestCase on CI, because of QTBUG-118571");
#endif

QMediaPlayer player;
if (!player.isAvailable())
QSKIP("Media player service is not available");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ void tst_QScreenCaptureBackend::removeWhileCapture(

void tst_QScreenCaptureBackend::initTestCase()
{
#ifdef Q_OS_ANDROID
QSKIP("SKIP initTestCase on CI, because of QTBUG-118573");
#endif
#if defined(Q_OS_LINUX)
if (qEnvironmentVariable("QTEST_ENVIRONMENT").toLower() == "ci" &&
qEnvironmentVariable("XDG_SESSION_TYPE").toLower() != "x11")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class tst_QWindowCaptureBackend : public QObject
private slots:
static void initTestCase()
{
#ifdef Q_OS_ANDROID
QSKIP("Feature does not work on Android");
#endif
#if defined(Q_OS_LINUX)
if (qEnvironmentVariable("QTEST_ENVIRONMENT").toLower() == "ci"
&& qEnvironmentVariable("XDG_SESSION_TYPE").toLower() != "x11")
Expand Down

0 comments on commit f5102ab

Please sign in to comment.