summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2020-04-30 15:03:22 +0200
committerTom Stellard <tstellar@redhat.com>2020-06-16 12:27:51 -0700
commit756b482c69befb4ad5437a22fc5207711c4ccf4e (patch)
treee654a820eff8a29344ebeca8e2f23b500213ae3e
parent3c2f0cf15bc00e9568ddb0757a026a81a477bf71 (diff)
downloadbcm5719-llvm-756b482c69befb4ad5437a22fc5207711c4ccf4e.tar.gz
bcm5719-llvm-756b482c69befb4ad5437a22fc5207711c4ccf4e.zip
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 (cherry picked from commit 88aad9b9f05702585eb823d0188996f4cf62070a)
-rw-r--r--llvm/utils/lit/lit/formats/googletest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/lit/lit/formats/googletest.py b/llvm/utils/lit/lit/formats/googletest.py
index 6696fabc4f5..2e07fa069d8 100644
--- a/llvm/utils/lit/lit/formats/googletest.py
+++ b/llvm/utils/lit/lit/formats/googletest.py
@@ -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.
OpenPOWER on IntegriCloud