From a65cffb7051ada0d5e6a802b1a9debf55c400426 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Mon, 2 Oct 2017 13:54:18 +0100 Subject: [PATCH] trace-cmd: add trace files as artificats The binary and text trace files were not being added as artifacts in WA output. --- wa/instrumentation/trace-cmd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wa/instrumentation/trace-cmd.py b/wa/instrumentation/trace-cmd.py index 5104f705..feedf807 100644 --- a/wa/instrumentation/trace-cmd.py +++ b/wa/instrumentation/trace-cmd.py @@ -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)