summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-03 11:29:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-07 23:15:10 +0100
commitffc6f4ce3a671950fd88a0b3a519fd10c3d2d555 (patch)
tree6a7017e533df47ccd1d5e44c341e9936cff3c7f3 /meta/lib
parent587a5de39786af621882b32be2b230cff23770ef (diff)
downloadpoky-ffc6f4ce3a671950fd88a0b3a519fd10c3d2d555.tar.gz
oeqa/targetcontrol: Attempt to fix log closure warning message
We continue to see the warning message: WARNING: lib/bb/daemonize.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper name='build/tmp/work/qemux86_64-poky-linux/oe-selftest-image/1.0-r0/testimage/qemurunner_log.20200703011821' mode='a' encoding='UTF-8'> I've been unable to reprodue this but believe its caused by garbage collection of the FileHandler used in QemuTarget being delayed until after a new tinfoil instance is created by a subseqent test. Force the log file to be closed when we stop using it to avoid this. [YOCTO #13961] (From OE-Core rev: fa2cca514f4b03aeeedb14dbffd26bc98ed74d29) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e15cc7801ec611f867f5b31028741722ac718c87) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/targetcontrol.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 7bbba6016b..19f5a4ea7e 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -187,6 +187,7 @@ class QemuTarget(BaseTarget):
187 except: 187 except:
188 pass 188 pass
189 self.logger.removeHandler(self.loggerhandler) 189 self.logger.removeHandler(self.loggerhandler)
190 self.loggerhandler.close()
190 self.connection = None 191 self.connection = None
191 self.ip = None 192 self.ip = None
192 self.server_ip = None 193 self.server_ip = None