Debian Codegraph @

build/travis/job1_Tests/run_tests.sh

raw
1 #!/bin/sh
2 # Run this script from MuseScore's root directory
3
4 cd build.debug/mtest
5
6 xvfb-run -a ctest -j2 --output-on-failure
7
8 PROC_RET=$?
9
10 if [ "$PROC_RET" -ne 0 ]; then
11 killall Xvfb
12 xvfb-run -a ./mtest
13 fi
14
15 # Searching for merge conflicts, by searching for the begin/end markers.
16 # Searching for the middle marker '=======)" won't work though as that is
17 # used elsewhere too.
18 # Haven't found a way without using an intermediate temp file.
19 rm -f /tmp/$$ # Cleanup, just in case of an older leftover
20 find ../.. -type f ! -name `basename $0` -print0 |
21 xargs -0r egrep -n '<<<<<<< HEAD|>>>>>>> .*' |
22 tee /tmp/$$
23 if [ -s /tmp/$$ ]; then # File not empty
24 PROC_RET=`expr $PROC_RET + 1` # Store the error
25 printf "\033[31m" # Set color to (doesn't work on Travis though)
26 echo
27 echo "problem with a merge conflict"
28 echo
29 printf "\033[0m" # Reset color
30 fi
31 rm -f /tmp/$$ # Cleanup
32
33 #pwd == build.debug/mtest
34 cd ../../vtest
35 xvfb-run ./gen
36 cd -
37
38 #make reporthtml
39 #REVISION=`git rev-parse --short HEAD`
40 #mv report/html $REVISION
41 #mv report/*.xml $REVISION
42 #chmod 755 $REVISION
43 #chmod 644 $REVISION/*
44 #zip -r $REVISION.zip $REVISION
45 #curl -F zip_file=@$REVISION.zip http://prereleases.musescore.org/test/index.php
46 #echo "Test results: http://prereleases.musescore.org/test/$REVISION/"
47
48 cd ..
49 cd ..
50 if [ "$(grep '^[[:blank:]]*set( *MSCORE_UNSTABLE \+TRUE *)' CMakeLists.txt)" ]
51 then # Build is marked UNSTABLE inside CMakeLists.txt
52 echo "Unstable version: do not upload source zip file"
53 else
54 make clean
55 rm -rf qt5
56 rm -rf qt5.zip
57 rm -rf share/sound/FluidR3Mono*
58 rm -rf share/sound/README*
59 rm -rf share/locale/*.qm
60 make zip
61 ./build/travis/job1_Tests/osuosl.sh MuseScore*.zip
62 fi
63
64
65 exit $PROC_RET