aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-11-21 11:34:57 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-11-22 09:50:11 +0100
commitaa3813366a8e772cd58c9253461cf2dc50b97a9d (patch)
treee306a60fa9b2d1f7dd2e6b245fdf05214c7c55df /tests/manual
parent4241bb4d26ef69eb212e0274bad0926ec71bead9 (diff)
parentacb6ed0815f92588c3ff875a568e9561fe61218c (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/qml/qml/qqmlextensionplugin.cpp tests/auto/quick/qquicktableview/tst_qquicktableview.cpp Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_style2.qml37
-rw-r--r--tests/manual/scenegraph_lancelot/scenegrabber/scenegrabber.pro1
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro4
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp14
4 files changed, 52 insertions, 4 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_style2.qml b/tests/manual/scenegraph_lancelot/data/text/text_style2.qml
new file mode 100644
index 0000000000..984ca6a1ed
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_style2.qml
@@ -0,0 +1,37 @@
+import QtQuick 2.0
+
+//vary font style
+
+Item {
+ width: 320
+ height: 480
+
+ Column {
+ anchors.fill: parent
+ Repeater {
+ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken]
+ Text {
+ renderType: Text.QtRendering
+ width: parent.width
+ wrapMode: Text.Wrap
+ font.pointSize: 10
+ style: modelData
+ styleColor: "green"
+ text: "The quick fox jumps in style " + modelData
+ }
+ }
+
+ Repeater {
+ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken]
+ Text {
+ renderType: Text.NativeRendering
+ width: parent.width
+ wrapMode: Text.Wrap
+ font.pointSize: 10
+ style: modelData
+ styleColor: "green"
+ text: "The quick fox jumps in style " + modelData
+ }
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/scenegrabber/scenegrabber.pro b/tests/manual/scenegraph_lancelot/scenegrabber/scenegrabber.pro
index 24f0f8a315..704acd0aca 100644
--- a/tests/manual/scenegraph_lancelot/scenegrabber/scenegrabber.pro
+++ b/tests/manual/scenegraph_lancelot/scenegrabber/scenegrabber.pro
@@ -1,6 +1,5 @@
TARGET = qmlscenegrabber
DESTDIR=..
-macx:CONFIG -= app_bundle
CONFIG += console
QT += quick
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro b/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro
index dd0ef268b1..9deb46427e 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro
+++ b/tests/manual/scenegraph_lancelot/scenegraph/scenegraph.pro
@@ -10,6 +10,8 @@ SOURCES += tst_scenegraph.cpp
# Assuming that we are in a normal Qt5 source code tree
include(../../../../../qtbase/tests/baselineserver/shared/qbaselinetest.pri)
-TEST_HELPER_INSTALLS += .././qmlscenegrabber
+win32: TEST_HELPER_INSTALLS += .././qmlscenegrabber.exe
+else: macos: TEST_HELPER_INSTALLS += .././qmlscenegrabber.app
+else: TEST_HELPER_INSTALLS += .././qmlscenegrabber
TESTDATA += ../data
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
index 40b17ec2a2..465e2a7d54 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
@@ -69,6 +69,7 @@ private:
quint16 checksumFileOrDir(const QString &path);
QString testSuitePath;
+ QString grabberPath;
int consecutiveErrors; // Not test failures (image mismatches), but system failures (so no image at all)
bool aborted; // This run given up because of too many system failures
};
@@ -90,6 +91,16 @@ void tst_Scenegraph::initTestCase()
QSKIP("Test suite data directory missing or unreadable: " + fi.canonicalFilePath().toLatin1());
testSuitePath = fi.canonicalFilePath();
+#if defined(Q_OS_WIN)
+ grabberPath = QFINDTESTDATA("qmlscenegrabber.exe");
+#elif defined(Q_OS_DARWIN)
+ grabberPath = QFINDTESTDATA("qmlscenegrabber.app/Contents/MacOS/qmlscenegrabber");
+#else
+ grabberPath = QFINDTESTDATA("qmlscenegrabber");
+#endif
+ if (grabberPath.isEmpty())
+ grabberPath = QCoreApplication::applicationDirPath() + "/qmlscenegrabber";
+
const char *backendVarName = "QT_QUICK_BACKEND";
const QString backend = qEnvironmentVariable(backendVarName, QString::fromLatin1("default"));
QBaselineTest::addClientProperty(QString::fromLatin1(backendVarName), backend);
@@ -201,11 +212,10 @@ bool tst_Scenegraph::renderAndGrab(const QString& qmlFile, const QStringList& ex
{
bool usePipe = true; // Whether to transport the grabbed image using temp. file or pipe. TBD: cmdline option
QProcess grabber;
- QString cmd = QCoreApplication::applicationDirPath() + "/qmlscenegrabber";
QStringList args = extraArgs;
QString tmpfile = usePipe ? QString("-") : QString("/tmp/qmlscenegrabber-%1-out.ppm").arg(QCoreApplication::applicationPid());
args << qmlFile << "-o" << tmpfile;
- grabber.start(cmd, args, QIODevice::ReadOnly);
+ grabber.start(grabberPath, args, QIODevice::ReadOnly);
grabber.waitForFinished(17000); //### hardcoded, must be larger than the scene timeout in qmlscenegrabber
if (grabber.state() != QProcess::NotRunning) {
grabber.terminate();