mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-11-07 09:20:29 +00:00
64aa9359ed
Some of the systems I ran on had a 'python3-coverage' and some had a 'coverage3' program. More were of the latter name, but more importantly, the upstream tarball only creates the latter name; apparently the former was just added by some distros. So, switch to the more official name of the program. Signed-off-by: Elijah Newren <newren@gmail.com>
32 lines
714 B
Bash
Executable File
32 lines
714 B
Bash
Executable File
#!/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
|