]> git.ipfire.org Git - thirdparty/bind9.git/commit
Ensure pytest runner get proper outcome from flaky reruns
authorNicki Křížek <nicki@isc.org>
Tue, 12 Nov 2024 09:07:02 +0000 (10:07 +0100)
committerNicki Křížek <nicki@isc.org>
Tue, 12 Nov 2024 09:19:03 +0000 (10:19 +0100)
commitb66fb31dcbaeec4e0d4486a468666b40a25cf5e7
treeb5d3399290083b3d2b048b61c0f1bd43ddc03159
parenta10d78db55a3e3ea50f82d2fcfce053a3c107866
Ensure pytest runner get proper outcome from flaky reruns

When a test is re-run by the flaky plugin, the TestReport outcomes
collected in the pytest_runtest_makereport() hook should be overriden.
Each of the setup/call/teardown phases is reported again and since we
care about the overall outcome, their respective results should be
overriden so that only the outcome from the final test (re)run gets
reported.

Prior to this change, it lead to a situation where an extra_artifact
generated during the test might be ignored. This was caused because the
check was skipped, since the test was incorrectly considered as "failed"
in the case where the test would fail on the first run, but pass on a
subsequent flaky rerun.
bin/tests/system/conftest.py