From a51daf6478f29b7d71508831a8e56ba93d562ccb Mon Sep 17 00:00:00 2001 From: Greg Chadwick Date: Tue, 3 Oct 2023 13:03:28 +0100 Subject: [PATCH] [dv] Fix ibex_cmd.py With the latest versions of all python packages in python-requirements.txt ibex_cmd.py was seeing a run-time type error. Data from a YAML file that had previously always been a string could now be an int as well. This alters the code to allow the int to work. --- dv/uvm/core_ibex/scripts/ibex_cmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dv/uvm/core_ibex/scripts/ibex_cmd.py b/dv/uvm/core_ibex/scripts/ibex_cmd.py index 17f55db835..0d8c5346e2 100644 --- a/dv/uvm/core_ibex/scripts/ibex_cmd.py +++ b/dv/uvm/core_ibex/scripts/ibex_cmd.py @@ -157,9 +157,9 @@ def filter_tests_by_config(cfg: ibex_config.Config, param_dict = test['rtl_params'] assert isinstance(param_dict, dict) for p, p_val in param_dict.items(): - # Parameters are strings or lists of strings. Coerce to the - # latter to make the code below simpler. - if isinstance(p_val, str): + # Parameters are strings or ints, or lists of those two. Coerce + # to the latter to make the code below simpler. + if isinstance(p_val, str) or isinstance(p_val, int): p_val = [p_val] config_val = cfg.params.get(p, None)