From 2e856dbab920cf19a7aa21e5815d3ce808792788 Mon Sep 17 00:00:00 2001 From: wangpggg Date: Mon, 31 Mar 2025 14:25:37 +0800 Subject: [PATCH] remove path dependency Signed-off-by: wangpeng --- filemanagement_aafwk.gni | 6 --- .../js/napi/file_access_ext_ability/BUILD.gn | 1 - .../js/napi/file_access_module/BUILD.gn | 2 +- .../napi/file_extension_info_module/BUILD.gn | 1 - interfaces/kits/native/recent/BUILD.gn | 5 +- .../externalfileaccess_fuzzer/BUILD.gn | 3 -- .../externalfileaccessaccess_fuzzer/BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../externalfileaccessdelete_fuzzer/BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../externalfileaccessmkdir_fuzzer/BUILD.gn | 5 -- .../externalfileaccessmove_fuzzer/BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../externalfileaccessrename_fuzzer/BUILD.gn | 5 -- .../BUILD.gn | 5 -- .../fileaccessextconnection_fuzzer/BUILD.gn | 2 - .../medialibraryfileaccess_fuzzer/BUILD.gn | 7 +-- test/unittest/BUILD.gn | 47 +++++++------------ .../external_file_access_test_info.cpp | 2 +- 22 files changed, 20 insertions(+), 116 deletions(-) diff --git a/filemanagement_aafwk.gni b/filemanagement_aafwk.gni index 80abb43a..e3737174 100644 --- a/filemanagement_aafwk.gni +++ b/filemanagement_aafwk.gni @@ -12,12 +12,6 @@ # limitations under the License. ability_runtime_path = "//foundation/ability/ability_runtime" -ability_runtime_innerkits_path = "${ability_runtime_path}/interfaces/inner_api" -ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" -ability_runtime_services_path = "${ability_runtime_path}/services" -ability_runtime_napi_path = "${ability_runtime_path}/frameworks/js/napi" -access_token_path = "//base/security/access_token" file_api_path = "//foundation/filemanagement/file_api" user_file_service_path = "//foundation/filemanagement/user_file_service" -distributed_file_path = "//foundation/distributeddatamgr/distributedfile" commonlibrary_path = "//commonlibrary" diff --git a/frameworks/js/napi/file_access_ext_ability/BUILD.gn b/frameworks/js/napi/file_access_ext_ability/BUILD.gn index 9e825e2b..2efb3546 100644 --- a/frameworks/js/napi/file_access_ext_ability/BUILD.gn +++ b/frameworks/js/napi/file_access_ext_ability/BUILD.gn @@ -10,7 +10,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") import("//build/ohos.gni") diff --git a/frameworks/js/napi/file_access_module/BUILD.gn b/frameworks/js/napi/file_access_module/BUILD.gn index 45421e36..d50bc8bb 100644 --- a/frameworks/js/napi/file_access_module/BUILD.gn +++ b/frameworks/js/napi/file_access_module/BUILD.gn @@ -31,8 +31,8 @@ ohos_shared_library("fileaccess") { relative_install_dir = "module/file" include_dirs = [ - "./", "${user_file_service_path}/frameworks/js/napi/common", + "${user_file_service_path}/frameworks/js/napi/file_access_module", "${user_file_service_path}/frameworks/js/napi/file_access_module/file_info", "${user_file_service_path}/frameworks/js/napi/file_access_module/root_info", "${user_file_service_path}/utils", diff --git a/frameworks/js/napi/file_extension_info_module/BUILD.gn b/frameworks/js/napi/file_extension_info_module/BUILD.gn index bffee06a..d4f2c0e1 100644 --- a/frameworks/js/napi/file_extension_info_module/BUILD.gn +++ b/frameworks/js/napi/file_extension_info_module/BUILD.gn @@ -30,7 +30,6 @@ ohos_shared_library("fileextensioninfo") { relative_install_dir = "module/file" include_dirs = [ - ".", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/frameworks/js/napi/common", "${user_file_service_path}/utils", diff --git a/interfaces/kits/native/recent/BUILD.gn b/interfaces/kits/native/recent/BUILD.gn index b296c510..78407b56 100644 --- a/interfaces/kits/native/recent/BUILD.gn +++ b/interfaces/kits/native/recent/BUILD.gn @@ -25,10 +25,7 @@ ohos_shared_library("recent") { debug = false } - include_dirs = [ - ".", - "${user_file_service_path}/utils", - ] + include_dirs = [ "${user_file_service_path}/utils" ] sources = [ "module.cpp", diff --git a/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn index 66c93d97..999941de 100644 --- a/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn @@ -23,7 +23,6 @@ ohos_fuzztest("ExternalFileAccessFuzzTest") { "${user_file_service_path}/test/fuzztest/externalfileaccess_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/utils", ] @@ -32,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessFuzzTest") { configs = [ "//build/config/compiler:exceptions" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", "${user_file_service_path}/services:file_access_service_base_include", diff --git a/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn index 8082e434..b5ff597a 100644 --- a/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn @@ -21,9 +21,6 @@ ohos_fuzztest("ExternalFileAccessAccessFuzzTest") { "${user_file_service_path}/test/fuzztest/externalfileaccessaccess_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -35,8 +32,6 @@ ohos_fuzztest("ExternalFileAccessAccessFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessaccess_fuzzer/externalfileaccessaccess_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn index 62e9f608..08b055d5 100644 --- a/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessCreateFileFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccesscreatefile_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessCreateFileFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccesscreatefile_fuzzer/externalfileaccesscreatefile_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn index df88e34d..5d7bdcb8 100644 --- a/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn @@ -21,9 +21,6 @@ ohos_fuzztest("ExternalFileAccessDeleteFuzzTest") { "${user_file_service_path}/test/fuzztest/externalfileaccessdelete_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -35,8 +32,6 @@ ohos_fuzztest("ExternalFileAccessDeleteFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessdelete_fuzzer/externalfileaccessdelete_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn index b523021d..bba16afa 100644 --- a/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessGetFileInfoFromRelativePathFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessGetFileInfoFromRelativePathFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/externalfileaccessgetfileinfofromrelativepath_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn index 3c1f2334..9e09df22 100644 --- a/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessGetFileInfoFromUriFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessGetFileInfoFromUriFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/externalfileaccessgetfileinfofromuri_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn index 57cdc829..29428da9 100644 --- a/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessGetRootsFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccessgetroots_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessGetRootsFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessgetroots_fuzzer/externalfileaccessgetroots_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn index e2e39d1c..a935c0b4 100644 --- a/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessListFileFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccesslistfile_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessListFileFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccesslistfile_fuzzer/externalfileaccesslistfile_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn index bc85b62a..40d302d3 100644 --- a/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn @@ -21,9 +21,6 @@ ohos_fuzztest("ExternalFileAccessMkdirFuzzTest") { "${user_file_service_path}/test/fuzztest/externalfileaccessmkdir_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -35,8 +32,6 @@ ohos_fuzztest("ExternalFileAccessMkdirFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessmkdir_fuzzer/externalfileaccessmkdir_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn index f98b0df0..c04b0e07 100644 --- a/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn @@ -21,9 +21,6 @@ ohos_fuzztest("ExternalFileAccessMoveFuzzTest") { "${user_file_service_path}/test/fuzztest/externalfileaccessmove_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -35,8 +32,6 @@ ohos_fuzztest("ExternalFileAccessMoveFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessmove_fuzzer/externalfileaccessmove_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn index 248f4d38..ce879f44 100644 --- a/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessOpenFileFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccessopenfile_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessOpenFileFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessopenfile_fuzzer/externalfileaccessopenfile_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn index e2208bd0..26796a85 100644 --- a/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn @@ -21,9 +21,6 @@ ohos_fuzztest("ExternalFileAccessRenameFuzzTest") { "${user_file_service_path}/test/fuzztest/externalfileaccessrename_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -35,8 +32,6 @@ ohos_fuzztest("ExternalFileAccessRenameFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessrename_fuzzer/externalfileaccessrename_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn index e58226a6..7452eeb0 100644 --- a/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn @@ -20,9 +20,6 @@ ohos_fuzztest("ExternalFileAccessScanFileFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/externalfileaccessscanfile_fuzzer" include_dirs = [ "${user_file_service_path}/utils", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", - "${ability_runtime_kits_path}/appkit/native/app/include", - "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", ] cflags = [ @@ -34,8 +31,6 @@ ohos_fuzztest("ExternalFileAccessScanFileFuzzTest") { sources = [ "${user_file_service_path}/test/fuzztest/externalfileaccessscanfile_fuzzer/externalfileaccessscanfile_fuzzer.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", ] diff --git a/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn b/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn index cde30d08..1e28168f 100644 --- a/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn +++ b/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn @@ -20,8 +20,6 @@ ohos_fuzztest("FileAccessExtConnectionFuzzTest") { fuzz_config_file = "${user_file_service_path}/test/fuzztest/fileaccessextconnection_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/services/native/file_access_service/include", "${user_file_service_path}/interfaces/kits/js/src/common", diff --git a/test/fuzztest/medialibraryfileaccess_fuzzer/BUILD.gn b/test/fuzztest/medialibraryfileaccess_fuzzer/BUILD.gn index 14cb9d16..9caf3d9b 100644 --- a/test/fuzztest/medialibraryfileaccess_fuzzer/BUILD.gn +++ b/test/fuzztest/medialibraryfileaccess_fuzzer/BUILD.gn @@ -23,7 +23,6 @@ ohos_fuzztest("MedialibraryFileAccessFuzzTest") { "${user_file_service_path}/test/fuzztest/medialibraryfileaccess_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/utils", ] @@ -31,11 +30,7 @@ ohos_fuzztest("MedialibraryFileAccessFuzzTest") { sources = [ "medialibrary_file_access_fuzzer.cpp" ] configs = [ "//build/config/compiler:exceptions" ] - deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", - "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", - ] + deps = [ "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit" ] external_deps = [ "ability_base:want", diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index f577fd75..0dc95ffe 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -29,25 +29,20 @@ ohos_unittest("medialibrary_file_access_test") { "medialibrary_file_access_test_info.cpp", ] - include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", - "${user_file_service_path}/interfaces/inner_api/file_access/include", - "${access_token_path}/frameworks/accesstoken:accesstoken_communication_adapter_cxx/", - ] + include_dirs = + [ "${user_file_service_path}/interfaces/inner_api/file_access/include" ] configs = [ "//build/config/compiler:exceptions" ] - deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", - "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", - ] + deps = [ "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit" ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:abilitykit_native", + "ability_runtime:app_context", "ability_runtime:app_manager", "ability_runtime:runtime", "ability_runtime:wantagent_innerkits", @@ -83,7 +78,6 @@ ohos_unittest("external_file_access_basic_test") { ] include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/services/native/file_access_service/include", ] @@ -91,8 +85,6 @@ ohos_unittest("external_file_access_basic_test") { configs = [ "//build/config/compiler:exceptions" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", "${user_file_service_path}/services:file_access_service", @@ -104,6 +96,8 @@ ohos_unittest("external_file_access_basic_test") { "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:abilitykit_native", + "ability_runtime:app_context", "ability_runtime:app_manager", "ability_runtime:runtime", "ability_runtime:wantagent_innerkits", @@ -140,7 +134,6 @@ ohos_unittest("external_file_access_management_test") { ] include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/services/native/file_access_service/include", ] @@ -148,8 +141,6 @@ ohos_unittest("external_file_access_management_test") { configs = [ "//build/config/compiler:exceptions" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", "${user_file_service_path}/services:file_access_service", @@ -161,6 +152,8 @@ ohos_unittest("external_file_access_management_test") { "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:abilitykit_native", + "ability_runtime:app_context", "ability_runtime:app_manager", "ability_runtime:runtime", "ability_runtime:wantagent_innerkits", @@ -193,7 +186,6 @@ ohos_unittest("external_file_access_notify_test") { sources = [ "external_notify_test.cpp" ] include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/services/native/file_access_service/include", ] @@ -201,8 +193,6 @@ ohos_unittest("external_file_access_notify_test") { configs = [ "//build/config/compiler:exceptions" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", "${user_file_service_path}/services:file_access_service", @@ -214,6 +204,8 @@ ohos_unittest("external_file_access_notify_test") { "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:abilitykit_native", + "ability_runtime:app_context", "ability_runtime:app_manager", "ability_runtime:runtime", "ability_runtime:wantagent_innerkits", @@ -246,16 +238,12 @@ ohos_unittest("abnormal_file_access_test") { "abnormal_file_access_test.cpp", ] - include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", - "${user_file_service_path}/interfaces/inner_api/file_access/include", - ] + include_dirs = + [ "${user_file_service_path}/interfaces/inner_api/file_access/include" ] configs = [ "//build/config/compiler:exceptions" ] deps = [ - "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/native/appkit:app_context", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_ext_base_include", "${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit", "${user_file_service_path}/services:file_access_service_base_source", @@ -266,6 +254,8 @@ ohos_unittest("abnormal_file_access_test") { "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", + "ability_runtime:abilitykit_native", + "ability_runtime:app_context", "ability_runtime:app_manager", "ability_runtime:runtime", "ability_runtime:wantagent_innerkits", @@ -294,9 +284,6 @@ ohos_unittest("file_access_ext_stub_impl_test") { module_out_path = "user_file_service/user_file_service" include_dirs = [ - "${ability_runtime_napi_path}/inner/napi_common", - "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/interfaces/kits/js/src/common", "${user_file_service_path}/utils", @@ -344,9 +331,6 @@ ohos_unittest("js_file_access_ext_ability_test") { module_out_path = "user_file_service/user_file_service" include_dirs = [ - "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", - "${commonlibrary_path}/c_utils/base/include", - "${file_api_path}/utils/filemgmt_libn/include", "${user_file_service_path}/interfaces/inner_api/file_access/include", "${user_file_service_path}/interfaces/inner_api/file_access/src", "${user_file_service_path}/interfaces/kits/js/src/common", @@ -379,6 +363,7 @@ ohos_unittest("js_file_access_ext_ability_test") { "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", "c_utils:utils", + "file_api:filemgmt_libn", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", diff --git a/test/unittest/external_file_access_test_info.cpp b/test/unittest/external_file_access_test_info.cpp index c526a705..afe60915 100644 --- a/test/unittest/external_file_access_test_info.cpp +++ b/test/unittest/external_file_access_test_info.cpp @@ -43,7 +43,7 @@ static int g_num = 0; * @tc.level Level 1 * @tc.require: SR000H0387 */ -HWTEST_F(FileExtensionHelperTest, external_file_access_GetRoots_0000, testing::ext::TestSize.Level1) +HWTEST_F(FileExtensionHelperTest, external_file_access_GetRoots_0000, testing::ext::TestSize.Level0) { shared_ptr fileAccessHelper = FileExtensionHelperTest::GetFileAccessHelper(); EXPECT_NE(fileAccessHelper, nullptr); -- Gitee