Add assertion handler to all LCM unit tests via lm_cc_test macro - #378
Open
shegazyy wants to merge 2 commits into
Open
Add assertion handler to all LCM unit tests via lm_cc_test macro#378shegazyy wants to merge 2 commits into
shegazyy wants to merge 2 commits into
Conversation
shegazyy
requested a deployment
to
workflow-approval
July 28, 2026 14:41 — with
GitHub Actions
Waiting
shegazyy
requested a deployment
to
workflow-approval
July 28, 2026 14:41 — with
GitHub Actions
Waiting
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
Contributor
Author
|
Hey @MaciejKaszynski 🙏 opened this to fix #368, would appreciate a review whenever you get a chance. Open to any feedback! |
MaciejKaszynski
requested changes
Jul 28, 2026
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| #pragma once |
Contributor
There was a problem hiding this comment.
everywhere else we use #ifdefs so please change this.
| namespace score::lcm::testing | ||
| { | ||
|
|
||
| inline void registerAssertionHandler() noexcept |
Contributor
There was a problem hiding this comment.
I think we can use the same assertion handler for the daemon as tests.
Would move this maybe into //score/launch_manager/src/daemon/src/common:assertion_handler and then also link it for the daemons cc_binary.
shegazyy
requested review from
FScholPer,
NicolasFussberger,
anmittag,
antonkri,
pawelrutkaq and
ramceb
as code owners
July 30, 2026 09:57
shegazyy
requested a deployment
to
workflow-approval
July 30, 2026 09:57 — with
GitHub Actions
Waiting
shegazyy
requested a deployment
to
workflow-approval
July 30, 2026 09:57 — with
GitHub Actions
Waiting
Creates a shared testing library (score/launch_manager/src/testing) that registers a diagnostic assertion handler at static-init time via alwayslink = True. Adds a lm_cc_test Bazel macro in tests/utils/bazel/ unit_test.bzl that wraps cc_test and injects the handler dependency automatically. Updates all 11 unit-test BUILD files to use lm_cc_test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Moved assertion_handler.{hpp,cpp} from src/testing/ to
src/daemon/src/common/ so the same handler can be used by both
unit tests and the daemon binary
- Replaced #pragma once with #ifndef header guard per codebase convention
- Removed testonly = True from the new target so the daemon can link it
- Added the new target as a dep to the daemon cc_binary; removed the
duplicate inline handler from main.cpp
- Updated lm_cc_test macro to reference the new Bazel label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shegazyy
force-pushed
the
fix/assertion-handler-for-unit-tests
branch
from
July 30, 2026 13:40
dcb124f to
c2010dd
Compare
shegazyy
requested a deployment
to
workflow-approval
July 30, 2026 13:40 — with
GitHub Actions
Waiting
shegazyy
requested a deployment
to
workflow-approval
July 30, 2026 13:40 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creates a shared testing library (score/launch_manager/src/testing) that registers a diagnostic assertion handler at static-init time via alwayslink = True. Adds a lm_cc_test Bazel macro in tests/utils/bazel/ unit_test.bzl that wraps cc_test and injects the handler dependency automatically. Updates all 11 unit-test BUILD files to use lm_cc_test.