Go to file
authName 389e615362 add query::query_with_limit_with_without_offset test
Change-Id: I0000bee68924a7ace03d1bd7c163f0c17bc4b120

Match-id-6c6c766da5c159acbf4346187c7b5b7d27e8752b
2023-10-31 11:02:17 +08:00
frameworks code format 2023-10-30 20:44:49 +08:00
interfaces code format 2023-10-30 20:44:49 +08:00
sa_profile remove redundant dependency 2023-10-24 13:27:45 +08:00
scripts update for auth & batch decrypt 2023-10-30 17:41:50 +08:00
services Revert "change test dir" 2023-10-31 10:38:38 +08:00
test/unittest add query::query_with_limit_with_without_offset test 2023-10-31 11:02:17 +08:00
.gitignore remove .idea 2023-10-12 21:32:58 +08:00
BUILD.gn code format 2023-10-30 20:44:49 +08:00
bundle.json add query::query_with_limit_with_without_offset test 2023-10-31 11:02:17 +08:00
Cargo.toml add trait for hashmap 2023-10-28 22:01:17 +08:00
README.md add query::query_with_limit_with_without_offset test 2023-10-31 11:02:17 +08:00
rustfmt.toml do cargo fmt 2023-10-19 11:09:20 +08:00

asset

环境配置

  1. 单框架代码下载:
mkdir hmos_trunk
cd hmos_trunk
repo init -u http://mgit-tm.rnd.huawei.com/platform/manifest -m system_general.xml -b hmos_trunk --repo-branch=stable --no-repo-verify --repo-branch=stable_py3
repo sync -c -j32
  1. asset代码下载
cd base/security
rm -rf asset
git clone ssh://git@szv-y.codehub.huawei.com:2222/y00522150/asset.git

编译运行

在vendor/huawei/build/component_config/system/generic_generic_arm_64only/hisi_higeneric/newphone_standard/part_config.json添加 "security:asset":{},

在vendor/huawei/build/component_config/system/generic_generic_arm_64only/hisi_newbaltimore/pc_standard/part_config.json添加 "security:asset":{},

# 首次编译命令修改BUILD.gn时执行
./build_system.sh --abi-type generic_generic_arm_64only --device-type hisi_higeneric_newphone_standard --ccache --build-variant root --build-target out/generic_generic_arm_64only/hisi_higeneric_newphone_standard/build_configs/security/asset:asset --build-target asset_test

# 非首次编译命令未修改BUILD.gn时执行
./build_system.sh --abi-type generic_generic_arm_64only --device-type hisi_higeneric_newphone_standard --ccache --build-variant root --build-target out/generic_generic_arm_64only/hisi_higeneric_newphone_standard/build_configs/security/asset:asset --build-target asset_test --fast-rebuild

# PC编译命令
./build_system.sh --abi-type generic_generic_arm_64only --device-type hisi_newbaltimore_pc_standard --ccache --build-variant root --build-target out/generic_generic_arm_64only/hisi_newbaltimore_pc_standard/build_configs/security/asset:asset --build-target asset_test

# 支持SA自启(仅在调试设备上执行一次)
./scripts/push_asset_cfg.bat

# 运行环境:(每次代码修改后执行)
./scripts/push_asset.bat

# 批量整改gn文件格式在asset目录下执行
find -name "*.gn" | xargs ../../../prebuilts/build-tools/linux-x86/bin/gn format

测试

测试DEMOhttps://codehub-y.huawei.com/y00522150/AssetDemo/files?ref=master

# 自动化用例推包运行
hdc file send Z:\workspace\hmos_trunk\out\generic_generic_arm_64only\hisi_higeneric_newphone_standard\tests\unittest\asset\asset_UT_test\asset_rust_test ./data/

hdc shell chmod 777 ./data/asset_rust_test

hdc shell "./data/asset_rust_test --test-threads=1"

hdc file send Z:\workspace\hmos_trunk\out\generic_generic_arm_64only\hisi_higeneric_newphone_standard\tests\unittest\asset\asset_UT_test\asset_ndk_test ./data/

hdc shell chmod 777 ./data/asset_ndk_test

hdc shell "./data/asset_ndk_test --gtest_output=xml:/data/"

单线程运行测试用例

执行的时候 在后面加 --test-threads=1

工具汇总

# 格式化BUILD.gn文件, 在asset目录下执行
find -name "*.gn" -or -name "*.gni" | xargs ../../../prebuilts/build-tools/linux-x86/bin/gn format

# disable样机打卡软件, 在设备上执行
hdc shell
find -name com.huawei.hmsapp.samplemanagement | xargs rm -rf

WIKI汇总

**BUILD.gn规范**https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-build-component-building-rules.md **日志打印规范:**https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/OpenHarmony-Log-guide.md **可靠性设计和编码规范:**https://w3.huawei.com/ipd/tsl/#!tsl_new/standard/standard.html?standardId=152795 **RUST编码规范**https://w3.huawei.com/tsl/#/standard/standardDetail?standardId=217651 **可信构建:**https://wiki.huawei.com/domains/6660/wiki/8/WIKI20230410978631?title=_15