[rtems-central commit] specview.py: Use enabled-by for no-validation

Sebastian Huber sebh at rtems.org
Wed Nov 17 08:07:50 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    6271a402d2583d966723cb3db2ba20df55bc695c
Changeset: http://git.rtems.org/rtems-central/commit/?id=6271a402d2583d966723cb3db2ba20df55bc695c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Nov 12 17:22:44 2021 +0100

specview.py: Use enabled-by for no-validation

---

 config.yml  |  1 +
 specview.py | 10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/config.yml b/config.yml
index 7c786eb..cd8d59d 100644
--- a/config.yml
+++ b/config.yml
@@ -18,6 +18,7 @@ build:
   - RTEMS_QUAL
   - RTEMS_QUAL_ONLY
   - RTEMS_SMP
+  - sparc/gr712rc
   source-directory: modules/rtems
   sources:
   - bsps/shared/doxygen.h
diff --git a/specview.py b/specview.py
index f8d4b3c..a0428cc 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__":



More information about the vc mailing list