areusch commented on code in PR #12055:
URL: https://github.com/apache/tvm/pull/12055#discussion_r919307370
##########
tests/scripts/setup-pytest-env.sh:
##########
@@ -51,19 +54,24 @@ function run_pytest() {
shift
local test_suite_name="$1"
shift
+ extra_args=( "$@" )
if [ -z "${ffi_type}" -o -z "${test_suite_name}" ]; then
- echo "error: run_pytest called incorrectly: run_pytest ${ffi_type}
${test_suite_name} $@"
+ echo "error: run_pytest called incorrectly: run_pytest ${ffi_type}
${test_suite_name} $extra_args"
echo "usage: run_pytest <FFI_TYPE> <TEST_SUITE_NAME> [pytest args...]"
exit 2
fi
+ has_help=$(python3 -m pytest --help 2>&1 | grep 'reruns=' || true)
+ if [ -n "$has_help" ]; then
+ extra_args+=('--reruns=3')
Review Comment:
should we just do 1? why 3?
##########
tests/scripts/setup-pytest-env.sh:
##########
@@ -24,11 +24,14 @@ if [[ ! -z $CI_PYTEST_ADD_OPTIONS ]]; then
else
export PYTEST_ADDOPTS="-s -vv $PYTEST_ADDOPTS"
fi
-set -u
+set -ux
export TVM_PATH=`pwd`
export PYTHONPATH="${TVM_PATH}/python"
+# TODO: Remove this line once https://github.com/apache/tvm/pull/12055 is
merged into the Docker images
+python3 -m pip install --user pytest-rerunfailures==10.2
Review Comment:
maybe to reduce risk we should just update the ci images and turn this on?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]