Skip to content

Commit 80b3635

Browse files
katgiadlanordicjm
authored andcommitted
[nrf fromtree] 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> (cherry picked from commit bec789d364bf24d5b1a6604bc1d6cd37c06cecf3)
1 parent 436197e commit 80b3635

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'
@@ -2568,8 +2568,7 @@ def iteration_increment(value=1, decrement=False):
25682568
assert tr.jobserver.name == expected_jobserver
25692569

25702570
assert tr.instances['dummy instance'].metrics == {
2571-
'k': 'v',
2572-
'k2': 'v2',
2571+
'k': 'v2',
25732572
'handler_time': 30
25742573
}
25752574

0 commit comments

Comments
 (0)