移植验证
OpenHarmony芯片移植完成后,需要开展OpenHarmony兼容性测试以及芯片SDK功能性测试。除可获得测试认证之外,还可以在开发阶段提前发现缺陷,大幅提高代码质量。
OpenHarmony兼容性测试
OpenHarmony兼容性测试是XTS(OpenHarmony生态认证测试套件)之一,详见 OpenHarmony兼容性测试。
- 添加test子系统以及xts_acts部件。 在“vendor/xxx/xxx/config.json”文件中,添加如下代码:
{
"subsystem": "test",
"components": [
{ "component": "xts_acts", "features":[] },
{ "component": "xts_tools", "features":[] }
]
}
- 链接XTS生成的.a库。 在链接选项中,需要链接生成于“out/MyBoard/MyProduct/libs”目录下的XTS的.a库,其库的名称格式为libmodule_ActsXxxTest.a,链接方式为"-lmodule_ActsXxxTest",示例代码如下:
"-Wl,--whole-archive",
......
"-lhctest",
"-lbootstrap",
"-lbroadcast",
"-lmodule_ActsBootstrapTest",
"-lmodule_ActsCMSISTest",
"-lmodule_ActsDfxFuncTest",
"-lmodule_ActsParameterTest",
"-lmodule_ActsSamgrTest",
"-lmodule_ActsSecurityDataTes