Commit Graph

6 Commits

Author SHA1 Message Date
Nikolai Kosjar
6e6d5b5309 ClangStaticAnalyzer: Tests: Rely on projects telling when they finished parsing
We relied on the CppModelManager to tell us whether a project was reparsed
after a kit change. While this worked, it was not guaranteed that the project
is really finished (and ready for e.g. building) after pushing new ProjectInfos
to the CppModelManager.

Rely on the projects telling when they are finished with parsing. This is more
accurate and future-proof.

The introduced signals in Project and SessionManager are (at the moment)
only for tests.

Change-Id: I1b368ec4585ffa8755eb28fac6d187cce31243ee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-31 15:09:01 +00:00
Nikolai Kosjar
7473469005 ClangStaticAnalyzer: Tests: Change target only if necessary
...otherwise we wait for nothing.

Change-Id: Ia55d4845f8dd0fe746ee6c8ca19b5312879294d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-21 10:20:50 +00:00
Nikolai Kosjar
9c88b03415 ClangStaticAnalyzer: Tests: Clarify meaning of assert
'arguments.first().toBool()' returned FALSE

...is not very expressive.

Change-Id: Ia0c8e8fbe2e84ea4f41668a5179a63e2003bab03
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-13 08:39:42 +00:00
Nikolai Kosjar
9cde684eea ClangStaticAnalyzer: Tests: Fix switching startup project
Change-Id: Ia29a8082a7c7764e7a426ce121c17c80b334d84d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-04 08:20:21 +00:00
Eike Ziller
e0281fcc84 Fix merge issue
Change-Id: I328720587d8a973fabcbd9c66a70185ba29cbbca
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-31 13:18:40 +00:00
Nikolai Kosjar
a8039d9ce2 ClangStaticAnalyzer: Simplify testing various kits
The already available ClangStaticAnalyzerUnitTests uses the automatically set
up "Desktop" kit to run the analyzer. This is fine for tests that are run in
the build environment of Qt Creator. However, testing different kits on the
same machine means to build Qt Creator itself with those kits, which is not
practical.

The new ClangStaticAnalyzerSessionTests will open the predefined session
"ClangStaticAnalyzerPreconfiguredSession" and for each project and each target
it will run the analyzer. If there is no such session, the test will be
skipped.

To manually preconfigure the desired session:

  1. ./qtcreator -settingspath /custom/path
  2. Set up the desired kits.
  3. Create a session with the name ClangStaticAnalyzerPreconfiguredSession and
     load the desired test projects.

To run the test:
  ./qtcreator -settingspath /custom/path -test ClangStaticAnalyzer,testPreconfiguredSession

Change-Id: I0f027353854088d3acf8acecc16c74e9f0516e7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-25 14:30:31 +00:00