diff options
author | Lucian Varlan <lucian.i.varlan@nokia.com> | 2011-01-04 13:49:39 (GMT) |
---|---|---|
committer | Adrian Constantin <adrian.constantin@nokia.com> | 2011-01-19 10:13:54 (GMT) |
commit | f250b8717cc35f55d1b6e1965419eca5334d77d9 (patch) | |
tree | d91d736bf1d07215fbc09fe9ecae117c1f5f617b /tests/auto/qlayout | |
parent | b075603792ad90a55e0b23817d15f428e078a96e (diff) | |
download | Qt-f250b8717cc35f55d1b6e1965419eca5334d77d9.zip Qt-f250b8717cc35f55d1b6e1965419eca5334d77d9.tar.gz Qt-f250b8717cc35f55d1b6e1965419eca5334d77d9.tar.bz2 |
Use SRCDIR as a base path for the test data.
The test cannot run on harmattan CI system, which executes it from
a different directory than the one where the executable resides.
Reviewed-by: Adrian Constantin
Reviewed-by: Harald Fernengel
Diffstat (limited to 'tests/auto/qlayout')
-rw-r--r-- | tests/auto/qlayout/qlayout.pro | 2 | ||||
-rw-r--r-- | tests/auto/qlayout/tst_qlayout.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qlayout/qlayout.pro b/tests/auto/qlayout/qlayout.pro index 08727e5..d3b76e3 100644 --- a/tests/auto/qlayout/qlayout.pro +++ b/tests/auto/qlayout/qlayout.pro @@ -11,6 +11,8 @@ wince*|symbian: { addFiles.path = . DEPLOYMENT += addFiles } else { + DEFINES += SRCDIR=\\\"$$PWD\\\" + test_data.files = baseline/* test_data.path = $${target.path}/baseline INSTALLS += test_data diff --git a/tests/auto/qlayout/tst_qlayout.cpp b/tests/auto/qlayout/tst_qlayout.cpp index 65eae55..3090ebb 100644 --- a/tests/auto/qlayout/tst_qlayout.cpp +++ b/tests/auto/qlayout/tst_qlayout.cpp @@ -156,7 +156,8 @@ void tst_QLayout::smartMaxSize() { QVector<int> expectedWidths; - QFile f(QLatin1String("baseline/smartmaxsize")); + QFile f(QLatin1String(SRCDIR "/baseline/smartmaxsize")); + QCOMPARE(f.open(QIODevice::ReadOnly | QIODevice::Text), true); QTextStream stream(&f); |