Skip to content

Commit bec789d

Browse files
katgiadladanieldegrasse
authored andcommitted
twister: Enable gathering footprint if test plan exists
If test plan is used, memory usage metrics are overridden. Result of this operation is missing memory footprint. This change removes redundand metrics update and fixes described inconvenience. Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
1 parent d1872d7 commit bec789d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

scripts/pylib/twister/twisterlib/runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,6 @@ def run(self):
18951895
except queue.Empty:
18961896
break
18971897
else:
1898-
inst.metrics.update(self.instances[inst.name].metrics)
18991898
inst.metrics["handler_time"] = inst.execution_time
19001899
self.instances[inst.name] = inst
19011900

scripts/tests/twister/test_runner.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,7 @@ def mock_client_from_environ(jobs):
25302530
pipeline_q = queue.LifoQueue()
25312531
done_q = queue.LifoQueue()
25322532
done_instance = mock.Mock(
2533-
metrics={'k2': 'v2'},
2533+
metrics={'k': 'v2'},
25342534
execution_time=30
25352535
)
25362536
done_instance.name='dummy instance'
@@ -2570,8 +2570,7 @@ def iteration_increment(value=1, decrement=False):
25702570
assert tr.jobserver.name == expected_jobserver
25712571

25722572
assert tr.instances['dummy instance'].metrics == {
2573-
'k': 'v',
2574-
'k2': 'v2',
2573+
'k': 'v2',
25752574
'handler_time': 30
25762575
}
25772576

0 commit comments

Comments
 (0)