From: Kurt Korbatits Date: Mon, 6 Aug 2012 00:46:52 +0000 (+1000) Subject: Added skips to reported bugs in qmediaplayerbackend test X-Git-Tag: upstream/5.2.95+rc1~212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93bbba0cc3b0a0001441b3568a19d5972d596837;p=platform%2Fupstream%2Fqtmultimedia.git 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 --- diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp index 7591ba6..ca6b28c 100644 --- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp +++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp @@ -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::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() > 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");