mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
validate:launcher: Take into account test duration when filtering them
Otherwise running -t 'some.*test' will run long tests (longer than hard timeout) which is not what the user expect.
This commit is contained in:
parent
93fa16f1ba
commit
1bc6cb3615
1 changed files with 12 additions and 4 deletions
|
@ -1177,17 +1177,25 @@ class TestsManager(Loggable):
|
|||
return True
|
||||
return False
|
||||
|
||||
def _check_duration(self, test):
|
||||
if test.duration > 0 and int(self.options.long_limit) < int(test.duration):
|
||||
self.info("Not activating %s as its duration (%d) is superior"
|
||||
" than the long limit (%d)" % (test, test.duration,
|
||||
int(self.options.long_limit)))
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def _is_test_wanted(self, test):
|
||||
if self._check_whitelisted(test):
|
||||
if not self._check_duration(test):
|
||||
return False
|
||||
return True
|
||||
|
||||
if self._check_blacklisted(test):
|
||||
return False
|
||||
|
||||
if test.duration > 0 and int(self.options.long_limit) < int(test.duration):
|
||||
self.info("Not activating %s as its duration (%d) is superior"
|
||||
" than the long limit (%d)" % (test, test.duration,
|
||||
int(self.options.long_limit)))
|
||||
if not self._check_duration(test):
|
||||
return False
|
||||
|
||||
if not self.wanted_tests_patterns:
|
||||
|
|
Loading…
Reference in a new issue