aboutsummaryrefslogtreecommitdiff
path: root/ci/script.sh
blob: c8025ce34ddf4f6ed2f8e568bbb942145b775121 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

set -e
set -o pipefail

# This will pass the environment variables down to a bash process which runs
# as $USER, while retaining the environment variables defined and belonging
# to secondary groups given above in usermod.
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
  sudo -E su "${USER}" -c "ci/run_${CI_TARGET}.sh"
else
  ci/run_${CI_TARGET}.sh
fi

if [[ -s "${GCOV_ERROR_FILE}" ]]; then
  echo '=== Unexpected gcov errors: ==='
  cat "${GCOV_ERROR_FILE}"
  exit 1
fi