Skip to content

Commit 3d3ceef

Browse files
committed
bazel: tests should have _test suffix
https://bazel.build/versions/7.3.0/build/style-guide#target-naming Signed-off-by: Øyvind Harboe <[email protected]>
1 parent eada1bb commit 3d3ceef

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/regression.bzl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ def _pop(kwargs, key, default):
9696
def regression_test(
9797
name,
9898
**kwargs):
99+
"""Macro to instantiate a regression test for a given test name
100+
101+
Automatically detects test files and configures the test rule.
102+
103+
Args:
104+
name: The base name of the test (without extension).
105+
**kwargs: Additional keyword arguments to pass to the regression_rule_test.
106+
"""
99107
# TODO: we should _not_ have the magic to figure out if tcl or py exists
100108
# in here but rather in the BUILD file and just pass the resulting
101109
# name = "foo-tcl", test_file = "foo.tcl" to this regression test macro.
@@ -112,7 +120,7 @@ def regression_test(
112120
for test_file in test_files:
113121
ext = test_file.split(".")[-1]
114122
regression_rule_test(
115-
name = name + "-" + ext,
123+
name = name + "-" + ext + "_test",
116124
test_file = test_file,
117125
test_name = name,
118126
data = [

0 commit comments

Comments
 (0)