validate: launcher: Add a argument to avoid rereuning flaky tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3122>
This commit is contained in:
Thibault Saunier 2022-10-04 19:17:15 -03:00 committed by GStreamer Marge Bot
parent 1577911d75
commit f3c162cc85
2 changed files with 3 additions and 1 deletions

View file

@ -2176,7 +2176,7 @@ class _TestsLauncher(Loggable):
self.reporter.after_test(test)
return False
if retry_on_failures or test.max_retries:
if retry_on_failures or test.max_retries and not self.options.no_retry_on_failures:
if not self.options.redirect_logs:
test.copy_logfiles()
to_retry.append(test)

View file

@ -522,6 +522,8 @@ class LauncherConfig(Loggable):
" at the same time")
parser.add_argument('--retry-on-failures', dest="retry_on_failures", action="store_true",
help="Re-try tests that produce unexpected results")
parser.add_argument('--no-retry-on-failures', dest="no_retry_on_failures", action="store_true",
help="Disable retrying on failure, event for known to be flaky tests.")
parser.add_argument('--html', dest="html", action="store_true",
help="Write logs as html")
dir_group = parser.add_argument_group(