File tree 3 files changed +54
-8
lines changed
3 files changed +54
-8
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,7 @@ before_install:
11
11
- sudo pip install cpp-coveralls --use-mirrors
12
12
13
13
script :
14
- - qmake CONFIG+=debug QMAKE_CXXFLAGS+="--coverage" QMAKE_LFLAGS+="--coverage"
15
- - make
16
- - export DISPLAY=:99.0
17
- - sh -e /etc/init.d/xvfb start
18
- - sleep 3
19
- - openbox &
20
- - ./copyq tests
14
+ - utils/build.sh
21
15
22
16
after_success :
23
- - coveralls -e qxt -e src/platform -e src/tests -e /usr -e plugins/itemfakevim/fakevim -E '.*/moc_.*'
17
+ - utils/after_build.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Generate coverage report for Coveralls after running tests with Travis CI.
3
+
4
+ # Exclude system and 3rd party files.
5
+ exclude_files=(
6
+ qxt
7
+ src/tests
8
+ /usr
9
+ plugins/itemfakevim/fakevim
10
+ )
11
+
12
+ # Exclude generated files.
13
+ exclude_regexs=(
14
+ ' .*/moc_.*'
15
+ ' .*\.moc$'
16
+ ' .*/ui_.*'
17
+ )
18
+
19
+ # Generate coverage report only with GCC.
20
+ if [ " $CC " == " gcc" ]; then
21
+ arguments=()
22
+
23
+ for file in " ${exclude_files[@]} " ; do
24
+ arguments+=(--exclude " $file " )
25
+ done
26
+
27
+ for regex in " ${exclude_regexs[@]} " ; do
28
+ arguments+=(--exclude-pattern " $regex " )
29
+ done
30
+
31
+ coveralls " ${arguments[@]} "
32
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Build and run tests with Travis CI.
3
+
4
+ # Configure.
5
+ if [ " $CC " == " gcc" ]; then
6
+ # GCC build generates coverage.
7
+ qmake CONFIG+=debug QMAKE_CXXFLAGS+=--coverage QMAKE_LFLAGS+=--coverage
8
+ else
9
+ qmake CONFIG+=debug
10
+ fi
11
+
12
+ # Build.
13
+ make
14
+
15
+ # Run tests.
16
+ export DISPLAY=:99.0
17
+ sh -e /etc/init.d/xvfb start
18
+ sleep 3
19
+ openbox &
20
+ ./copyq tests
You can’t perform that action at this time.
0 commit comments