diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2012-03-23 13:51:06 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-29 00:35:32 +0200 |
commit | 5de103291d8159a236cabcc689caade265de1bd5 (patch) | |
tree | bfb940673b977142fca126bbde7650d4cdd61bb6 /tests/auto | |
parent | a3470bccf3a5b0b714748363c740fa22959b0507 (diff) |
Fixed unittests skipping for cross_compile option
- qmlmin, qqmlparser, examples unittests to skip source dependent
tests when cross_compile option used as content not available.
Change-Id: Ieaadeff0c303f0a633b8a3cc506a764ea995cf42
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qmlmin/tst_qmlmin.cpp | 7 | ||||
-rw-r--r-- | tests/auto/qml/qqmlparser/tst_qqmlparser.cpp | 7 | ||||
-rw-r--r-- | tests/auto/quick/examples/examples.pro | 2 | ||||
-rw-r--r-- | tests/auto/quick/examples/tst_examples.cpp | 8 | ||||
-rw-r--r-- | tests/auto/quick/quick.pro | 3 |
5 files changed, 12 insertions, 15 deletions
diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp index 3be7919404..6f0b2e45a2 100644 --- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -158,6 +158,10 @@ with a lower case letter. void tst_qmlmin::qmlMinify_data() { +#if defined(QTEST_CROSS_COMPILED) + return; +#endif + QTest::addColumn<QString>("file"); QString examples = QLatin1String(SRCDIR) + "/../../../../examples/"; @@ -173,11 +177,10 @@ void tst_qmlmin::qmlMinify_data() void tst_qmlmin::qmlMinify() { - QFETCH(QString, file); - #if defined(QTEST_CROSS_COMPILED) QSKIP("sources not available when cross compiled"); #endif + QFETCH(QString, file); QProcess qmlminify; qmlminify.start(qmlminPath, QStringList() << QLatin1String("--verify-only") << file); diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index 00b64e04a1..cb42be91d7 100644 --- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -165,6 +165,10 @@ and ensures that the subnode's source locations are inside parent node's source void tst_qqmlparser::qmlParser_data() { +#if defined(QTEST_CROSS_COMPILED) + return; +#endif + QTest::addColumn<QString>("file"); QString examples = QLatin1String(SRCDIR) + "/../../../../examples/"; @@ -180,11 +184,10 @@ void tst_qqmlparser::qmlParser_data() void tst_qqmlparser::qmlParser() { - QFETCH(QString, file); - #if defined(QTEST_CROSS_COMPILED) QSKIP("sources not available when cross compiled"); #endif + QFETCH(QString, file); using namespace QQmlJS; diff --git a/tests/auto/quick/examples/examples.pro b/tests/auto/quick/examples/examples.pro index c320fdad9e..d24fe80498 100644 --- a/tests/auto/quick/examples/examples.pro +++ b/tests/auto/quick/examples/examples.pro @@ -8,5 +8,3 @@ DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test #temporary QT += core-private gui-private qml-private quick-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 9a2a800cfd..b019c716b0 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -249,10 +249,6 @@ 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(); @@ -293,10 +289,6 @@ 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(); diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro index c8014be820..15713ac6ae 100644 --- a/tests/auto/quick/quick.pro +++ b/tests/auto/quick/quick.pro @@ -1,12 +1,13 @@ TEMPLATE = subdirs PUBLICTESTS += \ - examples \ geometry \ nodes \ rendernode \ qquickpixmapcache +!cross_compile: PUBLICTESTS += examples + # This test requires the qtconcurrent module !contains(QT_CONFIG, concurrent):PUBLICTESTS -= qquickpixmapcache |