Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable mtests under Windows with MSVC #5954

Merged
merged 4 commits into from
Apr 20, 2020

Conversation

AntonioBL
Copy link
Contributor

Resolves: https://musescore.org/en/node/303707
This PR enables the compilation of mtests under Windows with msvc and it also adjusts some of them to pass also under Windows, so that Windows developers using msvc can locally run mtests.
A big thank you to Dmitri Ovodok (dmitrio95) for the part of the code correcting the workspace tests.
Steps for running the mtests can be found in the post in the issue tracker.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • [N/A] I created the test (mtest, vtest, script test) to verify the changes I made

@AntonioBL
Copy link
Contributor Author

AntonioBL commented Apr 16, 2020

To be redundant, here are the steps, which I verified only by command line compiling:

  • Compile MuseScore for Windows (I used Debug version, and I used the msvc_build.bat script) and install it (e.g. to its default location MuseScore\msvc.install_x64
  • cd MuseScore\msvc.build_x64\mtest
  • cmake --build .
  • cmake --build . --target INSTALL
  • add the binary dir to the PATH, e.g. PATH=%PATH%;C:\MuseScore\msvc.install_x64\bin
  • add the folder where diff.exe for Windows is located (for example msys2/usr/bin if msys2 is installed) to the PATH
  • run the tests with ctest

Maybe it can work also with QtCreator or Visual Studio, but I don't really know how to work with them. 😅

@ecstrema
Copy link
Contributor

ecstrema commented Apr 16, 2020

Thank you! It works like a charm!
For QtCreator users: here's what I did. It's basically the steps ABL explained above.
image

@ecstrema
Copy link
Contributor

To be redundant, here are the steps, which I verified only by command line compiling:

About being redundant, could you perhaps add the build steps under mtest/README.md?

@AntonioBL
Copy link
Contributor Author

Added instructions to README.md (please let me know if they are clear enough) and rebased on top of current master.

@AntonioBL AntonioBL changed the title Mtestwindows Enable mtests under Windows with MSVC Apr 20, 2020
@anatoly-os anatoly-os merged commit 8952a76 into musescore:master Apr 20, 2020
@AntonioBL AntonioBL deleted the mtestwindows branch October 26, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants