• Home
Name Date Size #Lines LOC

..--

arm-neon/12-May-2024-8153

ndk-test/12-May-2024-419302

sanitize/12-May-2024-2,9841,870

script/12-May-2024-571480

README.en.mdD12-May-20242.7 KiB8263

README.mdD12-May-20242.3 KiB8563

README.en.md

1# Compile the test case
2
3-   [Introduction]
4-   [Directory]
5-   [Constraints and Limitations]
6-   [illustrate]
7-   [Description of related issues]
8
9## Introduction
10
11Provides a framework based on cmake compilation, which can compile binary files for different platforms.
12
13According to the needs of customers, compile and generate corresponding executable programs and library files. Its compilation process is:
14
151.  Use python script to configure the parameters of cmake compilation
162.  After python runs, a Makefile will be generated
173.  Execute the compiled task by running cmake --build .
18
19## Directory
20
21```
22.
23├── README.en.md
24├── README.md
25├── ndk-test
26│   ├── CMakeLists.txt           # Starting point for ndk-test build via cmake
27│   ├── build.py                 # Script to compile ndk-test
28│   └── src
29├── sanitize
30│   ├── CMakeLists.txt           # Starting point for sanitize build via cmake
31│   ├── asan
32│   ├── build.py                 # Script to compile sanitize
33│   ├── cfi
34│   ├── fuzz
35│   ├── scudo
36│   └── ubsan
37├── script                       # Script Directory
38│   ├── __pycache__
39│   ├── build.py                 # Total Compile Script
40│   ├── config_args.py           # Parameters required for cmake compilation
41│   ├── runtest-sanitize.sh
42│   ├── runtest.sh
43│   └── runtest_Windows.bat      # Push the compiled files to the board
44└── target                       # save the target file
45    └── README.md
46```
47
48## Constraints and Limitations
49
50-   Need to download NDK or compile and generate through openharmony
51-   Configuration environment, please refer to [help for wiki](https://gitee.com/openharmony/third_party_musl/wikis/Home)
52
53## illustrate
54
551.  Compile commands for full compilation in the general directory
56
57    ```
58    python build.py
59    ```
60
612.  The corresponding compilation directory can be compiled separately
62
63    ```
64    # subdirectory sanitize
65    python build.py
66    # subdirectory ndk-test
67    python build.py
68    ```
69
703.  Run the test case on the board
71
72    ```
73    # Make sure the board is connected to the computer and run the script
74    runtest_Windows.bat
75    ```
76
774.  If the above steps are executed successfully, the script will generate a REPORT and REPORT-SANITIZE files to record the results of running the ndk-test and sanitize test cases respectively
78
79## Description of related issues
80
81**For cmake parameter CMAKE_TOOCHAIN_FILE**
82-   Points to the location of the toolchain file, which is important for compiling binaries for different platforms, so give the correct path

README.md

1# 编译测试案例
2
3-   [简介]
4-   [目录]
5-   [约束与限制]
6-   [说明]
7-   [相关问题说明]
8
9## 简介
10
11提供了一个基于cmake编译的框架,可编译不同平台的二进制文件
12
13根据客户的需求,编译生成对应的可执行程序和库文件。其编译流程为:
14
151.  使用python脚本进行配置cmake编译的参数
162.  python运行后会生成Makefile文件
173.  通过运行cmake --build .来执行编译的任务
18
19## 目录结构
20
21```
22.
23├── README.en.md
24├── README.md
25├── ndk-test
26│   ├── CMakeLists.txt           # ndk-test通过cmake构建的起点
27│   ├── build.py                 # 编译ndk-test的脚本
28│   └── src
29├── sanitize
30│   ├── CMakeLists.txt           # sanitize通过cmake构建的起点
31│   ├── asan
32│   ├── build.py                 # 编译sanitize的脚本
33│   ├── cfi
34│   ├── fuzz
35│   ├── scudo
36│   └── ubsan
37├── script                       # 编译放置的脚本
38│   ├── __pycache__
39│   ├── build.py                 # 编译的总脚本
40│   ├── config_args.py           # cmake编译需要的参数
41│   ├── runtest-sanitize.sh
42│   ├── runtest.sh
43│   └── runtest_Windows.bat      # 将编译生成的文件推送到板子上
44└── target                       # 存放目标文件
45    └── README.md
46```
47
48## 限制与约束
49
50-   需要下载NDK或者通过openharmony编译生成
51-   配置环境,详情请参照[gitee中的wiki文档](https://gitee.com/openharmony/third_party_musl/wikis/Home)
52
53## 说明
54
551.  总目录下全量编译的编译命令
56
57    ```
58    python build.py
59    ```
60
612.  对应的编译目录可单独编译
62
63    ```
64    # 子目录sanitize
65    python build.py
66    # 子目录ndk-test
67    python build.py
68    ```
69
703.  在板子上运行测试案例
71
72    ```
73    # 确定板子连接好电脑,运行脚本
74    runtest_Windows.bat
75    ```
76
774.  若以上步骤执行成功,脚本会产生一个REPORT和REPORT-SANITIZE文件,来分别记录ndk-test和sanitize测试案例运行的结果
78
79## 相关问题说明
80
81**对于cmake参数CMAKE_TOOCHAIN_FILE**
82-   指向的是工具链文件所在的位置,对于编译不同平台二进制文件是很重要的,所以要给定正确的路径
83
84
85