已合并
modify simplified key for binary_script #909
sujunwei3创建于 5月29日
modify simplified key for binary_script #909
已合并
sujunwei3创建于 5月29日
sujunwei3成员
5月29日

描述

修正 binary_script 构建脚本的两个问题:

  1. build_binary_op_exe_task.sh:将 timeout 7200 改为 timeout --foreground 2h

    • --foreground 参数确保 timeout 命令在前台脚本环境中正确生效(无此参数时,timeout 在前台进程组中可能无法正常终止子进程)
    • 2h 替代 7200 秒数字,提升可读性
  2. build_binary_opc_gen_task.sh:简化 key_mode 逻辑

    • 移除 ascendc_op_conf 条件分支(原逻辑:非空时 key_mode=0,空时 key_mode="None")
    • 统一设置 key_mode=0,消除冗余条件判断

关联的Issue

#480

测试

根据代码变更,测试场景如下:

  1. 构建脚本功能验证

    • 执行 binary_script 构建任务,验证 timeout --foreground 2h 在前台模式下正常生效
    • 超过 2 小时的构建任务应被正确终止
  2. key_mode 逻辑验证

    • 验证 key_mode 统一设置为 0 后,opc 生成任务正常运行
    • 对比修改前后生成结果,确认 key_mode=0 与原条件分支行为一致

文档更新

无需文档更新,仅修改构建脚本内部逻辑

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 sujunwei3 的贡献)
Ssujunwei3成员
5月29日 创建了 pull request,commit 3bd5d493
CANN-robotCANN-robot成员
5月29日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
5月29日 评论:

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-cv 刘伟, 冯彤 (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

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

likedislike
sujunwei3成员
5月29日 评论:

compile

likedislike
Ssujunwei3成员
5月29日 update merge request[project id: 7657293, iid: 909, commit_id: 12c63b5b58e4bea40817e788f5103790b8934413] virtual merging success
CANN-robotCANN-robot成员
5月29日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月29日 评论:

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

任务名称状态日志下载链接
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_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Pre ✅ 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_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_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
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-05-29 15:01:45]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
5月29日 评论:

流水线任务触发成功
任务链接 [3871cdc446e84f0593a1b6b43ab334c9][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ 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-05-29 14:58:47]    CI执行结束

likedislike
CANN-robotCANN-robot成员
5月29日 添加了label:api-check-pass
CANN-robotCANN-robot成员
5月29日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5月29日 添加了label:ci-pipeline-passed
Ssujunwei3成员
6月1日 修改了pull request 的描述
liu-wei
liu-wei成员
6月1日 评论:

/lgtm
/approve

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

/lgtm

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