1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-21 10:09:02 +00:00

trace-cmd: add trace files as artificats

The binary and text trace files were not being added as artifacts in WA
output.
This commit is contained in:
Sergei Trofimov 2017-10-02 13:54:18 +01:00
parent 66ba28e625
commit a65cffb705

View File

@ -205,9 +205,12 @@ class TraceCmdInstrument(Instrument):
def update_result(self, context): # NOQA pylint: disable=R0912
outfile = os.path.join(context.output_directory, 'trace.dat')
self.collector.get_trace(outfile)
if self.report and not self.report_on_target:
textfile = os.path.join(context.output_directory, 'trace.txt')
self.collector.report(outfile, textfile)
context.add_artifact('trace-cmd-bin', outfile, 'data')
if self.report:
if not self.report_on_target:
textfile = os.path.join(context.output_directory, 'trace.txt')
self.collector.report(outfile, textfile)
context.add_artifact('trace-cmd-txt', textfile, 'export')
def teardown(self, context):
path = self.target.path.join(self.target.working_directory, OUTPUT_TRACE_FILE)