Commit Graph

65 Commits

Author SHA1 Message Date
Christian Stenger b9a60137ad Clean up plugin
Change-Id: I695adb992f4d1f32f266f1628f2094e4bcc81485
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-17 10:44:35 +02:00
Christian Stenger 4caba7a3dd Perform parsing asynchronously...
...to avoid blocking the ui thread. Parsing will now performed
in a separate thread, except for small changes where this would
create too much overhead.

Change-Id: I1db441594f1684f969bb86c9423c0fb0bcb1a53a
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-17 10:26:49 +02:00
Christian Stenger 223b43e9e0 Enable and disable parser on demand
The new approach enables the parser as soon the Tests navigation
widget or the Tests results pane is visible.
If none is displayed parsing will be disabled.

This additionally fixes an issue of not parsing a project
when having a project opened already before triggering the
first Tests navigation widget to become visible.

Change-Id: I7163268d405e07e85814097d65ff34790a98a3d1
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-17 10:26:39 +02:00
Christian Stenger 213a687f45 Rework parsing and provide unit test
Handling of parsing has slightly changed. The parser now uses simple
states to be capable of postponing triggered parses if there is already
a parsing in progress. Furthermore the parser now waits for the current
project to be completely scanned.

Change-Id: I6d4968d28194ba8d23d3a0ee6ab454d81a549e67
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-17 10:26:28 +02:00
Christian Stenger 751d2e2bb1 Fix re-parsing of tests...
...for code split up into header and source.

Change-Id: I8f1bf01e6ff6f88afc1e054318cd384b5f231eb6
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:49:58 +02:00
Christian Stenger 2ce99680b2 Decouple code parser and model
Additionally some minor refactorings to increase readability.

Change-Id: I0be120fcedcf31dbb0116d84f0d3c23cf95e7d91
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:43:02 +02:00
Christian Stenger 61c50e4aa3 Fix wrong behavior for gathering test configuration
If the current project mixed named and unnamed Quick tests
determing the test configuration failed due to running into
the assert if you had no auto tests for the current project
selected as well.

Change-Id: I5c98316fada704cd7e021becab897d168a19b99b
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:42:25 +02:00
Christian Stenger 2ece8b6181 Fix detection of tests on OSX
Change-Id: I662afadd17bd8b2f1fbc9269dc470430e871e582
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:27:32 +02:00
Christian Stenger aba302ddef Fix compile warning
Change-Id: Ib98f444baa1c35e038921b4e25927faee64f0877
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 14:30:43 +02:00
Christian Stenger 9159799a2a Fix modifyContent() to take type in account as well
Change-Id: I1a4aeb10243afc5514330fceb3f502d9ea4432d1
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 14:27:23 +02:00
André Pönitz 81e4659a08 Compile fix with current qtbase/dev
Change-Id: I6fdb6429e8509468b7a710414af250ea6464d92d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-16 14:19:51 +02:00
Christian Stenger ca4b66e8ad Refactor TestCodeParser
Change-Id: I5fdb6429e8509468b7a710414af250ea6464d92d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-02-05 08:25:11 +02:00
Christian Stenger 834c52f483 Avoid crash when using wrongly created test tree
Change-Id: I686f0cf285daeb3889161109964efd6e9ac47a40
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-02-05 08:25:01 +02:00
Christian Stenger 3629aa9044 Fetch current project always before accessing
This fixes two different crashes when TestCodeParser tried
to access m_currentProject, but the object this pointer was
referencing had been deleted already.

Change-Id: Ie59e027394e613a8ef1e4f32f97abed6e8cb007a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-01-28 15:29:23 +02:00
Christian Stenger 2aa7ce7350 Make sure to get output on Windows when using Qt5.4 or higher
Change-Id: Id69636f5a48f5423217c47c039d4522ef42cd2a3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-01-27 16:07:26 +02:00
Christian Stenger 41208f66aa Re-enable printing of NAN for execution time
Change-Id: I50bfd95808c90a30501bdf32f484dd035cc2f30b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-01-21 14:48:01 +02:00
Tim Jenssen 6571c85f3d fix that windows can find the file
added missing .exe file suffix

Change-Id: I537736a95de778e0a498c37d21baf0d717eb8c4d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-21 09:26:19 +02:00
Tim Jenssen 295ad02f7e introduce testxmloutputreader
Change-Id: I5a77e8fd629343bc059a03e6c27f45103b96101a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-21 09:25:51 +02:00
Tim Jenssen 2a78ffea8d refactor if clause
Change-Id: I3ce6e711392f35c89dfcbecc3c8fcb8aca293602
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-21 09:24:47 +02:00
Tim Jenssen 33ce9f9e0d refactor performTestRun
On windows we are only interested in .exe files. For example
QProcess("test.cmd") does not work.

renamed which to executableFilePath

Change-Id: Ib9aa2d011c3d0525b618a1b0a6bd32b556c02010
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-21 09:24:22 +02:00
Tim Jenssen 003f812456 avoid abbreviations in variable names
Change-Id: Ie9474da2a4c9c2e461bdd15e859e1a53f820a1d1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-14 10:40:00 +02:00
Tim Jenssen 4297de7d4b remove static variable testRunner
Change-Id: I07dbde221632ec0aeca758f684c8ada2c71f3969
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-14 10:39:51 +02:00
Tim Jenssen 042b1d61d0 merge performTestRun and performExec
This is a preparation for later refactoring. Also moved
the get settings values outside from the threaded code.

