coveralls.sh
488 Bytes
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
#!/bin/bash
source script/env.sh
declare -r gcov_dir="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}/"
## ======
generateGcov()
{
# doesn't set output dir to gcov...
cd "${gcov_dir}"
for file in ${gcov_dir}/*.gcda
do
gcov-4.2 "${file}" -o "${gcov_dir}"
done
cd -
}
copyGcovToProjectDir()
{
cp -r "${gcov_dir}" gcov
}
removeGcov()
{
rm -r gcov
}
main()
{
# generate + copy
generateGcov
copyGcovToProjectDir
# post
coveralls ${@+"$@"}
# clean up
removeGcov
}
main ${@+"$@"}