diff --git a/README_zh.md b/README_zh.md index 19d2597b485275ba4c79a4eb8127649bba6c8366..092964ea152cca28974ce88a0938857eb8119b60 100755 --- a/README_zh.md +++ b/README_zh.md @@ -7,6 +7,7 @@ OpenHarmony为开发者提供了一套全面的自测试框架,开发者可根 - [环境配置](https://gitee.com/openharmony/docs/tree/master/zh-cn/device-dev/subsystems/subsys-testguide-envbuild.md) - [源码获取](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md) +测试框架依赖于test_xdevice框架,在使用时两个框架放在同级目录,命名为xdevice ## 测试框架目录简介 以下是测试框架的目录层级架构,在使用测试框架过程中可在相应目录查找对应组件。 diff --git a/libs/fuzzlib/README_zh.md b/libs/fuzzlib/README_zh.md index 97f9c1ff8e8f226f431a9f152b990ba75f403231..e9509e647c22f038dd3f3d52efc468c4d1d4fa82 100644 --- a/libs/fuzzlib/README_zh.md +++ b/libs/fuzzlib/README_zh.md @@ -140,6 +140,8 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or 基于[ohos_fuzztest]配置Fuzz模板,例如: + 需要注意的是fuzz_config_file, 使用gen命令生成的BUILD.GN文件中没有指明,需要写完测试套后加在BUILD.gn中 + ``` ohos_fuzztest("CalculatorFuzzTest") { #定义测试套名称CalculatorFuzzTest module_out_path = module_output_path @@ -169,7 +171,7 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or } ``` **注意:** - - 测试套名称采用大驼峰风格,并且以FuzzTest结尾,测试套前缀与fuzzer目录名相对应。 + - #### 测试套名称必须采用大驼峰风格,并且必须以FuzzTest结尾,测试套前缀与fuzzer目录名相对应(例如:calculator_fuzzer,只能有一个下划线)。 - module_out_path为测试套编译输出目录,内容为部件+模块名。 @@ -237,13 +239,14 @@ run -t FUZZ -ss developertest -tm calculator 1. 归档用例配置文件、语料以及用例可执行文件 - 新建目录,如: + 新建目录,如: + #### 注意:必须是\tests目录 ``` D:\test\tests ``` - 用例可执行文件为DTFuzz源文件编译产出文件,以二进制形式存储在out/release/package/phone/tests/fuzztest下。测试用例的配置文件均编译输出在out/release/package/phone/tests/res目录下对应的xxxx_fuzzer目录中。 + 用例可执行文件为DTFuzz源文件编译产出文件,以二进制形式存储在out/release/tests/fuzztest下。测试用例的配置文件均编译输出在out/release/tests/res目录下对应的xxxx_fuzzer目录中。 将fuzztest目录以及res目录直接拷贝到该路径下即可。 diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index 0c7959589742eb6cec19ee72bfa25df2686ec70d..524ca34182c2faf31e055c025f94abf07bb78699 100755 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -351,14 +351,15 @@ class ResultManager(object): remote_json_result_file = os.path.join(self.device_testpath, "%s.json" % self.testsuite_name) - if self.device.is_file_exist(remote_result_file): - self.device.pull_file(remote_result_file, result_file_path) - elif self.device.is_file_exist(remote_json_result_file): - self.device.pull_file(remote_json_result_file, - result_josn_file_path) - result_file_path = result_josn_file_path - else: - LOG.info("%s not exist", remote_result_file) + if self.config.testtype[0] != "fuzztest": + if self.device.is_file_exist(remote_result_file): + self.device.pull_file(remote_result_file, result_file_path) + elif self.device.is_file_exist(remote_json_result_file): + self.device.pull_file(remote_json_result_file, + result_josn_file_path) + result_file_path = result_josn_file_path + else: + LOG.info("%s not exist", remote_result_file) return result_file_path @@ -404,7 +405,7 @@ class ResultManager(object): if not os.path.exists(cxx_cov_path): os.makedirs(cxx_cov_path) src_file = os.path.join(DEFAULT_TEST_PATH, target_name) - self.device.pull_file(src_file, cxx_cov_path, is_create=True) + self.device.pull_file(src_file, cxx_cov_path, is_create=True, timeout=TIME_OUT) ##############################################################################