[Qbs] Error after running tests

Jochen Ulrich jochen.ulrich at clausmark.com
Tue Jan 14 22:56:31 CET 2020


Hi!

The error is not related to installing.
It's a bit unfortunate that there is no "Installation done" message. That's why it looks like the error is happening during installation.

The error says "ERROR: Cannot run:" because you are trying to `qbs run` but the "check" product is not an application but the AutotestRunner.
The AutotestRunner runs the tests during the build step. That's a bit confusing...

So instead of 
$ qbs run -p check

you should do
$ qbs build -p check


Kind regards
 
Jochen Ulrich


Am 14.01.20, 22:18 schrieb "Qbs im Auftrag von Alberto Mardegan" <qbs-bounces at qt-project.org im Auftrag von mardy at users.sourceforge.net>:

    Hi there!
      I'm using the AutotestRunner to run the unit tests in my project [1].
    The tests run successfully, but then QBS tries to install them (why?)
    and fails:
    
    ===========================
    $ qbs project.enableCoverage:true project.buildTests:true
    [...]
    
    $ qbs run -p check
    Restoring build graph from disk
    Building for configuration default
    Clearing coverage data [coverage-clean]
    Running test path-test [check]
    /home/mardy/src/git/mappero/default/path-test.6e444deb/path-test
    ********* Start testing of Mappero::PathTest *********
    Config: Using QtTest library 5.12.4, Qt 5.12.4
    (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1
    20160406 (Red Hat 5.3.1-6))
    PASS   : Mappero::PathTest::initTestCase()
    PASS   : Mappero::PathTest::loadGpx()
    PASS   : Mappero::PathTest::loadKml()
    PASS   : Mappero::PathTest::saveGpx()
    PASS   : Mappero::PathTest::positionAt()
    PASS   : Mappero::PathTest::cleanupTestCase()
    Totals: 6 passed, 0 failed, 0 skipped, 0 blacklisted, 54ms
    ********* Finished testing of Mappero::PathTest *********
    Build done for configuration default.
    Installing
    ERROR: Cannot run: Product 'check' is not an application.
    ===========================
    
    ("check" is the name of the AutotestRunner item)
    It's been a while since I ran the unit tests on this project, but I
    don't remember having seen this before.
    
    Is there a way to suppress the installation (or at least to get rid of
    the error)?
    
    Ciao,
      Alberto
    
    [1]: https://gitlab.com/mardy/mappero
    _______________________________________________
    Qbs mailing list
    Qbs at qt-project.org
    https://lists.qt-project.org/listinfo/qbs
    



More information about the Qbs mailing list