summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/qaudiodecoderbackend/qaudiodecoderbackend.pro3
-rw-r--r--tests/auto/integration/qcamerabackend/qcamerabackend.pro3
-rw-r--r--tests/auto/integration/qdeclarativevideooutput/qdeclarativevideooutput.pro2
-rw-r--r--tests/auto/integration/qmediaplayerbackend/qmediaplayerbackend.pro3
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp15
-rw-r--r--tests/auto/integration/qsound/qsound.pro2
-rw-r--r--tests/auto/integration/qsoundeffect/qsoundeffect.pro2
-rw-r--r--tests/auto/unit/qaudiobuffer/qaudiobuffer.pro1
-rw-r--r--tests/auto/unit/qaudiodecoder/qaudiodecoder.pro1
-rw-r--r--tests/auto/unit/qmediaplaylist/qmediaplaylist.pro2
-rw-r--r--tests/auto/unit/qmediaplaylist/tst_qmediaplaylist.cpp4
11 files changed, 15 insertions, 23 deletions
diff --git a/tests/auto/integration/qaudiodecoderbackend/qaudiodecoderbackend.pro b/tests/auto/integration/qaudiodecoderbackend/qaudiodecoderbackend.pro
index 7548b8983..7d6e33a87 100644
--- a/tests/auto/integration/qaudiodecoderbackend/qaudiodecoderbackend.pro
+++ b/tests/auto/integration/qaudiodecoderbackend/qaudiodecoderbackend.pro
@@ -5,11 +5,10 @@ CONFIG += no_private_qt_headers_warning
# This is more of a system test
# CONFIG += testcase
+TESTDATA += testdata/*
INCLUDEPATH += \
../../../../src/multimedia/audio
-DEFINES += TESTDATA_DIR=\\\"$$PWD/\\\"
-
SOURCES += \
tst_qaudiodecoderbackend.cpp
diff --git a/tests/auto/integration/qcamerabackend/qcamerabackend.pro b/tests/auto/integration/qcamerabackend/qcamerabackend.pro
index a856570bd..3457b3101 100644
--- a/tests/auto/integration/qcamerabackend/qcamerabackend.pro
+++ b/tests/auto/integration/qcamerabackend/qcamerabackend.pro
@@ -1,10 +1,9 @@
-CONFIG += testcase
TARGET = tst_qcamerabackend
QT += multimedia-private testlib
CONFIG += no_private_qt_headers_warning
# This is more of a system test
-# CONFIG += testcase
+CONFIG += testcase
SOURCES += tst_qcamerabackend.cpp
diff --git a/tests/auto/integration/qdeclarativevideooutput/qdeclarativevideooutput.pro b/tests/auto/integration/qdeclarativevideooutput/qdeclarativevideooutput.pro
index 5d93a9e84..8264e3669 100644
--- a/tests/auto/integration/qdeclarativevideooutput/qdeclarativevideooutput.pro
+++ b/tests/auto/integration/qdeclarativevideooutput/qdeclarativevideooutput.pro
@@ -1,8 +1,8 @@
-CONFIG += testcase
TARGET = tst_qdeclarativevideooutput
QT += multimedia-private qml testlib quick
CONFIG += no_private_qt_headers_warning
+CONFIG += testcase
OTHER_FILES += \
../../../../src/imports/multimedia/qdeclarativevideooutput_p.h
diff --git a/tests/auto/integration/qmediaplayerbackend/qmediaplayerbackend.pro b/tests/auto/integration/qmediaplayerbackend/qmediaplayerbackend.pro
index fdd941d69..6b56a9bf7 100644
--- a/tests/auto/integration/qmediaplayerbackend/qmediaplayerbackend.pro
+++ b/tests/auto/integration/qmediaplayerbackend/qmediaplayerbackend.pro
@@ -6,7 +6,8 @@ CONFIG += no_private_qt_headers_warning
# This is more of a system test
# CONFIG += testcase
-DEFINES += TESTDATA_DIR=\\\"$$PWD/\\\"
SOURCES += \
tst_qmediaplayerbackend.cpp
+
+TESTDATA += testdata/*
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 9c224572f..c527c1af2 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -49,10 +49,6 @@
//TESTED_COMPONENT=src/multimedia
-#ifndef TESTDATA_DIR
-#define TESTDATA_DIR "./"
-#endif
-
QT_USE_NAMESPACE
/*
@@ -132,9 +128,8 @@ void tst_QMediaPlayerBackend::init()
void tst_QMediaPlayerBackend::initTestCase()
{
- QFileInfo wavFile(QLatin1String(TESTDATA_DIR "testdata/test.wav"));
- if (!wavFile.exists())
- wavFile = QFileInfo(QLatin1String("testdata/test.wav"));
+ const QString testFileName = QFINDTESTDATA("testdata/test.wav");
+ QFileInfo wavFile(testFileName);
QVERIFY(wavFile.exists());
@@ -465,7 +460,8 @@ void tst_QMediaPlayerBackend::seekPauseSeek()
TestVideoSurface *surface = new TestVideoSurface;
player.setVideoOutput(surface);
- QFileInfo videoFile(QLatin1String(TESTDATA_DIR "testdata/colors.mp4"));
+ const QString testFileName = QFINDTESTDATA("testdata/colors.mp4");
+ QFileInfo videoFile(testFileName);
QVERIFY(videoFile.exists());
player.setMedia(QUrl::fromLocalFile(videoFile.absoluteFilePath()));
@@ -540,7 +536,8 @@ void tst_QMediaPlayerBackend::probes()
QVERIFY(videoProbe->setSource(player));
QVERIFY(audioProbe->setSource(player));
- QFileInfo videoFile(QLatin1String(TESTDATA_DIR "testdata/colors.mp4"));
+ const QString testFileName = QFINDTESTDATA("testdata/colors.mp4");
+ QFileInfo videoFile(testFileName);
QVERIFY(videoFile.exists());
player->setMedia(QUrl::fromLocalFile(videoFile.absoluteFilePath()));
QTRY_COMPARE(player->mediaStatus(), QMediaPlayer::LoadedMedia);
diff --git a/tests/auto/integration/qsound/qsound.pro b/tests/auto/integration/qsound/qsound.pro
index 43c289477..049bd4b6e 100644
--- a/tests/auto/integration/qsound/qsound.pro
+++ b/tests/auto/integration/qsound/qsound.pro
@@ -7,3 +7,5 @@ CONFIG += no_private_qt_headers_warning
# CONFIG += testcase
SOURCES += tst_qsound.cpp
+
+TESTDATA += test.wav
diff --git a/tests/auto/integration/qsoundeffect/qsoundeffect.pro b/tests/auto/integration/qsoundeffect/qsoundeffect.pro
index 294c63aa5..8506c3fd3 100644
--- a/tests/auto/integration/qsoundeffect/qsoundeffect.pro
+++ b/tests/auto/integration/qsoundeffect/qsoundeffect.pro
@@ -13,3 +13,5 @@ unix:!mac {
DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
}
}
+
+TESTDATA += test.wav
diff --git a/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro b/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro
index cbbaefe65..18b8c6882 100644
--- a/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro
+++ b/tests/auto/unit/qaudiobuffer/qaudiobuffer.pro
@@ -14,4 +14,3 @@ CONFIG -= app_bundle
TEMPLATE = app
SOURCES += tst_qaudiobuffer.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/unit/qaudiodecoder/qaudiodecoder.pro b/tests/auto/unit/qaudiodecoder/qaudiodecoder.pro
index 5b189522f..21204847c 100644
--- a/tests/auto/unit/qaudiodecoder/qaudiodecoder.pro
+++ b/tests/auto/unit/qaudiodecoder/qaudiodecoder.pro
@@ -19,4 +19,3 @@ include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockdecoder.pri)
SOURCES += tst_qaudiodecoder.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/unit/qmediaplaylist/qmediaplaylist.pro b/tests/auto/unit/qmediaplaylist/qmediaplaylist.pro
index ba51c6501..a6728b594 100644
--- a/tests/auto/unit/qmediaplaylist/qmediaplaylist.pro
+++ b/tests/auto/unit/qmediaplaylist/qmediaplaylist.pro
@@ -6,8 +6,6 @@ include (../qmultimedia_common/mockplaylist.pri)
QT += multimedia-private testlib
CONFIG += no_private_qt_headers_warning
-DEFINES += TESTDATA_DIR=\\\"$$PWD/\\\"
-
HEADERS += \
$$QT.multimedia.sources/../plugins/m3u/qm3uhandler.h
diff --git a/tests/auto/unit/qmediaplaylist/tst_qmediaplaylist.cpp b/tests/auto/unit/qmediaplaylist/tst_qmediaplaylist.cpp
index 018db83f3..38b7fd730 100644
--- a/tests/auto/unit/qmediaplaylist/tst_qmediaplaylist.cpp
+++ b/tests/auto/unit/qmediaplaylist/tst_qmediaplaylist.cpp
@@ -57,10 +57,6 @@
#include "mockmediaplaylistsourcecontrol.h"
#include "mockreadonlyplaylistprovider.h"
-#ifndef TESTDATA_DIR
-#define TESTDATA_DIR "./"
-#endif
-
QT_USE_NAMESPACE
class MockReadOnlyPlaylistObject : public QMediaObject