[Interest] make check not working (macOS)

Jason H jhihn at gmx.com
Wed Jun 23 18:03:14 CEST 2021

> Sent: Wednesday, June 23, 2021 at 11:45 AM
> From: "Kai Köhne" <Kai.Koehne at qt.io>
> To: "Jason H" <jhihn at gmx.com>, "interestqt-project.org" <interest at qt-project.org>
> Subject: RE: [Interest] make check not working (macOS)
> HI Jason,
> It looks to me like you're trying to add a test case into your normal application executable. Is that correct?

> The canonical use of QTest is different: You create a separate project for the tests, in a separate directory. If you e.g. check back on https://doc.qt.io/qt-5/qttestlib-tutorial1-example.html , this creates a new file testqstring.cpp, and then uns "qmake -project" in the directory to create a completely new project.
> Hope this helps.

Yes it does. Thanks!

So I have to manually maintain the modules being tested as a separate project? If so, that's pretty undesirable because of the manual effort to make sure that the test project is using the same source that the actual application uses. I hope I can automate that somehow? (Preferably requiring 0 maintenance)  I would not be opposed to a "tests" subdir to hold this project, but then, that needs it's own .pro, and it needs to automatically reference the parent project's files. Immediately I am thinking I can just use HEADERS/SOURCES files with ../ prefixes but that violates my 0-maintenance requirement.

I want a brain-dead, simple, 0-maintenance test kit.  The only thing the developers should have to worry about is adding test implementations once it is started.

Can this be achieved in Qt?

More information about the Interest mailing list