CI and mtests
Recently, "mscore/workspace" and "mscore/palette" mtests were disabled during CI test builds because no GLX could be initialized in the headless machines used by github actions.
I think I found a solution by using
QT_QPA_PLATFORM=minimal:enable_fonts (see for example https://doc.qt.io/qt-5/qpa.html#qpa-minimal-plugins and https://www.yellowsubroutine.com/qt/qt-qpa-platform) here: https://github.com/musescore/MuseScore/blob/master/build/ci/linux/runmt…
However, in this case GLX is not required, but there is a crash due to the built-in freetype library (thirdparty/freetype). You can see that crash here:
Compilation and run of "workspace" and "palette" mtests work when using
make instruction, as seen here:
I also tried to update freetype from 2.6.1 to 2.10.3 and those mtests worked, see:
(I didn't check if compilation still works for Mac and Windows in this case).
In summary, if we want those tests to be performed, we need to use
QT_QPA_PLATFORM=minimal:enable_fonts (or "offscreen" platform) and system freetype or an updated bundled freetype.
What do you think?
I don't know if mtests are still considered useful. They helped a lot in the past in finding errors and regressions at PR time. They were also compiled with address sanitizer turned on to catch possible memory errors, but now they are compiled in release mode. And gtests were added.
So, as an additional question, what's the future of mtests?