mtest doesn't work on Windows (master)
The first thing is incorrect instructions for Windows: to run making test the following command must be run mingw32-make.exe -f Makefile
.
Then, the following error appears:
C:\work\MuseScore3\mtest\libmscore\note\tst_note.cpp: In member function 'void TestNote::LongNoteAfterShort_183746()':
C:\work\MuseScore3\mtest\libmscore\note\tst_note.cpp:537:39: error: reference to 'Chord' is ambiguous
totalTicks += static_cast(n->parent())->durationTypeTicks();
^
In file included from C:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/windows.h:71:0,
from C:/Qt/5.9.4/mingw53_32/include/QtCore/qt_windows.h:64,
from C:/Qt/5.9.4/mingw53_32/include/QtGui/qopengl.h:49,
from C:/Qt/5.9.4/mingw53_32/include/QtGui/QtGui:43,
from all.h:45:
C:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/wingdi.h:2681:28: note: candidates are: WINBOOL Chord(HDC, int, int, int, int, int, int, int, int)
WINGDIAPI WINBOOL WINAPI Chord(HDC hdc,int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4);
^
In file included from C:\work\MuseScore3\mtest\libmscore\note\tst_note.cpp:21:0:
C:/work/MuseScore3/libmscore/chord.h:61:7: note: class Ms::Chord
class Chord final : public ChordRest {
^
It seems like Chord
definition inteferes with some of Windows definitions.
Comments
@Jojo, could you check please and confirm this issue?
In reply to @Jojo, could you check… by Anatoly-os
Just adding target mtest to the cmake config in QtCreator (
cmake.exe --build . --target mtest
) doesn't show any error, it builds mtest.exe cleanly. It doesn't run or builds any tests thoughcmake.exe --build . --target tst_note
though gives the error you describeIn reply to Just adding target mtest to… by Jojo-Schmitz
The instructions are about building ctest... So, I used command line make and had errors.
See PR:
https://github.com/musescore/MuseScore/pull/3783
However tst_biab.cpp fails under Windows.
How to build and run the mtests under QtCtreator?
The tst_biab fail seems to be due to:
Which looks like a legitimate fail, seems the ref file needs to get updated.
Not sure why this passes on Linux / Travis?
(running MuseScore.exe with the -t option)
The wrong instructions you refer to are in ...mtest/Readme.md, right? So they should be fixed there.
To run all tests is say to run ctest, but there is no such such file?
I don't know how to do it in QtCreator. Maybe a "test" target should be added to the Makefile.
I run the tests via command line, by using:
cd build.debug\mtest
mingw32-make -j4
and then running ctest (which is part of cmake; actually the command I run is "ctest -j4 --output-on-failure"). I found that win32install\bin folder should also be in the PATH because some of the dlls (e.g. libsndfile-1.dll) are required by the sfz tests.
Attached the results of ctest. The failure in biab tests is due to the "name" tag of Harmony objects.
There is also a difference in one binary midi output file of tst_midi.
The info about missing chords_std.xml for some of the tests is printed when directly running mtest.exe (which performs only some of the tests).
In reply to I don't know how to do it in… by ABL
That missing chords_std.xml might be the cause for the biab test fail.
Indeed, as I recall last time I tried building & running tests myself (about three systems ago), you needed to manually create enough of an environment for some tests to run successfully. And missing chords_std.xml would likely cause failures in tests dealing with chord symbols.
Fixed in branch master, commit 57ab4c4b19
fix #272312 : mtest doesn't work on Windows
Fixed in branch master, commit e131f3876f
Merge pull request #3783 from AntonioBL/mtest_windows
fix #272312 : mtest doesn't work on Windows
Automatically closed -- issue fixed for 2 weeks with no activity.