Revision df69e0a0 autotools/gen-coverage

b/autotools/gen-coverage
1 1
#!/bin/bash
2 2
#
3 3

  
4
# Copyright (C) 2010 Google Inc.
4
# Copyright (C) 2010, 2011 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
34 34
$COVERAGE erase
35 35

  
36 36
for script; do
37
  $COVERAGE run --branch --append $script
37
  if [[ "$script" == *-runasroot.py ]]; then
38
    if [[ -z "$FAKEROOT" ]]; then
39
      echo "FAKEROOT variable not set and needed for $script" >&2
40
      exit 1
41
    fi
42
    cmdprefix="$FAKEROOT"
43
  else
44
    cmdprefix=
45
  fi
46
  $cmdprefix $COVERAGE run --branch --append $script
38 47
done
39 48

  
40 49
echo "Writing text report to $TEXT_COVERAGE ..." >&2

Also available in: Unified diff