Skip to content

Commit f60bdc1

Browse files
committed
[rules_score]: assumption_of_use take TRLCInfoProvider as src
1 parent bff44df commit f60bdc1

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

bazel/rules/rules_score/private/assumptions_of_use.bzl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ following S-CORE process guidelines. Assumptions of Use define the safety-releva
1919
operating conditions and constraints for a Safety Element out of Context (SEooC).
2020
"""
2121

22+
load("@trlc//:trlc.bzl", "TrlcProviderInfo", "trlc_requirements_test")
2223
load("//bazel/rules/rules_score:providers.bzl", "AssumptionsOfUseInfo", "ComponentRequirementsInfo", "FeatureRequirementsInfo", "SphinxSourcesInfo")
2324

2425
# ============================================================================
@@ -79,9 +80,9 @@ _assumptions_of_use = rule(
7980
doc = "Collects Assumptions of Use documents with traceability to feature requirements",
8081
attrs = {
8182
"srcs": attr.label_list(
82-
allow_files = [".rst", ".md", ".trlc"],
83+
providers = [TrlcProviderInfo],
8384
mandatory = True,
84-
doc = "Source files containing Assumptions of Use specifications",
85+
doc = "trlc_requirements targets containing Assumptions of Use specifications",
8586
),
8687
"requirements": attr.label_list(
8788
providers = [[FeatureRequirementsInfo], [ComponentRequirementsInfo]],
@@ -110,7 +111,7 @@ def assumptions_of_use(
110111
Args:
111112
name: The name of the assumptions of use target. Used as the base
112113
name for all generated targets.
113-
srcs: List of labels to .rst, .md, or .trlc files containing the
114+
srcs: List of labels to trlc_requirements targets containing the
114115
Assumptions of Use specifications as defined in the S-CORE
115116
process.
116117
requirements: Optional list of labels to feature or component requirements
@@ -120,12 +121,13 @@ def assumptions_of_use(
120121
121122
Generated Targets:
122123
<name>: Main assumptions of use target providing AssumptionsOfUseInfo
124+
<name>_test: TRLC validation test for the assumptions of use sources
123125
124126
Example:
125127
```starlark
126128
assumptions_of_use(
127129
name = "my_assumptions_of_use",
128-
srcs = ["assumptions_of_use.rst"],
130+
srcs = [":my_aous_trlc"],
129131
requirements = [":my_feature_requirements"],
130132
)
131133
```
@@ -136,3 +138,8 @@ def assumptions_of_use(
136138
requirements = requirements,
137139
visibility = visibility,
138140
)
141+
trlc_requirements_test(
142+
name = name + "_test",
143+
reqs = srcs,
144+
visibility = visibility,
145+
)

0 commit comments

Comments
 (0)