diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-07-29 01:01:08 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-30 16:35:04 +0200 |
commit | 83a73c8e5a05a1d3795fdbbad8b5b553e5bd723f (patch) | |
tree | 7c336f32ed6b76233f4988cfb0910973a231e51a /tests/auto/qml/qmldiskcache | |
parent | b8fd580cb3453b3850c36765c4b2537538d2f4f8 (diff) | |
parent | 1d815780e020a7315dfc4762b6b0280834203e7e (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
examples/quick/tableview/pixelator/main.cpp
examples/quick/demos/
Change-Id: Id7eaae6584017a4ab4ec9dd97b56d5c1a417f0e3
Diffstat (limited to 'tests/auto/qml/qmldiskcache')
-rw-r--r-- | tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp index 284a324227..20eef9c322 100644 --- a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp +++ b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp @@ -90,7 +90,13 @@ static void waitForFileSystem() // the newly written file has a modification date newer than an existing cache file, we must // wait. // Similar effects of lacking precision have been observed on some Linux systems. - QThread::sleep(1); + static const bool fsHasSubSecondResolution = []() { + QDateTime mtime = QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)).lastModified(); + // 1:1000 chance of a false negative + return mtime.toMSecsSinceEpoch() % 1000; + }(); + if (!fsHasSubSecondResolution) + QThread::sleep(1); } struct TestCompiler |