From 13a6237c1d5cb121818a30c153b4b061cf5a8d8d Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Mon, 18 Nov 2019 11:38:59 -0800 Subject: [PATCH] run-tests: silent some errors from run-tests itself Summary: I have seen errors like: Traceback (most recent call last): File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner self.run() File "/usr/lib64/python2.7/threading.py", line 765, in run self.__target(*self.__args, **self.__kwargs) File "./run-tests.py", line 2636, in job del runningtests[test.name] File "/usr/lib64/python2.7/collections.py", line 68, in __delitem__ dict_delitem(self, key) KeyError: 'test-empty-t.py' It's not fatal and is caused by race condition. So let's just ignore it. Reviewed By: ikostia Differential Revision: D18538388 fbshipit-source-id: 85e38578bea4c9b27439e6f10abb7619a8bb9238 --- eden/scm/tests/run-tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eden/scm/tests/run-tests.py b/eden/scm/tests/run-tests.py index d1df604892..fbf74f0da3 100755 --- a/eden/scm/tests/run-tests.py +++ b/eden/scm/tests/run-tests.py @@ -2647,7 +2647,10 @@ class TestSuite(unittest.TestSuite): done.put(("!", test, "run-test raised an error, see traceback")) raise finally: - del runningtests[test.name] + try: + del runningtests[test.name] + except KeyError: + pass try: channels[channel] = "" except IndexError: