From 6140b436c375ca27e9229836fe9a664f1a27d088 Mon Sep 17 00:00:00 2001 From: ry Date: Tue, 13 Sep 2022 21:49:11 +0800 Subject: [PATCH 1/2] modify code path Signed-off-by: ry --- bundle.json | 22 +++++++++---------- .../unittest/common/get_app_info/BUILD.gn | 2 +- .../detector/test/unittest/common/BUILD.gn | 2 +- examples/distributedb/test/BUILD.gn | 6 ++--- examples/lite/c_demo/source/BUILD.gn | 2 +- .../lite/c_demo/test/unittest/common/BUILD.gn | 4 ++-- .../sleep/test/performance/common/BUILD.gn | 2 +- libs/fuzzlib/fuzzer_helper.py | 2 +- src/core/build/build_manager.py | 5 +++-- src/core/constants.py | 2 +- 10 files changed, 25 insertions(+), 24 deletions(-) diff --git a/bundle.json b/bundle.json index 678ab5f..5dcd4b8 100644 --- a/bundle.json +++ b/bundle.json @@ -17,20 +17,20 @@ "deps": {}, "build": { "sub_component": [ - "//test/developertest/examples/app_info:app_info", - "//test/developertest/examples/detector:detector", - "//test/developertest/examples/calculator:calculator", - "//test/developertest/examples/calculator:calculator_static" + "//test/testfwk/developer_test/examples/app_info:app_info", + "//test/testfwk/developer_test/examples/detector:detector", + "//test/testfwk/developer_test/examples/calculator:calculator", + "//test/testfwk/developer_test/examples/calculator:calculator_static" ], "inner_kits": [], "test": [ - "//test/developertest/examples/app_info/test:unittest", - "//test/developertest/examples/calculator/test:unittest", - "//test/developertest/examples/calculator/test:fuzztest", - "//test/developertest/examples/calculator/test:benchmarktest", - "//test/developertest/examples/detector/test:unittest", - "//test/developertest/examples/sleep/test:performance", - "//test/developertest/examples/distributedb/test:distributedtest" + "//test/testfwk/developer_test/examples/app_info/test:unittest", + "//test/testfwk/developer_test/examples/calculator/test:unittest", + "//test/testfwk/developer_test/examples/calculator/test:fuzztest", + "//test/testfwk/developer_test/examples/calculator/test:benchmarktest", + "//test/testfwk/developer_test/examples/detector/test:unittest", + "//test/testfwk/developer_test/examples/sleep/test:performance", + "//test/testfwk/developer_test/examples/distributedb/test:distributedtest" ] } } 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 3965ed3..398f482 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 @@ -19,7 +19,7 @@ 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/testfwk/developer_test/signature/openharmony_sx.p7b" } group("unittest") { diff --git a/examples/detector/test/unittest/common/BUILD.gn b/examples/detector/test/unittest/common/BUILD.gn index 7a30719..16c1a8e 100755 --- a/examples/detector/test/unittest/common/BUILD.gn +++ b/examples/detector/test/unittest/common/BUILD.gn @@ -31,7 +31,7 @@ ohos_unittest("DetectorDependTest") { configs = [ ":module_private_config" ] deps = [ - "//test/developertest/examples/detector:detector", + "//test/testfwk/developer_test/examples/detector:detector", "//third_party/googletest:gtest_main", ] } diff --git a/examples/distributedb/test/BUILD.gn b/examples/distributedb/test/BUILD.gn index 4d6f7ba..998fc5f 100755 --- a/examples/distributedb/test/BUILD.gn +++ b/examples/distributedb/test/BUILD.gn @@ -26,7 +26,7 @@ config("module_private_config") { "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/app_distributeddata/include", "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/include", - "//test/developertest/aw/distributed", + "//test/testfwk/developer_test/aw/distributed", ] # link library @@ -39,7 +39,7 @@ config("module_private_config") { ohos_distributedtest("DistributeDemo") { module_out_path = module_output_path - sources = [ "//test/developertest/examples/distributedb/test/distributedtest/common/distribute_demo.cpp" ] + sources = [ "//test/testfwk/developer_test/examples/distributedb/test/distributedtest/common/distribute_demo.cpp" ] configs = [ ":module_private_config" ] @@ -61,7 +61,7 @@ ohos_distributedtest("DistributeDemo") { ohos_distributedtest("DistributeDemoAgent") { module_out_path = module_output_path - sources = [ "//test/developertest/examples/distributedb/test/distributedtest/common/distribute_demo_agent.cpp" ] + sources = [ "//test/testfwk/developer_test/examples/distributedb/test/distributedtest/common/distribute_demo_agent.cpp" ] configs = [ ":module_private_config" ] diff --git a/examples/lite/c_demo/source/BUILD.gn b/examples/lite/c_demo/source/BUILD.gn index 1d3e8a8..62a88f8 100755 --- a/examples/lite/c_demo/source/BUILD.gn +++ b/examples/lite/c_demo/source/BUILD.gn @@ -13,5 +13,5 @@ source_set("calc_multi_demo") { sources = [ "calc_multi.c" ] - include_dirs = [ "//test/developertest/example/c_demo/include" ] + include_dirs = [ "//test/testfwk/developer_test/example/c_demo/include" ] } diff --git a/examples/lite/c_demo/test/unittest/common/BUILD.gn b/examples/lite/c_demo/test/unittest/common/BUILD.gn index d9a50ea..20b0b44 100755 --- a/examples/lite/c_demo/test/unittest/common/BUILD.gn +++ b/examples/lite/c_demo/test/unittest/common/BUILD.gn @@ -14,10 +14,10 @@ import("//build/lite/config/test.gni") unittest("CalcMultiTest") { - include_dirs = [ "//test/developertest/example/c_demo/include" ] + include_dirs = [ "//test/testfwk/developer_test/example/c_demo/include" ] sources = [ "calc_multi_test.c" ] configs = [] - deps = [ "//test/developertest/example/c_demo/source:calc_multi_demo" ] + deps = [ "//test/testfwk/developer_test/example/c_demo/source:calc_multi_demo" ] } ############################################################################### diff --git a/examples/sleep/test/performance/common/BUILD.gn b/examples/sleep/test/performance/common/BUILD.gn index 163912b..bdb4bff 100755 --- a/examples/sleep/test/performance/common/BUILD.gn +++ b/examples/sleep/test/performance/common/BUILD.gn @@ -33,7 +33,7 @@ ohos_performancetest("SpentTimeTest") { configs = [ ":module_private_config" ] deps = [ - "//test/developertest/aw/cxx/hwext:performance_test_static", + "//test/testfwk/developer_test/aw/cxx/hwext:performance_test_static", "//third_party/googletest:gtest_main", ] } diff --git a/libs/fuzzlib/fuzzer_helper.py b/libs/fuzzlib/fuzzer_helper.py index aba2656..df633f0 100644 --- a/libs/fuzzlib/fuzzer_helper.py +++ b/libs/fuzzlib/fuzzer_helper.py @@ -48,7 +48,7 @@ SOURCE_OUT_DIR = os.path.join(SOURCE_ROOT_DIR, "out") TDD_BUILD_GN_PATH = os.path.join( SOURCE_ROOT_DIR, - "test/developertest/BUILD.gn" + "test/testfwk/developer_test/BUILD.gn" ) ###project name must end with _fuzzer. eg. my_fuzzer,extrator_fuzzer. VALID_PROJECT_NAME_REGEX = re.compile(r'^[a-zA-Z0-9_-]+(_fuzzer)+$') diff --git a/src/core/build/build_manager.py b/src/core/build/build_manager.py index 00bce49..a2db0b1 100755 --- a/src/core/build/build_manager.py +++ b/src/core/build/build_manager.py @@ -121,10 +121,11 @@ class BuildManager(object): LOG.warning("No build target found.") return False - # 路径拼接 build_cfg_filepath = OpenHarmony/test/developertest/BUILD.gn + # 路径拼接 build_cfg_filepath = OpenHarmony/test/testfwk/developer_test/BUILD.gn build_cfg_filepath = os.path.join(project_root_path, "test", - "developertest", + "testfwk", + "developer_test", "BUILD.gn") self._make_gn_file(build_cfg_filepath, target_list) diff --git a/src/core/constants.py b/src/core/constants.py index 0ff7e5d..ffb0ff3 100755 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -104,7 +104,7 @@ ohos_js_unittest("%(suite_name)s") { ":%(suite_name)s_resources", ] - certificate_profile = "//test/developertest/signature/openharmony_sx.p7b" + certificate_profile = "//test/testfwk/developer_test/signature/openharmony_sx.p7b" hap_name = "%(suite_name)s" } ohos_js_assets("%(suite_name)s_js_assets") { -- Gitee From 8527300eeb3947602234be89c79b3db96cd6d08f Mon Sep 17 00:00:00 2001 From: ry Date: Wed, 14 Sep 2022 11:44:37 +0800 Subject: [PATCH 2/2] modify code path Signed-off-by: ry --- examples/app_info/test/unittest/common/get_app_info/BUILD.gn | 3 ++- examples/lite/c_demo/test/unittest/common/BUILD.gn | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 398f482..0fe4d7f 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 @@ -19,7 +19,8 @@ ohos_js_unittest("GetAppInfoJsTest") { module_out_path = module_output_path hap_profile = "./config.json" - certificate_profile = "//test/testfwk/developer_test/signature/openharmony_sx.p7b" + certificate_profile = + "//test/testfwk/developer_test/signature/openharmony_sx.p7b" } group("unittest") { diff --git a/examples/lite/c_demo/test/unittest/common/BUILD.gn b/examples/lite/c_demo/test/unittest/common/BUILD.gn index 20b0b44..f61f873 100755 --- a/examples/lite/c_demo/test/unittest/common/BUILD.gn +++ b/examples/lite/c_demo/test/unittest/common/BUILD.gn @@ -17,7 +17,8 @@ unittest("CalcMultiTest") { include_dirs = [ "//test/testfwk/developer_test/example/c_demo/include" ] sources = [ "calc_multi_test.c" ] configs = [] - deps = [ "//test/testfwk/developer_test/example/c_demo/source:calc_multi_demo" ] + deps = + [ "//test/testfwk/developer_test/example/c_demo/source:calc_multi_demo" ] } ############################################################################### -- Gitee