summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptv8testsuite
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2010-11-23 08:58:46 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2010-12-06 08:37:19 (GMT)
commit1ba320366e1b010ecf32c263574e183e4b1f452d (patch)
tree87976c9795ef0324f46022a6bc66d5071ef4c6cc /tests/auto/qscriptv8testsuite
parentd3dc2ab3e0ee6bca8eca374e3cb3b3f4c7d0c34e (diff)
downloadQt-1ba320366e1b010ecf32c263574e183e4b1f452d.zip
Qt-1ba320366e1b010ecf32c263574e183e4b1f452d.tar.gz
Qt-1ba320366e1b010ecf32c263574e183e4b1f452d.tar.bz2
Move test data to a qrc file.
Using qrc file simplify deployment on a device. Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/qscriptv8testsuite')
-rw-r--r--tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro8
-rw-r--r--tests/auto/qscriptv8testsuite/qscriptv8testsuite.qrc5
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp12
3 files changed, 9 insertions, 16 deletions
diff --git a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro
index 5d8e5af4..00e2e01 100644
--- a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro
+++ b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro
@@ -1,10 +1,4 @@
load(qttest_p4)
QT = core script
SOURCES += tst_qscriptv8testsuite.cpp
-!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-wince*|symbian: {
-testFiles.files = tests
-testFiles.path = .
-DEPLOYMENT += testFiles
-}
+RESOURCES += qscriptv8testsuite.qrc
diff --git a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.qrc b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.qrc
new file mode 100644
index 0000000..a894ee5
--- /dev/null
+++ b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>tests</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
index 5f9a578..912027e 100644
--- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
+++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
@@ -45,10 +45,6 @@
#include <QtScript>
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -217,9 +213,8 @@ int tst_Suite::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
tst_Suite::tst_Suite()
{
- testsDir = QDir(SRCDIR);
- bool testsFound = testsDir.cd("tests");
- if (!testsFound) {
+ testsDir = QDir(":/tests");
+ if (!testsDir.exists()) {
qWarning("*** no tests/ dir!");
} else {
if (!testsDir.exists("mjsunit.js"))
@@ -297,8 +292,7 @@ tst_Suite::tst_Suite()
appendCString(stringdata, "");
QFileInfoList testFileInfos;
- if (testsFound)
- testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files);
+ testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files);
foreach (QFileInfo tfi, testFileInfos) {
QString name = tfi.baseName();
// slot: signature, parameters, type, tag, flags