[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:
Milad Farazmand 2019-03-18 08:32:18 -04:00 committed by Commit Bot
parent 34102d9b7f
commit cb7607b875

View File

@ -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()