[Interest] make check not working (macOS)

Jason H jhihn at gmx.com
Wed Jun 23 17:08:16 CEST 2021


It's been a while since I use QtTest, and never on MacOS.

I am following the tutorial at: https://doc.qt.io/qt-5/qtest-overview.html and https://doc.qt.io/qt-5/qttestlib-tutorial1-example.html

Changes from existing project:
QT += testlib
CONFIG += testcase no_testcase_installs
HEADERS += test_sqldatabase.h

Added a test_sqldatabase.h, containing:
class Test_SqlDatabase: public QObject {
...
private slots:
...tests...
};

QTEST_MAIN(Test_SqlDatabase)
#include "moc_test_sqldatabase.h" // the tutorial says #include "testqstring.moc" But it looks like the moc naming convention change

// end of test_sqldatabase.h

When I run `qmake && make check` it just executes the main program


What did I miss?
the make target is:
check: first
        .../target_wrapper.sh $(TESTRUNNER) ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) $(TESTARGS)

Which makes me think TESTRUNNER is not being set?



More information about the Interest mailing list