Added skips to reported bugs in qmediaplayerbackend test

- Changed some checks to QTRY's to avoid using qWait's

Change-Id: Ib7fb6fd25170c40969389c9c1b16f4a4e0e7a5e7
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
Kurt Korbatits
2012-08-06 10:46:52 +10:00
committed by Qt by Nokia
parent 921397e695
commit 93bbba0cc3

View File

@@ -93,6 +93,8 @@ private:
QMediaContent localWavFile;
QMediaContent localVideoFile;
QMediaContent localCompressedSoundFile;
bool m_inCISystem;
};
/*
@@ -222,6 +224,8 @@ void tst_QMediaPlayerBackend::initTestCase()
mediaCandidates << QFINDTESTDATA("testdata/nokia-tune.mkv");
mediaCandidates << QFINDTESTDATA("testdata/nokia-tune.mp3");
localCompressedSoundFile = selectSoundFile(mediaCandidates);
qgetenv("QT_TEST_CI").toInt(&m_inCISystem,10);
}
void tst_QMediaPlayerBackend::cleanup()
@@ -283,8 +287,7 @@ void tst_QMediaPlayerBackend::unloadMedia()
player.play();
QTest::qWait(250);
QVERIFY(player.position() > 0);
QTRY_VERIFY(player.position() > 0);
QVERIFY(player.duration() > 0);
stateSpy.clear();
@@ -332,8 +335,7 @@ void tst_QMediaPlayerBackend::playPauseStop()
QTRY_VERIFY(statusSpy.count() > 0 &&
statusSpy.last()[0].value<QMediaPlayer::MediaStatus>() == QMediaPlayer::BufferedMedia);
QTest::qWait(500);
QVERIFY(player.position() > 0);
QTRY_VERIFY(player.position() > 0);
QVERIFY(player.duration() > 0);
QVERIFY(positionSpy.count() > 0);
QVERIFY(positionSpy.last()[0].value<qint64>() > 0);
@@ -546,6 +548,11 @@ void tst_QMediaPlayerBackend::volumeAcrossFiles_data()
void tst_QMediaPlayerBackend::volumeAcrossFiles()
{
#ifdef Q_OS_LINUX
if (m_inCISystem)
QSKIP("QTBUG-26577 Fails with gstreamer backend on ubuntu 10.4");
#endif
QFETCH(int, volume);
QFETCH(bool, muted);
@@ -569,22 +576,18 @@ void tst_QMediaPlayerBackend::volumeAcrossFiles()
//to ensure the backend doesn't change volume/muted
//async during file loading.
QTest::qWait(50);
QCOMPARE(player.volume(), volume);
QTRY_COMPARE(player.volume(), volume);
QCOMPARE(player.isMuted(), muted);
player.setMedia(QMediaContent());
QTest::qWait(50);
QCOMPARE(player.volume(), volume);
QTRY_COMPARE(player.volume(), volume);
QCOMPARE(player.isMuted(), muted);
player.setMedia(localWavFile);
player.pause();
QTest::qWait(50);
QCOMPARE(player.volume(), volume);
QTRY_COMPARE(player.volume(), volume);
QCOMPARE(player.isMuted(), muted);
}
@@ -677,6 +680,11 @@ void tst_QMediaPlayerBackend::seekPauseSeek()
void tst_QMediaPlayerBackend::subsequentPlayback()
{
#ifdef Q_OS_LINUX
if (m_inCISystem)
QSKIP("QTBUG-26769 Fails with gstreamer backend on ubuntu 10.4, setPosition(0)");
#endif
if (localCompressedSoundFile.isNull())
QSKIP("Sound format is not supported");