diff --git a/OAT.xml b/OAT.xml index c3d50c7672bba7e8a8c2c479ecd0205a96e5c1d2..5e287faf8b0f13abe93beb55c8e3cf0ba240c587 100644 --- a/OAT.xml +++ b/OAT.xml @@ -29,7 +29,7 @@ - + diff --git a/README.md b/README.md index c62b16228268987eee9392b0e97a1aaf18dbe4e1..c85821df1404ab38ea465d0e29c9d876fe8aa054 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 7b06b190adb47cc537c333a9cf5ee2f0ef51138e..b18822df96a9e80dd9235f8e801daecc941652f0 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 1bbd95290c7355f9170d683a1c9996350cc17c91..cfef1a33614076a52183fa0c850eb59959548e69 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 feadc864670c27e0947aa8dc3c8b945e9bea6743..7fc0ea5a23b1b27300bb2af779c4a6f020a0c91f 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 0fe4d7f497055859a201be7f5e4f9562cc624552..0d8926c6fd2443282a8af8702ab2d903ea55da03 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 fe9146b7f0b7de8bba08d7df34fba81a5f5c3113..a98770e37c43f084e8cf34d09d1d28f58f8457e9 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 14857c6d62ea12a7b09d6362d7ba590b947c0bd9..607afb53ba6e7df0b1e1875c6b0485be30814158 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 676bfbd45f27692eec79a6ecd92f0d2e92205264..d5757ebf54ac39b10c3ee49b65990328e075e340 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 3191954ee37249bfa1f53ee7275a1e5b1208aa81..644f34f98325334858b550dfa7004b09ffafeb1f 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 16c1a8e72c198dae3b0367575a5e1995f8e15d3f..1bb92c9c53c347af53963b3e877e6a85691191d8 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 8c86f10e997fea3607108653e878ace701142cb2..9d2af231b9fc688b4083eec8e52d4a40b0ff00d9 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 bdb4bffc3321aea95380c2255c70e1a34487cd60..36bd4cfc5040a8adee3ecbabfb6bd8c973ff91e0 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 13e23843bdbc0ad9155b24b52d8f3804c7ecb72b..db5268e5354eedc56043d2acaf2c73064915ff64 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 224d1b1e04f88cbd758f2faf7d38c76ad223f2af..b47e2572cebabf48a55d376ed8ad89a6704e0124 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 e08f8fe4406b297d106fe21523050cede9f7e077..935c2dcbb331cf790f10bf6ead6ad66fbb4419f5 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 c0ce5dbf27b992ce23ff89af37491f0025d96190..3c79b87811b85d7d8b0f5baa2ae03507b0b1c42f 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 4bc0fee92cdda6edadb5b1d5c03001d387d80931..0840c26403c5bcab360df838fda27bfe76e17120 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/command/run.py b/src/core/command/run.py index 20bb93f83bcbefd7fa3fc13de39e261d69042ccb..9fd8bf46c4f9855feaeedf005c33ce0afe5197e0 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/config/config_manager.py b/src/core/config/config_manager.py index 7f0554322f7c0d85e628cd9569e963a1805b9fe4..1340a5914c7780ef476e15331bcb860343c1ed05 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 f77f8b8ed2d4e420ce70622b96139c8354381729..8119bbce859edf871cc798cec29d7afd6324107a 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)) @@ -804,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 7dddbf5a13a0a5915a4aa76c00abb88cbe707cee..ca81577ba6237f34dda7e645da1ff8c40f0ed47a 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