From 5de103291d8159a236cabcc689caade265de1bd5 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Fri, 23 Mar 2012 13:51:06 +1000 Subject: 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 --- tests/auto/qml/qmlmin/tst_qmlmin.cpp | 7 +++++-- tests/auto/qml/qqmlparser/tst_qqmlparser.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'tests/auto/qml') 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("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("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; -- cgit v1.2.3