[QBS] How to generate 2 objects from the same source file

Christian Kandeler christian.kandeler at qt.io
Fri Jul 29 15:21:41 CEST 2016

On 07/29/2016 10:04 AM, Ch'Gans wrote:
> My first step is simply to get the generator running, i have several choices:
> - 1 run qbs with a QProcess like TestBlackbox::runQbs()

Go with that one.

> But i'm a bit overwhelmed by the amount of boiler plate i have to write!
> Solution 1 seems the less-difficult of all...

Writing a blackbox test requires virtually zero boilerplate code. Set 
the project directory, call runQbs() with your parameters, examine the 
result in a way that makes sense for the respective test, done.

> Which profile should i use?

The tests require a profile called qbs_autotests to be present. The 
person running the tests is responsible for it to exist and have 
sensible contents. The ability to build a Qt-based project is pretty 
much the only requirement for the profile.

> How to retrieve the profile that has been
> used for building Qbs itself? Does it even make sense to attempt to
> retrieve it?


> Surely, there is to be a way to get a ready-to-use profile for the
> auto-tests, still searching tho...

No. Just set it up, e.g. via setup-qt.
We should move further discussion to gerrit.


More information about the Qbs mailing list