Skip to content

Commit 5cf07b9

Browse files
Rachel Goldfingercopybara-github
authored andcommitted
This change moves tests from GoogleCcProtoLibraryTest.java to Starlark-based tests in cc_proto_library_tests.bzl
PiperOrigin-RevId: 891886325
1 parent 555360e commit 5cf07b9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

bazel/tests/proto_bzl_test_suite.bzl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,32 @@
33
load("@rules_testing//lib:analysis_test.bzl", "analysis_test")
44
load("@rules_testing//lib:util.bzl", "testing_aspect")
55

6+
def default_config_settings():
7+
"""Returns the default config settings for bzl analysis tests."""
8+
return {
9+
"//command_line_option:features": [
10+
"supports_dynamic_linker",
11+
"supports_pic",
12+
],
13+
}
14+
615
def bzl_test_suite(
716
name,
817
tests,
918
attrs = {},
1019
testing_aspect = testing_aspect,
1120
provider_subject_factories = [],
12-
config_settings = []):
21+
config_settings = {}):
1322
"""Defines a test suite for bzl analysis tests.
1423
1524
Args:
1625
tests: A list of tuples, where each tuple contains an analysis test
1726
implementation function and a target to test.
18-
config_settings: A list of config settings to apply to the test suite.
27+
config_settings: A dictionary of config settings to apply to the test suite.
1928
testing_aspect: The testing aspect to use.
2029
name: The name of the test suite.
2130
"""
31+
2232
test_names = []
2333
for (impl, target) in tests:
2434
impl_name = get_function_name(impl)

0 commit comments

Comments
 (0)