aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-07-11 09:57:33 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-07-13 11:53:05 +0000
commitf0613e2467416f32e61a7640e9f0011645f4b068 (patch)
tree64d380f52fb2bc0c273f521e3d9ed97a77806e3a /tests
parent4dbcd6d618e939f43114fdfc56c492e49eedad7a (diff)
QML Preview: Blacklist paths ":/qgradient" and "/etc"
":/qgradient" is where the new webgradients introduced in QBrush are stored. We don't want to load them from the client. Replacing target-specific files in /etc with files from the host is also a bad idea. Change-Id: I3228388713dec29dad1841aedb175dca10cfe1e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
index ebe09fbd69..fa416900d0 100644
--- a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
+++ b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
@@ -105,8 +105,18 @@ QList<QQmlDebugClient *> tst_QQmlPreview::createClients()
return QList<QQmlDebugClient *>({m_client});
}
+void checkFiles(const QStringList &files)
+{
+ QVERIFY(!files.contains("/etc/localtime"));
+ QVERIFY(!files.contains("/etc/timezome"));
+ QVERIFY(!files.contains(":/qgradient/webgradients.binaryjson"));
+}
+
void tst_QQmlPreview::cleanup()
{
+ // Use a separate function so that we don't return early from cleanup() on failure.
+ checkFiles(m_files);
+
QQmlDebugTest::cleanup();
if (QTest::currentTestFailed()) {
qDebug() << "Files loaded:" << m_files;