Add use of TESTDATA feature to integration tests
Use TESTDATA and QFINDTESTDATA in integration tests. Also remove unused path defines from unit test .pro files. Change-Id: I46dc6a96b918e989acf79eb3bd23c53125c7c3d6 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
8e82f57c6a
commit
1f1bdbec82
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/*
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -7,3 +7,5 @@ CONFIG += no_private_qt_headers_warning
|
||||
# CONFIG += testcase
|
||||
|
||||
SOURCES += tst_qsound.cpp
|
||||
|
||||
TESTDATA += test.wav
|
||||
|
||||
@@ -13,3 +13,5 @@ unix:!mac {
|
||||
DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
|
||||
}
|
||||
}
|
||||
|
||||
TESTDATA += test.wav
|
||||
|
||||
@@ -14,4 +14,3 @@ CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += tst_qaudiobuffer.cpp
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
@@ -19,4 +19,3 @@ include (../qmultimedia_common/mock.pri)
|
||||
include (../qmultimedia_common/mockdecoder.pri)
|
||||
|
||||
SOURCES += tst_qaudiodecoder.cpp
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -57,10 +57,6 @@
|
||||
#include "mockmediaplaylistsourcecontrol.h"
|
||||
#include "mockreadonlyplaylistprovider.h"
|
||||
|
||||
#ifndef TESTDATA_DIR
|
||||
#define TESTDATA_DIR "./"
|
||||
#endif
|
||||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
class MockReadOnlyPlaylistObject : public QMediaObject
|
||||
|
||||
Reference in New Issue
Block a user