git-filter-repo/t/run_coverage

29 lines
484 B
Plaintext
Raw Normal View History

#!/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:
ls t939*.sh | xargs -n 1 bash
cd $tmpdir
python3-coverage combine
python3-coverage html -d $orig_dir/report
python3-coverage report -m
cd $orig_dir
rm -rf $tmpdir