driazati commented on code in PR #12055:
URL: https://github.com/apache/tvm/pull/12055#discussion_r919310220
##########
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:
the number is just arbitrary, though given that the flaky tests we do have
come from a pretty consistent set of places I think 2 failures happening in a
row is not that unlikely
--
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]