summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt12
-rw-r--r--tests/QtMultimedia/audio_test.py2
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index adf4179..904d106 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -25,6 +25,18 @@ macro(PYSIDE_TEST)
WILL_FAIL ${EXPECT_TO_FAIL})
endmacro(PYSIDE_TEST)
+# Try to find QtMultimedia
+# TODO: Remove this hack when cmake support QtMultimedia module
+if (NOT QT_QTMULTIMEDIA_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
+ find_path(QT_QTMULTIMEDIA_INCLUDE_DIR QtMultimedia
+ PATHS ${QT_HEADERS_DIR}/QtMultimedia
+ ${QT_LIBRARY_DIR}/QtMultimedia.framework/Headers
+ NO_DEFAULT_PATH)
+ find_library(QT_QTMULTIMEDIA_LIBRARY QtMultimedia PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ if (QT_QTMULTIMEDIA_INCLUDE_DIR AND QT_QTMULTIMEDIA_LIBRARY)
+ set(QT_QTMULTIMEDIA_FOUND ON)
+ endif()
+endif ()
add_subdirectory(signals)
TEST_QT_MODULE(QT_QTCORE_FOUND QtCore)
diff --git a/tests/QtMultimedia/audio_test.py b/tests/QtMultimedia/audio_test.py
index 04d0a1e..0d8813d 100644
--- a/tests/QtMultimedia/audio_test.py
+++ b/tests/QtMultimedia/audio_test.py
@@ -10,6 +10,8 @@ class testAudioDevices(unittest.TestCase):
def testListDevices(self):
for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
+ if devInfo.deviceName() == 'null':
+ continue
fmt = QAudioFormat()
for codec in devInfo.supportedCodecs():
fmt.setCodec(codec)