From: Clifford Wolf Date: Wed, 12 Sep 2018 11:23:22 +0000 (+0200) Subject: Detect bogus task tags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e111f7c9355acc0fc16dd1dcb3c9e0cc6a00f263;p=SymbiYosys.git Detect bogus task tags Signed-off-by: Clifford Wolf --- diff --git a/sbysrc/sby.py b/sbysrc/sby.py index 5f33e1d..efc8b1a 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -139,7 +139,9 @@ def read_sbyconfig(sbydata, taskname): task_skiping_blocks = False continue + found_task_tag = False task_skip_line = False + for t in task_tags_all: if line.startswith(t+":"): line = line[len(t)+1:].lstrip() @@ -157,8 +159,15 @@ def read_sbyconfig(sbydata, taskname): else: task_skip_line = not match + found_task_tag = True break + if len(task_tags_all) and not found_task_tag: + tokens = line.split() + if len(tokens) > 0 and tokens[0].endswith(":"): + print("ERROR: Invalid task specifier \"%s\"." % tokens[0], file=sys.stderr) + sys.exit(1) + if task_skip_line or task_skip_block: continue