diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-12 17:22:44 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-17 09:05:48 +0100 |
commit | 6271a402d2583d966723cb3db2ba20df55bc695c (patch) | |
tree | b4c3b1c12e6db9f1fec14f2f108b5df089316339 /specview.py | |
parent | applconfig: Clear page before options (diff) | |
download | rtems-central-6271a402d2583d966723cb3db2ba20df55bc695c.tar.bz2 |
specview.py: Use enabled-by for no-validation
Diffstat (limited to 'specview.py')
-rwxr-xr-x | specview.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/specview.py b/specview.py index f8d4b3c3..a0428ccd 100755 --- a/specview.py +++ b/specview.py @@ -189,16 +189,18 @@ def _is_pre_qualified(item: Item) -> bool: _NOT_PRE_QUALIFIED)) -def _no_validation(item: Item, path: List[str]) -> List[str]: +def _no_validation(item: Item, path: List[str], enabled: List[str]) -> List[str]: path_2 = path + [item.uid] + if not item.is_enabled(enabled): + return path_2[:-1] leaf = len(list(item.children("validation"))) == 0 if not leaf: return path_2[:-1] for child in item.children(_CHILD_ROLES): - path_2 = _no_validation(child, path_2) + path_2 = _no_validation(child, path_2, enabled) leaf = False for parent in item.parents(_PARENT_ROLES): - path_2 = _no_validation(parent, path_2) + path_2 = _no_validation(parent, path_2, enabled) leaf = False if leaf and item.type not in _VALIDATION_LEAF and _is_pre_qualified(item): for index, component in enumerate(path_2): @@ -359,7 +361,7 @@ def main() -> None: if item not in spec: print(item.uid) elif args.filter == "no-validation": - _no_validation(root, []) + _no_validation(root, [], config["build"]["enabled"]) if __name__ == "__main__": |