File: rendertest

package info (click to toggle)
musescore 1.3%2Bdfsg1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 148,004 kB
  • ctags: 30,854
  • sloc: cpp: 372,716; xml: 148,276; ansic: 6,156; python: 2,202; perl: 710; sh: 505; makefile: 227
file content (182 lines) | stat: -rwxr-xr-x 4,925 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#!/bin/bash

#
#     render MusicXml files with lilypond and mscore
#     and put up a webpage for every testfile
#     webpages are created in subdirectory "html"
#     startpage is html/index.html
#
#     requires ImageMagick ("convert")
#

echo "Render test for MuseScore"

TESTDIR=html
testfiles="
00a-Basics-Pitches
00b-Basics-Intervals
00c-Basics-Durations
00d-Basics-RestDurations
00e-Basics-PitchedRests-PJB
00f-Basics-Clefs
00g-Basics-Keys
00h-Basics-TimeSignatures
00i-Basics-NoKeyOrClef
00j-Basics-NoTime-PJB
00k-Basics-Backup
00l-Basics-MultiMeasureRests
00l-Basics-Tie-PJB
01a-Chord-Rosegarden
01b-Chords-Rosegarden
01c-Chords-Rosegarden
01d-Chords-SchubertStabatMater
01e-Chords-PickupMeasures
02a-Notations-MusicXML
02b-Articulations-Texts-PJB
02c-MultipleNotationChildren-RFK
02d-Arpeggio
03a-Directions-MusicXML
03b-AccordionRegistrations-MusicXML
03c-MetronomeMarks
04a-Spanners-Finale
04b-Glissando
04c-Spanners-Noteedit
04d-Spanners-JScore
04e-OctaveShifts-Finale
05a-HeaderQuotes-Finale
06a-Lyrics-Finale
06b-MultipleLyrics-Finale
06c-Lyrics-Pianostaff-Finale
06d-Lyrics-Melisma-Finale
06e-Lyrics-Chords-Finale
06f-Lyrics-GracedNotes-Finale
06g-Lyrics-NameNumber
06h-Lyrics-BeamsMelismata
08a-Partorder-Rosegarden
08b-StaffGroups-Finale
08c-More-than-10-parts-Rosegarden
08d-NestedPartsBrackets-Finale
08e-LinebrokenInstrumentNames-Finale
08f-PianoStaff-PJB
08g-OverlappingPartGroups-Finale
09a-SimpleRepeat-Finale
09b-RepeatWithAlternatives-Finale
09c-Barlines-Finale
09d-RepeatMultipleTimes-Finale
09e-Alternatives-Finale
09f-Repeats-Finale
09g-Endings-Finale
09h-RepeatsNoEndBar-Finale
09i-MidmeasureBarline
09j-Midmeasure-Clef-Finale
09k-Upbeats-ImplicitMeasures-Finale
09l-PickupMeasure-SecondVoiceMessup
10a-TwoVoicesOnStaff-Finale
12a-TripletsDuration-NoBracket-PJB
12b-Tuplets-Finale
13a-GraceNotes-Finale
13b-ChordAsGraceNote-Finale
14a-MultistaffClefDynamics-Finale
14b-DifferentKeysAfterBackup-PJB
14b-DifferentKeys-PJB
14c-StaffChange-Finale
15a-Percussion-Finale
17a-Chords-Finale
17b-Fretboards-Finale
17c-ChordsFrets-Finale
17d-ChordsFretsOnMultistaff-Finale
17e-TabStaves-Finale
17f-AllChordTypes
18a-FiguredBass
19a-PageLayout-PrintMusic
99a-Sibelius5-IgnoreBeaming
99b-Lyrics-BeamsMelismata-IgnoreBeams
"

function genIndex() {
      echo "gen index"

      cd $TESTDIR

      echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" > index.html
      echo "   \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"  >> index.html
      echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"  >> index.html
      echo ""  >> index.html
      echo "<body>"  >> index.html
      echo "   <h1>MuseScore Regression Tests</h1>"  >> index.html
      for test in $testfiles; do
            echo -n "   <a href=\"" >> index.html
            echo -n $test    >> index.html
            echo -n ".html\">"    >> index.html
            echo -n $test    >> index.html
            echo "</a><br>"  >> index.html
            done
      echo "   </body>"  >> index.html
      echo "</html>"  >> index.html
      cd ..
      }

function genHtml() {
      cd $TESTDIR
      echo "gen test $1"
      echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" > $1.html
      echo "   \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"  >> $1.html
      echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"  >> $1.html
      echo ""        >> $1.html
      echo "<body>"  >> $1.html

      echo "<h1>MuseScore Regression Tests</h1>"  >> $1.html
      echo "<h2>"               >> $1.html
      echo -n $1                >> $1.html
      echo -n "</h2>"           >> $1.html
      echo "<hr/>"              >> $1.html
      echo "<h3>Lilypond</h3>"  >> $1.html
      echo "<hr/>"              >> $1.html
      echo -n "<img src=\"lilypond/"  >> $1.html
      echo -n $1.png  >> $1.html
      echo "\"/><br>"  >> $1.html
      echo "<hr/>"  >> $1.html
      echo "<h3>MuseScore</h3>"  >> $1.html
      echo "<hr/>"  >> $1.html
      echo -n "<img src=\"mscore/"  >> $1.html
      echo -n $1.png  >> $1.html
      echo "\"/><br>"  >> $1.html

      echo "   </body>"  >> $1.html
      echo "</html>"  >> $1.html
      cd ..
      }

function genFiles() {
      musicxml2ly $1.xml -o $1.ly
      lilypond --png --output mops $1.ly
      convert -trim mops.png $TESTDIR/lilypond/$1.png
      rm $1.ly
      if [[ -f mops.png ]]; then
            rm mops.png
            fi
      mscore -d -S xmltest.mss -r 100 $1.xml -o mops.png
      convert -trim mops-1.png $TESTDIR/mscore/$1.png
      genHtml $1
      }

if [[ -n $1 ]]; then
      echo $1
      genFiles $1
      exit;
      fi

if [[ -d $TESTDIR ]]; then
      rm -rf $TESTDIR
      mkdir $TESTDIR
      mkdir $TESTDIR/mscore
      mkdir $TESTDIR/lilypond
      fi

genIndex

for test in $testfiles; do
      echo $test
      genFiles $test
      done