summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-12-07 00:00:11 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-12-07 00:00:11 (GMT)
commitef2dc6d122a03a94da273cbbf09e8f7aec2b4f6e (patch)
treea962d5fcf9d73c952c02586aeb79fbd346befe2e /tests
parent3905cdb7424997f08774401e06d67d295fecb2b5 (diff)
parent54aa97bf265bfa581bb64b5968e92ce943c63802 (diff)
downloadQt-ef2dc6d122a03a94da273cbbf09e8f7aec2b4f6e.zip
Qt-ef2dc6d122a03a94da273cbbf09e8f7aec2b4f6e.tar.gz
Qt-ef2dc6d122a03a94da273cbbf09e8f7aec2b4f6e.tar.bz2
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'tests')
-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
-rw-r--r--tests/benchmarks/script/sunspider/sunspider.pro10
-rw-r--r--tests/benchmarks/script/sunspider/sunspider.qrc5
-rw-r--r--tests/benchmarks/script/sunspider/tst_sunspider.cpp9
-rw-r--r--tests/benchmarks/script/v8/tst_v8.cpp9
-rw-r--r--tests/benchmarks/script/v8/v8.pro10
-rw-r--r--tests/benchmarks/script/v8/v8.qrc5
9 files changed, 25 insertions, 48 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
diff --git a/tests/benchmarks/script/sunspider/sunspider.pro b/tests/benchmarks/script/sunspider/sunspider.pro
index aab4cdb..dce3855 100644
--- a/tests/benchmarks/script/sunspider/sunspider.pro
+++ b/tests/benchmarks/script/sunspider/sunspider.pro
@@ -1,19 +1,11 @@
load(qttest_p4)
TEMPLATE = app
TARGET = tst_bench_sunspider
-
+RESOURCES += sunspider.qrc
SOURCES += tst_sunspider.cpp
QT = core script
-!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-wince*|symbian: {
-testFiles.files = tests
-testFiles.path = .
-DEPLOYMENT += testFiles
-}
-
symbian* {
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
TARGET.EPOCSTACKSIZE = 0x14000
diff --git a/tests/benchmarks/script/sunspider/sunspider.qrc b/tests/benchmarks/script/sunspider/sunspider.qrc
new file mode 100644
index 0000000..a894ee5
--- /dev/null
+++ b/tests/benchmarks/script/sunspider/sunspider.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>tests</file>
+</qresource>
+</RCC>
diff --git a/tests/benchmarks/script/sunspider/tst_sunspider.cpp b/tests/benchmarks/script/sunspider/tst_sunspider.cpp
index 7a8617a..0df19b6 100644
--- a/tests/benchmarks/script/sunspider/tst_sunspider.cpp
+++ b/tests/benchmarks/script/sunspider/tst_sunspider.cpp
@@ -46,10 +46,6 @@
#include <QtScript/qscriptengine.h>
#include <QtScript/qscriptvalue.h>
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
//TESTED_FILES=
static QString readFile(const QString &filename)
@@ -84,9 +80,8 @@ private:
tst_SunSpider::tst_SunSpider()
{
- testsDir = QDir(SRCDIR);
- bool testsFound = testsDir.cd("tests");
- if (!testsFound)
+ testsDir = QDir(":/tests");
+ if (!testsDir.exists())
qWarning("*** no tests/ dir!");
}
diff --git a/tests/benchmarks/script/v8/tst_v8.cpp b/tests/benchmarks/script/v8/tst_v8.cpp
index f8297e2..841e2f3 100644
--- a/tests/benchmarks/script/v8/tst_v8.cpp
+++ b/tests/benchmarks/script/v8/tst_v8.cpp
@@ -46,10 +46,6 @@
#include <QtScript/qscriptengine.h>
#include <QtScript/qscriptvalue.h>
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
//TESTED_FILES=
static QString readFile(const QString &filename)
@@ -84,9 +80,8 @@ private:
tst_V8::tst_V8()
{
- testsDir = QDir(SRCDIR);
- bool testsFound = testsDir.cd("tests");
- if (!testsFound)
+ testsDir = QDir(":/tests");
+ if (!testsDir.exists())
qWarning("*** no tests/ dir!");
}
diff --git a/tests/benchmarks/script/v8/v8.pro b/tests/benchmarks/script/v8/v8.pro
index f36bda5..547eecc 100644
--- a/tests/benchmarks/script/v8/v8.pro
+++ b/tests/benchmarks/script/v8/v8.pro
@@ -1,19 +1,11 @@
load(qttest_p4)
TEMPLATE = app
TARGET = tst_bench_v8
-
+RESOURCES += v8.qrc
SOURCES += tst_v8.cpp
QT = core script
-!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-wince*|symbian: {
-testFiles.files = tests
-testFiles.path = .
-DEPLOYMENT += testFiles
-}
-
symbian* {
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
TARGET.EPOCSTACKSIZE = 0x14000
diff --git a/tests/benchmarks/script/v8/v8.qrc b/tests/benchmarks/script/v8/v8.qrc
new file mode 100644
index 0000000..a894ee5
--- /dev/null
+++ b/tests/benchmarks/script/v8/v8.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>tests</file>
+</qresource>
+</RCC>