iot_connect acts 指导

代码复制

标准设备

拷贝 iotc_acts/iot_connect_standard 目录至 test/xts/acts/communication 目录下

轻量设备

拷贝 iotc_acts/iot_connect_lite 目录至 test/xts/acts/communication 目录下

新增编译测试套件

标准设备

在 test/xts/acts/communication/BUILD.gn 中增加如下

"iot_connect_cpp_standard:ActsIotConnectTest",

轻量设备

wifi 和 ble 接口适配参考

ws63v100 示例:

在 vendor/hihope/nearlink_dk_3863_xts/config.json 中增加如下

{
    "product_name": "nearlink_dk_3863_xts",
    "subsystems": [
        ...
        {
            "subsystem": "communication",
            "components": [
                { "component": "wifi_lite", "features":[] },
                { "component": "iot_connect", "features":[] }
            ]
        }
    ]
}

在 test/xts/acts/build_lite/BUILD.gn 中增加如下

lite_component("acts_component") {
     if (ohos_xts_test_args != "") {
        ...
     } else {
        if (ohos_kernel_type == "liteos_m") {
            all_features += [
                ...
                "//test/xts/acts/communication_lite/lwip_hal:ActsLwipTest",   
                "//test/xts/acts/communication_lite/iot_connect_lite:ActsIotConnectTest", // 添加行
                "//test/xts/acts/commonlibrary_lite/file_hal:ActsUtilsFileTest",
                ...
            ]
        }
     }
}

在 device/soc/hisilicon/ws63v100/sdk/build/config/target_config/ws63/config.py 文件中增加如下

{
    "ws63-liteos-xts": {
        "ram_component" : [
            "wifiservice", // ws63 wifi 适配
            "btservice", // ws63 ble 适配
            "iotc", // ws63 iotc 适配
            "module_ActsIotConnectTest", // 测试套
        ]
    }
}

在 device/soc/hisilicon/ws63v100/sdk/libs_url/ws63/cmake/ohos.cmake 文件中增加如下

if(${TARGET_COMMAND} MATCHES "ws63-liteos-xts")
    set( "btservice"  "wifiservice" "iotc" "module_ActsIotConnectTest")

编译 acts 套件

标准设备

在 test/xts/acts 目录下执行如下编译命令

./build.sh product_name=rk3568 system_size=standard

轻量设备

ws63v100 示例

hb set
选择 mini/hihope/nearlink_dk_3863_xts
hb build -f --gn-args build_xts=true

运行 acts 套件

标准设备

参考社区acts 套件测试方法。

轻量设备

烧录镜像文件后,开机自动运行。

FAQ

1:轻量设备使用 MobaXterm 工具查看日志和报告,建议勾选 CR/LF选项。

2:ws63v100 编译xts 镜像内存空间不够修复方法。 在文件device/soc/hisilicon/ws63v100/sdk/drivers/boards/ws63/evb/memory_config/include/memory_config_common.h中修改

// 增加 APP_PROGRAM_LENGTH的大小
#define APP_PROGRAM_LENGTH (0x260000 - 0x300)