Unit Test Organisation, and having qmake what I want
Hi,
I'm working on a qt project called xdc. Its source tree looks like this:
Code:
/
xdc.pro
xdc/
include/
...
src/
...
test/
include/
...
src/
...
Now, I want to write a project file so that after generating the Makefile, I should be able to compile the test cases simply with a "make test" command.
What should I write in xdc.pro to make it possible?
More generally, how are unit tests organized in a qt project? Is there a specific way to do it?
Thanks
Re: Unit Test Organisation, and having qmake what I want
i am not sure if it is the best solution but should work:
1. make some pro file for building tests and put it in test/ dir (lets say tests.pro)
2. add to xdc.pro something like this:
Code:
mytests.target = test
mytests.commands = cd test && qmake && make
QMAKE_EXTRA_TARGETS += mytests