Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kurt Korbatits authored and Qt by Nokia committed Mar 7, 2012
1 parent 65764c0 commit 72f4cce
Show file tree
Hide file tree
Showing 44 changed files with 55 additions and 125 deletions.
2 changes: 2 additions & 0 deletions tests/auto/quick/examples/examples.pro
Expand Up @@ -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
8 changes: 8 additions & 0 deletions tests/auto/quick/examples/tst_examples.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/auto/quick/qquickaccessible/qquickaccessible.pro
Expand Up @@ -8,13 +8,13 @@ SOURCES += tst_qquickaccessible.cpp

include (../../shared/util.pri)

TESTDATA = data/*

OTHER_FILES += data/checkbuttons.qml
OTHER_FILES += data/hittest.qml
OTHER_FILES += data/pushbutton.qml
OTHER_FILES += data/statictext.qml

DEFINES += SRCDIR=\\\"$$PWD\\\"

CONFIG += parallel_test

wince*: {
Expand Down
6 changes: 3 additions & 3 deletions tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
Expand Up @@ -129,8 +129,8 @@ void tst_QQuickAccessible::commonTests_data()
{
QTest::addColumn<QString>("accessibleRoleFileName");

QTest::newRow("StaticText") << SRCDIR "/data/statictext.qml";
QTest::newRow("PushButton") << SRCDIR "/data/pushbutton.qml";
QTest::newRow("StaticText") << "statictext.qml";
QTest::newRow("PushButton") << "pushbutton.qml";
}

void tst_QQuickAccessible::commonTests()
Expand All @@ -141,7 +141,7 @@ void tst_QQuickAccessible::commonTests()

QQuickView *view = new QQuickView();
// view->setFixedSize(240,320);
view->setSource(QUrl::fromLocalFile(accessibleRoleFileName));
view->setSource(testFileUrl(accessibleRoleFileName));
view->show();
// view->setFocus();
QVERIFY(view->rootObject() != 0);
Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickanchors/qquickanchors.pro
Expand Up @@ -7,9 +7,7 @@ include (../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro
Expand Up @@ -8,9 +8,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
Expand Up @@ -6,9 +6,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
Expand Up @@ -5,6 +5,4 @@ TARGET=tst_qquickanimationcontroller
CONFIG += warn_on qmltestcase
SOURCES += tst_qquickanimationcontroller.cpp

importFiles.files = data
importFiles.path = .
DEPLOYMENT += importFiles
TESTDATA = data/*
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickanimations/qquickanimations.pro
Expand Up @@ -6,9 +6,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickbehaviors/qquickbehaviors.pro
Expand Up @@ -6,9 +6,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickborderimage/qquickborderimage.pro
Expand Up @@ -8,9 +8,7 @@ SOURCES += tst_qquickborderimage.cpp \

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickcanvas/qquickcanvas.pro
Expand Up @@ -9,9 +9,7 @@ macx:CONFIG -= app_bundle
CONFIG += parallel_test
QT += core-private gui-private qml-private quick-private testlib

testData.files = data
testData.path = .
DEPLOYMENT += testData
TESTDATA = data/*

OTHER_FILES += \
data/AnimationsWhileHidden.qml \
Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro
Expand Up @@ -5,9 +5,7 @@ TARGET=tst_qquickcanvasitem
CONFIG += warn_on qmltestcase
SOURCES += tst_qquickcanvasitem.cpp

importFiles.files = data
importFiles.path = .
DEPLOYMENT += importFiles
TESTDATA = data/*

OTHER_FILES += \
data/testhelper.js \
Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickflickable/qquickflickable.pro
Expand Up @@ -7,9 +7,7 @@ SOURCES += tst_qquickflickable.cpp
include (../../shared/util.pri)
include (../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private quick-private testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickflipable/qquickflipable.pro
Expand Up @@ -6,9 +6,7 @@ SOURCES += tst_qquickflipable.cpp

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickfocusscope/qquickfocusscope.pro
Expand Up @@ -7,8 +7,6 @@ include (../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

QT += core-private gui-private qml-private quick-private testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickfontloader/qquickfontloader.pro
Expand Up @@ -8,9 +8,7 @@ SOURCES += tst_qquickfontloader.cpp \

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickgridview/qquickgridview.pro
Expand Up @@ -7,9 +7,7 @@ SOURCES += tst_qquickgridview.cpp
include (../../shared/util.pri)
include (../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib widgets
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickimage/qquickimage.pro
Expand Up @@ -9,9 +9,7 @@ SOURCES += tst_qquickimage.cpp \
include (../../shared/util.pri)
include (../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private qml-private quick-private network testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickitem/qquickitem.pro
Expand Up @@ -6,9 +6,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private quick-private widgets testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickitem2/qquickitem2.pro
Expand Up @@ -6,9 +6,7 @@ SOURCES += tst_qquickitem.cpp

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickitemlayer/qquickitemlayer.pro
Expand Up @@ -4,9 +4,7 @@ SOURCES += tst_qquickitemlayer.cpp

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

include(../../shared/util.pri)

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquicklistview/qquicklistview.pro
Expand Up @@ -9,8 +9,6 @@ SOURCES += tst_qquicklistview.cpp \
include (../../shared/util.pri)
include (../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

QT += core-private gui-private qml-private quick-private widgets widgets-private v8-private opengl-private testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickloader/qquickloader.pro
Expand Up @@ -10,9 +10,7 @@ SOURCES += tst_qquickloader.cpp \

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickmousearea/qquickmousearea.pro
Expand Up @@ -8,9 +8,7 @@ SOURCES += tst_qquickmousearea.cpp \

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
Expand Up @@ -4,8 +4,6 @@ macx:CONFIG -= app_bundle

SOURCES += tst_qquickmultipointtoucharea.cpp

importFiles.files = data
importFiles.path = .
DEPLOYMENT += importFiles
TESTDATA = data/*

QT += core-private gui-private qml-private quick-private testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickpath/qquickpath.pro
Expand Up @@ -6,9 +6,7 @@ SOURCES += tst_qquickpath.cpp

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickpathview/qquickpathview.pro
Expand Up @@ -7,9 +7,7 @@ SOURCES += tst_qquickpathview.cpp
include (../../shared/util.pri)
include (../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private quick-private widgets testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickpincharea/qquickpincharea.pro
Expand Up @@ -6,9 +6,7 @@ SOURCES += tst_qquickpincharea.cpp

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro
Expand Up @@ -9,9 +9,7 @@ INCLUDEPATH += ../../shared/

include (../../shared/util.pri)

importFiles.files = data
importFiles.path = .
DEPLOYMENT += importFiles
TESTDATA = data/*

# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickpositioners/qquickpositioners.pro
Expand Up @@ -7,9 +7,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickrepeater/qquickrepeater.pro
Expand Up @@ -7,9 +7,7 @@ SOURCES += tst_qquickrepeater.cpp
include (../../shared/util.pri)
include (../shared/util.pri)

testFiles.files = data
testFiles.path = .
DEPLOYMENT += testFiles
TESTDATA = data/*

CONFIG += parallel_test
QT += core-private gui-private qml-private quick-private testlib
Expand Up @@ -6,9 +6,7 @@ SOURCES += tst_qquicksmoothedanimation.cpp

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
Expand Up @@ -6,9 +6,7 @@ SOURCES += tst_qquickspringanimation.cpp

include (../../shared/util.pri)

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down
4 changes: 1 addition & 3 deletions tests/auto/quick/qquickspriteimage/qquickspriteimage.pro
Expand Up @@ -6,9 +6,7 @@ include (../../shared/util.pri)

macx:CONFIG -= app_bundle

testDataFiles.files = data
testDataFiles.path = .
DEPLOYMENT += testDataFiles
TESTDATA = data/*

CONFIG += parallel_test

Expand Down

0 comments on commit 72f4cce

Please sign in to comment.