QtVersion to utils/cpplanguage_details.h which already contains similar
flags.
BuildTargetType to ProjectExplorer, next to BuildTargetInfo (but not in the
same header to not pull that in everywhere).
Removes dependency on ProjectPart from RawProjectPart.
Change-Id: I5791065e4266f20c2657ee4b1b594df04b238a1c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Add an option to automatically run tests if the build
succeeded and the current project has tests.
Change-Id: I1fe028be84279b9b488f78590565c6d4b0449e34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
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>
Follow the official terms used by the test frameworks.
In detail this means Google test now uses TestSuite and TestCase
and the value for a normal function has been simplified to
TestFunction.
Beside the visual change there is no change in functionality.
Change-Id: Idf541d07fa3469e04a699d46f4625ff9075d5b6f
Reviewed-by: David Schulz <david.schulz@qt.io>
Test suites are used in several test frameworks. To avoid
fiddling around with the types and their meaning on the
frameworks side just add another type (TestSuite) that can
be used.
Frameworks can use or ignore this type as it is done already
for other types.
Change-Id: I6c2a312a32ce5716f55b49303e2b1a0f6f8e8da4
Reviewed-by: David Schulz <david.schulz@qt.io>
QtTest had been forgotten to handle correctly as well. So, it
was possible to have several levels of grouping which had not
been handled correctly.
By (current) definition we handle only one level of grouping,
so prohibit more for QtTest tree items as well.
Basically move the check into a separate function and use this
beforehand instead of creating a nullptr.
Change-Id: Icbf02eae67e89464f371eb349eecf2976636d05f
Reviewed-by: David Schulz <david.schulz@qt.io>
In preperation for the language server protocol support.
Change-Id: Iee4ccd53a86d9afdb357972ea62b75ace2edcb1d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* use nullptr
* override
* remove old style casts
* fix most of the code model warnings
Change-Id: Ia08e846f9326ae28ca7e7d66748e25a8b817b9b1
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
When the rebuild of the tree model has been triggered
due to switching between grouping by filter or directory
it could happen that some children did not get merged
into others due to (insignificant) differences.
Avoid this visual duplication by finding items similar
to the one to be added and if there is one re-use this
instead.
Change-Id: Ife49593638e0af23ffc7353e305be4ea25eb2180
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Since bc698d4ce6 the build system targets / build keys are
unique on their own.
Simplify the completion of test configurations and improve
readability.
Change-Id: I258e8a35a4740dd58b1365498ca399258092e0e3
Reviewed-by: hjk <hjk@qt.io>
This allows to create a copy of an item. Basically it will
copy its member objects, but it does not copy its children.
Preparation for extending grouping support for GTest.
Change-Id: I75f92be53ff4191cacea2944b31641a9292d1e58
Reviewed-by: David Schulz <david.schulz@qt.io>
Since all resources in Qt Creator get merged together at runtime, they
should be prefixed with the library/plugin name.
Change-Id: Ie411388ed72f099647b25787a140feff1828d3f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If marking a test case for removal by file it could be
possible that children of this test case are not marked
because of being located inside a different file.
When performing sweep the test case and the not marked
children would be gone as the test case is marked and
so sweep would not look into the children.
This currently can only happen for gtest based test
cases as registering the tests is different and the test
case stores here the path of the first found test set.
Change-Id: I712054534307ee2839894c5148ae04b86b9df967
Reviewed-by: David Schulz <david.schulz@qt.io>
Simplify and re-arrange to avoid wrong indirections and
unnecessary delegation.
Beside this ensure correct check states of group nodes
when adding them.
Change-Id: I24a32249d785e48c9d27111d062c2a06a17327ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Grouping of test cases can now get enabled for each
registered framework.
For now grouping happens only folder based.
Task-number: QTCREATORBUG-17979
Change-Id: Ic0e5c0ecc76998a1aedea8aa0845f6d9b53fb179
Reviewed-by: David Schulz <david.schulz@qt.io>
Link is a common class and is used across the plugins.
Change-Id: Id92e47e1b8604316ca8b970804e57abaf404ec28
Reviewed-by: David Schulz <david.schulz@qt.io>
If we failed to find a project part for the respective file
it is most likely that we had a header with declarations only
but we can still find depending targets for this file.
Task-number: QTCREATORBUG-18922
Change-Id: I80d0af569bbd6c2a41bf498fb55283704f16439c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
If there are tests defined or registered inside libraries
we ended up trying to execute the library or nothing at all.
If possible try to find correct build targets for such cases.
Change-Id: I58e9edb7f858e3e5407ece6fcb8782f5a129acd0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Let project managers store information whether a project part
belongs to an executable or a library and use this information
inside the AutoTest plugin.
This information will help to determine which targets are
relevant for the execution of tests.
Change-Id: I93b42797bf55225425398dc83aecea3c99eea290
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
If we want to mark test tree items because of their file name
explicitly for removal we must not mark its children
recursively without looking at their content. (Grand-)Children
might have a different file and won't get updated ('unmarked')
when just parsing single files which in turn would lead to
sweeping them after parsing.
Task-number: QTCREATORBUG-18689
Change-Id: Ic28dda5652899308a71d2bd3c28a7fde89a08a0e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Base the selection of the run configuration on the executable
we have gotten already from the BuildTargetInfo and take
deployment information into account.
This also reverts cce1e130 partially and avoids
stuffing unrelated information into the buildsystemtarget.
Change-Id: I3de6e910a5fd1092d428ec4afc33c4ca62daaa25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This allows (de)selecting of all test cases of a specific test
framework.
Change-Id: I21357d3dbcfce73387f157b1b40686f437fa260b
Reviewed-by: David Schulz <david.schulz@qt.io>
If project files are not mapped 1:1 to targets the result
of the chosen executable was more or less random.
Try to handle multiple targets as correct as possible by
checking for build targets already where we still know
which files are part of the respective test cases.
Task-number: QTCREATORBUG-17783
Task-number: QTCREATORBUG-18357
Change-Id: I82dcc26bf52c9918e2727b439a719af08879ef49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
As this functionality had been simplified GTest* classes had been
ignored. Continue the simplification and finally remove now useless
code and file.
Change-Id: I89170cd5f05bb93bf30a05fdbf5370012bc9741a
Reviewed-by: David Schulz <david.schulz@qt.io>
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members
Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
We never used the possibility to overload the virtual child() and
rowCount() functions, it's unlikely to be needed in future.
Change-Id: I7ebdf4dfc70bb0bcadea9ef3fb88f16632a95696
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This splits out the case of static string displays from the
TreeItem base class, making the base more lightweight.
Change-Id: If1f442011ec60094399a41b65d9b5015f432f82e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...into files and respective sub folders.
Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This is also necessary for a uniform handling while adding or
updating test tree items, which in turn makes it possible to
separate model and items once more.
Change-Id: I84ff558d23490c8734b22062f00e03e8c06d6720
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...to allow different approaches for different test frameworks.
Change-Id: I16f101fb3f702a0db00cffe33e0d83cd4ea28c99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Another preparation for having a consistent interface later on.
Change-Id: I573e45101016048de916f4d321b326a24efbe4ee
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This change makes AutoTest reuse the equivalent icons from CPlusPlus.
Change-Id: I01f8c30798c7f1b622469ae1f25418e9d1bd8a93
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The signal used to be emitted only on reset or when tests are actually removed during sweep phase:
thus the 'run tests' button in test panel stayed disabled if the panel was opened while tests were
scanned.
Change-Id: I274c9d03f1e1140c8aa375f92465c5a0c866cd62
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>