Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | D | 12-May-2024 | 2.9 KiB | 53 | 49 | |
animation_filter_test.cpp | D | 12-May-2024 | 11.1 KiB | 287 | 221 | |
app_start_filter_test.cpp | D | 12-May-2024 | 7.8 KiB | 195 | 126 | |
binder_filter_test.cpp | D | 12-May-2024 | 12.3 KiB | 292 | 220 | |
bio_parser_test.cpp | D | 12-May-2024 | 15.7 KiB | 318 | 278 | |
bytrace_parser_test.cpp | D | 12-May-2024 | 8.8 KiB | 245 | 166 | |
clock_filter_test.cpp | D | 12-May-2024 | 19.3 KiB | 508 | 372 | |
cpu_filter_test.cpp | D | 12-May-2024 | 15.3 KiB | 356 | 233 | |
ebpf_file_system_test.cpp | D | 12-May-2024 | 23.9 KiB | 511 | 418 | |
ebpf_parser_test.cpp | D | 12-May-2024 | 6 KiB | 160 | 104 | |
event_parser_test.cpp | D | 12-May-2024 | 43.6 KiB | 1,204 | 801 | |
filter_filter_test.cpp | D | 12-May-2024 | 2.8 KiB | 86 | 47 | |
frame_filter_test.cpp | D | 12-May-2024 | 16 KiB | 390 | 279 | |
hidump_parser_test.cpp | D | 12-May-2024 | 5.9 KiB | 172 | 120 | |
hilog_parser_test.cpp | D | 12-May-2024 | 15.1 KiB | 379 | 285 | |
hisys_event_parser_test.cpp | D | 12-May-2024 | 8.4 KiB | 185 | 150 | |
htrace_binder_event_test.cpp | D | 12-May-2024 | 27 KiB | 645 | 531 | |
htrace_cpu_data_parser_test.cpp | D | 12-May-2024 | 13.5 KiB | 342 | 253 | |
htrace_cpu_detail_parser_test.cpp | D | 12-May-2024 | 7 KiB | 193 | 140 | |
htrace_diskio_parser_test.cpp | D | 12-May-2024 | 14.5 KiB | 366 | 271 | |
htrace_event_parser_test.cpp | D | 12-May-2024 | 31.9 KiB | 824 | 616 | |
htrace_irq_event_test.cpp | D | 12-May-2024 | 26.7 KiB | 671 | 542 | |
htrace_mem_parser_test.cpp | D | 12-May-2024 | 21.2 KiB | 602 | 446 | |
htrace_network_parser_test.cpp | D | 12-May-2024 | 14.5 KiB | 344 | 265 | |
htrace_process_parser_test.cpp | D | 12-May-2024 | 12.9 KiB | 321 | 246 | |
htrace_sys_mem_parser_test.cpp | D | 12-May-2024 | 11.5 KiB | 320 | 234 | |
htrace_sys_vmem_parser_test.cpp | D | 12-May-2024 | 11.4 KiB | 318 | 232 | |
http_server_test.cpp | D | 12-May-2024 | 9.9 KiB | 346 | 265 | |
irq_filter_test.cpp | D | 12-May-2024 | 12.3 KiB | 334 | 231 | |
js_cpu_profiler_test.cpp | D | 12-May-2024 | 13.5 KiB | 266 | 216 | |
js_memory_test.cpp | D | 12-May-2024 | 42.7 KiB | 761 | 681 | |
measure_filter_test.cpp | D | 12-May-2024 | 13.6 KiB | 334 | 218 | |
native_hook_parser_test.cpp | D | 12-May-2024 | 93 KiB | 2,040 | 1,575 | |
paged_memory_parser_test.cpp | D | 12-May-2024 | 14.8 KiB | 290 | 246 | |
parser_pbreader_test.cpp | D | 12-May-2024 | 7 KiB | 209 | 161 | |
process_filter_test.cpp | D | 12-May-2024 | 13.4 KiB | 386 | 248 | |
proto_reader_test.cpp | D | 12-May-2024 | 40.4 KiB | 1,029 | 834 | |
rpc_server_test.cpp | D | 12-May-2024 | 3.7 KiB | 114 | 74 | |
slice_filter_test.cpp | D | 12-May-2024 | 18.7 KiB | 415 | 296 | |
smaps_parser_test.cpp | D | 12-May-2024 | 12.5 KiB | 309 | 239 | |
span_join_test.cpp | D | 12-May-2024 | 10.4 KiB | 246 | 205 | |
table_test.cpp | D | 12-May-2024 | 60.6 KiB | 1,506 | 1,177 | |
task_pool_filter_test.cpp | D | 12-May-2024 | 10.9 KiB | 266 | 216 | |
wasm_func_test.cpp | D | 12-May-2024 | 2.7 KiB | 86 | 52 |
README.md
1# 准备测试的硬件环境 2 1. 测试依赖hi3516DV300设备。 3 2. 烧录OHOS_STD代码。 4 3. 通过直连方式,使用USB线将设备连接到存储测试代码的主机。 5 6# 准备测试的软件环境 7 1. 设置UT环境变量 8 在代码根目录执行:export BUILD_UT=true 9 2. 连接设备 10 在代码根目录执行: root 11 remount 12 3. 准备UT依赖的动态库 13 通过push 把测试依赖的libsqlite.z.so等动态库推到hi3516DV300设备的system/lib文件夹下。 14 4. 准备UT依赖的资源文件 15 将OHOS_STD/test/resource目录push到hi3516DV300设备的/data目录 16 在代码根目录执行: push ./test/resource/ /data/ 17 5. 环境清理 18 (a) 执行之前先清理OHOS_STD/out/xxx-arm-release/obj/developtools 临时文件。 19 rm -rf ~/OHOS_STD/out/xxx-arm-release/obj/developtools 20 (b) 清理hi3516DV300设备上生成的中间文件/home/XXX/OHOS_STD/out。 21 rm -rf /home/ohos/OHOS_STD/out* 22 (c) 清理UT环境残留的覆盖率报告。 23 rm -rf ~/OHOS_STD/developtools/profiler/build/html 24 25# 测试步骤 26 1. 启动UT执行环境, 启动后根据提示信息输入hi3516DV300对应的设备编号。 27 在代码根目录执行:./test/developertest/start.sh 28 2. 编译并执行hiprofiler_ts_ut。 29 在start.sh启动的交互式窗口执行:run -t ut -ss developtools -ts hiprofiler_ts_ut 30 31# 生成测试报告 32 1. pull设备上生成的gcda 33 进入设备环境后: 执行cd /home/XXX/OHOS_STD 34 tar -cvf out.tar out 35 exit 36 退出shell后:pull /home/XXX/OHOS_STD/out.tar ~/OHOS_STD/ 37 tar -xvf out.tar 38 pull /home/ohos/OHOS_STD/out/* /home/ohos/OHOS_STD/out/ 39 cd /home/ohos/OHOS_STD/developtools/profiler/build 40 2. 生成UT覆盖率报告 41 在代码根目录执行:./developtools/profiler/build/lcov.sh 42 pull /data/test/hiprofiler_ts_ut.xml ~/OHOS_STD/developtools/profiler/build/html/ 43 报告位置:~/OHOS_STD/developtools/profiler/build/html/index.html 44 45# 可能遇到的问题 46 1. gcno文件不存在问题 47 gcno文件是在编译阶段生成,编译时如果out目录存在.o临时文件,则不会编译源码,需要删除out/ obj/developtools/目录的编译中间文件后重新编译 48 2. 运行时报缺少依赖库libsqlite.z.so 49 需要把libsqlite.z.so push到设备的system/lib目录,在developtools/profiler/device/ohos_test.xml文件增加push命令 50 3. UT所有步骤执行完之后,html中没有生成覆盖率信息 51 权限问题,从设备中pull出来gcov文件后,需要关注文件权限 52 4. UT输出覆盖率世间点不是当前最新时间 53 清理掉原来的html文件,重新执行lcov.sh,生成新的html覆盖率报告