File: test.sh

package info (click to toggle)
pbbam 2.4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,148 kB
  • sloc: cpp: 60,214; xml: 2,908; ansic: 660; sh: 275; python: 203; makefile: 187
file content (25 lines) | stat: -rwxr-xr-x 565 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/env bash
set -vex

########
# TEST #
########

ninja -C "${CURRENT_BUILD_DIR:-build}" -v test

############
# COVERAGE #
############

if [[ ${ENABLED_COVERAGE:-false} == true ]]; then
  module load gcov

  pushd "${CURRENT_BUILD_DIR:-build}"
  find . -type f -iname '*.o' | xargs gcov -acbrfu {} \; >/dev/null && \
    mkdir coverage && pushd coverage && mv ../*.gcov . && \
    sed -i -e 's@Source:@Source:../@' *.gcov && \
    sed -i -e 's@Graph:@Graph:../@' *.gcov && \
    sed -i -e 's@Data:@Data:../@' *.gcov && \
    rm pugixml* && popd
  popd
fi