Debian Codegraph @

mtest/capella/io/iotest

raw symbols SCIP
1 #!/bin/bash
2
3 # simple standalone iotest for Capella import
4 # run mtest/capella/io directory as "./iotest"
5 # note that the debug build must be used with the -t option to get the beams right in the .mscx files
6
7 MSCORE=../../../build.debug/mscore/mscore
8
9 echo "---------------------------------------------"
10 echo "Regression Tests for MuseScore Capella import"
11 echo "---------------------------------------------"
12 echo
13 $MSCORE -v
14 echo
15
16 capfiles=`cat tst_capella_io.cpp | grep "{ capReadTest" | awk -F\" '{print $2}' | sort`
17 capxfiles=`cat tst_capella_io.cpp | grep "{ capxReadTest" | awk -F\" '{print $2}' | sort`
18 testcount=0
19 failures=0
20
21 captest() {
22 echo -n "testing load/save $1$2";
23 $MSCORE -t $1$2 -o mops.mscx &> /dev/null
24 if diff -q $1$2-ref.mscx mops.mscx &> /dev/null; then
25 echo -e "\r\t\t\t\t\t\t...OK";
26 else
27 echo -e "\r\t\t\t\t\t\t...FAILED";
28 failures=$(($failures+1));
29 echo "+++++++++DIFF++++++++++++++"
30 diff $1$2-ref.mscx mops.mscx
31 echo "+++++++++++++++++++++++++++"
32 fi
33 rm mops.mscx
34 testcount=$(($testcount+1))
35 }
36
37 echo "Capella files ..."
38 for f in $capfiles; do
39 captest ${f} .cap
40 done
41
42 echo "CapellaXML files ..."
43 for f in $capxfiles; do
44 captest ${f} .capx
45 done
46
47 echo
48 echo "$testcount test(s), $failures failure(s)"