• Home
Name Date Size #Lines LOC

..--

ca/22-Oct-2025-12,8848,453

cmake/22-Oct-2025-198166

ta/22-Oct-2025-20,49317,844

utils/22-Oct-2025-523317

CMakeLists.txtD22-Oct-2025671 2015

README.mdD22-Oct-20252.2 KiB5741

README_zh.mdD22-Oct-20252 KiB5441

README.md

1# TEE Test
2
3## Introduce
4
5This is the test suit for the functional and compatible test of TEE.
6
7TEE test suit is based on Open Harmony hcpptest framework, which can refer to the XTS subsystem.
8
9## Important Folders
10
11|  Folder   |  Introduce  |
12|  ----  |  ----  |
13| driver  | driver related code |
14| ca  | REE related test code,which is the testcase definition. |
15| ta  | TEE related test code |
16| utils  | test AW and public code |
17
18## Build
19### Build CA
20
21    # build with the system:
22    hb build --gn-args build_xts=true
23
24    # For rk3568:
25    First, copy the tee directory from the ca directory to the test/xts/acts directory, then add the configuration tee directory to the test/xts/acts/test_packages.gni file, and execute the  following compile command
26    cd test/xts/acts
27    /build.sh product_name=rk3568 system_size=standard target_subsystem=tee
28    The compiled CA in "out/rk3568/suites/acts/acts/testcases"。
29### Build TA
30
31
32## Test Execution
33Note: The absolute path for running the CA during the test must be the same as the absolute path for running the CA specified by AddCaller_CA func in the test TA. In this example, the CA named tee_test_client_api_vendor in the TA is used as an example to describe the test command. You can specify another name in the actual test.
34
35Place the test TA (sec file) in the same level directory as the test CA, and both can be placed in the/vendor/bin/directory.
36
37### TEE SDK compatibility test
381. Execute all test cases.
39Enter the command line window of the tested system, Enter "/vendor/bin/tee_test_client_api_vendor"
40
412. Execute some test cases.
42For details, see the commands provided by the hcpptest framework.
43Supports the use of wildcard characters "*", for example /vendor/bin/tee_test_client_api_vendor --gtest_filter=*TeeBasicTestFram.InvokeCommand*
44
453. Current exist tee xts test CA list:
46/vendor/bin/tee_test_client_api_vendor
47/system/bin/tee_test_client_api_system
48/vendor/bin/tee_test_tcf_api
49/vendor/bin/tee_test_time_api
50/vendor/bin/tee_test_arithmetic_api
51/vendor/bin/tee_test_trusted_storage_api
52/vendor/bin/tee_test_crypto_api
53/vendor/bin/tee_test_device_api
54
55## Reference
56    - xts_acts
57

README_zh.md

1# TEE Test介绍
2
3## 简介
4
5此目录下为TEE的测试套件代码,用于功能测试和兼容性测试。
6TEE 测试套件REE侧是基于Open Harmony的hcpptest编写。测试框架可参考XTS子系统简介。
7
8## 重要目录说明
9
10|  目录   |  说明  |
11|  ----  |  ----  |
12| driver  | 驱动相关代码 |
13| ca  | REE侧相关测试代码,即测试用例定义部分 |
14| ta  | TEE侧相关测试代码 |
15| utils  | 测试公共代码 |
16
17## 如何编译
18### CA编译
19    # 跟随系统编译:
20    hb build --gn-args build_xts=true
21
22    # 对于rk3568系统:
23    先将ca目录下的tee目录拷贝到test/xts/acts目录下,然后在test/xts/acts/test_packages.gni文件中添加配置tee目录,再执行下面编译命令
24    cd test/xts/acts
25    /build.sh product_name=rk3568 system_size=standard target_subsystem=tee
26    编译出的CA在out/rk3568/suites/acts/acts/testcases目录下。
27
28### TA编译
29    将测试TA源码放到SDK目录中,参考demo TA的编译,源码和配置文件使用待编译的TA即可。
30
31## 测试执行
32注意,测试时CA运行的路径要与测试TA中AddCaller_CA指定的CA运行路径保持一致,本例以TA中CA名称为tee_test_client_api_vendor为例来介绍测试命令。
33测试TA(sec文件)放到与测试CA同级目录下,可以均放在/vendor/bin/目录下。
34
35### TEE sdk兼容性测试
36
371. 执行全部用例
38   进入被测试系统命令行窗口,输入:"/vendor/bin/tee_test_client_api_vendor"
39
402. 执行部分用例
41   参考hcpptest框架提供的命令。支持使用通配符*,例如 /vendor/bin/tee_test_client_api_vendor --gtest_filter=*TeeBasicTestFram.InvokeCommand*
42
433. 当前已有的tee xts 测试CA 列表:
44/vendor/bin/tee_test_client_api_vendor
45/system/bin/tee_test_client_api_system
46/vendor/bin/tee_test_tcf_api
47/vendor/bin/tee_test_time_api
48/vendor/bin/tee_test_arithmetic_api
49/vendor/bin/tee_test_trusted_storage_api
50/vendor/bin/tee_test_crypto_api
51/vendor/bin/tee_test_device_api
52## 参考仓
53    - xts_acts
54