1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-07 05:30:44 +00:00

ftrace: fix get_trace when outfile is directory

If the path passed into get_trace() is a directory, the collector is
supposed to use the name of the output file on target for the file on
the host. Until now however, os.path.dirname() was mistakenly called on
the target location (returning the containing directory rather than the
base name of the file).
This commit is contained in:
Sergei Trofimov 2017-05-11 14:22:28 +01:00
parent 4dc54728c1
commit 7e80a381d8

View File

@ -202,7 +202,7 @@ class FtraceCollector(TraceCollector):
def get_trace(self, outfile):
if os.path.isdir(outfile):
outfile = os.path.join(outfile, os.path.dirname(self.target_output_file))
outfile = os.path.join(outfile, os.path.basename(self.target_output_file))
self.target.execute('{} extract -o {}'.format(self.target_binary, self.target_output_file),
timeout=TIMEOUT, as_root=True)