diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-11-24 10:36:10 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-01 09:12:52 +0100 |
commit | 3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef (patch) | |
tree | b77bb527bf3a21dc95a317248b2640c73751f629 /tests/auto/corelib/tools/qlocale | |
parent | 13eba9ddf47d570fc4562c20fcfbacd1dfa4a61a (diff) |
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 <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qlocale')
-rw-r--r-- | tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro | 8 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qlocale/test/test.pro | 20 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 6 |
3 files changed, 16 insertions, 18 deletions
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro index d3188c020d..d510d82207 100644 --- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro +++ b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro @@ -1,8 +1,10 @@ SOURCES += syslocaleapp.cpp DESTDIR = ./ +CONFIG -= app_bundle + QT = core -# no install rule for application used by test -INSTALLS = -CONFIG -= app_bundle +# This app is testdata for tst_qlocale +target.path = $$[QT_INSTALL_TESTS]/tst_qlocale/$$TARGET +INSTALLS += target diff --git a/tests/auto/corelib/tools/qlocale/test/test.pro b/tests/auto/corelib/tools/qlocale/test/test.pro index 4649d78c03..5a4fb674c5 100644 --- a/tests/auto/corelib/tools/qlocale/test/test.pro +++ b/tests/auto/corelib/tools/qlocale/test/test.pro @@ -3,20 +3,14 @@ QT = core testlib network embedded: QT += gui SOURCES = ../tst_qlocale.cpp -!wince* { - TARGET = ../tst_qlocale - win32: { - CONFIG(debug, debug|release) { - TARGET = ../../debug/tst_qlocale - } else { - TARGET = ../../release/tst_qlocale - } +TARGET = ../tst_qlocale +win32 { + CONFIG(debug, debug|release) { + TARGET = ../../debug/tst_qlocale + } else { + TARGET = ../../release/tst_qlocale } -} else { - TARGET = tst_qlocale - addFiles.files = ../syslocaleapp - addFiles.path = "\\Program Files\\tst_qlocale" - DEPLOYMENT += addFiles } +TESTDATA += syslocaleapp mac: CONFIG += insignificant_test # QTBUG-22769 diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index a5a247f15a..1cd695ae46 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -372,7 +372,7 @@ void tst_QLocale::emptyCtor() /* because of caching of the system locale. */ \ QProcess process; \ process.setEnvironment(QStringList(env) << QString("LANG=%1").arg(req_lc)); \ - process.start("syslocaleapp/syslocaleapp"); \ + process.start(syslocaleapp_dir + "syslocaleapp"); \ process.waitForReadyRead(); \ QString ret = QString(process.readAll()); \ process.waitForFinished(); \ @@ -389,10 +389,12 @@ void tst_QLocale::emptyCtor() env << entry; } + QString syslocaleapp_dir = QFINDTESTDATA("syslocaleapp/"); + // Get default locale. QProcess p; p.setEnvironment(env); - p.start("syslocaleapp/syslocaleapp"); + p.start(syslocaleapp_dir + "syslocaleapp"); p.waitForReadyRead(); QString defaultLoc = QString(p.readAll()); p.waitForFinished(); |