summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptjstestsuite
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-26 10:41:37 +0200
committerKent Hansen <khansen@trolltech.com>2009-06-26 10:43:16 +0200
commit9ac5755fb53387a79e5d9c007501800ab9963bed (patch)
treef09282f68d1644f74afba036468b79a2fa14f682 /tests/auto/qscriptjstestsuite
parent51e5b6e876774406a9ee4f443ae7619390f5e9b4 (diff)
make autotests work with shadowbuilds
Can't assume that the executable and source are in the same dir.
Diffstat (limited to 'tests/auto/qscriptjstestsuite')
-rw-r--r--tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro1
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro b/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro
index b8109cc0b3..f6a6aeb8ab 100644
--- a/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro
+++ b/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT = core script
SOURCES += tst_qscriptjstestsuite.cpp
+DEFINES += SRCDIR=\\\"$$PWD\\\"
wince*: {
testFiles.sources = tests
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index 66004f86d6..0194730679 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -389,7 +389,7 @@ int tst_Suite::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
tst_Suite::tst_Suite()
{
- testsDir = QDir(".");
+ testsDir = QDir(SRCDIR);
bool testsFound = testsDir.cd("tests");
if (!testsFound) {
qWarning("*** no tests/ dir!");