summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-07 13:57:38 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-07 13:57:38 (GMT)
commitd8fb8ca3a378743eebb8464f7910a5e6d1870c01 (patch)
tree9c31a017163a532946f10107b8d9f4405ed1c9db /tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
parentb5915ef3a6d0417440ad82e9369d6679505b953e (diff)
parent076bba6c901e292b61fffb7a91020075dcd84919 (diff)
downloadQt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.zip
Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.tar.gz
Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.tar.bz2
Merge branch 'qdoc-simplified' into mimir-simplified
Conflicts: doc/src/platforms/compiler-notes.qdoc tools/qdoc3/ditaxmlgenerator.cpp tools/qdoc3/ditaxmlgenerator.h tools/qdoc3/htmlgenerator.cpp tools/qdoc3/htmlgenerator.h tools/qdoc3/node.cpp tools/qdoc3/pagegenerator.h
Diffstat (limited to 'tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp')
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp70
1 files changed, 30 insertions, 40 deletions
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index a2d3273..ef0d4dc 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -102,43 +102,25 @@ void tst_qmlvisual::visual_data()
QTest::addColumn<QString>("testdata");
QStringList files;
- if (qgetenv("QMLVISUAL_ALL") != "")
- files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
- else {
- //these are newly added tests we want to try out in CI (then move to the stable list)
- files << QT_TEST_SOURCE_DIR "/animation/qtbug10586/qtbug10586.qml";
- files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated.qml";
- files << QT_TEST_SOURCE_DIR "/qdeclarativeflipable/test-flipable.qml";
- files << QT_TEST_SOURCE_DIR "/qdeclarativepositioners/usingRepeater.qml";
- files << QT_TEST_SOURCE_DIR "/animation/parentAnimation2/parentAnimation2.qml";
-
- //these are tests we think are stable and useful enough to be run by the CI system
- files << QT_TEST_SOURCE_DIR "/animation/bindinganimation/bindinganimation.qml";
- files << QT_TEST_SOURCE_DIR "/animation/loop/loop.qml";
- files << QT_TEST_SOURCE_DIR "/animation/parallelAnimation/parallelAnimation-visual.qml";
- files << QT_TEST_SOURCE_DIR "/animation/parentAnimation/parentAnimation-visual.qml";
- files << QT_TEST_SOURCE_DIR "/animation/reanchor/reanchor.qml";
- files << QT_TEST_SOURCE_DIR "/animation/scriptAction/scriptAction-visual.qml";
- files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/drag.qml";
- files << QT_TEST_SOURCE_DIR "/fillmode/fillmode.qml";
-
- // new tests
- files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-flickable.qml";
-
- //these reliably fail in CI, for unknown reasons
- //files << QT_TEST_SOURCE_DIR "/animation/easing/easing.qml";
- //files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
- //files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/borders.qml";
- //files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated-smooth.qml";
-
- //these reliably fail on Linux because of color interpolation (different float rounding)
-#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
- files << QT_TEST_SOURCE_DIR "/animation/colorAnimation/colorAnimation-visual.qml";
- files << QT_TEST_SOURCE_DIR "/animation/propertyAction/propertyAction-visual.qml";
+ files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
+ if (qgetenv("QMLVISUAL_ALL") != "1") {
+#if defined(Q_WS_X11)
+ //Text on X11 varies per version - and the CI system is currently using something outdated.
+ foreach(const QString &str, files.filter(QRegExp(".*text.*")))
+ files.removeAll(str);
+#endif
+#if defined(Q_WS_MAC)
+ //Text on Mac also varies per version. Only check the text on 10.6
+ if(QSysInfo::MacintoshVersion != QSysInfo::MV_10_6)
+ foreach(const QString &str, files.filter(QRegExp(".*text.*")))
+ files.removeAll(str);
+#endif
+#if defined(Q_WS_QWS)
+ //We don't want QWS test results to mire down the CI system
+ files.clear();
+ //Needs at least one test data or it fails anyways
+ files << QT_TEST_SOURCE_DIR "/selftest_noimages/selftest_noimages.qml";
#endif
-
- //this is unstable because the MouseArea press-and-hold timer is not synchronized to the animation framework.
- //files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-visual.qml";
}
foreach (const QString &file, files) {
@@ -157,7 +139,7 @@ void tst_qmlvisual::visual()
QStringList arguments;
arguments << "-script" << testdata
- << "-scriptopts" << "play,testimages,testerror,exitoncomplete,exitonfailure"
+ << "-scriptopts" << "play,testimages,testerror,testskip,exitoncomplete,exitonfailure"
<< file;
#ifdef Q_WS_QWS
arguments << "-qws";
@@ -165,9 +147,11 @@ void tst_qmlvisual::visual()
QProcess p;
p.start(qmlruntime, arguments);
- QVERIFY(p.waitForFinished());
+ bool finished = p.waitForFinished();
+ QByteArray output = p.readAllStandardOutput() + p.readAllStandardError();
+ QVERIFY2(finished, output.data());
if (p.exitCode() != 0)
- qDebug() << p.readAllStandardError();
+ qDebug() << output;
QCOMPARE(p.exitStatus(), QProcess::NormalExit);
QCOMPARE(p.exitCode(), 0);
}
@@ -278,7 +262,7 @@ void action(Mode mode, const QString &file)
break;
case Play:
arguments << "-script" << testdata
- << "-scriptopts" << "play,testimages,testerror,exitoncomplete"
+ << "-scriptopts" << "play,testimages,testerror,testskip,exitoncomplete"
<< file;
break;
case TestVisuals:
@@ -345,6 +329,12 @@ void usage()
"If you ONLY wish to use the 'error' property, you can record your test with\n"
"-recordnovisuals, or discard existing visuals with -removevisuals; the test\n"
"will then only fail on a syntax error, crash, or non-empty 'error' property.\n"
+ "\n"
+ "If your test has anything set to the 'skip' property on the root object then\n"
+ "test failures will be ignored. This allows for an opt-out of automated\n"
+ "aggregation of test results. The value of the 'skip' property (usually a\n"
+ "string) will then be printed to stdout when the test is run as part of the\n"
+ "message saying the test has been skipped.\n"
);
}