The idea is to export the scores to png with the reference build of the MuseScore and the current one, and compare these pictures.
The main purpose is to run on CI for pull requests to the main branch.
Can also be used locally for development.
In order to generate the diff between the reference
file and the generated one, Image Magick needs to be
installed and "compare" should be in the PATH
.
To create png files and compare them you can use the vtest.sh
script.
If you do not have any generated reference png, then first you need to generate them.
- You need to build yourself or take anywhere a reference MuseScore build.
- Call the script from the repository root
vtest/vtest.sh -c gen_ref -m path/to/ref/mscore
- You can see the created files in
vtest.artifacts/ref
- You need to build yourself a MuseScore test build.
- Call the script from the repository root
vtest/vtest.sh -c gen_cur -m path/to/mscore
- You can see the created files in
vtest.artifacts/current
- Call the script from the repository root
vtest/vtest.sh -c compare
- You can see the created files in
vtest.artifacts/compare
You can specify some paths explicitly, see vtest.sh
source.
For Windows, try using Git Bash
Just put the new score in the vtest/scores
directory.
Score can be in mscx
and mscz
format