Skip to content

Commit

Permalink
Add support for go_test (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum authored Jun 20, 2024
1 parent 3a560fb commit cb40258
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion with_cfg/private/with_cfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ def is_executable(rule_name):
return rule_name.endswith("_binary")

def is_test(rule_name):
return rule_name.endswith("_test")
# rules_go's go_test is a macro called go_test_macro. Macro wrappers should
# generally try to have the same name as the rule they are wrapping, so this
# shouldn't become configurable.
return rule_name.endswith("_test") or rule_name == "go_test_macro"

def _is_native(rule_or_macro):
return str(rule_or_macro).startswith("<built-in rule ")
Expand Down

0 comments on commit cb40258

Please sign in to comment.