Change-Id: I0acceece4bc55a453880f4235e02a5712443b32d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-14 10:39:37 +02:00
Tim Jenssen 2287ba501f variables as complete words are better
Change-Id: If433c621466f2e1160a016d2b7b2539e4dc8b3d6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 13:42:46 +02:00
Tim Jenssen 0c9531f384 don't pollute the Autotest namespace with an enum
Change-Id: Ic6c3e3beaba15e83c8524394ccc6a1953e76d59a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 13:42:35 +02:00
Tim Jenssen e0616dc889 use variable instead of anonymous "false"
Change-Id: I4ca2f7d82e70306ffae50d5eea31357e9fcfd0aa
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-09 14:19:45 +02:00
Tim Jenssen 96205e28fe fix warning that "pep" is initialized but not referenced
Change-Id: I1f12323e1de481f800fcf835a12213059b72bfd4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-09 14:19:36 +02:00
Christian Stenger 35939ac402 Avoid executing unnamed Quick Tests if no related main is executed anyway
Change-Id: I521065577c195713bc252e6762a88011996f045c
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-01-09 08:24:45 +02:00
Tim Jenssen ba8979d066 Get rid of the Locker in TestResultModel...
...use signals and slots instead.

Additionally re-use the existing item that is displaying the
"Entering Test Function..." information.

Change-Id: Ibedac01ced9e987d542aa4dc878588fbec84d585
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-01-09 08:24:39 +02:00
Tim Jenssen be4c06fdaf introduce FaultyTestResult class
Change-Id: I5f20741492dbb3d553bea30a677965d46d6d8eb3
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-06 17:08:38 +02:00
Tim Jenssen 0c737c21ff no need of an pointer for settingspage
Change-Id: I55d69bac267f6f601682aeeca9eedcf944e8b55a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-06 16:37:44 +02:00
Tim Jenssen b655f70aba move settings getter to cpp
Change-Id: Iec90cfcd74192f13d270180db91db95d41253bc5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-06 16:35:10 +02:00
Tim Jenssen 1cc239ef41 move create menu entries to extra function
Change-Id: Ia504e453b6cacc254ea598c629c3762c03cfa783
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-06 15:35:55 +02:00
Tim Jenssen 2cc47c2039 move license check to a function
Change-Id: Idcb2c328f3313dac38997765c2569d6861d34a20
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-06 14:51:13 +02:00
Tim Jenssen 6a4afc7d5f rename TestTreeViewWidget to TestNavigationWidget
also move it to an extra file

Change-Id: Ia76c9b3be4c11207a564e7cc7fcb2eae730ae505
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-18 18:32:50 +02:00
Christian Stenger d778fc5477 Post-pone parsing for test if CppModelManager is parsing
Change-Id: I7af93eb587e55f7d6e4ee14ed9808ceeb41ed8a3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2014-12-18 18:32:01 +02:00
Tim Jenssen 19f36ebf78 rename selectOrDeselectAll to changeCheckStateAll
Change-Id: I78e700734e2b5ec6bad31df71419bbc1a8b1b3c8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-18 18:14:56 +02:00
Tim Jenssen 59a4999de3 rename pro file to subdirectory name
Change-Id: I7636e819f41a3fc0592a36f330f30695760cad6a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-18 18:08:18 +02:00
Christian Stenger cda4227a62 Re-do the usage of QWriteLocker
Only lock if necessary to avoid dead-lock situations.

Change-Id: I39d1158749131a72805e55f28aba79e1827f158b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-09 15:04:46 +02:00
Christian Stenger ac24550a22 Add special message to results pane
This message just states which function actually is executed and will
always be on the bottom of the list of results.
When test run finishes this message will be completely removed.

Change-Id: Ie8fedfc74f67eba71a2bcf55f4dc1553754fca9a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-09 10:33:15 +02:00
Christian Stenger e71a2c44fc Provide test settings and make use of them
Change-Id: Ia6fef10bc577f9722b6c063c2df4d1651a8be50d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-09 10:22:48 +02:00
Christian Stenger edfd394bf5 Fix issue when buildQueueFinished signal is emitted too fast
Change-Id: I56ba8f9d0d4abe7627f9dd0d980774dda814d456
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-05 09:51:52 +02:00
Christian Stenger 32a6849fae Add support for minimal benchmarks 2014-12-04 13:52:16 +01:00
Christian Stenger d278476956 Support blacklisted test cases 2014-12-04 13:52:16 +01:00
Christian Stenger 0fc6d113d1 Update test tree when configuration changes
This takes especially configurations in account when subprojects
are enabled/disabled conditionally.
2014-12-04 13:52:16 +01:00
Christian Stenger eb073616fb Access test results list from multiple threads in a safe way
This had lead to crashes when executing projects with some more
tests or more test output. Now it's using a mutex to avoid
concurrent access.
2014-12-04 13:52:16 +01:00
Christian Stenger 036c648650 Don't cancel test run if some test configurations are faulty
Instead just remove these from the current test run and add a
respective warning to the test results pane.

Additionally made a the message of having no test cases at all
a warning instead of a fatal.
2014-12-04 13:52:16 +01:00
Christian Stenger b0c4a9cc3b Improve support for Qt Quick Tests 2014-12-04 13:52:16 +01:00
Christian Stenger 9a644d1257 Support sorting of test tree
Additionally preparation of filtering has been done.
2014-12-04 13:52:16 +01:00
Christian Stenger 0357b0e98b Add basic support for Qt Quick Test 2014-12-04 13:52:16 +01:00