> On 20 Sep 2024, at 08:52, Suhas Krishanamurthy 
> <suhaskrishanamurthy2...@outlook.com> wrote:
> 
> Hello All,
> 
> I was trying to build the qt development source code from the code review,
> I was successful able to build it and also fixed a bug in that qt source code 
> so what my sir told is to  test this 
> with the ctest .
> 
> But when i was building the source code I have OFF it by giving this below 
> command
> "../configure -prefix /home/sumanhp/QtBugFix_Team/Qtbugfix -developer-build 
> -- -DQT_BUILD_TESTS_BY_DEFAULT=ON"
> can anyone help me with building this source code.
> 
> Thank You 
> Suhas


Hi Suhas,

You didn’t turn anything off in your configure line; if you run `ninja` in the 
build tree that you configured, it should build everything, including tests, 
and you can run selected tests by running ctest, e.g.

% ctest -R qstring # runs every test that has `qstring` in its name
% ctest -L qtpositioning # runs all the tests in the `qtpositioning` submodule

(however, you use both -developer-build and -prefix, so things might only work 
after installing, which is somewhat defeating the purpose of -developer-build; 
I’d remove the -prefix option).

ctest won’t build the test for you, so if you configured with 
`-DQT_BUILD_TESTS_BY_DEFAULT=OFF` instead of `…=ON`, then you have to build 
each test explicitly before you can test it, e.g. `ninja tst_qstring`. But then 
you can also build the `_check` target to build and run the test, e.g.

% ninja tst_qstring_check

To build and run a whole set of tests you’d probably have to write a script 
that processes the output from `ninja -t targets`. Re-configuring with 
QT_BUILD_TESTS_BY_DEFAULT=ON is probably a better choice.


Volker

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to