[QBS] How to run autotests from install-root

Ch'Gans chgans at gna.org
Fri Jul 1 05:23:44 CEST 2016


Hi there,

Some of my unit tests require that the project is fully built and
installed, and that they run from the same directory as the real
application.
By default "qbs build -p autotest-runner" execute the tests from their
build directory, is there any way to get qbs run them from the install
root?

Here is my Autotest.qbs:
------------------------------------------------------
import qbs

Product {
    type: ["application", "autotest"]
    Depends { name: "Qt.test" }
    targetName: "tst_" + name.split(' ').join("")
    destinationDirectory: project.bin_path

    Group {
        fileTagsFilter: product.type
        qbs.install: true
        qbs.installDir: project.bin_path
    }
}
------------------------------------------------------

Thanks,
Chris



More information about the Qbs mailing list