Avoid some repetition in _make_analysis_test (#197)
This commit is contained in:
parent
720f59405d
commit
f1475299af
|
@ -193,20 +193,18 @@ def _make_analysis_test(
|
||||||
if expect_failure:
|
if expect_failure:
|
||||||
changed_settings["//command_line_option:allow_analysis_failures"] = "True"
|
changed_settings["//command_line_option:allow_analysis_failures"] = "True"
|
||||||
|
|
||||||
|
target_attr_kwargs = {}
|
||||||
if changed_settings:
|
if changed_settings:
|
||||||
test_transition = analysis_test_transition(
|
test_transition = analysis_test_transition(
|
||||||
settings = changed_settings,
|
settings = changed_settings,
|
||||||
)
|
)
|
||||||
attrs["target_under_test"] = attr.label(
|
target_attr_kwargs["cfg"] = test_transition
|
||||||
aspects = [_action_retrieving_aspect],
|
|
||||||
cfg = test_transition,
|
attrs["target_under_test"] = attr.label(
|
||||||
mandatory = True,
|
aspects = [_action_retrieving_aspect],
|
||||||
)
|
mandatory = True,
|
||||||
else:
|
**target_attr_kwargs
|
||||||
attrs["target_under_test"] = attr.label(
|
)
|
||||||
aspects = [_action_retrieving_aspect],
|
|
||||||
mandatory = True,
|
|
||||||
)
|
|
||||||
|
|
||||||
return rule(
|
return rule(
|
||||||
impl,
|
impl,
|
||||||
|
|
Loading…
Reference in New Issue