From 1fb06148fab52d44666c46d965b919760f9d3932 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Mon, 24 Jul 2023 13:58:26 +0100 Subject: [PATCH] lisa.wa: Fix WATraceCollector.traces FIX WATraceCollector.traces property creates all Trace instances with the same path, which is the path of the trace of the last job. Fix that by ensuring each Trace is created from the trace path associated with its job. --- lisa/wa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisa/wa.py b/lisa/wa.py index ac00e7708..72983d2ce 100644 --- a/lisa/wa.py +++ b/lisa/wa.py @@ -651,7 +651,7 @@ class WATraceCollector(WAArtifactCollectorBase): to their corresponding :class:`lisa.trace.Trace`. """ return LazyMapping({ - f"{job.label}-{job.iteration}": lru_cache()(lambda k: Trace(job.get_artifact_path('trace-cmd-bin'), **self._trace_kwargs)) + f"{job.label}-{job.iteration}": lru_cache()(lambda k, job=job: Trace(job.get_artifact_path('trace-cmd-bin'), **self._trace_kwargs)) for job in self.wa_output.jobs }) -- GitLab