aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/examples
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-03-06 14:48:21 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-07 06:24:24 +0100
commit72f4ccecf457eaa34469e9d7c2d05802214904d6 (patch)
treed8c1a4a8ad12369f6cac9afc18c2e6c1cc3891d5 /tests/auto/quick/examples
parent65764c0334e92c7229457c1bc412f262c9ffdb8a (diff)
Changed quick tests to work from install directory
- Changed tests to use TESTDATA - added check for cross_compile option to skip when sources not available Change-Id: I1f382794ff982bbc07fc20438a4e4a8c8b8d565f Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/quick/examples')
-rw-r--r--tests/auto/quick/examples/examples.pro2
-rw-r--r--tests/auto/quick/examples/tst_examples.cpp8
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/quick/examples/examples.pro b/tests/auto/quick/examples/examples.pro
index e67120d7c2..5907ba291c 100644
--- a/tests/auto/quick/examples/examples.pro
+++ b/tests/auto/quick/examples/examples.pro
@@ -8,3 +8,5 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
CONFIG += parallel_test
#temporary
QT += core-private gui-private qml-private quick-private widgets-private v8-private testlib
+
+cross_compile: DEFINES += QTEST_CROSS_COMPILED
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp
index 482053e158..c29da570c3 100644
--- a/tests/auto/quick/examples/tst_examples.cpp
+++ b/tests/auto/quick/examples/tst_examples.cpp
@@ -237,6 +237,10 @@ void tst_examples::sgexamples()
{
QFETCH(QString, file);
+#if defined(QTEST_CROSS_COMPILED)
+ QSKIP("sources not available when cross compiled");
+#endif
+
QQmlComponent component(&engine, QUrl::fromLocalFile(file));
if (component.status() == QQmlComponent::Error)
qWarning() << component.errors();
@@ -274,6 +278,10 @@ void tst_examples::sgsnippets()
{
QFETCH(QString, file);
+#if defined(QTEST_CROSS_COMPILED)
+ QSKIP("sources not available when cross compiled");
+#endif
+
QQmlComponent component(&engine, QUrl::fromLocalFile(file));
if (component.status() == QQmlComponent::Error)
qWarning() << component.errors();