You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git-filter-repo/t/run_coverage

32 lines
714 B
Bash

#!/bin/bash
orig_dir=$(cd $(dirname $0) && pwd -P)
tmpdir=$(mktemp -d)
cat <<EOF >$tmpdir/.coveragerc
[run]
parallel=true
data_file=$tmpdir/.coverage
EOF
cat <<EOF >$tmpdir/sitecustomize.py
import coverage
coverage.process_startup()
EOF
export COVERAGE_PROCESS_START=$tmpdir/.coveragerc
export PYTHONPATH=$tmpdir:
# We pretend filenames are unicode for two reasons: (1) because it exercises
# more code, and (2) this setting will detect accidental use of unicode strings
# for file/directory names when it should always be bytestrings.
export PRETEND_UNICODE_ARGS=1
ls t939*.sh | xargs -n 1 bash
cd $tmpdir
coverage3 combine
coverage3 html -d $orig_dir/report
coverage3 report -m
cd $orig_dir
rm -rf $tmpdir