mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 20:54:51 +00:00
coverage
This commit is contained in:
14
scripts/check-tests-ng.sh
vendored
14
scripts/check-tests-ng.sh
vendored
@@ -18,24 +18,16 @@ cur=$(dirname "$(${rl} "${0}")")
|
||||
tmpworkdir="/tmp/dotdrop-tests-workdir"
|
||||
export DOTDROP_WORKDIR="${tmpworkdir}"
|
||||
|
||||
workers=${DOTDROP_WORKERS}
|
||||
if [ -n "${workers}" ]; then
|
||||
DOTDROP_WORKERS=${workers}
|
||||
echo "ENABLE workers: ${workers}"
|
||||
fi
|
||||
|
||||
# run bash tests
|
||||
export DOTDROP_DEBUG="yes"
|
||||
unset DOTDROP_FORCE_NODEBUG
|
||||
# check if tmp dir is present
|
||||
workdir_tmp_exists="no"
|
||||
[ -d "${HOME}/.config/dotdrop/tmp" ] && workdir_tmp_exists="yes"
|
||||
|
||||
# run bash tests
|
||||
if [ -z "${GITHUB_WORKFLOW}" ]; then
|
||||
## local
|
||||
export COVERAGE_FILE=
|
||||
tests-ng/tests_launcher.py
|
||||
else
|
||||
## CI/CD
|
||||
export COVERAGE_FILE="${cur}/.coverage"
|
||||
# running multiple jobs in parallel sometimes
|
||||
# messes with the results on remote servers
|
||||
tests-ng/tests_launcher.py 1
|
||||
|
||||
17
scripts/check-unittests.sh
vendored
17
scripts/check-unittests.sh
vendored
@@ -17,20 +17,7 @@ cur=$(dirname "$(${rl} "${0}")")
|
||||
|
||||
if [ -n "${DOTDROP_WORKERS}" ]; then
|
||||
unset DOTDROP_WORKERS
|
||||
echo "DISABLE workers"
|
||||
echo "DISABLE workers for unittests"
|
||||
fi
|
||||
|
||||
# execute tests with coverage
|
||||
if [ -z "${GITHUB_WORKFLOW}" ]; then
|
||||
## local
|
||||
export COVERAGE_FILE=
|
||||
# do not print debugs when running tests (faster)
|
||||
# tests
|
||||
PYTHONPATH="dotdrop" nose2 --with-coverage --coverage dotdrop --plugin=nose2.plugins.mp -N0
|
||||
else
|
||||
## CI/CD
|
||||
export COVERAGE_FILE="${cur}/.coverage"
|
||||
# tests
|
||||
PYTHONPATH="dotdrop" nose2 --with-coverage --coverage dotdrop
|
||||
fi
|
||||
#PYTHONPATH="dotdrop" python3 -m pytest tests
|
||||
coverage run -p -m pytest tests
|
||||
Reference in New Issue
Block a user