Closed
ets_utils单元测试宿主机适配问题:ICU数据依赖用例失败与ProcessChdirTest001设备路径依赖 #2528
jizaiyiAdd on 29 days agoClosed at 28 days ago
openharmony_ci
29 days ago Comments:
29 days ago Comments:
感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@weng-changcheng](https://gitcode.com/weng-changcheng) [@xliu-huanwei](https://gitcode.com/xliu-huanwei) [@gong_19901](https://gitcode.com/gong_19901) 。如果需要调整订阅PR、Issue的变更状态,请访问链接。
Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.


29 days ago Added label: waiting_for_assign
29 days ago Associated pull request
28 days ago Close issue
28 days ago changed custom state from 待办的 to 已完成
问题背景
ets_utils host UT(Linux 主机单元测试,配套 !2693)在干净 Linux 主机(无设备文件系统路径)执行 test_util_unittest / test_process_unittest 时发现两类失败:
问题1:ICU 数据依赖用例失败(31例)
SetHwIcuDirectory() 将 ICU 数据目录硬编码为 /system/usr/icu(设备镜像路径),Linux 主机不存在该路径,导致 31 个依赖表驱动编码转换器(gbk/big5/shift_jis/iso-2022-jp/ibm866/macintosh/windows-/koi8-/iso-8859-15/gb18030)的用例失败:
问题2:ProcessChdirTest001 设备路径依赖
用例硬编码 chdir("/system/lib"),主机不存在该目录导致 uv_chdir 失败、断言失败。
修复方案
验证:host 全量 2043/2043 通过(31 例隔离);ProcessChdirTest001 主机通过;设备侧编译无影响。