Still some missing bits as some QString members had different meanings
depending on their context.
Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
Otherwise the result will not be displayed and may lead to
wrong test results with a contrary correct summary.
Change-Id: Id041dbac441eea8a1a1d623acd87e049bca9a281
Reviewed-by: David Schulz <david.schulz@qt.io>
If a test crashes we need to take its output into account
to avoid not displaying a result for the respective test
and having a wrong visual view of the results.
Change-Id: I349153192fa06c5d61bc51f8274d32ceb8cf8731
Reviewed-by: David Schulz <david.schulz@qt.io>
If the parser processes a test with an empty test name
it crashed QC.
Change-Id: Ic377f609ecdd74724ee7a272be3d5b60f0101afa
Reviewed-by: David Schulz <david.schulz@qt.io>
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface
So move these items out of QtcProcess, later potentially to a separate
file pair.
Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When the last item of a test got modified and gets a
different state than the rest of its siblings we failed
to set the resulting state of its parent to partially
checked.
Fixes: QTCREATORBUG-25702
Change-Id: I122b77b907dfa7fd14c31d8363b025254e0c115e
Reviewed-by: David Schulz <david.schulz@qt.io>
Function processDocument() became to huge. Beside this it
might be needed to re-use functionality partially.
Change-Id: I4c31caa4458c165938c3d6f1170d8ac4806d2af1
Reviewed-by: David Schulz <david.schulz@qt.io>
If the check state of a tree item changes due to closing
the project and there is no other project open we access
a nullptr.
Change-Id: Ib08031e19eaae0837d1dc0485a05756cd8d0c0dc
Reviewed-by: David Schulz <david.schulz@qt.io>
A convenience method to tie the enabled state of an aspect to some
other bool aspect, to be used e.g. when settings item availability
depends on some check box.
Makes it harder to miss one of the three necessary steps.
Change-Id: I8c120bb6846aea2a503614f7c73fa57a149cab41
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes TestTreeItem programming language agnostic.
By moving the "query" methods to CppTools, the cohesion within these
methods is improved, i.e. information crosses the AutoTest <-> CppTools
border fewer times. Furthermore, it allows the CppTools plugin to see
how its data is being used, allowing it to optimize its queries
behind the scenes.
Change-Id: I0a60140abaca1193d500605dfa2812b4d937d94c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If a test name starts with a number the codemodel handles
the function-like macro differently and does not generate
the arguments as it would do when using normal literals.
Work around by explicitly handling the expression tokens.
Fixes: QTCREATORBUG-25498
Change-Id: Ibf381af912403cb7b87c1c30b5a8fc7043c16056
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This only handles the storage side, all gui/layouting is left for
follow-up changes.
Change-Id: I0f2b6dc82e5d4374528c8a72610a5afe264a72b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If a test framework uses stderr for output we might end up adding
real test output to a not-yet-sent sanitizer result.
Fixes: QTCREATORBUG-24328
Change-Id: I389c09da626229aa8985b2f99671b6ba8b6c467c
Reviewed-by: David Schulz <david.schulz@qt.io>
The casting provided by the asTest*() methods isn't made use of here, so
using the "data-oriented" type() method seems more expressive.
Change-Id: Ia3e1a28d126f096afed54eeb0d884c52332f4350
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Ensures that the static_cast<>() in framework() always succeeds.
Change-Id: I6aff0cf12a565bd6f9791c67979698729d7143e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
By having TestParseResults take ITestFramework rather than ITestBase as
parameter, some base->asFramework() casts can be avoided today which
could possibly fail in the future.
Moreover, it allows TestTreeItem to take ITestFramework rather than
ITestBase as parameter which improves type safety further. This shall be
done in a separate commit though.
Change-Id: I66594415d68c3423076a0830ecd11080d3b6c186
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Test tools only create ITestTreeItems, not TestTreeItems.
Change-Id: Idb20844b80e351d4f0a472e4b97b074797ad6f99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In TestCodeParser::syncTestFrameworks(), a parser is created for every
test framework. As a result, the last parser being created would "win"
the global s_parserInstance variable, which is not predictable and
probably not intended. So turn CppParser::getFileContent() into a non-
static method, avoiding the global variable altogether.
Change-Id: I9f7560f1185bc4a3bc7b2b36e89280351998465e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When using plain text output of Qt and Quick tests we are able
to correct possible mis-parsings of the output.
These merely can happen if the test application produces output
on stdout on its own which may interfere with the normal test
output and confuses the parser.
If XML output is used this handling is impossible as we do not
get any summary, but interfering the output with user stuff
would end up in a parse error and a fatal anyhow.
Task-number: QTCREATORBUG-25112
Change-Id: I84f5e542aa3faeb6470963c784e92ed1b2584b61
Reviewed-by: David Schulz <david.schulz@qt.io>
This effectively enables to handle ctest project wise instead
of just globally. So far only code based test frameworks could
be enabled or disabled by project.
Change-Id: I491f91119c3500131ca51af4d55b0e68d47debf0
Reviewed-by: David Schulz <david.schulz@qt.io>
... by assuming that active.keys() is a subset of
TestFrameworkManager::registeredFrameworks() which is used in the case
above. Also, TestFrameworkManager::registeredFrameworks() is already
sorted, as can be seen from the above case, too.
Change-Id: If82c8c998716fa56d6257d3ee0ec09c12d458bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This allows to have ctest based tests listed inside the test
integration and to run them.
Task-number: QTCREATORBUG-23332
Change-Id: I1cb855697d7bb4afcd7c887506abdea16c252cb0
Reviewed-by: David Schulz <david.schulz@qt.io>