summaryrefslogtreecommitdiffstats
path: root/rtemsspec/build.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-17 09:49:30 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-19 11:29:34 +0200
commitf9b689f7414a8c7a91a7e74004cebdef0afdbde2 (patch)
treed3cecf72ff59af6b8d132d2c760ee1b59a3dcff7 /rtemsspec/build.py
parentvalidation: Add test documentation to group (diff)
downloadrtems-central-f9b689f7414a8c7a91a7e74004cebdef0afdbde2.tar.bz2
build: Gather test header files
Diffstat (limited to 'rtemsspec/build.py')
-rw-r--r--rtemsspec/build.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rtemsspec/build.py b/rtemsspec/build.py
index f1ca2be9..5ead7746 100644
--- a/rtemsspec/build.py
+++ b/rtemsspec/build.py
@@ -71,6 +71,13 @@ def _gather_source_files(item: Item, enabled: List[str],
_EXTEND_SOURCE_FILES[item["build-type"]](item, source_files)
+def _gather_test_files(item_cache: ItemCache, 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"]:
+ source_files.append(item["test-header"]["target"])
+
+
def gather_files(config: dict, item_cache: ItemCache) -> List[str]:
""" Generates a list of files form the build specification. """
bsps = {} # type: BSPMap
@@ -85,4 +92,5 @@ def gather_files(config: dict, item_cache: ItemCache) -> List[str]:
_gather_source_files(bsps[arch][bsp], enabled, source_files)
for uid in config["uids"]:
_gather_source_files(item_cache[uid], enabled, source_files)
+ _gather_test_files(item_cache, source_files)
return source_files