From 40924657e9e5a8f40182be784cc07a70302e1824 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 8 Apr 2016 09:07:49 +0200 Subject: tests: skip tst_qaudiodecoderbackend when no audio decoding support Task-number: QTBUG-46331 Change-Id: I9168ae7d89869cc0811394fc4091a5e44c136b9b Reviewed-by: Christian Stromme --- .../integration/qaudiodecoderbackend/BLACKLIST | 41 ---------------------- .../tst_qaudiodecoderbackend.cpp | 8 +++++ 2 files changed, 8 insertions(+), 41 deletions(-) delete mode 100644 tests/auto/integration/qaudiodecoderbackend/BLACKLIST (limited to 'tests') diff --git a/tests/auto/integration/qaudiodecoderbackend/BLACKLIST b/tests/auto/integration/qaudiodecoderbackend/BLACKLIST deleted file mode 100644 index 038b89022..000000000 --- a/tests/auto/integration/qaudiodecoderbackend/BLACKLIST +++ /dev/null @@ -1,41 +0,0 @@ -# QTBUG-46331 - -[fileTest] -opensuse-13.1 64bit -redhatenterpriselinuxworkstation-6.6 -osx-10.8 -osx-10.9 -osx-10.10 -osx-10.11 -windows 32bit developer-build -windows 64bit developer-build - -[unsupportedFileTest] -opensuse-13.1 64bit -redhatenterpriselinuxworkstation-6.6 -osx-10.8 -osx-10.9 -osx-10.10 -osx-10.11 -windows 32bit developer-build -windows 64bit developer-build - -[corruptedFileTest] -opensuse-13.1 64bit -redhatenterpriselinuxworkstation-6.6 -osx-10.8 -osx-10.9 -osx-10.10 -osx-10.11 -windows 32bit developer-build -windows 64bit developer-build - -[deviceTest] -opensuse-13.1 64bit -redhatenterpriselinuxworkstation-6.6 -osx-10.8 -osx-10.9 -osx-10.10 -osx-10.11 -windows 32bit developer-build -windows 64bit developer-build diff --git a/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp b/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp index a52324d1a..562fe7ada 100644 --- a/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp +++ b/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp @@ -78,6 +78,8 @@ void tst_QAudioDecoderBackend::cleanup() void tst_QAudioDecoderBackend::fileTest() { QAudioDecoder d; + if (d.error() == QAudioDecoder::ServiceMissingError) + QSKIP("There is no audio decoding support on this platform."); QAudioBuffer buffer; quint64 duration = 0; int byteCount = 0; @@ -260,6 +262,8 @@ void tst_QAudioDecoderBackend::fileTest() void tst_QAudioDecoderBackend::unsupportedFileTest() { QAudioDecoder d; + if (d.error() == QAudioDecoder::ServiceMissingError) + QSKIP("There is no audio decoding support on this platform."); QAudioBuffer buffer; QVERIFY(d.state() == QAudioDecoder::StoppedState); @@ -336,6 +340,8 @@ void tst_QAudioDecoderBackend::unsupportedFileTest() void tst_QAudioDecoderBackend::corruptedFileTest() { QAudioDecoder d; + if (d.error() == QAudioDecoder::ServiceMissingError) + QSKIP("There is no audio decoding support on this platform."); QAudioBuffer buffer; QVERIFY(d.state() == QAudioDecoder::StoppedState); @@ -408,6 +414,8 @@ void tst_QAudioDecoderBackend::corruptedFileTest() void tst_QAudioDecoderBackend::deviceTest() { QAudioDecoder d; + if (d.error() == QAudioDecoder::ServiceMissingError) + QSKIP("There is no audio decoding support on this platform."); QAudioBuffer buffer; quint64 duration = 0; int sampleCount = 0; -- cgit v1.2.1 From fa9fe9ff8c3aba25fbae4f8f32588dd6477d6df8 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 9 May 2016 14:33:09 +0200 Subject: 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 --- .../integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp | 3 +++ .../auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'tests') 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); -- cgit v1.2.1 From f0e0d5d901d4e28fff9f29caf86ada84906b3db4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 19:46:10 +0200 Subject: decruft project file the "created by qt creator" header is not supposed to be checked in. Change-Id: I6d8c623f41c633babe5923344c915412d3d6bcd4 Reviewed-by: Joerg Bornemann --- tests/auto/unit/qaudiobuffer/qaudiobuffer.pro | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tests') diff --git a/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro b/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro index cd3b42f50..535465889 100644 --- a/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro +++ b/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro @@ -1,9 +1,3 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2012-02-02T23:40:38 -# -#------------------------------------------------- - QT += multimedia testlib QT -= gui -- cgit v1.2.1