twister: coverage: initialize 'use_system_gcov'

Initialize 'use_system_gcov', so it is always set before being referenced
in "elif" statement.

Fixes: 1440b19bde ("twister: restore logic to determine which gcov we
  should use")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
Marcin Niestroj 2023-02-20 12:34:03 +01:00 committed by Anas Nashif
parent 4be438254a
commit faee6c90b8

View file

@ -237,6 +237,8 @@ class Gcovr(CoverageTool):
def run_coverage(testplan, options):
use_system_gcov = False
for plat in options.coverage_platform:
_plat = testplan.get_platform(plat)
if _plat and (_plat.type in {"native", "unit"}):