[chip dv] Set +sw_images as comma-separated list
The `+sw_images` plusarg is currently set as a space separated list,
which requires it to be quoted. This plusarg is a part of `run_opts`,
which is yet another list of options that requires to be quoted too
(this means the quotes used in `+sw_images` need to be escaped).
The entire make command further needs to be set as a string when
launching over bsub / Google Cloud, which requires ... (see where I am
going?). `shlex.quote` does not work unfortunately.
Rather than have to deal with the headache of having properly escaped
quotes within escaped quotes, this change makes the `+sw_images` plusarg
a comma-separated list instead.
It also fixes a bug in the wildcard substitution code that processes
`{eval_cmd}`.
Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/util/dvsim/utils.py b/util/dvsim/utils.py
index cb4ad2b..dd2cce2 100644
--- a/util/dvsim/utils.py
+++ b/util/dvsim/utils.py
@@ -165,7 +165,7 @@
# command and we're done.
cmd_matches = list(wildcard_re.finditer(cmd))
if not cmd_matches:
- var = var[:idx] + run_cmd(cmd)
+ var = var[:match.start()] + run_cmd(cmd)
continue
# Otherwise, check that each of them is ignored, or that