summaryrefslogtreecommitdiffstats
path: root/src/testlib/qappletestlogger.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QAppleTestLogger: Add source link to failure messagesAxel Spoerl2024-01-221-0/+8
| | | | | | | | | | | | | | The apple test logger did not include the failure location in the log output, because the assumption was that the structured logging would report the file and line separately. Unfortunately we can't do that using the os_log machinery just yet, so we bring in the manual location printing as in the plain text logger. Pick-to: 6.7 Change-Id: Ief0a6a6e04d628c98ed09c09334b694504cbff2c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove redundant QPair includesAhmad Samir2023-09-061-2/+0
| | | | | | | | Nothing in those files uses QPair; and a local build finished fine without them. Task-number: QTBUG-115841 Change-Id: I669cfecaa9129bce6b31e464826287f138b159db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtTestLib: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-281-1/+1
| | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I3debae5f481037958bfb65caabca97a0d4681eb9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Document what QtTest's various loggers doEdward Welbourne2022-03-221-1/+9
| | | | | | | | | Provide basic (internal) documentation of each logging class and link the command-line documentation to pages relevant to the formats not defined by Qt. Change-Id: I3251dd1304203c6ab87dfe1f2dec0e9787ab69f8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make Skip an incident in test loggingEdward Welbourne2021-12-091-12/+4
| | | | | | | | | | | | | | | Skip ends the test (albeit inconclusively). Rearrange the enums in the abstract logger, move code to handle skip between relevant function and tidy up various things that became simpler as a result. Also reorder the message enum, and its switches, to separate testlib's internals from the usual Qt messages, and put each group in ascending order of severity. Task-number: QTBUG-96844 Change-Id: I2c7a634b9f849830d64eafa750155e66e244b729 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* testlib: Rename QAbstractTestLogger::QSystem to QCriticalTor Arne Vestbø2021-08-101-2/+2
| | | | | | | | | | | | | It's used to handle qCritical() messages, and corresponds to QtMsgType's QtCriticalMsg, so change its name to reflect what it really is. In the process, reclassify the -maxwarnings overflow message as a warning, rather than a critical message. Pick-to: 6.2 Change-Id: I87626117a547ae4498d5dc352b93bd6db8bfb332 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Apple test logger: Handle test log messages without a contextTor Arne Vestbø2019-03-261-37/+93
| | | | | | | | | | | We may get calls to the MessageTypes-overload of addMessage via e.g. qSkip, or other functions in QTestLog, so we have to implement the function. Change-Id: I9d58c73e93ca918c42448c246c37cc9ae6aa04de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* testlib: Prevent Apple test logger from stomping on other loggersTor Arne Vestbø2019-03-051-14/+6
| | | | | | | | | | | | | | We were potentially adding the Apple test logger multiple times, and we didn't consider whether the existing loggers were logging to file or not when circumventing them. We now don't use the Apple logger if it would touch stderr and some other logger is using stdout. In the case of no explicit logger being specified on the command line, we allow the Apple logger to take priority over the default plain test logger. Change-Id: I31bbec4f4b3ab84ba9a2be35e8e5db08fee071a7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* testlib: Add BXPASS and BXFAILOliver Wolff2019-01-291-0/+4
| | | | | | | | | | | | | | | Prioritize blacklisting over QEXPECT_FAIL so that a test that is blacklisted no longer fails if QEXPECT_FAIL returns true unexpectedly. To reflect this state properly, the two values of BXPASS and BXFAIL were added to testlib's output. [ChangeLog][Important Behavior Changes][QtTestLib] Blacklisting of tests will be taken into account for XPASS and XFAIL. A blacklisted test that causes an XPASS will no longer be a fail. Task-number: QTBUG-72928 Change-Id: Ia2232fdc714d405fa3fd9aea6c89eb2836bc5950 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove codepaths and checks for unsupported Apple platformsTor Arne Vestbø2018-08-311-42/+34
| | | | | | | We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3. Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix build issue on macOSFilipe Azevedo2018-03-261-0/+2
| | | | | Change-Id: Ib3aa37242e9bf66c3fc3d232ead1e6ef4d4bc485 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Allow log messages to be grouped by activity on Apple OSesTor Arne Vestbø2018-03-151-0/+11
| | | | | | | | Useful for making sense of the event dispatcher, especially when running tests. Change-Id: Iea84bcfb40d4954439c2e31ffc0197c64907e800 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix bad xfail test incident mapping in Apple test loggerTor Arne Vestbø2018-03-141-1/+1
| | | | | Change-Id: If0c0204805747b16556cbdedf7c76dbb0a1a2193 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* testlib: Feed test log messages to Apple Unified LoggingTor Arne Vestbø2018-03-091-0/+144
QtTestLib uses its own message handler for plain text logging, so it doesn't go though the logic in qDefaultMessageHandler that dispatches logging to alternate logging sinks. Building on the approach of Android and Windows, we log to AUL from the plain text logger. A future improvement in this area would be to make QtTestLib make more use of the infrastructure in qlogging.cpp, but this is a bigger task and requires a better overview of the requirements. The AUL code has been isolated into a wrapper, to allow logging both to AUl and to e.g. the QPlainTextLogger. This is needed so that we short circuit the plain text logger in case AUL already has handled printing to stderr. Change-Id: Iee0c3902190bd081b7ffbaf77c41b3118ce7f6da Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>