From 4e6440acf8e09abbb2b2aa208f0241416154e090 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 4 May 2016 15:21:17 +0200 Subject: Improve reliability of callgrind benchmark results When running under callgrind, do not bother with the use of the watchdog. The constructor waits for the thread to start, which adds an overall run-time cost that depends on the OS scheduling. Change-Id: I162e2e311c43a6892ebc67dea39899e40babb61d Reviewed-by: Robin Burchell --- src/testlib/qtestcase.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/testlib') diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index d674b0af7a..fe680e19aa 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -2548,8 +2548,13 @@ static void qInvokeTestMethods(QObject *testObject) invokeMethod(testObject, "initTestCase_data()"); QScopedPointer watchDog; - if (!debuggerPresent()) + if (!debuggerPresent() +#ifdef QTESTLIB_USE_VALGRIND + && QBenchmarkGlobalData::current->mode() != QBenchmarkGlobalData::CallgrindChildProcess +#endif + ) { watchDog.reset(new WatchDog); + } if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) { invokeMethod(testObject, "initTestCase()"); -- cgit v1.2.3 From a2ae631c04fee752e492f2c0b8fd25f06abffd6b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 3 Aug 2016 12:00:41 +0200 Subject: Doc: Change instances of '(Mac) OS X' to 'macOS' As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen --- src/testlib/doc/src/qttestlib-manual.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testlib') diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc index d8e2dc2516..d0f6296480 100644 --- a/src/testlib/doc/src/qttestlib-manual.qdoc +++ b/src/testlib/doc/src/qttestlib-manual.qdoc @@ -314,7 +314,7 @@ \li All platforms \row \li CPU tick counter \li -tickcounter - \li Windows, OS X, Linux, many UNIX-like systems. + \li Windows, \macos, Linux, many UNIX-like systems. \row \li Event Counter \li -eventcounter \li All platforms -- cgit v1.2.3 From d04982dc84d66bec92b4b3767538676cf925ef17 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 11 Aug 2016 11:16:47 +0200 Subject: QTest::QTouchEventSequence: add a sleep before each touch movement In any code (such as QtQuick Flickable) which calculates velocity as distance / time, it's unrealistic to simulate instantaneous touchpoint movements. So, force a slight delay before each event, so that the touchpoint can only move very fast, but not infinitely fast. We use qSleep() rather than qWait() because qWait() has a minimum qSleep(10), and also processes events. commit() also conditionally calls processEvents(), and we don't want to make that unconditional. Change-Id: I3cee890f8951d7ecb8837a6abe216c5a8e0a6e34 Reviewed-by: Liang Qi --- src/testlib/qtesttouch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/testlib') diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h index bdc964389e..2c57bf0420 100644 --- a/src/testlib/qtesttouch.h +++ b/src/testlib/qtesttouch.h @@ -129,6 +129,7 @@ namespace QTest void commit(bool processEvents = true) { if (!points.isEmpty()) { + qSleep(1); if (targetWindow) { qt_handleTouchEvent(targetWindow, device, points.values()); -- cgit v1.2.3