mirror of
https://github.com/ARM-software/devlib.git
synced 2025-03-04 09:17:51 +00:00
trace/serial_trace: Flush data to file before copying
We add a missing flush which esures that all data has been synced to the temporary file before we copy it. Prior to this commit, we would sometimes miss the last few lines of the trace.
This commit is contained in:
parent
804a044efc
commit
41f460afbe
@ -69,6 +69,8 @@ class SerialTraceCollector(TraceCollector):
|
||||
if self._collecting:
|
||||
raise RuntimeError("get_trace was called whilst collecting")
|
||||
|
||||
self._tmpfile.flush()
|
||||
|
||||
shutil.copy(self._tmpfile.name, outfile)
|
||||
|
||||
self._tmpfile.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user