From 3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 24 Nov 2011 10:36:10 +1000 Subject: Fixed installation of corelib tests In .pro files, removed wince/symbian-specific DEPLOYMENT cases and replaced them with TESTDATA where appropriate. In .cpp files, removed SRCDIR and relative paths to testdata and replaced them with the QFINDTESTDATA macro where appropriate. Modified test helper apps/libs to install themselves under the test they relate to. This change allows corelib tests to be correctly installed, along with their testdata, via `make install'. Change-Id: I5e202e2f3b577af7e39072d5c9fe13e0ca125304 Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qiodevice/qiodevice.pro | 10 +--------- tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'tests/auto/corelib/io/qiodevice') diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro index 2a90ca100b..a8295ec79b 100644 --- a/tests/auto/corelib/io/qiodevice/qiodevice.pro +++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro @@ -3,15 +3,7 @@ TARGET = tst_qiodevice QT = core network testlib SOURCES = tst_qiodevice.cpp -wince* { - addFiles.files = tst_qiodevice.cpp - addFiles.path = . - DEPLOYMENT += addFiles - DEFINES += SRCDIR=\\\"\\\" - !wince50standard-x86-msvc2005: DEFINES += WINCE_EMULATOR_TEST=1 -} else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} +TESTDATA += tst_qiodevice.cpp MOC_DIR=tmp mac: CONFIG += insignificant_test # QTBUG-22766 diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index 02a04a5fe5..c3d4e54c37 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -147,7 +147,7 @@ void tst_QIODevice::constructing_QFile() QVERIFY(!device->isOpen()); - file.setFileName(SRCDIR "tst_qiodevice.cpp"); + file.setFileName(QFINDTESTDATA("tst_qiodevice.cpp")); QVERIFY(file.open(QFile::ReadOnly)); QVERIFY(device->isOpen()); QCOMPARE((int) device->openMode(), (int) QFile::ReadOnly); @@ -176,7 +176,7 @@ void tst_QIODevice::constructing_QFile() void tst_QIODevice::read_QByteArray() { - QFile f(SRCDIR "tst_qiodevice.cpp"); + QFile f(QFINDTESTDATA("tst_qiodevice.cpp")); f.open(QIODevice::ReadOnly); QByteArray b = f.read(10); -- cgit v1.2.3