mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 20:52:57 +08:00
35 lines
915 B
Bash
Executable File
35 lines
915 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
function cov {
|
|
pytest \
|
|
--ignore-glob=*/setup.py \
|
|
--cov ${1} \
|
|
--cov-append \
|
|
--cov-branch \
|
|
--cov-report='' \
|
|
${1}
|
|
}
|
|
|
|
PYTHON_VERSION=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
|
|
PYTHON_VERSION_INFO=(${PYTHON_VERSION//./ })
|
|
|
|
coverage erase
|
|
|
|
cov exporter/opentelemetry-exporter-datadog
|
|
cov instrumentation/opentelemetry-instrumentation-flask
|
|
cov instrumentation/opentelemetry-instrumentation-requests
|
|
cov instrumentation/opentelemetry-instrumentation-wsgi
|
|
|
|
# aiohttp is only supported on Python 3.5+.
|
|
if [ ${PYTHON_VERSION_INFO[1]} -gt 4 ]; then
|
|
cov instrumentation/opentelemetry-instrumentation-aiohttp-client
|
|
# ext-asgi is only supported on Python 3.5+.
|
|
if [ ${PYTHON_VERSION_INFO[1]} -gt 4 ]; then
|
|
cov instrumentation/opentelemetry-instrumentation-asgi
|
|
fi
|
|
|
|
coverage report --show-missing
|
|
coverage xml
|