From 8f868e2986f0a06f2f6b79669ae4d79334c6674e Mon Sep 17 00:00:00 2001 From: xianghengliang Date: Thu, 20 Jan 2022 10:27:19 +0800 Subject: [PATCH 1/3] fix test module build deps Signed-off-by: xianghengliang --- services/distributedfiledaemon/test/unittest/BUILD.gn | 1 + test/moduletest/BUILD.gn | 1 + 2 files changed, 2 insertions(+) diff --git a/services/distributedfiledaemon/test/unittest/BUILD.gn b/services/distributedfiledaemon/test/unittest/BUILD.gn index 141218182..68e8dea15 100644 --- a/services/distributedfiledaemon/test/unittest/BUILD.gn +++ b/services/distributedfiledaemon/test/unittest/BUILD.gn @@ -23,6 +23,7 @@ config("module_private_config") { "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include", "//base/security/deviceauth/interfaces/innerkits", "//third_party/json/include", + "//utils/system/safwk/native/include", ] } diff --git a/test/moduletest/BUILD.gn b/test/moduletest/BUILD.gn index 82f1d1aa5..eb96fe321 100644 --- a/test/moduletest/BUILD.gn +++ b/test/moduletest/BUILD.gn @@ -26,6 +26,7 @@ config("module_private_config") { "//foundation/communication/dsoftbus/interfaces/kits/common", "//base/security/deviceauth/interfaces/innerkits", "//third_party/json/include", + "//utils/system/safwk/native/include", ] } -- Gitee From 68b529a2fc4cfc3a336f33101d137903a0a336f8 Mon Sep 17 00:00:00 2001 From: xianghengliang Date: Thu, 20 Jan 2022 11:31:37 +0800 Subject: [PATCH 2/3] test gn_format check fix Signed-off-by: xianghengliang --- .../test/unittest/BUILD.gn | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/services/distributedfiledaemon/test/unittest/BUILD.gn b/services/distributedfiledaemon/test/unittest/BUILD.gn index 68e8dea15..b37b27de1 100644 --- a/services/distributedfiledaemon/test/unittest/BUILD.gn +++ b/services/distributedfiledaemon/test/unittest/BUILD.gn @@ -30,29 +30,26 @@ config("module_private_config") { ohos_unittest("DeviceManagerAgentTest") { module_out_path = module_output_path - sources = [ - ] + sources = [] sources += [ "device/device_manager_agent_test.cpp" ] configs = [ ":module_private_config", - "${utils_path}:compiler_configs" + "${utils_path}:compiler_configs", ] deps = [ - "//third_party/googletest:gtest_main", "${utils_path}:libdistributedfileutils", - "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", "//base/security/deviceauth/services:deviceauth_sdk", + "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", + "//third_party/googletest:gtest_main", ] - defines = [ - "private=public" - ] + defines = [ "private=public" ] } group("unittest") { testonly = true - deps = [":DeviceManagerAgentTest"] -} \ No newline at end of file + deps = [ ":DeviceManagerAgentTest" ] +} -- Gitee From ab834d52a4f306ea8250331637d4059e21ab13b7 Mon Sep 17 00:00:00 2001 From: xianghengliang Date: Thu, 20 Jan 2022 15:30:33 +0800 Subject: [PATCH 3/3] modulerest build gn format fix Signed-off-by: xianghengliang --- test/moduletest/BUILD.gn | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/test/moduletest/BUILD.gn b/test/moduletest/BUILD.gn index eb96fe321..f6b76d4a3 100644 --- a/test/moduletest/BUILD.gn +++ b/test/moduletest/BUILD.gn @@ -34,38 +34,36 @@ ohos_moduletest("DistributedFileDaemonServiceTest") { module_out_path = module_output_path sources = [ - "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp", - "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp", - "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp", "${services_path}/distributedfiledaemon/src/device/device_info.cpp", - "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp", + "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp", "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp", - "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp", + "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp", + "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp", + "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp", "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp", + "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp", "${services_path}/distributedfiledaemon/src/network/session_pool.cpp", "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp", - "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp", "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp", + "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp", ] sources += [ "src/distributedfiledaemon_service_test.cpp" ] configs = [ ":module_private_config", - "${utils_path}:compiler_configs" + "${utils_path}:compiler_configs", ] - defines = [ - "private=public" - ] + defines = [ "private=public" ] deps = [ - "//third_party/googletest:gtest_main", - "//third_party/googletest:gmock", "${utils_path}:libdistributedfileutils", + "//base/security/deviceauth/services:deviceauth_sdk", "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", "//foundation/filemanagement/dfs_service/services/distributedfiledaemon:libdistributedfiledaemon", - "//base/security/deviceauth/services:deviceauth_sdk", + "//third_party/googletest:gmock", + "//third_party/googletest:gtest_main", ] external_deps = [ @@ -77,5 +75,5 @@ ohos_moduletest("DistributedFileDaemonServiceTest") { group("moduletest") { testonly = true - deps = [":DistributedFileDaemonServiceTest"] -} \ No newline at end of file + deps = [ ":DistributedFileDaemonServiceTest" ] +} -- Gitee