File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Coverage combine merges (and removes) all the coverage files and
4
+ # generates a new .coverage file in the current directory.
5
+
6
+ set -o xtrace # Write all commands first to stderr
7
+ set -o errexit # Exit the script with error if any of the commands fail
8
+
9
+ . .evergreen/utils.sh
10
+
11
+ if [ -z " $PYTHON_BINARY " ]; then
12
+ PYTHON_BINARY=$( find_python3)
13
+ fi
14
+
15
+ createvirtualenv " $PYTHON_BINARY " covenv
16
+ # coverage 7.3 dropped support for Python 3.7, keep in sync with run-tests.sh
17
+ pip install -q " coverage<7.3"
18
+
19
+ pip list
20
+ ls -la coverage/
21
+
22
+ python -m coverage combine coverage/coverage.*
23
+ python -m coverage html -d htmlcov
Original file line number Diff line number Diff line change @@ -131,12 +131,7 @@ functions:
131
131
working_dir : " src"
132
132
script : |
133
133
${PREPARE_SHELL}
134
- set -o xtrace
135
- # Coverage combine merges (and removes) all the coverage files and
136
- # generates a new .coverage file in the current directory.
137
- ls -la coverage/
138
- /opt/python/3.7/bin/python3 -m coverage combine coverage/coverage.*
139
- /opt/python/3.7/bin/python3 -m coverage html -d htmlcov
134
+ bash .evergreen/combine-coverage.sh
140
135
# Upload the resulting html coverage report.
141
136
- command : shell.exec
142
137
params :
Original file line number Diff line number Diff line change @@ -258,7 +258,8 @@ python -c 'import sys; print(sys.version)'
258
258
# Only cover CPython. PyPy reports suspiciously low coverage.
259
259
PYTHON_IMPL=$( $PYTHON -c " import platform; print(platform.python_implementation())" )
260
260
if [ -n " $COVERAGE " ] && [ " $PYTHON_IMPL " = " CPython" ]; then
261
- python -m pip install pytest-cov " coverage"
261
+ # coverage 7.3 dropped support for Python 3.7, keep in sync with combine-coverage.sh.
262
+ python -m pip install pytest-cov " coverage<7.3"
262
263
TEST_ARGS=" $TEST_ARGS --cov pymongo --cov-branch --cov-report term-missing:skip-covered"
263
264
fi
264
265
You can’t perform that action at this time.
0 commit comments