Hi! I package drumstick for Arch Linux and while building 2.0.0 I also tried to run the test targets. The build environment is a clean chroot (a systemd-nspawn environment into which all dependencies of the package and a base system are installed).
However, I get:
make: Entering directory '/build/drumstick/src/drumstick-2.0.0/build' Running tests... Test project /build/drumstick/src/drumstick-2.0.0/build Start 1: alsaTest1 1/6 Test #1: alsaTest1 ........................ Passed 0.00 sec Start 2: alsaTest2 2/6 Test #2: alsaTest2 ........................***Failed 0.00 sec Start 3: fileTest1 3/6 Test #3: fileTest1 ........................ Passed 0.00 sec Start 4: fileTest2 4/6 Test #4: fileTest2 ........................ Passed 0.00 sec Start 5: rtTest 5/6 Test #5: rtTest ...........................Subprocess aborted***Exception: 0.07 sec Start 6: widgetsTest 6/6 Test #6: widgetsTest ......................Subprocess aborted***Exception: 0.07 sec 50% tests passed, 3 tests failed out of 6 Total Test time (real) = 0.16 sec The following tests FAILED: 2 - alsaTest2 (Failed) 5 - rtTest (Subprocess aborted) 6 - widgetsTest (Subprocess aborted) Errors while running CTest make: *** [Makefile:126: test] Error 8
I am not sure how to get further information on the nature of the failures, as I couldn't find any more in-depth logs about the test runs.
If I can provide further information, please let me know!
You may run the tests outside CMake/ctest, changing to the build/bin directory and executing the programs directly:
$ cd '/build/drumstick/src/drumstick-2.0.0/build/bin'
$ ./alsaTest2
* Start testing of AlsaTest2 *
Config: Using QtTest library 5.12.10, Qt 5.12.10 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6))
PASS : AlsaTest2::initTestCase()
PASS : AlsaTest2::testTimer()
PASS : AlsaTest2::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 1033ms
* Finished testing of AlsaTest2 *
The alsaTest2 just checks the ALSA timer. You build environment may be unsuitable for a good MIDI timer.
For the rtTest and widgetsTest, you may get the crash backtrace with gdb:
$ gdb rtTest
(gdb) run
...
(gdb) bt
Anyway, unitary tests are ment to be written and run by the developers. The goal is to automatically detect incompatibilities after changing the source code. It requires a development evironment with features like the GUI and hardware available to run the applications.
For instance, QtCreator has a nice "Tests results" facility, very convenient...
![QtCreator](https://sourceforge.net/p/drumstick/bugs/_discuss/thread/ed12316ce0/0863/attachment/Screenshot_20210107_113533.png)
Last edit: Pedro Lopez-Cabanillas 2021-01-07
Ticket moved from /p/drumstick/bugs/24/
Can't be converted:
Today when working with ticket [#49] I've found this issue too. Running the ALSA test needs the library and kernel modules and there is no alternative, but the RT and Widgets tests at lest may be run with this environment variable (you need the Qt offscreen plugin):
Related
Bugs and New Feature Requests:
#49