已合并
feat: 跑ut时支持 gtest_filter 选项过滤ut用例 #3241
zhanw_coding创建于 6月10日
feat: 跑ut时支持 gtest_filter 选项过滤ut用例 #3241
已合并
zhanw_coding创建于 6月10日
zhanw_coding
zhanw_coding成员
6月10日

描述

feat: 跑ut时支持 gtest_filter 选项过滤ut用例
使用示例:
bash build.sh -u --ops=abs --ophost --gtest_filter=AbsInfershape.abs_infershape_diff_test

关联的Issue

https://gitcode.com/cann/ops-math/issues/1931

测试

$ bash build.sh -u --ops=abs --ophost --gtest_filter=AbsInfershape.abs_infershape_diff_test
...
[2026-06-10 10:05:26] Run ops op_host utest
...
[2026-06-10 10:05:26] Note: Google Test filter = AbsInfershape.abs_infershape_diff_test
[2026-06-10 10:05:26] [==========] Running 1 test from 1 test suite.
[2026-06-10 10:05:26] [----------] Global test environment set-up.
[2026-06-10 10:05:26] Global Environment SetpUp.
...
[2026-06-10 10:05:26] [----------] 1 test from AbsInfershape
[2026-06-10 10:05:26] AbsInfershape SetUp
[2026-06-10 10:05:26] [ RUN      ] AbsInfershape.abs_infershape_diff_test
[2026-06-10 10:05:26] [INFO] GE(733687,math_op_host_ut):2026-06-10-10:05:26.877.112 [op_context_builder_impl.cc:102]733687 CreateComputeNodeInfoImpl:Node Abs, compute_node_info attr_size 48, outputs_ins_info_size:48, offset:416, total_size:520.
[2026-06-10 10:05:26] [       OK ] AbsInfershape.abs_infershape_diff_test (0 ms)
[2026-06-10 10:05:26] AbsInfershape TearDown
[2026-06-10 10:05:26] [----------] 1 test from AbsInfershape (0 ms total)
[2026-06-10 10:05:26] 
[2026-06-10 10:05:26] [----------] Global test environment tear-down
[2026-06-10 10:05:26] Global Environment TearDown
[2026-06-10 10:05:26] [==========] 1 test from 1 test suite ran. (11 ms total)
[2026-06-10 10:05:26] [  PASSED  ] 1 test.

文档更新

类型标签

  • Bug修复
  • 新特性
  • 性能优化
  • 文档更新
  • 其他,请描述:
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhanw_coding 的贡献)
zhanw_codingzhanw_coding成员
6月10日 创建了 pull request,commit 377debb2
CANN-robotCANN-robot成员
6月10日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6月10日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/ops-math 宋凯, wangrui_ (2/2) 宋凯 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

zhanw_coding, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
zhanw_codingzhanw_coding成员
6月10日 修改了pull request 的描述
zhanw_coding
zhanw_coding成员
6月10日 评论:

compile

likedislike
zhanw_codingzhanw_coding成员
6月10日 update merge request[project id: 7649531, iid: 3241, commit_id: 6d6f9b1153d2d3c3c121c0b5f94a3e3b9568d3e4] virtual merging success
CANN-robotCANN-robot成员
6月10日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月10日 评论:

流水线任务触发成功
任务链接 [334fc3c28999476f9b3d0e0c1af334c0][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-06-10 10:32:03]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6月10日 评论:

流水线任务触发成功
任务链接 [002c61be32414aa6b1b211d6de085dd1][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>> >>>>>

[2026-06-10 10:26:15]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6月10日 添加了label:api-check-pass
CANN-robotCANN-robot成员
6月10日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6月10日 添加了label:ci-pipeline-passed
songkai111成员
6月10日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月10日 添加了label:approved
RuiWang_成员
6月10日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
6月10日 添加了label:lgtm
CANN-robotCANN-robot成员
6月10日 关闭了关联的issue
CANN-robotCANN-robot成员
6月10日 合入了pull request