mirror of
https://github.com/ARM-software/devlib.git
synced 2025-07-22 21:49:12 +01: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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user