Commit Graph

11 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Christian Stenger
615b37193b AutoTest: Support multiple test cases for Qt
Multiple testcases inside a single executable are not
supported officially, but widely used.
Detect them and handle them as appropriate as possible.
Single test functions or data tags are not selectable
as they cannot get addressed correctly and rely
strongly on the implementation of the test main.

Fixes: QTCREATORBUG-18347
Change-Id: I0f0f42579709d8896e034a6df356cb560291d2ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-01 07:36:25 +00:00
Christian Stenger
5525f2b112 AutoTest: Use Utils::FilePath for files and directories
Still some missing bits as some QString members had different meanings
depending on their context.

Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
2021-05-27 12:24:05 +00:00
Eike Ziller
1b431fe271 Move Id from Core to Utils
And add a compatibility wrapper for Core::Id, so we don't have to rename
all occurrences from Core::Id to Utils::Id.

This allows us to use Id also in Utils, which makes it possible to e.g.
move Core::InfoBar to Utils without work arounds.

Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:58:23 +00:00
hjk
d3f79fcc68 AutoTest: Use ITestFramework * instead of its id in some cases
Change-Id: Ic327e31185247b6479c78af8bf8156f44bb4bdfb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-16 12:18:29 +00:00
Christian Stenger
d058dcc326 AutoTest: Filter out interfering environment variables
If there are environment variables that might interfere with
the test process filter them out before setting the environment
for the test process as they can - in the worst case - even
lead to being not able to execute the test application at all.

Task-number: QTCREATORBUG-21012
Change-Id: I4a2059cf527395498824a0914fd6c3203eca9bcf
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-04 06:06:33 +00:00
Christian Stenger
4068ec44b6 AutoTest: Allow arguments for test runs
Arguments specified for run configurations were
ignored so far, but sometimes it might help to process
them. Add the possibility and a respective setting
to be able to pass arguments to the test run.

Task-number: QTCREATORBUG-17630
Change-Id: Ie64b784e8477efa02f50ce6b4cf3e55864952880
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-09-18 12:17:04 +00:00
Christian Stenger
0ceea628b0 AutoTest: Do not lose information of base classes
In case the base class is defined outside of the file with the
derived class we are missing the correct entry point.
Work around this by getting alternative entry points beforehand
and using them if we cannot find a valid entry point.

Task-number: QTCREATORBUG-17522
Change-Id: I07ef87b2fcdac4f78240da9e57eaa518ff0f4d20
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-06 06:19:35 +00:00
Christian Stenger
c07c4eb068 AutoTest: Avoid concurrent access on static function members
First thread using the helper function initialized the list
object another thread accesses it afterwards. This could be
problematic under some circumstances.

Issue was detected using Helgrind.

Change-Id: I1520b1f7364742cb02630af1fd9d98960dec1f41
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-08 13:44:51 +00:00
Christian Stenger
e4ff33e622 AutoTest: Move function into framework related class
TestTreeModel::testCaseNamesForFiles() is a helper that is currently
needed only for handling the Qt test framework.
Move it down into Qt framework's helper class and make it static.

Change-Id: I03c377a76402593584870cbbdaa4621d19278443
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-09 11:52:19 +00:00
Christian Stenger
2f8b4b3fbf AutoTest: Move test framework related code...
...into files and respective sub folders.

Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-01 11:37:32 +00:00