Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/utils/bazel/unit_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ def lm_cc_test(name, deps = [], **kwargs):
print a diagnostic message before aborting, without requiring any
explicit setup call in test code.

SCORE_LANGUAGE_FUTURECPP_ASSERT_LEVEL_DEBUG is also defined so that
SCORE_LANGUAGE_FUTURECPP_ASSERT_DBG(_MESSAGE) checks actually compile in
(they're a no-op otherwise, see score/language/futurecpp's assert.hpp),
letting these invariants be exercised in unit tests.

Args:
name: Test target name.
deps: Additional dependencies (assertion handler is appended automatically).
Expand All @@ -30,6 +35,7 @@ def lm_cc_test(name, deps = [], **kwargs):
cc_test(
name = name,
deps = deps + ["//score/launch_manager/src/daemon/src/common:assertion_handler"],
defines = kwargs.pop("defines", []) + ["SCORE_LANGUAGE_FUTURECPP_ASSERT_LEVEL_DEBUG"],
target_compatible_with = kwargs.pop("target_compatible_with", []) + select({
"//config:unit_qemu": [],
"//config:unit_host": [],
Expand Down
Loading