Skip to content

Commit 86cd5b3

Browse files
committed
Fix reporting of test srcs
1 parent 98d409e commit 86cd5b3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cc/defs2.bzl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ UNIT = "unit"
2323
# Name for a integration test
2424
INTEGRATION = "integration"
2525

26+
TEST_SRCS = "test_srcs"
27+
2628
# Coding Standard levels
2729
#
2830
# Throughout this file and others there are references to coding
@@ -271,6 +273,9 @@ def _add_library(**kwargs):
271273
kwargs["tags"] = [LIBRARY, level] + (["portable"] if portable else []) + kwargs.get("tags", [])
272274
kwargs["target_compatible_with"] = kwargs.get("target_compatible_with", [])
273275

276+
if "test_library" in kwargs["tags"]:
277+
kwargs["tags"].append("test_srcs")
278+
274279
_create_srcs(**kwargs)
275280
_create_hdrs(**kwargs)
276281

@@ -476,6 +481,10 @@ def swift_cc_test_library(**kwargs):
476481
if "exceptions" not in kwargs:
477482
kwargs["exceptions"] = True
478483

484+
if "tags" not in kwargs:
485+
kwargs["tags"] = []
486+
kwargs["tags"].append("test_library")
487+
479488
kwargs["target_compatible_with"] = _test_compatible_with()
480489

481490
_add_library(lang = "cc", level = INTERNAL, portable = False, **kwargs)

0 commit comments

Comments
 (0)