lit googletest.py: Don't raise StopIteration in generator

The intention here seems to be to end the generator function, but with
modern Python, raising StopIteration causes a runtime error
(https://www.python.org/dev/peps/pep-0479/).

Differential revision: https://reviews.llvm.org/D79169
This commit is contained in:
Hans Wennborg 2020-04-30 15:03:22 +02:00
parent 292058a5d6
commit 88aad9b9f0
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class GoogleTest(TestFormat):
litConfig.warning(
"unable to discover google-tests in %r: %s. Process output: %s"
% (path, sys.exc_info()[1], exc.output))
raise StopIteration
return
nested_tests = []
for ln in output.splitlines(False): # Don't keep newlines.