From 01d10a4115cd03c881e05e22c31d4a1e41b4f8ac Mon Sep 17 00:00:00 2001 From: Ederson de Souza Date: Tue, 8 Apr 2025 09:37:34 -0700 Subject: [PATCH] twister: Look at SIMICS_PROJECT environment variable to find simics While cmake/emu/simics.cmake uses SIMICS_PROJECT env var, twister checks if a build is "runnable" by checking if `simics` is executable, but it doesn't look at SIMICS_PROJECT env var. Signed-off-by: Ederson de Souza --- scripts/pylib/twister/twisterlib/platform.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/pylib/twister/twisterlib/platform.py b/scripts/pylib/twister/twisterlib/platform.py index b19f908b915..5c7ac81b102 100644 --- a/scripts/pylib/twister/twisterlib/platform.py +++ b/scripts/pylib/twister/twisterlib/platform.py @@ -30,6 +30,9 @@ class Simulator: self.exec = data.get("exec") def is_runnable(self) -> bool: + if self.name == "simics": + return shutil.which(self.exec, path=os.environ.get("SIMICS_PROJECT")) is not None + return not bool(self.exec) or bool(shutil.which(self.exec)) def __str__(self):