Commit cb7607b8 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

[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: 's avatarTamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60294}
parent 34102d9b
...@@ -268,7 +268,7 @@ class TestSuite(object): ...@@ -268,7 +268,7 @@ class TestSuite(object):
def __initialize_test_count_estimation(self): def __initialize_test_count_estimation(self):
# Retrieves a single test to initialize the test generator. # Retrieves a single test to initialize the test generator.
next(iter(self.ListTests())) next(iter(self.ListTests()), None)
def __calculate_test_count(self): def __calculate_test_count(self):
self.__initialize_test_count_estimation() self.__initialize_test_count_estimation()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment