summaryrefslogtreecommitdiffstats
path: root/src/testlib
Commit message (Collapse)AuthorAgeFilesLines
* testlib: Separate the gui- and widgets-specific apiKent Hansen2011-09-213-174/+159
| | | | | | | | | | | | Group the widgets-specific ("legacy") api under as few ifdefs as possible. (The diff can look confusing; rest assured that this change "only" moves entire functions around in the files.) Change-Id: I27bdec7d1c96d0b040dc22a8fed17e4e47766276 Reviewed-on: http://codereview.qt-project.org/5290 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Remove testlib's dependency on gui and widgetsKent Hansen2011-09-211-1/+1
| | | | | | | | | | | | | | Commit 37d76a679878d7c07f8a2cb17f7bda46f6582572 made testlib depend on gui and widgets. It shouldn't. Changing the includes was enough. It's the application (e.g. autotest) that uses the gui/widgets features that should link against gui/widgets. Change-Id: If80d30a7eca2cac78cb5c6e5d29c82a06fb9f1dd Reviewed-on: http://codereview.qt-project.org/5095 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* testlib: Remove widgets dependency when only using guiKent Hansen2011-09-215-1/+53
| | | | | | | | | | | There's api in testlib that should only be available if the application links against widgets. Change-Id: I22e382c6710690866ed8ffed81bae27b548dc830 Reviewed-on: http://codereview.qt-project.org/5094 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Initialize in the right orderGunnar Sletta2011-09-191-2/+2
| | | | | | | Change-Id: I605c92bb43ea304cc812f85dc9937c161b2279f6 Reviewed-on: http://codereview.qt-project.org/5120 Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove gui-related ifdef from testlib/qbenchmark.cppKent Hansen2011-09-191-4/+0
| | | | | | | | | | It didn't make sense, since testlib doesn't link against gui. The QApplication api wasn't used anywhere anyway. Change-Id: Idb1bd20c7bcd0f9f16a9b526a7dabe4afccecfc4 Reviewed-on: http://codereview.qt-project.org/5058 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* correctly initialise private data in QTouchEventSequence constructorMatthew Cattell2011-09-171-2/+2
| | | | | | | Change-Id: Ia43ab0af4dfbaa824e76f744030e98f29e898bac Reviewed-on: http://codereview.qt-project.org/4973 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* compile when shadowing is an errorGunnar Sletta2011-09-151-7/+7
| | | | | | | Change-Id: If12cd19821d07303e808e19be1ee3984c90110b1 Reviewed-on: http://codereview.qt-project.org/4946 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* added small delay after touch event is dispatchedMatthew Cattell2011-09-141-0/+1
| | | | Change-Id: Ic5682ac32e9518a293f31cd4480df061a8215746
* hack to allow qWaitForWindowShown to be used in test cases that use QWindowMatthew Cattell2011-09-121-0/+7
| | | | | | | Change-Id: Id51aaf81d898f9159e4587613f5e34c3de9a5808 Reviewed-on: http://codereview.qt-project.org/4690 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* added ascii translations to qasciikey for keyup and keydownMatthew Cattell2011-09-122-1/+2
| | | | | | | Change-Id: I7645392b437bdaa5e981dbf07cac70ee1653b624 Reviewed-on: http://codereview.qt-project.org/4689 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* added additional qwindow test support functions for keyboard and mouse eventsMatthew Cattell2011-09-092-1/+85
| | | | | | Change-Id: Id5be7053c917bcefb2bb8cfab58de0933baf15d3 Reviewed-on: http://codereview.qt-project.org/4540 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* fixed mouseMoveMatthew Cattell2011-09-081-5/+11
| | | | | | Change-Id: I95dd22ed3216f5ad169393f535e27b1b397c8433 Reviewed-on: http://codereview.qt-project.org/4462 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* add support for QWindow in mouseEventMatthew Cattell2011-09-061-1/+70
| | | | | | | Change-Id: I0cbc2f2e6f4753da44a7709b31cf0e228def628c Reviewed-on: http://codereview.qt.nokia.com/4271 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* added support for qwindowMatthew Cattell2011-09-061-3/+72
| | | | | | Change-Id: I5611a5d3590be596457dcad5e431ae110c2c8b47 Reviewed-on: http://codereview.qt.nokia.com/4258 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote branch 'gerrit/master' into HEADSamuel Rødal2011-09-0635-1126/+296
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/corelib/global/qglobal.h src/gui/kernel/qplatformnativeinterface_qpa.h src/gui/widgets/qlinecontrol.cpp src/gui/widgets/qmenu_mac.mm src/gui/widgets/qmenu_p.h src/gui/widgets/qmenubar.cpp src/gui/widgets/qmenubar_p.h src/gui/widgets/widgets.pri src/plugins/platforms/wayland/qwaylandnativeinterface.cpp src/plugins/platforms/wayland/qwaylandnativeinterface.h src/src.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qstring/tst_qstring.cpp Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b
| * Pass log file name when constructing loggers.Jason McDonald2011-09-0511-79/+75
| | | | | | | | | | | | | | | | | | | | | | Pass the filename when creating the logger rather than when commencing output. This will simplify forthcoming changes for running multiple loggers. Change-Id: I563aa97661caf279a5dcccb1321ff3ce4725b332 Reviewed-on: http://codereview.qt.nokia.com/4116 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Beautify testlib's usage messageJason McDonald2011-09-051-30/+33
| | | | | | | | | | | | | | Change-Id: Ibeed554075215a5c4a154339dfa751dfe14a4d33 Reviewed-on: http://codereview.qt.nokia.com/4059 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove circular dependency in testlib loggingJason McDonald2011-09-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove one of the circular dependencies between QPlainTestLogger and QTestLog by directly checking whether we're writing to stdout rather than inferring the same by examining whether the output file name is null. Change-Id: I798288482c9e2e071e17a8622e8a8f8d5016dc7e Reviewed-on: http://codereview.qt.nokia.com/4052 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix various trivial formatting issues.Jason McDonald2011-09-0119-101/+96
| | | | | | | | | | | | Change-Id: Ifa2a2dd2aa26dab178ec1334376db42fc3ebb355 Reviewed-on: http://codereview.qt.nokia.com/4029 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove QXmlTestLogger constructor default paramJason McDonald2011-09-011-1/+1
| | | | | | | | | | | | | | | | | | This class is never constructed with the parameter defaulted. Change-Id: If9c3f6562da1e48635a9cf5332bee7e9641255fa Reviewed-on: http://codereview.qt.nokia.com/4021 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Simplify qtestlib logging code, part 3Jason McDonald2011-09-016-265/+37
| | | | | | | | | | | | | | | | Collapse the QTestBasicStreamer class into QTestXunitStreamer. Change-Id: I349b8db432fd45f9352084f60b36b460f3b61f6a Reviewed-on: http://codereview.qt.nokia.com/3925 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Simplify qtestlib logging code, part 2Jason McDonald2011-09-018-29/+29
| | | | | | | | | | | | | | | | | | Rename the QTestLogger class to QXunitTestLogger. Change-Id: I7b93f9de4f4744e53997ccc001a745c36f375599 Reviewed-on: http://codereview.qt.nokia.com/3924 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Simplify qtestlib logging code, part 1Jason McDonald2011-09-0110-670/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the old and new XML loggers produce the Complete and Light XML log formats, while only the new logger produces Xunit XML logs. The disadvantage of the new logger is that it is more complex and doesn't produce a partial log if the test fails to terminate gracefully. This behaviour arises because Xunit format output cannot be written correctly until all tests have been executed. This commit removes the Complete and Light XML formats from the new logger, using the old logger to produce those formats and the new logger to produce only Xunit XML. Prior to this commit, the qtestlib selftests demonstrate that the old and new loggers produce identical output for Complete and Light XML. This commit also removes the undocumented -flush command-line option, which was used rather obscurely to select between the old and new loggers. The newer logger will be renamed to QXunitTestLogger in a subsequent commit. Change-Id: Id304f5b411bdd520409ee233f6bc34e8917942ab Reviewed-on: http://codereview.qt.nokia.com/3923 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix errors in lightxml test loggerJason McDonald2011-08-311-28/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newer test logger did not produce the same light XML output as the logger that it replaced. In particular, it did not output the <DataTag> tag and it incorrectly nested a <Message> tag inside the <Incident> tag when a fatal error occured in a test. Unfortunately, it appears that the expected lightxml output for the selftests was produced by running tests using the newer logger, while the selftests did not use the older lightxml logger. Thus the errors were not detected by the selftests. This commit adds the older lightxml logger to the selftests, updates the expected test data accordingly, and modifies the newer lightxml logger to behave correctly. This last item is achieved by making the lightxml streamer copy most of the code from the xml streamer -- lightxml output is supposed to be same as xml, except for the omission of the root and <TestCase> tags. Change-Id: Ie6e1f69dd6000df2b9d0c5c8e2109fe7bbff3956 Reviewed-on: http://codereview.qt.nokia.com/3902 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Make lightxml and xml log formatting consistentJason McDonald2011-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | For XML logs, an Incident tag with no sub-tags has a space before the closing slash. For Light XML logs, this space was missing unless the -flush command line option was supplied. Change-Id: I6de2e140f9309f333b5b97ed7f8116e4e727a149 Reviewed-on: http://codereview.qt.nokia.com/3871 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Merge branch 'master' into refactorGunnar Sletta2011-08-3112-171/+11
|\|
| * Remove ability to run tests in random order.Jason McDonald2011-08-3112-171/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the undocumented feature that allows test functions to be executed in random order. The feature was designed to expose unintended dependencies between test functions -- test functions are only supposed to depend on the initTestCase() and init() functions. Aside from the lack of documentation, there are a number of problems with this feature. Most importantly, running the tests in random order has only a 50% chance of exposing dependencies between test functions. A better strategy would be to run the test functions in reverse order and complain if that produces different results to running the tests in the normal order. Additionally, the random order is not deterministic, so even if a dependency is exposed during a test run, there's no guarantee that it will be exposed again. The feature allows the user to optionally supply a random seed to make the "random" order deterministic, but as rand() implementations are not identical across platforms, even that does not guarantee that dependencies between test functions will be exposed deterministically. Change-Id: I39eac34c532ccb988116778bbc5ab05d835874c5 Reviewed-on: http://codereview.qt.nokia.com/3720 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Merge remote branch 'gerrit/master' into refactorSamuel Rødal2011-08-2926-735/+303
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/accessible/qaccessible.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qapplication_mac.mm src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qapplication_s60.cpp src/gui/kernel/qapplication_win.cpp src/gui/kernel/qapplication_x11.cpp src/gui/kernel/qdnd_x11.cpp src/gui/kernel/qwidget.cpp src/gui/widgets/qlabel.cpp Change-Id: Ief9c75724d2cff89ed45f009bdee2ffc5e4395ba
| * Remove the QTEST_NOEXITCODE define.Jason McDonald2011-08-291-6/+0
| | | | | | | | | | | | | | | | | | | | Tests that are expected to return a non-zero exitcode should be marked with "CONFIG+=insignificant_test" in their .pro file. Change-Id: Iebb9c7129c08833ed517115f569086d6fcfe827b Reviewed-on: http://codereview.qt.nokia.com/3689 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Rename COMPARE_IMPL2 to TO_STRING_IMPL.Jason McDonald2011-08-291-15/+15
| | | | | | | | | | | | | | Change-Id: Idbc8c78815f9259c5ecc36fbb053d64f6802c66b Reviewed-on: http://codereview.qt.nokia.com/3649 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove unused functionJason McDonald2011-08-291-6/+0
| | | | | | | | | | | | | | Change-Id: I04eea17a3674beb59c84e3992f9bb2754f7b3525 Reviewed-on: http://codereview.qt.nokia.com/3646 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove literal tabsJason McDonald2011-08-291-5/+5
| | | | | | | | | | | | | | Change-Id: I06064f68a0ca23968cec30ccb063dadf2e67571b Reviewed-on: http://codereview.qt.nokia.com/3645 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove default params from QTestData constructorJason McDonald2011-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | The constructor asserts if either parameter is null, so having defaults seems to be pointless. Change-Id: I8cec52e17e5f94458e8d8323855eaed6433686e7 Reviewed-on: http://codereview.qt.nokia.com/3644 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove obsolete ifdef.Jason McDonald2011-08-291-3/+1
| | | | | | | | | | | | | | | | | | | | QTEST_EMBED is not defined in Qt itself, nor is it defined by any of the CI builds for Qt's supported platforms. Change-Id: I73a3979630130fc8f1ef99dcbc17b4d1875ba246 Reviewed-on: http://codereview.qt.nokia.com/3641 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove debugging printf.Jason McDonald2011-08-291-1/+0
| | | | | | | | | | | | | | Change-Id: Ib5733e96d3a6cec956d2f4c326d7be42e813c440 Reviewed-on: http://codereview.qt.nokia.com/3639 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove obsolete autotest command-line flag.Jason McDonald2011-08-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The charting functionality was removed in Qt 4.6, though the command-line option was retained to print a warning that the feature had been removed. Sufficient time has passed for this to be removed completely. Change-Id: I2adf2818c6a6e57e765104de97b28dbf6914e3fa Reviewed-on: http://codereview.qt.nokia.com/3638 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Send error messages to stderr rather than stdoutJason McDonald2011-08-292-34/+34
| | | | | | | | | | | | | | | | | | | | | | The commit changes printf's that output error and warning messages to send their text to the stderr stream. Non-error output, such as that produced by passing the -help option to a test, still goes to stdout. Change-Id: Iea4d62451e3e7e84c654859cb09ea7e717511d13 Reviewed-on: http://codereview.qt.nokia.com/3636 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove unused members and methods from QTestLogger.Jason McDonald2011-08-292-86/+10
| | | | | | | | | | | | | | | | | | | | | | QTestLogger was counting various test outputs, but was only using three of the counters internally and the rest were not used at all. This commit removes the unused counters and all of the getter methods. Change-Id: I447183dcaf3e6cc335bbf58656e25b1d32ba810a Reviewed-on: http://codereview.qt.nokia.com/3437 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove unused methods from QTestLogger.Jason McDonald2011-08-292-13/+0
| | | | | | | | | | | | | | | | | | | | | | The setLogFormat() and logFormat() methods are never called -- the log format is set in the call to the constructor and it would not make sense to change it during a test run. Change-Id: I59256f17f28bbc72d86cabfb2a961d2faf0e2d52 Reviewed-on: http://codereview.qt.nokia.com/3435 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove QTestLog constructor/destructor definitionsJason McDonald2011-08-291-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | QTestLog is an entirely static class and its constructor and destructor are declared private to prevent accidental construction of an instance of the class. Therefore, the constructor and destructor do not need to be defined. Change-Id: I860f1344c5032091f5c641a20e1656bb52a6f07e Reviewed-on: http://codereview.qt.nokia.com/3466 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Add missing assertions.Jason McDonald2011-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | For both QTestLog::addFail() and QTestLog::addIgnoreMessage(), passing a null message does not make sense and is therefore an error that should be brought to the developer's attention. Change-Id: Ib09ad90b70d74f7432c08708db8a70dee008cce4 Reviewed-on: http://codereview.qt.nokia.com/3470 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Be more consistent when including private headers.Jason McDonald2011-08-291-3/+1
| | | | | | | | | | | | | | Change-Id: I0fdc014391ff34ba3be9501c2e73bd5357df1f5e Reviewed-on: http://codereview.qt.nokia.com/3467 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove mode parameter from QTestLog::addSkip().Jason McDonald2011-08-295-10/+6
| | | | | | | | | | | | | | | | | | | | The mode parameter is never used by the logging code, so there's little value in passing it there. Change-Id: Ibe2cbe5eaf457a7e3ffd3aea3a4be7c8278c91b6 Reviewed-on: http://codereview.qt.nokia.com/3547 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix broken header file guard.Jason McDonald2011-08-291-1/+1
| | | | | | | | | | | | | | Change-Id: I6db5be5289b271be24a4a9d77c5f2a1e9f560d2d Reviewed-on: http://codereview.qt.nokia.com/3434 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix typo in enum name.Jason McDonald2011-08-293-5/+5
| | | | | | | | | | | | | | Change-Id: I2eccbd3b9dd31aa5e869d622055f9235f90c0c03 Reviewed-on: http://codereview.qt.nokia.com/3445 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix minor formatting issues.Jason McDonald2011-08-291-7/+7
| | | | | | | | | | | | | | Change-Id: I66767e906c54988ca0d0e2823b1a396993ba06f2 Reviewed-on: http://codereview.qt.nokia.com/3624 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove QTestFileLogger class.Jason McDonald2011-08-295-200/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not very useful -- it just creates a text file that records each occasion that an autotest enters a test function as a stop-gap solution for the fact that the newer XML logger produces no output if the autotest fails to terminate gracefully. Addressing QTBUG-20615 will provide a better solution by allowing the user to get a partial plain text test log in those circumstances. Change-Id: I179bb98dbd696d0734cd3f12046e5c567def30cc Reviewed-on: http://codereview.qt.nokia.com/3390 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove ability to change XML logger during a test.Jason McDonald2011-08-299-23/+17
| | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to change the logger associated with a streamer in the middle of a test run, so only allow the logger to be set when constructing a streamer. Change-Id: I02661de2b6071c74d10bc854cbe436581978d2d9 Reviewed-on: http://codereview.qt.nokia.com/3622 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Enable multiple instances of QAbstractTestLogger.Jason McDonald2011-08-296-164/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously QAbstractTestLogger used a global variable for the file pointer to which it was writing test output. This effectively meant that only one instance of this or its derived classes could exist at any time. This commit moves the file pointer inside the class, so that multiple loggers can exist at the same time. This means that the outputString() method can no longer be static, which in turn means that several functions used by QPlainTestLogger need to move from the QTest namespace into the class, and also that QTestBasicStreamer must hold a non-const pointer to its associated logger instead of a const pointer. Task-number: QTBUG-20615 Change-Id: If941f1f9399cf20fb93e3e87f3390bceeca1cbfc Reviewed-on: http://codereview.qt.nokia.com/3576 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove color logging feature from qtestlib.Jason McDonald2011-08-293-74/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature was undocumented and only worked if a secret environment variable was set, the test output was going to a real console, and plain text test results were being generated. Including code in testlib for fancy presentation of test results conflicts with testlib's stated goal of being a lightweight framework where every feature contributes to finding bugs, so this feature is being removed. If fancy presentation of test output is required, it should be achieved by post-processing the test output outside of the test framework. Change-Id: I872165c4d2c3d2498c3aa039070ecf319e237ca1 Reviewed-on: http://codereview.qt.nokia.com/3432 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>