aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/autotestplugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix some clang warnings about unused lambda capturesChristian Kandeler2020-04-241-1/+1
| | | | | | | | | | There are more, but we need to keep those because MSVC believes they are required. This is the subset that satisifies both compilers. Change-Id: I0b0a63d5496acc119a7f0513d3a1da0b76fa1fca Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* AutoTest: add support for Catch frameworkJochen Seemann2020-04-091-0/+2
| | | | | | | | | | This adds a basic test and test output parser for the Catch2 test framework. Task-number: QTCREATORBUG-19740 Done-with: Christian Stenger <christian.stenger@qt.io> Change-Id: Ic3322905ab82f414d2a26c325e130142233f72aa Reviewed-by: David Schulz <david.schulz@qt.io>
* Autotest: Move Test{FrameWorkManager,Runner} singletonshjk2020-03-261-22/+17
| | | | | | | Make them plugin-pimpl data members, removing some indirections. Change-Id: Ie441ac94a27f07342513b0b5b1437ccfe4b5d7d2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* AutoTest: Move TestCodeParser and TestTreeModel ownership to plugin pimplhjk2020-03-201-16/+17
| | | | | Change-Id: I01b32aae894a4b419c8a067f604d5f04a2b14dfe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* AutoTest: Remove back referenceChristian Stenger2020-03-091-6/+3
| | | | | | | There is no need for holding the q-pointer anymore. Change-Id: I9de19238b0cf0d59cd1e88590b7b2dfaf28ff285 Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-061-4/+16
|\ | | | | | | Change-Id: I04d9cc69a07d4d07b1bf1df57681d6a68587d7ba
| * AutoTest: Fix leaking of project settingsChristian Stenger2020-03-051-4/+16
| | | | | | | | | | | | | | | | Make sure project settings will be destructed correctly. Change-Id: I633bf744eb2e0835fe89e3a9f3c2f7293c5f5275 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | AutoTest: Use normal object for settingshjk2020-03-021-21/+20
|/ | | | | | | | | | Ownership is clear here. However, since this is accessed via the static plugin interface, this needed some change that access. Change-Id: I9488a242442303dee89006240f787677afab730a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Disentangle ProjectExplorer::updateRunActionshjk2020-02-261-1/+1
| | | | | | | | | | | | | | | | | This enforces a linear pass through [static] ProjectExplorerPlugin::updateRunActions ProjectExplorerPluginPrivate::doUpdateRunAction [emit] ProjectExplorerPluginPrivate::runActionsUpdated instead of the previous direct emission of the signal from user code and connecting also the internal update to it. This is meant to simplify reasoning about execution order and maybe to help elimimating double executation. Change-Id: Id8cc41a46d9dec06afb5514855f2ae80560f3695 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove apparently unneeded QtPlugin includeshjk2020-02-121-1/+0
| | | | | | Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Autotest: Use correct Icon for "Run Test Under Cursor" actionAlessandro Portale2019-12-181-1/+1
| | | | | | | | The "TOOLBAR" version is too bright and has a shadow (in non-dark modes). Change-Id: Ic7e8500fd9ecad4465bf2d9dfba53c0bf6538a66 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* AutoTest: Re-order responsibilitiesChristian Stenger2019-09-061-1/+1
| | | | | | | | | Keep the timer for syncing frameworks where it is really used, do not create functions that are not necessary at all. Change-Id: Ie0a49a2611dc67510b72562455ea2a1af7b1c538 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Pimpl pluginChristian Stenger2019-09-021-50/+86
| | | | | Change-Id: I36c1ec242e29b9d06c1c2304960b445833fb9ebb Reviewed-by: hjk <hjk@qt.io>
* AutoTest: Add project based {en|dis}abling of test frameworksChristian Stenger2019-09-021-1/+28
| | | | | | | | | | Provide integration into the 'Project' view which allows to set some settings on a per project base. For now only enabling or disabling of test frameworks. Task-number: QTCREATORBUG-16704 Change-Id: Iedd9a300164931e07a21cbb4e5a222be3266c81e Reviewed-by: David Schulz <david.schulz@qt.io>
* Standardize on int for line and column valueshjk2019-07-261-1/+1
| | | | | | | | | | | | | | | Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Test: Fix double semicolonDavid Schulz2019-07-101-2/+1
| | | | | Change-Id: I8f858ef2345f19a0067cbfb4437cb432360e490d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Use Utils::FileName for Runnable::executablehjk2019-06-211-2/+1
| | | | | Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ExtensionSystem: Move away from QListEike Ziller2019-05-271-2/+2
| | | | | | | | Qt 6 API will move away from it. Use QVector for API and some std container for internal things. Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8 Reviewed-by: hjk <hjk@qt.io>
* AutoTest: Add basic boost test supportChristian Stenger2019-05-201-0/+2
| | | | | | | | | | | | | | | Provide experimental support for Boost UTF. This patch adds the basic implementation for * parsing the code for Boost tests * executing the found tests * displaying respective results This is just a basic and limited support which needs to be enhanced and improved later on. Task-number: QTCREATORBUG-21169 Change-Id: Ie0da5f51f90fb1fa7217eac461ebfc5214395ef6 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Make automatic popup of results pane configurableChristian Stenger2019-03-201-0/+6
| | | | | | | | | | | | | | Let the test results pane automatically popup before the first test result is added to indicate running the tests has started. Beside this provide settings for enabling or disabling the popup of the results pane on start or finish of a test run and make it possible to limit the automatic popup on finish to failed test runs. Change-Id: Ib22735536effd9f2330b39a7d2830c97839eb21f Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Limit test execution under cursorChristian Stenger2018-10-171-8/+24
| | | | | | | | | | | | | | | | | | | Run and debug under cursor simply used the literal under the cursor to find matching test cases or functions. This obviously finds more than the test under cursor. This patch limits this behavior by taking current file and line number into account as well. If the action gets triggered on a test definition then the found tests are limited to this position. If the literal under cursor does not belong to the definition of the test (declaration, string, comment) the original behavior gets triggered. Fixes: QTCREATORBUG-21093 Change-Id: I051d25c1d18e819caf2950b5c62d51e6d70d1b22 Reviewed-by: pawelrutka <prutka13@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Provide way to remember last chosen run configurationsChristian Stenger2018-09-211-0/+28
| | | | | | | | | | | | | | | | | In some special setups it is almost impossible to get the right executable or run configuration. For bigger projects this can become a pain point when trying to execute tests and always getting asked which one to run. So, allow remembering the choice and use it if appropriate. The cached information is not stored permanently. Resetting of the cached information can also be triggered by switching or closing the current project and inside the settings. Task-number: QTCREATORBUG-20859 Change-Id: If416ea0ae9ad3548daca2ffcf5888fd568fd2622 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Avoid shortcuts with "Alt" on macOSEike Ziller2018-08-211-5/+9
| | | | | | | | | | On macOS shortcuts with "Alt" are used for entering special characters, where "special" depends on keyboard layout and can mean e.g. '|' or '~'. Task-number: QTCREATORBUG-20873 Change-Id: Ifa70b95381ef48d2ba3b15a528a5dcfe43d53bfd Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* AutoTest: Silence soft assertChristian Stenger2018-05-231-1/+2
| | | | | Change-Id: I6aa2490971fcf4fbbbbc0bad570406e349029b32 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Add action to run all tests from current fileSergey Morozov2018-05-151-0/+33
| | | | | | | | | Run specific test functions since one test case can be implemented in multiple files. Task-number: QTCREATORBUG-20329 Change-Id: I07f435c264f18e9608caa5b7ee20dff2d33ee9c0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-04-131-2/+8
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/settingsaccessor.cpp src/plugins/autotest/autotestplugin.cpp src/plugins/git/gitclient.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.h Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
| * AutoTest: Replace expensive function callChristian Stenger2018-04-091-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the underlying project manager it can be pretty expensive calling PE::canRunStartupProject(). AutoTest plugin used this to determine whether its global actions should be enabled or not and updating these actions is triggered for too many causes. Replace this function call by some simple checks that have almost no cost to avoid blocking UI. Task-number: QTCREATORBUG-20175 Change-Id: I0e3cce683f33abe82bf1354ec5276250f5e30068 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | AutoTest: Add possibility to trigger test run from sourcePawel Rutka2018-03-161-1/+66
| | | | | | | | | | Change-Id: Iceed69747de64d76f34451d41f719c8dbdd81e44 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-03-011-7/+7
|\| | | | | | | Change-Id: I63f8aebb201936f671b1486ff9420f67e5e3fafc
| * AutoTest: Correct enabled state of context menu itemsChristian Stenger2018-02-281-7/+7
| | | | | | | | | | | | | | | | | | Permanently enable (De)Select All and allow triggering a rescan also if there is a build running. Task-number: QTCREATORBUG-19940 Change-Id: Ia0e8a5da135c3c59aba4ab179ae2970c25d470f3 Reviewed-by: David Schulz <david.schulz@qt.io>
* | AutoTest: Access plugin singleton through static functionsChristian Stenger2018-02-011-7/+2
| | | | | | | | | | | | | | It's the more common pattern nowadays, and cheaper. Change-Id: If6217b2a820fbfa6f088fd9349225f5f8488f593 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | AutoTest: Avoid global object poolChristian Stenger2018-02-011-3/+6
|/ | | | | | | | Instead of adding internal objects to the global object pool keep them to handle their destruction. Change-Id: Ie6217b2a820fbfa6f088fd9349225f5f8488f593 Reviewed-by: hjk <hjk@qt.io>
* AutoTest: Consolidate handling of global menu itemsChristian Stenger2017-12-191-8/+19
| | | | | Change-Id: I6ad07775d63206864ec330ad87d3b65e5ecaf76c Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Unify handling of run modesChristian Stenger2017-09-181-2/+2
| | | | | | | | Move used enums more central to avoid duplicating information and unify their usages. Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Drop unused variables and lambda capturesUlf Hermann2017-09-081-1/+1
| | | | | | | | | Also, add context to connect() expressions where we are or were capturing "this". Change-Id: I6e006ba6f83d532478018550d148ee93eca59605 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* AutoTest: Avoid triggering run tests while buildingChristian Stenger2017-06-191-3/+11
| | | | | | | | Disable respective actions while a build is running to avoid strange side-effects or race conditions. Change-Id: Ifc8d1c9fc9fd4d705cabd148b145708e23029dba Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Ensure that removing and adding qml files is noticedChristian Stenger2017-03-071-2/+3
| | | | | | Task-number: QTCREATORBUG-17805 Change-Id: I068f6925fc39813a504205c4ef8e8b9f9e911189 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Modernize codeChristian Stenger2017-02-171-3/+3
| | | | | | | | | | * remove unnecessary QLatin1String where possible * foreach * nullptr * bad naming of static members Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Always parse if plugin is enabledChristian Stenger2016-12-121-3/+0
| | | | | | | | | | Remove the 'Always parse' setting and respective special handling. This simplifies the handling of parsing for tests and removes strange special handling that was introduced in earlier versions and led more to confusion on the user side. Change-Id: Ia4d122ed448244f3cb3876dda9930864afde9c28 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Fix handling of enabled state for code parserChristian Stenger2016-11-141-0/+1
| | | | | | | | | | | Avoid unintentional re-enabling of the code parser. Handling of the enabled state broke several times before, therefore separate it from other states of the parser to avoid breaking it again when not taking enough care while refactoring or adding features related to states. Change-Id: If1eb0dd649225f10bfc3bf06f09851649da75983 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Fix enabled state of global Tests menuChristian Stenger2016-10-261-0/+1
| | | | | | | | | If tests are running the Tests menu's (current) items are all disabled which led to having the menu disabled as well. Ensure to have the menu enabled regardless the sub items' state. Change-Id: I561f1eb75637f03a27df012129455e06be38ea87 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Move framework settings into framework managerChristian Stenger2016-10-101-1/+1
| | | | | Change-Id: I9914291adb102de5136802eb3b6d12afb6276538 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Cancel possible running tasks on shutdownChristian Stenger2016-07-151-0/+1
| | | | | | | | | If tasks are running while shutting down we might end up in a crash, so cancel all tasks and handle possible invalid accesses of the current running processing. Change-Id: I69f7cac5f44390e322fa301af6d6794270c95c2a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* AutoTest: Add minimum support for debugging testsChristian Stenger2016-06-221-2/+2
| | | | | | | | | | This adds another context menu entry for items on the test tree to allow debugging of a single test. Task-number: QTCREATORBUG-16070 Change-Id: I98f56b0f22c94ad71f0b91d690383043ed27f1c7 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Introduce active state for test frameworksChristian Stenger2016-06-141-1/+2
| | | | | | Change-Id: I0fddce91a239c0a51352a25e34a221fd8880b733 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* AutoTest: Add test frame work handlingChristian Stenger2016-06-091-5/+12
| | | | | | | Mainly a preparation for enabling/disabling test frame works. Change-Id: I0bbea7e055a607517ef8193587c229cadf0de027 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Add Id to parsers and remove now useless enumChristian Stenger2016-06-071-1/+0
| | | | | | | Preparation for introducing test frameworks. Change-Id: Iefaa4ca9dd9af665444556afa9c6e326041cfd0f Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Provide setting to outvote automatically disabling parserChristian Stenger2016-02-031-0/+3
| | | | | | | | | | | Test parser is normally disabled as long neither test tree nor results pane is opened. The new setting allows the user to enable the parser without the need to have one of these widgets opened. Task-number: QTCREATORBUG-15669 Change-Id: I354e1a3cb91eeca2302f2344fd443c81c4b15406 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* AutoTest: Add an accelerator to menu entryOrgad Shaneh2016-01-251-1/+1
| | | | | Change-Id: I8e94912fdbdf1f0dbd7366e96222d04f6c838586 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>