From 77d9aaeda4c742c2c7e7122751e6e146d8236a17 Mon Sep 17 00:00:00 2001 From: caojiale1 Date: Tue, 15 Aug 2023 16:17:24 +0800 Subject: [PATCH 1/2] Signed-off-by caojiale1 caojiale1@huawei.com Signed-off-by: caojiale1 --- src/core/command/run.py | 7 +++++++ src/core/driver/drivers.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/core/command/run.py b/src/core/command/run.py index 20bb93f..9fd8bf4 100644 --- a/src/core/command/run.py +++ b/src/core/command/run.py @@ -17,6 +17,7 @@ # import platform import random +import shutil import subprocess from pydoc import classname import time @@ -298,6 +299,12 @@ class Run(object): del self.history_cmd_list[0] self.history_cmd_list.append(cmd_record) print("-------------run end: ", self.history_cmd_list) + if "fuzztest" == options.testtype[0] and options.coverage is False: + report = get_plugin(plugin_type=Plugin.REPORTER, plugin_id="ALL")[0] + latest_corpus_path = os.path.join(sys.framework_root_dir, "reports", "latest_corpus") + if os.path.exists(latest_corpus_path): + shutil.rmtree(latest_corpus_path) + shutil.copytree(os.path.join(report.report_path, "result"), latest_corpus_path) if options.coverage and platform.system() != "Windows": pull_service_gcov_path = os.path.join( sys.framework_root_dir, "localCoverage/resident_service/pull_service_gcda.py") diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index f77f8b8..001f274 100644 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -697,7 +697,9 @@ class CppTestDriver(IDriver): f.writelines(lines) def _push_corpus_cov_if_exist(self, suite_file): - cov_file = suite_file + "_corpus.tar.gz" + corpus_path = suite_file.split("fuzztest")[-1].strip(os.sep) + cov_file = os.path.join( + sys.framework_root_dir, "reports", "latest_corpus", corpus_path + "_corpus.tar.gz") LOG.info("corpus_cov file :%s" % str(cov_file)) self.config.device.push_file(cov_file, os.path.join(self.config.target_test_path)) -- Gitee From 0a37e95e557f9fbfa7702f0729cfefeedcc2a11a Mon Sep 17 00:00:00 2001 From: caojiale1 Date: Fri, 18 Aug 2023 16:27:53 +0800 Subject: [PATCH 2/2] Signed-off-by caojiale1 caojiale1@huawei.com Signed-off-by: caojiale1 --- OAT.xml | 2 +- README.md | 12 +++++----- README_zh.md | 24 +++++++++---------- aw/cxx/hwext/BUILD.gn | 2 +- bundle.json | 6 ++--- .../unittest/common/get_app_info/BUILD.gn | 2 +- .../test/benchmarktest/common/BUILD.gn | 2 +- .../common/calculator_fuzzer/BUILD.gn | 2 +- .../calculator/test/unittest/common/BUILD.gn | 2 +- .../calculator/test/unittest/phone/BUILD.gn | 2 +- .../detector/test/unittest/common/BUILD.gn | 2 +- examples/distributedb/test/BUILD.gn | 2 +- .../sleep/test/performance/common/BUILD.gn | 2 +- .../actsbundlemanagerstagetest/BUILD.gn | 2 +- libs/benchmark/README_zh.md | 4 ++-- libs/fuzzlib/README_zh.md | 20 ++++++++-------- src/core/command/display.py | 2 +- src/core/command/gen.py | 2 +- src/core/config/config_manager.py | 14 +++++------ src/core/driver/drivers.py | 2 +- src/main/_init_global_config.py | 14 +++++------ 21 files changed, 61 insertions(+), 61 deletions(-) diff --git a/OAT.xml b/OAT.xml index c3d50c7..5e287fa 100644 --- a/OAT.xml +++ b/OAT.xml @@ -29,7 +29,7 @@ - + diff --git a/README.md b/README.md index c62b162..c85821d 100755 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This module allows you to develop new test cases for new features, or modify exi ## Directory Structure ``` -developertest/ +developer_test/ ├── aw # Static libraries of the test framework │ ├── cxx # C++ libraries │ └── python # Python libraries @@ -157,7 +157,7 @@ The Python environment is required. ``` -- Configure the developers test module in the configuration file **developertest/config/user\_config.xml**. +- Configure the developers test module in the configuration file **developer_test/config/user\_config.xml**. 1. Modify basic configuration parameters of the test framework. \[build\] \# Configure build parameters of the test case. @@ -206,7 +206,7 @@ The Python environment is required. ``` -- \(Optional\) Modify the configuration file **config/user\_config.xml** of the **developertest** module. If a test case has been compiled, specify the compilation output directory of the test case. In this case, the test platform will not recompile the test case. +- \(Optional\) Modify the configuration file **config/user\_config.xml** of the **developer_test** module. If a test case has been compiled, specify the compilation output directory of the test case. In this case, the test platform will not recompile the test case. 1. Specify the output directory of the test case, that is, the compilation output directory between the **** tags. ``` @@ -232,7 +232,7 @@ The Python environment is required. - An empty directory is created on the development host for mounting test cases through the NFS, and the NFS service is started properly. - Run test suites. - - Start the test framework and go to the **test/developertest** directory. + - Start the test framework and go to the **test/developer_test** directory. 1. Run the following command to start the test framework in Windows. ``` @@ -248,7 +248,7 @@ The Python environment is required. - Select a device form. - Configure device forms based on the actual development board, for example, **developertest/config/framework\_config.xml**. + Configure device forms based on the actual development board, for example, **developer_test/config/framework\_config.xml**. - Run test commands. 1. To query the subsystems, modules, product forms, and test types supported by test cases, run the **show** commands. @@ -358,6 +358,6 @@ The Python environment is required. [testing subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/test.md) -**test\_developertest** +**test\_developer_test** [test\_xdevice](https://gitee.com/openharmony/testfwk_xdevice/blob/master/README.md) diff --git a/README_zh.md b/README_zh.md index 7b06b19..b18822d 100755 --- a/README_zh.md +++ b/README_zh.md @@ -1,5 +1,5 @@ # 开发自测试执行框架 -OpenHarmony为开发者提供了一套全面的开发自测试框架OHA-developertest,开发者可根据测试需求开发相关测试用例,开发阶段提前发现缺陷,大幅提高代码质量。 +OpenHarmony为开发者提供了一套全面的开发自测试框架OHA-developer_test,开发者可根据测试需求开发相关测试用例,开发阶段提前发现缺陷,大幅提高代码质量。 本文从基础环境构建,用例开发,编译以及执行等方面介绍OpenHarmony开发自测试执行框架如何运行和使用。 ## 基础环境构建 @@ -13,7 +13,7 @@ OpenHarmony为开发者提供了一套全面的开发自测试框架OHA-develope 以下是开发自测试框架的目录层级架构,在使用开发自测试框架过程中可在相应目录查找对应组件。 ``` test # 测试子系统 -├── developertest # 开发者自测试框架 +├── developer_test # 开发者自测试框架 │ ├── aw # 测试框架的静态库 │ ├── config # 测试框架配置 │ │ │ ... @@ -549,7 +549,7 @@ subsystem # 子系统 import("//build/test.gni") - module_output_path = "developertest/calculator" + module_output_path = "developer_test/calculator" config("module_private_config") { visibility = [ ":*" ] @@ -589,7 +589,7 @@ subsystem # 子系统 ``` 3. 指定文件输出路径 ``` - module_output_path = "developertest/calculator" + module_output_path = "developer_test/calculator" ``` > **说明:** 此处输出路径为部件/模块名。 @@ -653,13 +653,13 @@ subsystem # 子系统 import("//build/test.gni") - module_output_path = "developertest/app_info" + module_output_path = "developer_test/app_info" ohos_js_unittest("GetAppInfoJsTest") { module_out_path = module_output_path hap_profile = "./config.json" - certificate_profile = "//test/developertest/signature/openharmony_sx.p7b" + certificate_profile = "//test/developer_test/signature/openharmony_sx.p7b" } group("unittest") { @@ -683,7 +683,7 @@ subsystem # 子系统 3. 指定文件输出路径 ``` - module_output_path = "developertest/app_info" + module_output_path = "developer_test/app_info" ``` > **说明:** 此处输出路径为部件/模块名。 @@ -704,7 +704,7 @@ subsystem # 子系统 module_out_path = module_output_path hap_profile = "./config.json" - certificate_profile = "//test/developertest/signature/openharmony_sx.p7b" + certificate_profile = "//test/developer_test/signature/openharmony_sx.p7b" } ``` config.json为hap编译所需配置文件,需要开发者根据被测sdk版本配置“target”项,其余项可默认,具体如下所示: @@ -786,7 +786,7 @@ subsystem # 子系统 import("//build/test.gni") - want_output_path = "developertest/stage_test" + want_output_path = "developer_test/stage_test" ohos_js_stage_unittest("ActsBundleMgrStageEtsTest") { hap_profile = "entry/src/main/module.json" @@ -797,7 +797,7 @@ subsystem # 子系统 ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" hap_name = "ActsBundleMgrStageEtsTest" - subsystem_name = "developertest" + subsystem_name = "developer_test" part_name = "stage_test" // 部件名称 module_out_path = want_output_path // 必须定义输出路径 } @@ -951,7 +951,7 @@ subsystem # 子系统 ##### 搭建执行环境 1. 在Windows环境创建测试框架目录Test,并在此目录下创建testcase目录 -2. 从Linux环境拷贝测试框架developertest和xdevice到创建的Test目录下,拷贝编译好的测试用例到testcase目录下 +2. 从Linux环境拷贝测试框架developer_test和xdevice到创建的Test目录下,拷贝编译好的测试用例到testcase目录下 >**说明:** 将测试框架及测试用例从Linux环境移植到Windows环境,以便后续执行。 @@ -1144,7 +1144,7 @@ subsystem # 子系统 #### 测试结果 测试结果输出根路径如下: ``` -test/developertest/reports/xxxx_xx_xx_xx_xx_xx +test/developer_test/reports/xxxx_xx_xx_xx_xx_xx ``` >**说明:** 测试报告文件目录将自动生成。 diff --git a/aw/cxx/hwext/BUILD.gn b/aw/cxx/hwext/BUILD.gn index 1bbd952..cfef1a3 100755 --- a/aw/cxx/hwext/BUILD.gn +++ b/aw/cxx/hwext/BUILD.gn @@ -27,6 +27,6 @@ ohos_static_library("performance_test_static") { public_deps = [ "//third_party/libxml2:libxml2" ] public_configs = [ ":performance_test_config" ] subsystem_name = "testfwk" - part_name = "developertest" + part_name = "developer_test" external_deps = [ "c_utils:utils" ] } diff --git a/bundle.json b/bundle.json index feadc86..7fc0ea5 100644 --- a/bundle.json +++ b/bundle.json @@ -1,7 +1,7 @@ { - "name": "@openharmony/developertest", + "name": "@openharmony/developer_test", "version": "3.1.0", - "description": "developertest", + "description": "developer_test", "license": "Apache License 2.0", "publishAs": "code-segment", "segment": { @@ -11,7 +11,7 @@ "repository": "", "dirs": {}, "component": { - "name": "developertest", + "name": "developer_test", "subsystem": "testfwk", "features" :[], "adapted_system_type": [ "standard" ], diff --git a/examples/app_info/test/unittest/common/get_app_info/BUILD.gn b/examples/app_info/test/unittest/common/get_app_info/BUILD.gn index 0fe4d7f..0d8926c 100644 --- a/examples/app_info/test/unittest/common/get_app_info/BUILD.gn +++ b/examples/app_info/test/unittest/common/get_app_info/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/app_info" +module_output_path = "developer_test/app_info" ohos_js_unittest("GetAppInfoJsTest") { module_out_path = module_output_path diff --git a/examples/calculator/test/benchmarktest/common/BUILD.gn b/examples/calculator/test/benchmarktest/common/BUILD.gn index fe9146b..a98770e 100644 --- a/examples/calculator/test/benchmarktest/common/BUILD.gn +++ b/examples/calculator/test/benchmarktest/common/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/calculator" +module_output_path = "developer_test/calculator" ohos_benchmarktest("BenchmarkDemoTest") { module_out_path = module_output_path diff --git a/examples/calculator/test/fuzztest/common/calculator_fuzzer/BUILD.gn b/examples/calculator/test/fuzztest/common/calculator_fuzzer/BUILD.gn index 14857c6..607afb5 100644 --- a/examples/calculator/test/fuzztest/common/calculator_fuzzer/BUILD.gn +++ b/examples/calculator/test/fuzztest/common/calculator_fuzzer/BUILD.gn @@ -14,7 +14,7 @@ import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "developertest/calculator" +module_output_path = "developer_test/calculator" ##############################fuzztest########################################## ohos_fuzztest("CalculatorFuzzTest") { diff --git a/examples/calculator/test/unittest/common/BUILD.gn b/examples/calculator/test/unittest/common/BUILD.gn index 676bfbd..d5757eb 100755 --- a/examples/calculator/test/unittest/common/BUILD.gn +++ b/examples/calculator/test/unittest/common/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/calculator" +module_output_path = "developer_test/calculator" ############################################################################### config("module_private_config") { diff --git a/examples/calculator/test/unittest/phone/BUILD.gn b/examples/calculator/test/unittest/phone/BUILD.gn index 3191954..644f34f 100755 --- a/examples/calculator/test/unittest/phone/BUILD.gn +++ b/examples/calculator/test/unittest/phone/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/calculator" +module_output_path = "developer_test/calculator" ############################################################################### config("module_private_config") { diff --git a/examples/detector/test/unittest/common/BUILD.gn b/examples/detector/test/unittest/common/BUILD.gn index 16c1a8e..1bb92c9 100755 --- a/examples/detector/test/unittest/common/BUILD.gn +++ b/examples/detector/test/unittest/common/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/detector" +module_output_path = "developer_test/detector" ############################################################################### config("module_private_config") { diff --git a/examples/distributedb/test/BUILD.gn b/examples/distributedb/test/BUILD.gn index 8c86f10..9d2af23 100644 --- a/examples/distributedb/test/BUILD.gn +++ b/examples/distributedb/test/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/distributedb" +module_output_path = "developer_test/distributedb" ############################################################################### config("module_private_config") { diff --git a/examples/sleep/test/performance/common/BUILD.gn b/examples/sleep/test/performance/common/BUILD.gn index bdb4bff..36bd4cf 100755 --- a/examples/sleep/test/performance/common/BUILD.gn +++ b/examples/sleep/test/performance/common/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "developertest/sleep" +module_output_path = "developer_test/sleep" ############################################################################### config("module_private_config") { diff --git a/examples/stagetest/actsbundlemanagerstagetest/BUILD.gn b/examples/stagetest/actsbundlemanagerstagetest/BUILD.gn index 13e2384..db5268e 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/BUILD.gn +++ b/examples/stagetest/actsbundlemanagerstagetest/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -want_output_path = "developertest/stage_test" +want_output_path = "developer_test/stage_test" ohos_js_stage_unittest("ActsBundleMgrStageEtsTest") { hap_profile = "entry/src/main/module.json" diff --git a/libs/benchmark/README_zh.md b/libs/benchmark/README_zh.md index 224d1b1..b47e257 100644 --- a/libs/benchmark/README_zh.md +++ b/libs/benchmark/README_zh.md @@ -263,7 +263,7 @@ BENCHMARK_MAIN(); import("//build/test.gni") -module_output_path = "developertest/calculator" +module_output_path = "developer_test/calculator" ohos_benchmarktest("BenchmarkDemoTest") { module_out_path = module_output_path @@ -309,7 +309,7 @@ group("benchmarktest") { 3. 指定文件输出路径 ``` - module_output_path = "developertest/calculator" + module_output_path = "developer_test/calculator" ``` > **说明:** 此处输出路径为部件/模块名。 diff --git a/libs/fuzzlib/README_zh.md b/libs/fuzzlib/README_zh.md index e08f8fe..935c2dc 100644 --- a/libs/fuzzlib/README_zh.md +++ b/libs/fuzzlib/README_zh.md @@ -36,7 +36,7 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or ### 配置启动测试框架 -参考[ 开发者测试组件](https://gitee.com/openharmony/test_developertest/blob/master/README_zh.md)中的描述完成测试框架安装、设备连接配置,并在linux环境下通过 +参考[ 开发者测试组件](https://gitee.com/openharmony/testfwk_developer_test/blob/master/README_zh.md)中的描述完成测试框架安装、设备连接配置,并在linux环境下通过 ``` ./start.sh @@ -77,10 +77,10 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or 3. gen命令示例,-t、-fn和-dp均为必选项 ``` - gen -t FUZZ -fn calculator_fuzzer -dp test/developertest/example/calculator/test/fuzztest/common + gen -t FUZZ -fn calculator_fuzzer -dp test/developer_test/example/calculator/test/fuzztest/common ``` - 执行完毕后会在test/developertest/example/calculator/test/fuzztest/common目录下生成一个Fuzz用例demo。 + 执行完毕后会在test/developer_test/example/calculator/test/fuzztest/common目录下生成一个Fuzz用例demo。 @@ -149,7 +149,7 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or ``` ohos_fuzztest("CalculatorFuzzTest") { #定义测试套名称CalculatorFuzzTest module_out_path = module_output_path - fuzz_config_file = "//test/developertest/examples/calculator/test/fuzztest/common/calculator_fuzzer" + fuzz_config_file = "//test/developer_test/examples/calculator/test/fuzztest/common/calculator_fuzzer" include_dirs = [] cflags = [ "-g", @@ -202,11 +202,11 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or ``` "tests": [ - "//test/developertest/examples/calculator/test:unittest", - "//test/developertest/examples/calculator/test:fuzztest", #添加DTFuzz用例路径 - "//test/developertest/examples/detector/test:unittest", - "//test/developertest/examples/sleep/test:performance", - "//test/developertest/examples/distributedb/test:distributedtest" + "//test/developer_test/examples/calculator/test:unittest", + "//test/developer_test/examples/calculator/test:fuzztest", #添加DTFuzz用例路径 + "//test/developer_test/examples/detector/test:unittest", + "//test/developer_test/examples/sleep/test:performance", + "//test/developer_test/examples/distributedb/test:distributedtest" ] ``` @@ -228,7 +228,7 @@ Fuzzing测试框架使用了LLVM编译器框架中的[libFuzzer](https://llvm.or Fuzz能力集成,在测试类型-t中新增FUZZ类型,执行Fuzz测试指令示例,其中-t为必选,-ss和-tm为可选 ``` -run -t FUZZ -ss developertest -tm calculator +run -t FUZZ -ss developer_test -tm calculator ``` | 参数 | 描述 | 说明 | 备注 | diff --git a/src/core/command/display.py b/src/core/command/display.py index c0ce5db..3c79b87 100644 --- a/src/core/command/display.py +++ b/src/core/command/display.py @@ -70,7 +70,7 @@ CMD_KEY_SUBSYSTEMLIST_ACTS = "actssubsystemlist" # hats子系统名称列表 CMD_KEY_SUBSYSTEMLIST_HATS = "hatssubsystemlist" -TOOL_VERSION_INFO = """Welcome to DeveloperTest V3.2.2.0 +TOOL_VERSION_INFO = """Welcome to developer_test V3.2.2.0 """ HLEP_COMMAND_INFOMATION = """use help [follow command] for more information: diff --git a/src/core/command/gen.py b/src/core/command/gen.py index 4bc0fee..0840c26 100644 --- a/src/core/command/gen.py +++ b/src/core/command/gen.py @@ -38,7 +38,7 @@ class Gen(object): def gen_fuzzer_list_file(self, fuzzer_list): filepath = os.path.join(sys.source_code_root_path, "test", - "developertest", "libs", "fuzzlib", "fuzzer_list.txt") + "developer_test", "libs", "fuzzlib", "fuzzer_list.txt") LOG.info("The fuzzer list file path: %s" % filepath) with open(filepath, "w") as gn_file: gn_file.truncate(0) diff --git a/src/core/config/config_manager.py b/src/core/config/config_manager.py index 7f05543..1340a59 100755 --- a/src/core/config/config_manager.py +++ b/src/core/config/config_manager.py @@ -25,8 +25,8 @@ from core.constants import ConfigFileConst LOG = platform_logger("config_manager") -# 变量注释 framework_res_dir = OpenHarmony/test/developertest -# 变量注释 CONFIG_PATH = OpenHarmony/test/developertest/config +# 变量注释 framework_res_dir = OpenHarmony/test/developer_test +# 变量注释 CONFIG_PATH = OpenHarmony/test/developer_test/config CONFIG_PATH = os.path.join(sys.framework_res_dir, "config") @@ -36,7 +36,7 @@ class FrameworkConfigManager(object): def __init__(self, filepath=""): if filepath == "": - # 变量注释 filepath = OpenHarmony/test/developertest/config/framework_config.xml + # 变量注释 filepath = OpenHarmony/test/developer_test/config/framework_config.xml self.filepath = os.path.abspath(os.path.join( CONFIG_PATH, ConfigFileConst.FRAMECONFIG_FILEPATH)) else: @@ -96,7 +96,7 @@ class FilterConfigManager(object): def __init__(self, filepath=""): if filepath == "": - # 变量注释 filepath = OpenHarmony/test/developertest/config/filter_config.xml + # 变量注释 filepath = OpenHarmony/test/developer_test/config/filter_config.xml self.filepath = os.path.abspath( os.path.join(CONFIG_PATH, ConfigFileConst.FILTERCONFIG_FILEPATH)) @@ -165,7 +165,7 @@ class UserConfigManager(object): def __init__(self, config_file=""): if config_file == "": - # 变量注释 filepath = OpenHarmony/test/developertest/config/user_config.xml + # 变量注释 filepath = OpenHarmony/test/developer_test/config/user_config.xml self.filepath = os.path.abspath(os.path.join( CONFIG_PATH, ConfigFileConst.USERCONFIG_FILEPATH)) else: @@ -286,7 +286,7 @@ class BuildConfigManager(object): def __init__(self, filepath=""): if filepath == "": - # 变量注释 filepath = OpenHarmony/test/developertest/config/build_config.xml + # 变量注释 filepath = OpenHarmony/test/developer_test/config/build_config.xml self.filepath = os.path.abspath(os.path.join( CONFIG_PATH, ConfigFileConst.BUILDCONFIG_FILEPATH)) else: @@ -315,7 +315,7 @@ class FuzzerConfigManager(object): def __init__(self, config_path=""): if config_path == "": - # 变量注释 filepath = OpenHarmony/test/developertest/config/fuzz_config.xml + # 变量注释 filepath = OpenHarmony/test/developer_test/config/fuzz_config.xml self.filepath = self.filepath = os.path.abspath(os.path.join( CONFIG_PATH, ConfigFileConst.FUZZCONFIG_FILEPATH)) else: diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index 001f274..8119bbc 100644 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -806,7 +806,7 @@ class JSUnitTestDriver(IDriver): def __execute__(self, request): try: - LOG.info("developertest driver") + LOG.info("developer_test driver") self.config = request.config self.config.target_test_path = DEFAULT_TEST_PATH self.config.device = request.config.environment.devices[0] diff --git a/src/main/_init_global_config.py b/src/main/_init_global_config.py index 7dddbf5..ca81577 100755 --- a/src/main/_init_global_config.py +++ b/src/main/_init_global_config.py @@ -23,7 +23,7 @@ def _init_global_config(): # insert src path for loading xdevice modules # 当前脚本运行的绝对路径 去掉最后两个路径 - # 变量注释 framework_src_dir = OpenHarmony/test/developertest + # 变量注释 framework_src_dir = OpenHarmony/test/developer_test sys.framework_src_dir = os.path.abspath(os.path.dirname( os.path.dirname(__file__))) @@ -31,7 +31,7 @@ def _init_global_config(): sys.path.insert(0, sys.framework_src_dir) # 当前脚本运行的绝对路径 去掉最后两个路径 - # 变量注释 framework_root_dir = OpenHarmony/test/developertest + # 变量注释 framework_root_dir = OpenHarmony/test/developer_test sys.framework_root_dir = os.path.abspath(os.path.dirname( os.path.dirname(os.path.dirname(__file__)))) @@ -53,14 +53,14 @@ def _init_global_config(): "src")) sys.path.insert(1, sys.xdevice_extension_dir) - # 变量注释 pytest_dir = OpenHarmony/test/developertest/aw/python + # 变量注释 pytest_dir = OpenHarmony/test/developer_test/aw/python sys.pytest_dir = os.path.abspath(os.path.join( sys.framework_root_dir, "aw", "python")) sys.path.insert(2, sys.pytest_dir) - # 变量注释 adapter_dir = OpenHarmony/test/developertest/adapter/aw/python + # 变量注释 adapter_dir = OpenHarmony/test/developer_test/adapter/aw/python sys.adapter_dir = os.path.abspath(os.path.join( sys.framework_root_dir, "adapter" @@ -68,16 +68,16 @@ def _init_global_config(): "python")) sys.path.insert(3, sys.adapter_dir) - # 变量注释 hmh_script = OpenHarmony/test/developertest/libs + # 变量注释 hmh_script = OpenHarmony/test/developer_test/libs sys.hmh_script = os.path.abspath(os.path.join( sys.framework_root_dir, "libs")) sys.path.insert(4, sys.hmh_script) - # 变量注释 framework_res_dir = OpenHarmony/test/developertest + # 变量注释 framework_res_dir = OpenHarmony/test/developer_test sys.framework_res_dir = sys.framework_root_dir - # 变量注释 exec_dir = OpenHarmony/test/developertest + # 变量注释 exec_dir = OpenHarmony/test/developer_test sys.exec_dir = sys.framework_root_dir from core.common import get_source_code_root_path -- Gitee