summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-05-05 14:41:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-05-08 21:58:56 +0200
commit09edfca912bb1ddee896342a7ad5b834f24fad80 (patch)
tree1fa8bbddee9a2c5e04d97e007339b971b39e305b
parentinterface: Discard non-options in enabled-by (diff)
downloadrtems-central-09edfca912bb1ddee896342a7ad5b834f24fad80.tar.bz2
build: Gather only enabled test headers
-rw-r--r--rtemsspec/build.py7
1 files 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