From ddf33f3b89082f0c547d41cd421adc76cba62a2e Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Thu, 14 Nov 2024 10:18:46 +0800 Subject: [PATCH] bundle framework add innerapi Signed-off-by: sunjiakun --- bundle.json | 6 ++++ services/bundlemgr/BUILD.gn | 33 +++++++++++++++++++ .../bm/pageAbilityBundleForInstall/BUILD.gn | 2 +- .../bm/pageAbilityBundleForUninstall/BUILD.gn | 2 +- test/sceneProject/tools/ohos_test/BUILD.gn | 4 +-- 5 files changed, 42 insertions(+), 5 deletions(-) diff --git a/bundle.json b/bundle.json index f260209ef5..d258dc2193 100644 --- a/bundle.json +++ b/bundle.json @@ -186,6 +186,12 @@ ] }, "name": "//foundation/bundlemanager/bundle_framework/interfaces/kits/js/common:bundle_napi_common" + }, + { + "name": "//foundation/bundlemanager/bundle_framework/services/bundlemgr:bms_test_head", + "visibility": [ + "bundle_tool" + ] } ], "test": [ diff --git a/services/bundlemgr/BUILD.gn b/services/bundlemgr/BUILD.gn index 68af80921f..c5b438b9c2 100644 --- a/services/bundlemgr/BUILD.gn +++ b/services/bundlemgr/BUILD.gn @@ -201,6 +201,7 @@ ohos_source_set("bundle_parser") { group("bms_target") { deps = [ + ":bms_test_head", ":installs", ":installs.cfg", ":libbms", @@ -570,3 +571,35 @@ ohos_prebuilt_etc("installs.cfg") { subsystem_name = "bundlemanager" part_name = "bundle_framework" } + +config("bms_test_head_config") { + include_dirs = [ + "include", + "include/shared", + "include/sandbox_app", + "include/rdb", + "include/installd", + "include/quick_fix", + "include/uninstall_data_mgr", + "include/navigation", + ] +} + +ohos_shared_library("bms_test_head") { + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + public_configs = [ ":bms_test_head_config" ] + + deps = ["${kits_path}/js/bundlemgr:bundle"] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} diff --git a/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn b/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn index 4abb66a486..5d415f7b07 100755 --- a/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn +++ b/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn @@ -18,7 +18,7 @@ ohos_hap("pageAbilityBundleForInstall") { hap_profile = "./src/main/config.json" hap_name = "pageAbilityBundleForInstall" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_tool/tools/resource/bm/${hap_name}.hap" + final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/tools/resource/bm/${hap_name}.hap" testonly = true deps = [ ":hjs_demo_js_assets", diff --git a/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn b/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn index 2ec69107e1..9d0d979c35 100755 --- a/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn +++ b/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn @@ -18,7 +18,7 @@ ohos_hap("pageAbilityBundleForUninstall") { hap_profile = "./src/main/config.json" hap_name = "pageAbilityBundleForUninstall" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_tool/tools/resource/bm/${hap_name}.hap" + final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/tools/resource/bm/${hap_name}.hap" testonly = true deps = [ ":hjs_demo_js_assets", diff --git a/test/sceneProject/tools/ohos_test/BUILD.gn b/test/sceneProject/tools/ohos_test/BUILD.gn index bba404b6b2..6e517632a2 100755 --- a/test/sceneProject/tools/ohos_test/BUILD.gn +++ b/test/sceneProject/tools/ohos_test/BUILD.gn @@ -16,7 +16,5 @@ import("../../../../appexecfwk.gni") ohos_copy("copy_ohos_test") { sources = [ "./ohos_test.xml" ] - outputs = [ - "$root_out_dir/tests/systemtest/bundle_tool/tools/resource/ohos_test.xml", - ] + outputs = [ "$root_out_dir/tests/systemtest/bundle_framework/tools/resource/ohos_test.xml" ] } -- Gitee