You need to set the autotest profile. Set the QBS_AUTOTEST_PROFILE environment variable to the name of the profile generated by qbs-setup-qt.
See https://anonscm.debian.org/cgit/pkg-kde/qt/qbs.git/tree/debian/rules for guidance. Note that they simply create a qbs_autotests profile; Qbs no longer hardcodes that profile name, you need to set QBS_AUTOTEST_PROFILE in order to let it find it. Also, please send future inquiries to the Qbs public mailing list. Thanks! > On Dec 8, 2017, at 6:13 AM, Sandro Mani <[email protected]> wrote: > > Hi Jake > > Since you've kindly helped me in the past with the qbs packaging, I wonder if > you could help me with the following issue: I'm updating qbs to 1.10 on > Fedora, and am hitting test failures when running tst_api which I suppose are > down to some configuration issue but I can't figure out what's missing. I > used to run the tests as follows: > > export LD_LIBRARY_PATH=%{buildroot}%{_libdir} > %{buildroot}/%{_bindir}/%{name} setup-qt %{_bindir}/qmake-qt5 qt > %{buildroot}/%{_bindir}/%{name} config profiles.qbs_autotests.baseProfile qt > make check > > which though results in many failures like > > FAIL! : TestApi::addQObjectMacroToCppFile() '!errorInfo.hasError()' returned > FALSE. > (/home/sandro/rpmbuild/BUILD/qbs-src-1.10.0/share/qbs/imports/qbs/base/QtApplication.qbs:34:5 > Dependency 'Qt.core' not found for product 'add-qobject-macro-to-cpp-file'. > Please create a Qt profile using the qbs-setup-qt tool if you haven't already > done so.) > Loc: [tst_api.cpp(176)] > > Digging a bit I discovered the qbs-setup-toolchains and qbs-setup-qt > commands, so I changed the test setup to > > export LD_LIBRARY_PATH=%{buildroot}%{_libdir} > %{buildroot}/%{_bindir}/qbs-setup-toolchains --detect > %{buildroot}/%{_bindir}/qbs-setup-qt --detect > make check > > but I still get the failures above. Any ideas? FWIW, the full build spec is > attached. > > (Also attached is a patch I need to get the blackbox lexyacc test to pass, > without it fails due to "error: ‘yylval’ undeclared".) > > Thanks > Sandro > > On 01.08.2017 00:49, Sandro Mani wrote: >> Hi Jake >> >> Uhm not sure if I formulated my question correctly: I currently have the >> qbs-1.8.1 package we discussed. I now wanted to update to the >> qt-creator-4.4.0-beta1 (we have always updated to the latest version, even >> pre-release, in the Fedora master branch aka rawhide). But the problem is >> that qt-creator-4.4.0-beta1 cannot be built against qbs-1.8.1, it requires >> what will become 1.9.0. So I was just wondering whether separate qbs >> releases were planned matching what the latest qt-creator release requires. >> If not, no problem, I'll just package the git snapshot required. >> >> Thanks >> Sandro >> >> >> On 01.08.2017 00:44, Jake Petroules wrote: >>> Hi Sandro, >>> >>> Tagged releases of Qt Creator will always depend on tagged releases of Qbs. >>> We currently have no plans to do beta releases of Qbs, but might in the >>> future. >>> >>> As a Linux packager, you should for the most part completely ignore the >>> submodule. Pretend it doesn't exist. >>> >>> If you're talking about a separate qt-creator-git package of sorts >>> (separate from the main qbs and qt-creator packages), then I'm afraid I >>> have no specific advice for you. >>> >>>> On Jul 31, 2017, at 1:44 PM, Sandro Mani <[email protected]> wrote: >>>> >>>> Hi Jake >>>> >>>> I was just looking at updating to qt-creator-4.4.0-beta1 and build it >>>> against the separate qbs package, and noticed that qt-creator bundles (and >>>> depends on) an unreleased qbs snapshot. I can clearly easily just package >>>> the latest git snapshot of qbs, but taking git snapshots is always a bit >>>> risky. Ideally development versions of qbs would be released in parallel >>>> with qt-creator. Are there any plans to do this? Or how would you >>>> recommend dealing with this situation? >>>> >>>> Thanks >>>> Sandro >>>> >>>> >>>> On 31.07.2017 12:52, Sandro Mani wrote: >>>>> Hi Jake >>>>> >>>>> With the patch now I get a failure + timeout, see below. Any ideas? >>>>> >>>>> Thanks >>>>> Sandro >>>>> >>>>> >>>>> ********* Start testing of TestBlackbox ********* >>>>> Config: Using QtTest library 5.9.1, Qt 5.9.1 (x86_64-little_endian-lp64 >>>>> shared (dynamic) release build; by GCC 7.1.1 20170718 (Red Hat 7.1.1-6)) >>>>> PASS : TestBlackbox::initTestCase() >>>>> PASS : TestBlackbox::alwaysRun(Transformer) >>>>> FAIL! : TestBlackbox::alwaysRun(Rule) Compared values are not the same >>>>> Actual (runQbs(params)): 1 >>>>> Expected (0) : 0 >>>>> Loc: [tst_blackbox.cpp(308)] >>>>> >>>>> ========= Received signal, dumping stack ============== >>>>> GNU gdb (GDB) Fedora 8.0-17.fc27 >>>>> Copyright (C) 2017 Free Software Foundation, Inc. >>>>> License GPLv3+: GNU GPL version 3 or later >>>>> <http://gnu.org/licenses/gpl.html> >>>>> This is free software: you are free to change and redistribute it. >>>>> There is NO WARRANTY, to the extent permitted by law. Type "show copying" >>>>> and "show warranty" for details. >>>>> This GDB was configured as "x86_64-redhat-linux-gnu". >>>>> Type "show configuration" for configuration details. >>>>> For bug reporting instructions, please see: >>>>> <http://www.gnu.org/software/gdb/bugs/>. >>>>> Find the GDB manual and other documentation resources online at: >>>>> <http://www.gnu.org/software/gdb/documentation/>. >>>>> For help, type "help". >>>>> Type "apropos word" to search for commands related to "word". >>>>> Attaching to process 18640 >>>>> [New LWP 18642] >>>>> [Thread debugging using libthread_db enabled] >>>>> Using host libthread_db library "/usr/lib64/libthread_db.so.1". >>>>> 0x00007f1b410a6e66 in ppoll () from /usr/lib64/libc.so.6 >>>>> Missing separate debuginfos, use: dnf debuginfo-install >>>>> bzip2-libs-1.0.6-22.fc26.x86_64 freetype-2.8-3.fc27.x86_64 >>>>> glib2-2.53.4-2.fc27.x86_64 glibc-2.25.90-29.fc27.x86_64 >>>>> graphite2-1.3.10-1.fc27.x86_64 harfbuzz-1.4.7-1.fc27.x86_64 >>>>> libX11-1.6.5-2.fc27.x86_64 libXau-1.0.8-7.fc26.x86_64 >>>>> libXext-1.3.3-5.fc26.x86_64 libgcc-7.1.1-6.fc27.x86_64 >>>>> libgcrypt-1.7.8-1.fc27.x86_64 >>>>> libglvnd-0.2.999-20.20170620gitd850cdd.fc27.x86_64 >>>>> libglvnd-glx-0.2.999-20.20170620gitd850cdd.fc27.x86_64 >>>>> libgpg-error-1.27-1.fc27.x86_64 libicu-57.1-4.fc26.x86_64 >>>>> libpng-1.6.29-1.fc27.x86_64 libselinux-2.6-8.fc27.x86_64 >>>>> libstdc++-7.1.1-6.fc27.x86_64 libxcb-1.12-3.fc26.x86_64 >>>>> lz4-libs-1.7.5-4.fc27.x86_64 openssl-libs-1.1.0f-7.fc27.x86_64 >>>>> pcre-8.41-1.fc27.x86_64 pcre2-utf16-10.30-0.3.RC1.fc27.x86_64 >>>>> qt5-qtbase-5.9.1-3.fc27.x86_64 qt5-qtbase-gui-5.9.1-3.fc27.x86_64 >>>>> qt5-qtscript-5.9.1-1.fc27.x86_64 systemd-libs-234-3.fc27.x86_64 >>>>> xz-libs-5.2.3-2.fc26.x86_64 zlib-1.2.11-2.fc26.x86_64 >>>>> (gdb) >>>>> Thread 2 (Thread 0x7f1b3964d700 (LWP 18642)): >>>>> #0 0x00007f1b41076d77 in waitpid () from /usr/lib64/libc.so.6 >>>>> No symbol table info available. >>>>> #1 0x00007f1b40fe08e7 in do_system () from /usr/lib64/libc.so.6 >>>>> No symbol table info available. >>>>> #2 0x00007f1b4224a7e1 in stackTrace() [clone .part.2] () from >>>>> /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #3 0x00007f1b4224a86d in stackTrace() () from /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #4 0x00007f1b422533bb in QTest::WatchDog::run() () from >>>>> /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #5 0x00007f1b419c746e in QThreadPrivate::start(void*) () from >>>>> /usr/lib64/libQt5Core.so.5 >>>>> No symbol table info available. >>>>> #6 0x00007f1b3fb92609 in start_thread () from /usr/lib64/libpthread.so.0 >>>>> No symbol table info available. >>>>> #7 0x00007f1b410b337f in clone () from /usr/lib64/libc.so.6 >>>>> No symbol table info available. >>>>> >>>>> Thread 1 (Thread 0x7f1b42b6e8c0 (LWP 18640)): >>>>> #0 0x00007f1b410a6e66 in ppoll () from /usr/lib64/libc.so.6 >>>>> No symbol table info available. >>>>> #1 0x00007f1b41bf1d00 in qt_safe_poll(pollfd*, unsigned long, timespec >>>>> const*) () from /usr/lib64/libQt5Core.so.5 >>>>> No symbol table info available. >>>>> #2 0x00007f1b41b2c0f8 in QProcessPrivate::waitForFinished(int) () from >>>>> /usr/lib64/libQt5Core.so.5 >>>>> No symbol table info available. >>>>> #3 0x00007f1b41b2240d in QProcess::waitForFinished(int) () from >>>>> /usr/lib64/libQt5Core.so.5 >>>>> No symbol table info available. >>>>> #4 0x000055902b20b305 in TestBlackboxBase::runQbs (this=0x7ffe51c12b20, >>>>> params=...) at tst_blackboxbase.cpp:87 >>>>> args = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No >>>>> data fields>}, {p = {static shared_null = {ref = {atomic = { >>>>> _q_value = {<std::__atomic_base<int>> = {static >>>>> _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, >>>>> end = 0, >>>>> array = {0x0}}, d = 0x55902bd21f70}, d = >>>>> 0x55902bd21f70}}, <No data fields>} >>>>> process = <incomplete type> >>>>> waitTime = 600000 >>>>> #5 0x000055902b1f372c in TestBlackbox::artifactScanning >>>>> (this=0x7ffe51c12b20) at tst_blackbox.cpp:340 >>>>> projectDir = {static null = {<No data fields>}, d = >>>>> 0x55902bd1ec20} >>>>> params = {command = {static null = {<No data fields>}, d = >>>>> 0x55902bd37020}, >>>>> arguments = {<QList<QString>> = {<QListSpecialMethods<QString>> >>>>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = { >>>>> _q_value = {<std::__atomic_base<int>> = {static >>>>> _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, >>>>> end = 0, array = {0x0}}, d = 0x7f1b41c49300 >>>>> <QListData::shared_null>}, >>>>> d = 0x7f1b41c49300 <QListData::shared_null>}}, <No data >>>>> fields>}, buildDirectory = {static null = {<No data fields>}, >>>>> d = 0x7f1b41c46d00 <QArrayData::shared_null>}, environment = >>>>> {d = {d = 0x55902bd24830}}, expectFailure = false, useProfile = true} >>>>> #6 0x00007f1b41bb0446 in QMetaMethod::invoke(QObject*, >>>>> Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, >>>>> QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, >>>>> QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, >>>>> QGenericArgument) const () >>>>> from /usr/lib64/libQt5Core.so.5 >>>>> No symbol table info available. >>>>> #7 0x00007f1b422513ba in QTest::TestMethods::invokeTestOnData(int) const >>>>> () from /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #8 0x00007f1b422520c0 in QTest::TestMethods::invokeTest(int, char >>>>> const*, QTest::WatchDog*) const () from /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #9 0x00007f1b422525f1 in QTest::TestMethods::invokeTests(QObject*) const >>>>> () from /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #10 0x00007f1b42252bab in QTest::qExec(QObject*, int, char**) () from >>>>> /usr/lib64/libQt5Test.so.5 >>>>> No symbol table info available. >>>>> #11 0x000055902b1bf807 in main (argc=<optimized out>, >>>>> argv=0x7ffe51c12c68) at tst_blackbox.cpp:4874 >>>>> app = <incomplete type> >>>>> tc = {<TestBlackboxBase> = {<QObject> = {<No data fields>}, >>>>> static staticMetaObject = {d = { >>>>> superdata = 0x7f1b41ff2ba0 <QObject::staticMetaObject>, >>>>> stringdata = 0x55902b21fd80 <qt_meta_stringdata_TestBlackboxBase>, >>>>> data = 0x55902b21fd20 <qt_meta_data_TestBlackboxBase>, >>>>> static_metacall = 0x55902b20f5b0 >>>>> <TestBlackboxBase::qt_static_metacall(QObject*, QMetaObject::Call, int, >>>>> void**)>, >>>>> relatedMetaObjects = 0x0, extradata = 0x0}}, testDataDir >>>>> = {static null = {<No data fields>}, d = 0x55902bd16db0}, testSourceDir = >>>>> { >>>>> static null = {<No data fields>}, d = 0x55902bd16d00}, >>>>> qbsExecutableFilePath = {static null = {<No data fields>}, d = >>>>> 0x55902bd16200}, >>>>> defaultInstallRoot = {static null = {<No data fields>}, d = >>>>> 0x55902bd14970}, m_qbsStderr = {d = 0x55902bd25430}, m_qbsStdout = { >>>>> d = 0x55902bd254c0}}, static staticMetaObject = {d = >>>>> {superdata = 0x55902b42b480 <TestBlackboxBase::staticMetaObject>, >>>>> stringdata = 0x55902b21e000 >>>>> <qt_meta_stringdata_TestBlackbox>, data = 0x55902b21cf00 >>>>> <qt_meta_data_TestBlackbox>, >>>>> static_metacall = 0x55902b20f170 >>>>> <TestBlackbox::qt_static_metacall(QObject*, QMetaObject::Call, int, >>>>> void**)>, relatedMetaObjects = 0x0, >>>>> extradata = 0x0}}} >>>>> Detaching from program: >>>>> /home/sandro/rpmbuild/BUILD/qbs-src-1.8.1/bin/tst_blackbox, process 18640 >>>>> ========= End of stack trace ============== >>>>> QFATAL : TestBlackbox::artifactScanning() Test function timed out >>>>> FAIL! : TestBlackbox::artifactScanning() Received a fatal error. >>>>> Loc: [Unknown file(0)] >>>>> Totals: 2 passed, 2 failed, 0 skipped, 0 blacklisted, 300834ms >>>>> ********* Finished testing of TestBlackbox ********* >>>>> >> > > <qbs_test_lexyacc.patch><qbs.spec> -- Jake Petroules - [email protected] The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io _______________________________________________ Qbs mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qbs
