summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-05-09 14:33:09 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-05-09 13:02:24 +0000
commitfa9fe9ff8c3aba25fbae4f8f32588dd6477d6df8 (patch)
tree235d66cbc4ebc8fb3df466b8a4f0b82ab9bbcfe8 /tests
parent7f502f32d9cc08bca841962511bbfabab1334b43 (diff)
Skip integration tests when the service is not available.
Don't try to run the player and audio decoder integration tests when the relevant services are not available. Change-Id: I34b0e68e11e3e81ad7bef8c1b6b840379ef54b7c Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp3
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp b/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp
index b60bdbc07..576da50e3 100644
--- a/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp
+++ b/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp
@@ -64,6 +64,9 @@ void tst_QAudioDecoderBackend::init()
void tst_QAudioDecoderBackend::initTestCase()
{
+ QAudioDecoder d;
+ if (!d.isAvailable())
+ QSKIP("Audio decoder service is not available");
}
void tst_QAudioDecoderBackend::cleanup()
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 35d281cd7..dfa1bf254 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -198,6 +198,10 @@ QMediaContent tst_QMediaPlayerBackend::selectMediaFile(const QStringList& mediaC
void tst_QMediaPlayerBackend::initTestCase()
{
+ QMediaPlayer player;
+ if (!player.isAvailable())
+ QSKIP("Media player service is not available");
+
const QString testFileName = QFINDTESTDATA("testdata/test.wav");
QFileInfo wavFile(testFileName);