From b7cd3a32c00274fa0fff4e49feb344d0c55943ae Mon Sep 17 00:00:00 2001 From: "@chuangda_1" Date: Fri, 24 Feb 2023 12:57:42 +0800 Subject: [PATCH] modify gn format 0224 Signed-off-by: @chuangda_1 --- README_ZH.md | 6 ------ frameworks/innerkitsimpl/BUILD.gn | 12 ++++++------ frameworks/kits/extension/BUILD.gn | 8 ++++---- .../kits/extension/src/js_print_extension.cpp | 2 +- interfaces/kits/napi/BUILD.gn | 2 +- print.gni | 11 +++++------ services/BUILD.gn | 2 +- test/unittest/fwk_inner_napi_test/BUILD.gn | 14 +++++++------- .../fwk_inner_napi_test/print_job_test.cpp | 10 +++++----- 9 files changed, 30 insertions(+), 37 deletions(-) diff --git a/README_ZH.md b/README_ZH.md index 8e127a5..7ec5b47 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -72,9 +72,3 @@ foundation/print_print_fwk #打印框架 系统打印管理应用 ## 相关仓 - -元能力子系统 - -[**ability_runtime**](https://gitee.com/openharmony/ability_ability_runtime) - - diff --git a/frameworks/innerkitsimpl/BUILD.gn b/frameworks/innerkitsimpl/BUILD.gn index 7905264..e46a159 100644 --- a/frameworks/innerkitsimpl/BUILD.gn +++ b/frameworks/innerkitsimpl/BUILD.gn @@ -21,10 +21,10 @@ config("print_interfaces_kits_napi_config") { } ohos_shared_library("print_client") { include_dirs = [ - "//foundation/arkui/ace_engine/frameworks/base/utils", - "//foundation/arkui/napi", - "//foundation/arkui/napi/interfaces/kits", - "//foundation/arkui/napi/interfaces/inner_api", + "${arkui_path}/ace_engine/frameworks/base/utils", + "${arkui_path}/napi", + "${arkui_path}/napi/interfaces/kits", + "${arkui_path}/napi/interfaces/inner_api", "//third_party/node/src", "//third_party/curl/include", "${ability_runtime_services_path}/common/include", @@ -35,7 +35,7 @@ ohos_shared_library("print_client") { "${ability_runtime_inner_api_path}/ability_manager/include", "//foundation/distributedschedule/samgr/interfaces/innerkits/Isamgr", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", - "${print_path}/utils/include", + "${print_utils_path}/include", ] public_configs = [ ":print_interfaces_kits_napi_config" ] @@ -59,7 +59,7 @@ ohos_shared_library("print_client") { "src/printer_info.cpp", ] deps = [ - "//foundation/arkui/napi:ace_napi", + "${arkui_path}/napi:ace_napi", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", ] external_deps = [ diff --git a/frameworks/kits/extension/BUILD.gn b/frameworks/kits/extension/BUILD.gn index 642b90e..0f1408b 100644 --- a/frameworks/kits/extension/BUILD.gn +++ b/frameworks/kits/extension/BUILD.gn @@ -21,7 +21,7 @@ config("ability_config") { include_dirs = [ "${print_path}/frameworks/innerkitsimpl/include", "${print_path}/frameworks/kits/extension/include", - "${print_path}/utils/include", + "${print_utils_path}/include", "//commonlibrary/c_utils/base/include", "${ability_runtime_path}/interfaces/kits/native/ability/native", "${ability_runtime_path}/interfaces/kits/native/appkit/app", @@ -34,10 +34,10 @@ config("ability_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app", "${ability_runtime_services_path}/common/include", - "//foundation/systemabilitymgr/dmsfwk/services/dtbschedmgr/include", + "${system_ability_mgr_path}/dmsfwk/services/dtbschedmgr/include", "//base/global/resource_management/interfaces/inner_api/include", "${ability_runtime_napi_path}/featureAbility", - "//foundation/arkui/napi/interfaces/kits", + "${arkui_path}/napi/interfaces/kits", "//third_party/node/src", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/remote_register_service", @@ -127,7 +127,7 @@ ohos_shared_library("print_extension_framework") { "//base/global/i18n/frameworks/intl:intl_util", "//base/global/resource_management/frameworks/resmgr:global_resmgr", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/arkui/napi:ace_napi", + "${arkui_path}/napi:ace_napi", ] subsystem_name = "print" diff --git a/frameworks/kits/extension/src/js_print_extension.cpp b/frameworks/kits/extension/src/js_print_extension.cpp index d319889..dfb5261 100644 --- a/frameworks/kits/extension/src/js_print_extension.cpp +++ b/frameworks/kits/extension/src/js_print_extension.cpp @@ -46,7 +46,7 @@ JsPrintExtension *JsPrintExtension::Create(const std::unique_ptr &runti } JsPrintExtension::JsPrintExtension(JsRuntime &jsRuntime) : jsRuntime_(jsRuntime), - extensionId_(""),hasDestroyed_(false) {} + extensionId_(""), hasDestroyed_(false) {} JsPrintExtension::~JsPrintExtension() = default; void JsPrintExtension::Init(const std::shared_ptr &record, diff --git a/interfaces/kits/napi/BUILD.gn b/interfaces/kits/napi/BUILD.gn index b5b119b..89ffa43 100644 --- a/interfaces/kits/napi/BUILD.gn +++ b/interfaces/kits/napi/BUILD.gn @@ -35,7 +35,7 @@ ohos_shared_library("print_napi") { "${ability_runtime_inner_api_path}/ability_manager/include", "//foundation/distributedschedule/samgr/interfaces/innerkits/Isamgr", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", - "${print_path}/utils/include", + "${print_utils_path}/include", "${print_path}/frameworks/innerkitsimpl/include", ] public_configs = [ ":print_interfaces_kits_napi_config" ] diff --git a/print.gni b/print.gni index 9288f8e..839ed2d 100644 --- a/print.gni +++ b/print.gni @@ -12,15 +12,14 @@ # limitations under the License. ability_runtime_path = "//foundation/ability/ability_runtime" - ability_runtime_inner_api_path = "${ability_runtime_path}/interfaces/inner_api" - ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" - ability_runtime_napi_path = "${ability_runtime_path}/frameworks/js/napi" - ability_runtime_services_path = "${ability_runtime_path}/services" -print_path = "//base/print/print_fwk" +system_ability_mgr_path = "//foundation/systemabilitymgr" -utils_path = "${print_path}/utils" +arkui_path = "//foundation/arkui" + +print_path = "//base/print/print_fwk" +print_utils_path = "${print_path}/utils" diff --git a/services/BUILD.gn b/services/BUILD.gn index eb2bfe3..5594edd 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -43,7 +43,7 @@ ohos_shared_library("print_service") { "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", "${print_path}/frameworks/innerkitsimpl/include", - "${print_path}/utils/include", + "${print_utils_path}/include", ] deps = [ "${print_path}/frameworks/innerkitsimpl:print_client", diff --git a/test/unittest/fwk_inner_napi_test/BUILD.gn b/test/unittest/fwk_inner_napi_test/BUILD.gn index 2626ed1..c973050 100644 --- a/test/unittest/fwk_inner_napi_test/BUILD.gn +++ b/test/unittest/fwk_inner_napi_test/BUILD.gn @@ -20,16 +20,16 @@ ohos_unittest("print_fwk_inner_napi_test") { module_out_path = module_output_path include_dirs = [ "${print_path}/frameworks/innerkitsimpl/include", - "//foundation/arkui/ace_engine/frameworks/base/utils", - "//foundation/arkui/napi", - "//foundation/arkui/napi/interfaces/kits", - "//foundation/arkui/napi/interfaces/inner_api", + "${arkui_path}/ace_engine/frameworks/base/utils", + "${arkui_path}/napi", + "${arkui_path}/napi/interfaces/kits", + "${arkui_path}/napi/interfaces/inner_api", "//third_party/node/src", "//third_party/curl/include", "//utils/system/safwk/native/include", "//foundation/distributedschedule/samgr/interfaces/innerkits/Isamgr", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", - "${print_path}/utils/include", + "${print_utils_path}/include", ] sources = [ @@ -51,8 +51,8 @@ ohos_unittest("print_fwk_inner_napi_test") { "${print_path}/interfaces/kits/napi:print_napi", "${print_path}/profile:print_sa_profiles", "${print_path}/services:print_service", - "//foundation/arkui/napi:ace_napi", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", + "${arkui_path}/napi:ace_napi", + "${system_ability_mgr_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/zlib:libz", diff --git a/test/unittest/fwk_inner_napi_test/print_job_test.cpp b/test/unittest/fwk_inner_napi_test/print_job_test.cpp index 6a5512a..530296e 100644 --- a/test/unittest/fwk_inner_napi_test/print_job_test.cpp +++ b/test/unittest/fwk_inner_napi_test/print_job_test.cpp @@ -50,7 +50,7 @@ HWTEST_F(PrintJobTest, PrintJobTest_0001, TestSize.Level1) std::vector getFdList; job.SetFdList(fdList); job.GetFdList(getFdList); - EXPECT_EQ("file1", getFdList[0]); + EXPECT_EQ(1, getFdList[0]); } /** @@ -66,7 +66,7 @@ HWTEST_F(PrintJobTest, PrintJobTest_0002, TestSize.Level1) std::vector getFdList; job.SetFdList(fdList); job.GetFdList(getFdList); - EXPECT_EQ("file2", getFdList[1]); + EXPECT_EQ(2, getFdList[1]); } /** @@ -82,7 +82,7 @@ HWTEST_F(PrintJobTest, PrintJobTest_0003, TestSize.Level1) std::vector getFdList; job.SetFdList(fdList); job.GetFdList(getFdList); - EXPECT_EQ("file3", getFdList[2]); + EXPECT_EQ(3, getFdList[2]); } /** @@ -98,7 +98,7 @@ HWTEST_F(PrintJobTest, PrintJobTest_0004, TestSize.Level1) std::vector getFdList; job.SetFdList(fdList); job.GetFdList(getFdList); - EXPECT_EQ("file4", getFdList[3]); + EXPECT_EQ(4, getFdList[3]); } /** @@ -666,7 +666,7 @@ HWTEST_F(PrintJobTest, PrintJobTest_0046, TestSize.Level1) OHOS::Print::PrintPreviewAttribute preview, getPreview; job.SetPreview(preview); job.GetPreview(getPreview); - EXPECT_EQ("", getPreview.GetResult()); + EXPECT_EQ(0xFFFFFFFF, getPreview.GetResult()); } /**