AGENTS.md优化
Created-by: doublelucky
Commit-by: chenmingxing
Merged-by: ohci1
Description: ### 一、内容说明(相关的Issue)
### 二、建议测试周期和提测地址
建议测试完成时间:xxxx.xx.xx
投产上线时间:xxxx.xx.xx
提测地址:CI环境/压测环境
测试账号:
### 三、变更内容
* 3.1 关联PR列表
* 3.2 数据库和部署说明
1. 常规更新
2. 重启unicorn
3. 重启sidekiq
4. 迁移任务:是否有迁移任务,没有写 "无"
5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"
* 3.4 其他技术优化内容(做了什么,变更了什么)
- 重构了 xxxx 代码
- xxxx 算法优化
* 3.5 废弃通知(什么字段、方法弃用?)
* 3.6 后向不兼容变更(是否有无法向后兼容的变更?)
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
自测测试结论:
### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
检查点:
| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx | 否 | 需要 | 不需要 |
| | | | |
接口测试:
性能测试:
并发测试:
其他:
See merge request: openharmony/developtools_syscap_codec!696
System Capability Encoder and Decoder Tools
SysCap(SystemCapability) encoder and decoder tools common usage scenarios as follow:
APP development: IDE collect APP required SysCap and API verssion as in rpcid encoder input. And IDE will decode pcid to device SysCap list when it imported. This tool is only for use by the IDE, developers will not be used directly.
Main function:
-
pcid Encode: Encode SysCap list to pcid.
-
pcid Decode: Decode pcid to get system SysCap list.
-
rpcid Encode: Encode APP required SysCap list to rpcid.
-
rpcid Decode: Decode rpcid to get APP required SysCap list.
File Structure
/developtools
├── syscap_codec # syscap codec代码目录
│ ├── include
│ │ ├──code_config # syscap_tool_shared对外接口定义
│ │ │ └──syscap_define.h
│ │ ├── context_tool.h
│ │ ├── create_pcid.h
│ │ └── syscap_tool.h
│ ├── interfaces/inner_api # 提供部件之间的接口
│ │ ├── syscap_interface.c
│ │ └── syscap_interface.h
│ ├── napi # napi 接口实现
│ │ ├── BUILD.gn
│ │ ├── napi_query_syscap.cpp
│ │ └── query_syscap.js
│ ├── src
│ │ ├── common_method.c
│ │ ├── common_method.h
│ │ ├── context_tool.c
│ │ ├── create_pcid.c
│ │ ├── endian_internal.h # 内部实现的大小端转换接口定义(便于win、mac、linux平台通用)
│ │ ├── endian_internal.c # 大小端转换实现
│ │ ├── main.c # syscap_tool命令行工具代码实现
│ │ └── syscap_tool.c # syscap_tool编解码接口的实现
│ └── test
│ │ └── unittest/common # inner 接口测试代码实现
│ │ ├── BUILD.gn
│ │ ├── include
│ │ │ └── syscap_codec_test.h
│ │ └── syscap_codec_test.cpp # syscap_tool功能测试代码实现
| |—— tools
| │ ├── requirements.txt
│ │ ├── syscap_check.py # syscap一致性检查脚本
│ │ ├── syscap_collector.py
| │ └── syscap_config_merge.py
API
PC tools, no API provided.
Building Manually
syscap_tool binary building steps as follow:
-
Build commands:SysCap tools binary building and installation will be tiggered by SDK compiling procedure. How to build SDK please refer to https://gitee.com/openharmony/build/blob/master/README_zh.md.
-
Building cmd should be adjust for host platform as same as SDK compiling, the archive will in corresponding platform directoty.
Note: Ubuntu host only avaiable for windows/linux building, MacOs binary should building on MacOs host.
Downloading Binary
- Downlaod SDK(recommonded)
Download daily builds( https://ci.openharmony.cn/workbench/cicd/dailybuild/dailylist ) which included SDK.
- Supported Host
Windows x86_64/Linux x86_64/Darwin x86_64
Help
SysCap tools usually integrate to IDE, APP store and bundle tools. Follow instructions for debugging manually:
./syscap_tool -h or ./syscap_tool --help:
./syscap_tool --help
./syscap_tool -R/P -e/d -i filepath [-o outpath]
-h, --help : how to use
-R, --rpcid : encode or decode rpcid
-P, --pcid : encode or decode pcid
-e, --encode : to encode
-d, --encode : to decode
-i filepath, --input filepath : input file
-o outpath, --output outpath : output path
Syscap consistency check tool
Functions and dependencies
The tool provides the following functions:
- Collect syscap fields of all components (or specified components), compare them with arraySyscap in developtools/ syscap_codec/include/syscap_define.h, and output the check results. If they are inconsistent, output the cause of the discrepancy.
- Collect the syscap fields of all components and compare them with the @syscap property set in *.d.ts in the Interface/sdk-js/api directory. If the check results are inconsistent, output the cause of the inconsistency.
- Compare syscap attributes in *.d.ts in all interface/ sdK-JS/API directories with arraySyscap in developtools/syscap_codec/include/syscap_define.h. If they are inconsistent, output the cause of the inconsistency.
How to use it
This tool is written in Python language and needs to be executed using the Python interpreter.
requirements:
prettytable==3.3.0
usage:
# check syscap field in all components for consistency with arraySyscap in syscap_define.h
python3 syscap_check.py -p path_of_openarmony -t component_codec
# check that the SYSCAP field in bundle.json of the specified part is consistent with arraySyscap in syscap_define.h. Note: --bundles is valid only if --check_target is component_codec
python3 syscap_check.py -p path_of_openarmony -t component_codec -b path_of_component1/bundle.json path_of_component2/bundle.json
# check the consistency of the syscap field of all components with the "@syscap" property set in *.d.ts
python3 syscap_check.py -p path_of_openarmony -t component_sdk
# check the "@syscap" attribute set in *.d.ts for consistency with arraSyscap in syscap_define.h
python3 syscap_check.py -p path_of_openarmony -t sdk_codec
Release Note
v1.0.0 2022-3-8 first release, SysCap codec supported for Windows/Linux/Mac host.