This is the same situation I’m in. Would be nice if they were built when you hit run, but as a workaround I use Alt+B, Alt+R (from memory… I think that’s right): https://codereview.qt-project.org/c/qt-creator/qt-creator/+/330075 That way you can do that key combination and then Ctrl+R to run the test. On 11/1/2022, 13:25, "Development" <[email protected]> wrote: Am 11.01.2022 um 12:39 schrieb Edward Welbourne: > Arno Rehn (9 January 2022 15:59) wrote: >> I'm skipping building the tests by default and would like >> to build only a subset (the ones of the module I'm working on). >> QtCreator doesn't seem to support EXCLUDE_FROM_ALL tests at all, so I >> usually have to resort to the command line for that. > > I suspect combining > > -DQT_BUILD_TESTS=ON > -DQT_BUILD_TESTS_BY_DEFAULT=OFF > > would help here. CMake would know how to build the tests, but would > only do so on request, so you could tell ninja to build $submodule/test > (or indeed $subdirectory/test; see ninja -t targets for a full list) so > as to only build the tests you care about, or build tst_component_check > to (build and) run a specific test.
That's what I'm doing, actually. Works fine on he command line, like you said. But QtCreator does not know how to handle this case. You see all test targets in QtCreator's list, but running them does not build them first. So either you'll get a "file not found" error or maybe an outdated executable. You can only build them with a manual call to ninja. Regards, Arno -- Arno Rehn Tel +49 89 189 166 0 Fax +49 89 189 166 111 [email protected]<mailto:[email protected]> www.menlosystems.com <http://www.menlosystems.com> Menlo Systems GmbH Bunsenstrasse 5, D-82152 Martinsried, Germany Amtsgericht München HRB 138145 Geschäftsführung: Dr. Michael Mei, Dr. Ronald Holzwarth USt.-IdNr. DE217772017, St.-Nr. 14316170324 _______________________________________________ Development mailing list [email protected]<mailto:[email protected]> https://lists.qt-project.org/listinfo/development
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
