You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
771 B
40 lines
771 B
8 years ago
|
#!/bin/bash
|
||
|
# Generate coverage report for Coveralls after running tests with Travis CI.
|
||
|
|
||
|
# Exclude system and 3rd party files.
|
||
|
exclude_files=(
|
||
|
qxt
|
||
|
/usr
|
||
|
plugins/itemfakevim/fakevim
|
||
|
)
|
||
|
|
||
|
# Exclude generated files.
|
||
|
exclude_regexs=(
|
||
|
'.*/moc_.*'
|
||
|
'.*\.moc$'
|
||
|
'.*_automoc\..*'
|
||
|
'.*/ui_.*'
|
||
|
'.*/qrc_.*'
|
||
|
'.*CMake.*'
|
||
|
'.*/tests/.*'
|
||
|
'.*/src/gui/add_icons.h'
|
||
|
)
|
||
|
|
||
|
# Generate coverage report only with GCC.
|
||
|
if [ "$CC" == "gcc" ]; then
|
||
|
arguments=()
|
||
|
|
||
|
for file in "${exclude_files[@]}"; do
|
||
|
arguments+=(--exclude "$file")
|
||
|
done
|
||
|
|
||
|
for regex in "${exclude_regexs[@]}"; do
|
||
|
arguments+=(--exclude-pattern "$regex")
|
||
|
done
|
||
|
|
||
|
coveralls \
|
||
|
--build-root "build" \
|
||
|
--gcov "$GCOV" \
|
||
|
"${arguments[@]}"
|
||
|
fi
|