about summary refs log tree commit diff homepage
path: root/scripts/build/run-coverage.sh
blob: 816b14678f49bb50c4d4c3f81a6027cd7d39e23b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

set -e

# We are going to build docker containers
export DOCKER_BUILD=1

# All scripts are located relative to this one
DIR="$(cd "$(dirname "$0")" && pwd)"
source "${DIR}/common-defaults.sh"

if [[ "a$COVERAGE" != "a1" ]]; then
  exit 0
fi

function upload_coverage() {
  tags=$1
  codecov_suffix=(${tags// /})
  ci_env=$(bash <(curl -s https://codecov.io/env))
  docker run ${ci_env} -ti ${REPOSITORY}/klee:${LLVM_VERSION_SHORT}${LLVM_SUFFIX}${SOLVER_SUFFIX}${DEPS_SUFFIX} /bin/bash -c "cd /home/klee/klee_src && bash <(curl -s https://codecov.io/bash) -X gcov -y /home/klee/klee_src/.codecov.yml -f /home/klee/klee_build/coverage_all.info.${codecov_suffix} -F $tags"
}

upload_coverage systemtests
upload_coverage unittests