validate: launcher: Add a argument to avoid rereuning flaky tests
authorThibault Saunier <tsaunier@igalia.com>
Tue, 4 Oct 2022 22:17:15 +0000 (19:17 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 5 Oct 2022 20:29:22 +0000 (20:29 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3122>

subprojects/gst-devtools/validate/launcher/baseclasses.py
subprojects/gst-devtools/validate/launcher/main.py

index 16c47cd..bbe0ba1 100644 (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)
index 5f9cd5f..3365821 100644 (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(