[rtems-central commit] build: Gather only enabled test headers

Sebastian Huber sebh at rtems.org
Tue May 9 13:45:27 UTC 2023


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri May  5 14:41:20 2023 +0200

build: Gather only enabled test headers

---

 rtemsspec/build.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/rtemsspec/build.py b/rtemsspec/build.py
index 699c6296..4ae93390 100644
--- a/rtemsspec/build.py
+++ b/rtemsspec/build.py
@@ -77,11 +77,12 @@ def _gather_source_files(item: Item, enabled: List[str],
     _EXTEND_SOURCE_FILES[item["build-type"]](item, source_files)
 
 
-def _gather_test_header(item_cache: ItemCache,
+def _gather_test_header(item_cache: ItemCache, enabled: List[str],
                         source_files: List[str]) -> None:
     for item in item_cache.all.values():
         tests = ["test-case", "requirement/functional/action"]
-        if item.type in tests and item["test-header"]:
+        if item.type in tests and item["test-header"] and item.is_enabled(
+                enabled):
             source_files.append(item["test-header"]["target"])
 
 
@@ -102,5 +103,5 @@ def gather_files(config: dict,
     for uid in config["build-uids"]:
         _gather_source_files(item_cache[uid], enabled, source_files)
     if test_header:
-        _gather_test_header(item_cache, source_files)
+        _gather_test_header(item_cache, enabled, source_files)
     return source_files



More information about the vc mailing list