diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-05-14 13:37:35 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-05-14 14:08:58 (GMT) |
commit | 18af9ef6074c33f7416629007ef5d24a39a55cbe (patch) | |
tree | 5342c665bf6b0aa3f8673924d5742ebad34fbc9e /tests/benchmarks | |
parent | f4ffb4b082a43ba267855fbe915da9f934f59043 (diff) | |
download | Qt-18af9ef6074c33f7416629007ef5d24a39a55cbe.zip Qt-18af9ef6074c33f7416629007ef5d24a39a55cbe.tar.gz Qt-18af9ef6074c33f7416629007ef5d24a39a55cbe.tar.bz2 |
Fix SRCDIR and DEPLOYMENT usage in declarative benchmarks
These tests were either not compiling, were deploying incorrectly,
or looking for data files from wrong place.
Task-number: QTBUG-10661
Task-number: QTBUG-10666
Task-number: QTBUG-10667
Reviewed-by: Shane Kearns
Diffstat (limited to 'tests/benchmarks')
14 files changed, 64 insertions, 52 deletions
diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro index 5ceaf34..7fc0a23 100644 --- a/tests/benchmarks/declarative/binding/binding.pro +++ b/tests/benchmarks/declarative/binding/binding.pro @@ -7,12 +7,12 @@ macx:CONFIG -= app_bundle SOURCES += tst_binding.cpp testtypes.cpp HEADERS += testtypes.h -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" - -symbian* { - data.sources = data/* - data.path = data +symbian { + data.sources = data + data.path = . DEPLOYMENT = data +} else { + # Define SRCDIR equal to test's source directory + DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp index dbddac3..6e3e146 100644 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ b/tests/benchmarks/declarative/binding/tst_binding.cpp @@ -48,6 +48,11 @@ //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_binding : public QObject { Q_OBJECT diff --git a/tests/benchmarks/declarative/compilation/compilation.pro b/tests/benchmarks/declarative/compilation/compilation.pro index 32f4aba..9277187 100644 --- a/tests/benchmarks/declarative/compilation/compilation.pro +++ b/tests/benchmarks/declarative/compilation/compilation.pro @@ -8,4 +8,10 @@ CONFIG += release SOURCES += tst_compilation.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" +symbian { + data.sources += data + data.path = . + DEPLOYMENT += data +} else { + DEFINES += SRCDIR=\\\"$$PWD\\\" +} diff --git a/tests/benchmarks/declarative/compilation/tst_compilation.cpp b/tests/benchmarks/declarative/compilation/tst_compilation.cpp index 5694d5b..0c6e917 100644 --- a/tests/benchmarks/declarative/compilation/tst_compilation.cpp +++ b/tests/benchmarks/declarative/compilation/tst_compilation.cpp @@ -46,8 +46,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_compilation : public QObject @@ -63,7 +62,7 @@ private: QDeclarativeEngine engine; }; -tst_compilation::tst_compilation() +tst_compilation::tst_compilation() { } diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/declarative/creation/creation.pro index 3e0caf6..a5df676 100644 --- a/tests/benchmarks/declarative/creation/creation.pro +++ b/tests/benchmarks/declarative/creation/creation.pro @@ -7,9 +7,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_creation.cpp symbian* { - data.sources = data/* - data.path = data - DEPLOYMENT += addFiles + data.sources = data + data.path = . + DEPLOYMENT += data } else { DEFINES += SRCDIR=\\\"$$PWD\\\" }
\ No newline at end of file diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 99324f4..a253671 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -53,7 +53,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir // Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_creation : public QObject @@ -97,8 +97,8 @@ public: TestType(QObject *parent = 0) : QObject(parent) {} - QDeclarativeListProperty<QObject> resources() { - return QDeclarativeListProperty<QObject>(this, 0, resources_append); + QDeclarativeListProperty<QObject> resources() { + return QDeclarativeListProperty<QObject>(this, 0, resources_append); } static void resources_append(QDeclarativeListProperty<QObject> *p, QObject *o) { @@ -106,7 +106,7 @@ public: } }; -tst_creation::tst_creation() +tst_creation::tst_creation() { qmlRegisterType<TestType>("Qt.test", 1, 0, "TestType"); } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro index 30ef235..917040d 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro @@ -7,16 +7,13 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp HEADERS += testtypes.h -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" -symbian* { - data.sources = data/* - data.path = data - samegame.sources = data/samegame/* - samegame.path = data/samegame - samegame_pics.sources = data/samegame/pics/* - samegame_pics.path = data/samegame/pics - DEPLOYMENT += data samegame samegame_pics +symbian { + data.sources = data + data.path = . + DEPLOYMENT += data +} else { + # Define SRCDIR equal to test's source directory + DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index 4b1456e..13420ff 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -48,6 +48,10 @@ //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif class tst_qmlcomponent : public QObject { diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index e2e8c8a..2d9744e 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -46,8 +46,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_qmlgraphicsimage : public QObject diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro index 79fdd26..1b72fc5 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro @@ -6,5 +6,12 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativemetaproperty.cpp -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" +symbian { + data.sources += data + data.path = . + DEPLOYMENT += data +} else { + # Define SRCDIR equal to test's source directory + DEFINES += SRCDIR=\\\"$$PWD\\\" +} + diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp index 8a5f4ae..6e71e7d 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp @@ -48,6 +48,10 @@ //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif class tst_qmlmetaproperty : public QObject { diff --git a/tests/benchmarks/declarative/qmltime/qmltime.pro b/tests/benchmarks/declarative/qmltime/qmltime.pro index 9352f3b..6f5ad5e 100644 --- a/tests/benchmarks/declarative/qmltime/qmltime.pro +++ b/tests/benchmarks/declarative/qmltime/qmltime.pro @@ -6,18 +6,10 @@ macx:CONFIG -= app_bundle SOURCES += qmltime.cpp -symbian* { +symbian { TARGET.CAPABILITY = "All -TCB" - example.sources = example.qml - esample.path = . - tests.sources = tests/* - tests.path = tests - anshors.sources = tests/anchors/* - anchors.path = tests/anchors - item_creation.sources = tests/item_creation/* - item_creation.path = tests/item_creation - positioner_creation.sources = tests/positioner_creation/* - positioner_creation.path = tests/positioner_creation - DEPLOYMENT += example tests anchors item_creation positioner_creation + example.sources = example.qml tests + example.path = . + DEPLOYMENT += example } diff --git a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp index b92ab46..f4c4c1f 100644 --- a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp +++ b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp @@ -46,8 +46,7 @@ #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir -// Application private dir is default serach path for files, so SRCDIR can be set to empty -#define SRCDIR "" +#define SRCDIR "." #endif class tst_typeimports : public QObject @@ -72,8 +71,8 @@ class TestType1 : public QObject public: TestType1(QObject *parent = 0) : QObject(parent) {} - QDeclarativeListProperty<QObject> resources() { - return QDeclarativeListProperty<QObject>(this, 0, resources_append); + QDeclarativeListProperty<QObject> resources() { + return QDeclarativeListProperty<QObject>(this, 0, resources_append); } static void resources_append(QDeclarativeListProperty<QObject> *p, QObject *o) { @@ -104,7 +103,7 @@ public: }; -tst_typeimports::tst_typeimports() +tst_typeimports::tst_typeimports() { qmlRegisterType<TestType1>("Qt.test", 1, 0, "TestType1"); qmlRegisterType<TestType2>("Qt.test", 1, 0, "TestType2"); diff --git a/tests/benchmarks/declarative/typeimports/typeimports.pro b/tests/benchmarks/declarative/typeimports/typeimports.pro index 8a74e0d..a5df3f0 100644 --- a/tests/benchmarks/declarative/typeimports/typeimports.pro +++ b/tests/benchmarks/declarative/typeimports/typeimports.pro @@ -6,10 +6,10 @@ macx:CONFIG -= app_bundle SOURCES += tst_typeimports.cpp -symbian* { - data.sources = data/* - data.path = data - DEPLOYMENT += addFiles +symbian { + data.sources = data + data.path = . + DEPLOYMENT += data } else { DEFINES += SRCDIR=\\\"$$PWD\\\" }
\ No newline at end of file |