From: Richard Purdie Date: Thu, 15 Nov 2018 14:35:41 +0000 (+0000) Subject: oeqa/concurrencytest: Avoid unclosed file warnings X-Git-Tag: 2018-10.4-thud~428 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=a7dceca55b169bcdb8d1528238cbdedfd131f37f;p=openembedded-core.git oeqa/concurrencytest: Avoid unclosed file warnings Avoid an unclosed file per thread warning when running selftests concurrently by closing the result stream. (From OE-Core rev: 33a4a076e8aa72a872807332501e7f5ae1cee0e2) Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py index 6404cb4668..f050289e61 100644 --- a/meta/lib/oeqa/core/utils/concurrencytest.py +++ b/meta/lib/oeqa/core/utils/concurrencytest.py @@ -115,6 +115,9 @@ class ConcurrentTestSuite(unittest.TestSuite): for thread, process_result in threads.values(): process_result.stop() raise + finally: + for test in tests: + test[0]._stream.close() def _run_test(self, test, process_result, queue): try: