#!/bin/sh
set -e

COV_PKG_OPTIONS="--cov hgext3rd --cov hgitaly"
if test -n "$GITALY_INSTALL_DIR"; then
    COV_PKG_OPTIONS="$COV_PKG_OPTIONS --cov tests_with_gitaly"
fi

set -u

pytest --doctest-modules \
       $COV_PKG_OPTIONS \
       --cov-config=.coveragerc \
       --ignore rust \
       --cov-fail-under 100 \
       --ignore rust \
       --cov-report term-missing \
       -v $@
