Skip to content

Commit 7525cc7

Browse files
golowanowfabiobaltieri
authored andcommitted
twister: coverage: Remove dead code at BinaryHandler
BinaryHandler.hanlde() method was trying to call GCOV and fails silently because of incorrect call parameters. Moreover, even being fixed, this call is not needed here as it attempts to find and process .gcno and .gcna files (using wrong paths) to create .gcov coverage text reports. Currently the CoverageTool class does all data processing and report generation using GCOVR or LCOV tools instead of direct calls to GCOV. Signed-off-by: Dmitrii Golovanov <[email protected]>
1 parent d1c6bb5 commit 7525cc7

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

scripts/pylib/twister/twisterlib/handlers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ def handle(self, harness):
326326

327327
handler_time = time.time() - start_time
328328

329-
if self.options.coverage:
330-
subprocess.call(["GCOV_PREFIX=" + self.build_dir,
331-
"gcov", self.sourcedir, "-b", "-s", self.build_dir], shell=True)
332-
333329
# FIXME: This is needed when killing the simulator, the console is
334330
# garbled and needs to be reset. Did not find a better way to do that.
335331
if sys.stdout.isatty():

scripts/tests/twister/test_handlers.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,6 @@ def mock_thread(target, *args, **kwargs):
640640
handler._update_instance_info.assert_called_once()
641641
handler._final_handle_actions.assert_called_once()
642642

643-
if coverage:
644-
call_mock.assert_any_call(
645-
['GCOV_PREFIX=build_dir', 'gcov', 'source_dir',
646-
'-b', '-s', 'build_dir'],
647-
shell=True
648-
)
649-
650643
if isatty:
651644
call_mock.assert_any_call(['stty', 'sane'], stdin=mock.ANY)
652645

0 commit comments

Comments
 (0)