[testrunner] preventing a StopIteration exception when running tests
The next built-in function throws a "StopIteration" when iterator is exhausted which will crash and stop the test runner. Asking it to return a "None" instead will fix the issue. Change-Id: I3ca4ff8f28f359798c9faf6f1ffbbaa6bb95f156 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524719 Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com> Reviewed-by: Tamer Tas <tmrts@chromium.org> Cr-Commit-Position: refs/heads/master@{#60294}
This commit is contained in:
parent
34102d9b7f
commit
cb7607b875
@ -268,7 +268,7 @@ class TestSuite(object):
|
||||
|
||||
def __initialize_test_count_estimation(self):
|
||||
# Retrieves a single test to initialize the test generator.
|
||||
next(iter(self.ListTests()))
|
||||
next(iter(self.ListTests()), None)
|
||||
|
||||
def __calculate_test_count(self):
|
||||
self.__initialize_test_count_estimation()
|
||||
|
Loading…
Reference in New Issue
Block a user