Skip to content

Fix: rename a2a3 scope_stats_collector test target to avoid name clash#1080

Merged
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
doraemonmj:fixbug
Jun 17, 2026
Merged

Fix: rename a2a3 scope_stats_collector test target to avoid name clash#1080
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
doraemonmj:fixbug

Conversation

@doraemonmj

Copy link
Copy Markdown
Contributor

Summary

  • tests/ut/cpp/CMakeLists.txt defined the logical target name
    test_scope_stats_collector twice: once via add_executable for the
    host-side test (common/test_scope_stats_collector.cpp, line 319) and
    once via add_a2a3_runtime_test for the a2a3 runtime variant
    (a2a3/test_scope_stats_collector.cpp, line 377). The macro internally
    calls add_executable(${name} ...), so the duplicate logical target
    violated CMake CMP0002 and failed configure with exit 1 (no build /
    device involvement).
  • Prefix the a2a3 variant as test_a2a3_scope_stats_collector, following
    the existing convention in this file (test_a2a3_tensormap, and the
    a5_ prefix note on the A5 block) so both tests coexist as distinct
    targets.

Testing

  • cmake configure now succeeds (CMP0002 clash resolved)
  • Both tests register distinctly: test_scope_stats_collector (host)
    and test_a2a3_scope_stats_collector (a2a3 runtime)

The host-side test_scope_stats_collector target (common/) and the a2a3
runtime variant shared the same logical target name, violating CMake
CMP0002 and failing configure with exit 1. Prefix the a2a3 variant per
the existing convention (see test_a2a3_tensormap and the a5_ prefix
note) so both targets coexist.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the CMake configuration in tests/ut/cpp/CMakeLists.txt to rename the runtime test target test_scope_stats_collector to test_a2a3_scope_stats_collector. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ChaoZheng109 ChaoZheng109 merged commit 7e65c76 into hw-native-sys:main Jun 17, 2026
15 checks passed
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3b2e945-b495-46e0-a043-f41acb035436

📥 Commits

Reviewing files that changed from the base of the PR and between c4b0aac and e8cad3e.

📒 Files selected for processing (1)
  • tests/ut/cpp/CMakeLists.txt

📝 Walkthrough

Walkthrough

In tests/ut/cpp/CMakeLists.txt, the CMake test target name for the a2a3 scope stats collector unit test is renamed from test_scope_stats_collector to test_a2a3_scope_stats_collector. The source file (a2a3/test_scope_stats_collector.cpp) remains unchanged.

Changes

Rename a2a3 Scope Stats Test Target

Layer / File(s) Summary
Rename CMake test target
tests/ut/cpp/CMakeLists.txt
add_a2a3_runtime_test target renamed from test_scope_stats_collector to test_a2a3_scope_stats_collector; source file is unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A name got a prefix, now proudly it bears,
test_a2a3_scope_stats_collector declares!
One line changed, one target reborn,
No source file ruffled, no logic forlorn.
🐇 Hippity-hop, tidiness wins the morn!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants