Skip to content

Commit

Permalink
[ci] Divide coverage data and run 2 lcov processes at the same time.
Browse files Browse the repository at this point in the history
  • Loading branch information
awulkiew committed Jul 28, 2018
1 parent 0c34f56 commit d30de92
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,31 @@ jobs:
- *attach_workspace
- run: ls -lah $COVERAGE_DIR
- run: sudo apt-get install lcov
- run: lcov --directory $COVERAGE_DIR --base-directory $BOOST_DIR --capture --output-file $COVERAGE_DIR/coverage.info
- run:
name: Divide coverage directories
command: |
directories=($(find $COVERAGE_DIR/* -maxdepth 0 -type d))
half_count=$((${#directories[@]} / 2))
directories1=${directories[@]:0:half_count}
directories2=${directories[@]:half_count}
mkdir coverage1
mkdir coverage2
mv -t coverage1 ${directories1[@]}
mv -t coverage2 ${directories2[@]}
ls coverage1
ls coverage2
- run: ls -l
- run: ls -l coverage1
- run: ls -l coverage2
- run:
name: Generate coverage
command: |
lcov --directory coverage1 --base-directory shared-boost --capture --output-file coverage1.info &
lcov --directory coverage2 --base-directory shared-boost --capture --output-file coverage2.info &
wait
- run: ls -l
- run: lcov `ls coverage*.info | sed -r 's/(.+)/--add-tracefile \1/g'` -o $COVERAGE_DIR/coverage.info
# - run: lcov --directory $COVERAGE_DIR --base-directory $BOOST_DIR --capture --output-file $COVERAGE_DIR/coverage.info
- run: lcov --extract $COVERAGE_DIR/coverage.info "*/boost/geometry/*" "*/libs/geometry/include/*" --output-file $COVERAGE_DIR/coverage.info
- run: sed -i 's/SF:.*boost\/geometry/SF:boost\/geometry/g' $COVERAGE_DIR/coverage.info
#Coveralls
Expand Down

0 comments on commit d30de92

Please sign in to comment.