Changeset View
Changeset View
Standalone View
Standalone View
jobs/swh-environment.yaml
Show All 39 Lines | builders: | ||||
cd .. | cd .. | ||||
# abort when some tests fail | # abort when some tests fail | ||||
set -e | set -e | ||||
# execute tests in each swh module | # execute tests in each swh module | ||||
for module in $(./bin/ls-py-modules) | for module in $(./bin/ls-py-modules) | ||||
do | do | ||||
cd $module | cd $module | ||||
tests_dir=$(echo $module | sed 's/-/\//g')/tests | tests_dir=$(echo $module | sed 's/-/\//g')/tests | ||||
pytest_opts= | |||||
if [[ "$module" == "swh-storage" ]] | |||||
then | |||||
# to prevent hypothesis.errors.DeadlineExceeded | |||||
pytest_opts="--hypothesis-profile=fast" | |||||
fi | |||||
if [ -d "$tests_dir" ] | if [ -d "$tests_dir" ] | ||||
then | then | ||||
python3 -m pytest $pytest_opts $tests_dir | python3 -m pytest $tests_dir | ||||
fi | fi | ||||
cd .. | cd .. | ||||
done | done | ||||