mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +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 True
|
||||||
return False
|
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):
|
def _is_test_wanted(self, test):
|
||||||
if self._check_whitelisted(test):
|
if self._check_whitelisted(test):
|
||||||
|
if not self._check_duration(test):
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if self._check_blacklisted(test):
|
if self._check_blacklisted(test):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if test.duration > 0 and int(self.options.long_limit) < int(test.duration):
|
if not self._check_duration(test):
|
||||||
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 False
|
||||||
|
|
||||||
if not self.wanted_tests_patterns:
|
if not self.wanted_tests_patterns:
|
||||||
|
|
Loading…
Reference in a new issue