blob: 79e398dc1f156232b02281baf7f7929cd1a08b08 (
plain)
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
|
#!/usr/bin/env bash
set -e
set -o pipefail
PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
mapbox_time "install_lcov" \
mason install lcov 1.12
LCOV="`mason prefix lcov 1.12`/usr/bin/lcov"
mapbox_time "check_mason_lcov" \
command -v $LCOV > /dev/null 2>&1 || exit 1
mapbox_time "remove_coverage_info" \
rm -f "build/${HOST_SLUG}/${BUILDTYPE}/coverage.info"
# Run all unit tests
./scripts/run_tests.sh "build/${HOST_SLUG}/${BUILDTYPE}/test"
# Collect coverage data and save it into coverage.info
mapbox_time "lcov_capture" \
$LCOV \
--quiet \
--capture \
--no-external \
--gcov-tool "gcov-4.9" \
--directory "src/mbgl" \
--directory "platform" \
--directory "include/mbgl" \
--directory "build/${HOST_SLUG}/${BUILDTYPE}" \
--base-directory "build/${HOST_SLUG}/${BUILDTYPE}" \
--output-file "build/${HOST_SLUG}/${BUILDTYPE}/coverage.info"
mapbox_time "coveralls_upload" \
coveralls-lcov "build/${HOST_SLUG}/${BUILDTYPE}/coverage.info"
|