Skip to content

Commit 38f6e94

Browse files
CEL Dev Teamcopybara-github
authored andcommitted
cel_cc_test: Allow passing arguments to the underlying cc_test rule.
This is necessary for adding command line arguments, setting tags etc. PiperOrigin-RevId: 819772768
1 parent 7a66fef commit 38f6e94

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

testing/testrunner/cel_cc_test.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def cel_cc_test(
3232
deps = [],
3333
enable_coverage = False,
3434
test_data_path = "",
35-
data = []):
35+
data = [],
36+
**kwargs):
3637
"""trigger the cc impl of the CEL test runner.
3738
3839
This rule will generate a cc_test rule. This rule will be used to trigger
@@ -53,6 +54,7 @@ def cel_cc_test(
5354
enable_coverage: bool whether to enable coverage collection.
5455
test_data_path: absolute path of the directory containing the test files. This is needed only
5556
if the test files are not located in the same directory as the BUILD file.
57+
**kwargs: additional arguments to pass to the cc_test rule.
5658
"""
5759
data, test_data_path = _update_data_with_test_files(
5860
data,
@@ -62,7 +64,7 @@ def cel_cc_test(
6264
cel_expr,
6365
is_raw_expr,
6466
)
65-
args = []
67+
args = kwargs.pop("args", [])
6668

6769
test_data_path = test_data_path.lstrip("/")
6870

@@ -98,6 +100,7 @@ def cel_cc_test(
98100
data = data,
99101
args = args,
100102
deps = ["//testing/testrunner:runner"] + deps,
103+
**kwargs
101104
)
102105

103106
def _update_data_with_test_files(data, filegroup, test_data_path, test_suite, cel_expr, is_raw_expr):

0 commit comments

Comments
 (0)