diff --git a/client/BUILD.gn b/client/BUILD.gn index 5c44c0ab2691cf7fe57b4cad9445e6e087ed50aa..78e55d0294cd67da61a210787535f1eacde830f6 100755 --- a/client/BUILD.gn +++ b/client/BUILD.gn @@ -46,7 +46,7 @@ ohos_shared_library("update") { "//base/update/updateservice/interfaces/innerkits/engine:updateservicekits", "//foundation/ace/napi:ace_napi", "//third_party/bounds_checking_function:libsec_static", - "//third_party/openssl:crypto_source", + "//third_party/openssl:libcrypto_static", "//third_party/openssl:ssl_source", "//utils/native/base:utils", ] diff --git a/engine/BUILD.gn b/engine/BUILD.gn index 42fc098b637ef25c372d80fe160eaa86186328bd..24df7fdf16fbffdb675794c9d9429baa59268f9a 100755 --- a/engine/BUILD.gn +++ b/engine/BUILD.gn @@ -70,7 +70,7 @@ ohos_shared_library("updateservice") { "//third_party/cJSON:cjson_static", "//third_party/curl:curl", "//third_party/libxml2:xml2", - "//third_party/openssl:crypto_source", + "//third_party/openssl:libcrypto_static", "//third_party/openssl:ssl_source", "//utils/native/base:utils", ] diff --git a/test/fuzztest/UpdaterOnRemoteRequest_fuzzer/BUILD.gn b/test/fuzztest/UpdaterOnRemoteRequest_fuzzer/BUILD.gn index d5e9f24699d7b6d06ac453e070e047b29256807c..4517cb3c639edfba7dae90f000e952e2ab79de64 100644 --- a/test/fuzztest/UpdaterOnRemoteRequest_fuzzer/BUILD.gn +++ b/test/fuzztest/UpdaterOnRemoteRequest_fuzzer/BUILD.gn @@ -50,10 +50,10 @@ ohos_fuzztest("UpdaterOnRemoteRequestFuzzTest") { "//third_party/cJSON:cjson_static", "//third_party/curl:curl", "//third_party/libxml2:xml2", - "//third_party/openssl:crypto_source", + "//third_party/openssl:libcrypto_static", "//third_party/openssl:ssl_source", "//utils/native/base:utils", - ] + ] external_deps = [ "hiviewdfx_hilog_native:libhilog", @@ -63,11 +63,15 @@ ohos_fuzztest("UpdaterOnRemoteRequestFuzzTest") { "startup_l2:syspara", ] - cflags = ["-g","-O0","-Wno-unused-variable","-fno-omit-frame-pointer"] - sources = [ - "UpdaterOnRemoteRequest_fuzzer.cpp", + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", ] + sources = [ "UpdaterOnRemoteRequest_fuzzer.cpp" ] } + ############################################################################### group("fuzztest") { testonly = true diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 1d3d2b7d6dd2558762cd7454351162541a3ac606..7d3aced05adbc22d3e884bb35dd17884d23b3dde 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -14,109 +14,108 @@ import("//build/ohos.gni") config("utest_config") { - visibility = [ ":*" ] + visibility = [ ":*" ] - cflags = [ - "-fprofile-arcs", - "-ftest-coverage", - "-Wno-implicit-fallthrough", - "-Wno-unused-function" - ] - cflags_cc =[ "-Wno-implicit-fallthrough" ] + cflags = [ + "-fprofile-arcs", + "-ftest-coverage", + "-Wno-implicit-fallthrough", + "-Wno-unused-function", + ] + cflags_cc = [ "-Wno-implicit-fallthrough" ] - ldflags = [ - "--coverage", - ] + ldflags = [ "--coverage" ] } ohos_executable("updaterserver_ut") { - sources = [ - "update_server_ut_entry.cpp", - "update_client/client_stub.cpp", - "update_client/client_unittest.cpp", - "update_engine/server_unittest.cpp", - ] + sources = [ + "update_client/client_stub.cpp", + "update_client/client_unittest.cpp", + "update_engine/server_unittest.cpp", + "update_server_ut_entry.cpp", + ] - sources += [ - "//base/update/updateservice/client/update_client.cpp", - "//base/update/updateservice/client/update_session.cpp", - "//base/update/updateservice/client/update_module.cpp", - "//base/update/updateservice/interfaces/innerkits/engine/update_service_proxy.cpp", - "//base/update/updateservice/interfaces/innerkits/engine/update_service_kits_impl.cpp", - "//base/update/updateservice/engine/src/update_service.cpp", - "//base/update/updateservice/engine/src/update_service_stub.cpp", - "//base/update/updateservice/engine/src/update_helper.cpp", - "//base/update/updateservice/engine/src/progress_thread.cpp", - "//base/update/updateservice/callback/src/update_callback_proxy.cpp", - "//base/update/updateservice/callback/src/update_callback_stub.cpp", - "//base/update/updateservice/callback/src/update_callback.cpp", - "//base/update/updater/interfaces/kits/packages/package.cpp", - "//base/update/updater/interfaces/kits/updaterkits/updaterkits.cpp" - ] - include_dirs = [ - "//base/update/updater/interfaces/kits/include/", - "//base/update/updater/interfaces/kits/include/package", - "//base/update/updateservice", - "//base/update/updateservice/interfaces/innerkits/include", - "//base/update/updateservice/client", - "//base/update/updateservice/engine/include", - "//base/update/updateservice/callback/include", - "//base/update/updater/utils/include/", - "//base/update/updater/services/include/", - "//base/update/updater/services/include/log", - "//base/update/updater/services/include/package", - "//base/update/updater/test/unittest", - "//third_party/bounds_checking_function/include", - "//third_party/node/src", - "//foundation/ace/napi/interfaces/kits", - "//third_party/cJSON", - "//third_party/libxml2/include", - "//third_party/curl/include", - "//third_party/openssl/include", - "//third_party/bounds_checking_function/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", - "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", - "//foundation/distributedschedule/safwk/services/safwk/include", - "//foundation/distributedschedule/safwk/interfaces/innerkits/safwk", - "//foundation/distributedschedule/samgr/adapter/interfaces/innerkits/include", - "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", - ] + sources += [ + "//base/update/updater/interfaces/kits/packages/package.cpp", + "//base/update/updater/interfaces/kits/updaterkits/updaterkits.cpp", + "//base/update/updateservice/callback/src/update_callback.cpp", + "//base/update/updateservice/callback/src/update_callback_proxy.cpp", + "//base/update/updateservice/callback/src/update_callback_stub.cpp", + "//base/update/updateservice/client/update_client.cpp", + "//base/update/updateservice/client/update_module.cpp", + "//base/update/updateservice/client/update_session.cpp", + "//base/update/updateservice/engine/src/progress_thread.cpp", + "//base/update/updateservice/engine/src/update_helper.cpp", + "//base/update/updateservice/engine/src/update_service.cpp", + "//base/update/updateservice/engine/src/update_service_stub.cpp", + "//base/update/updateservice/interfaces/innerkits/engine/update_service_kits_impl.cpp", + "//base/update/updateservice/interfaces/innerkits/engine/update_service_proxy.cpp", + ] + include_dirs = [ + "//base/update/updater/interfaces/kits/include/", + "//base/update/updater/interfaces/kits/include/package", + "//base/update/updateservice", + "//base/update/updateservice/interfaces/innerkits/include", + "//base/update/updateservice/client", + "//base/update/updateservice/engine/include", + "//base/update/updateservice/callback/include", + "//base/update/updater/utils/include/", + "//base/update/updater/services/include/", + "//base/update/updater/services/include/log", + "//base/update/updater/services/include/package", + "//base/update/updater/test/unittest", + "//third_party/bounds_checking_function/include", + "//third_party/node/src", + "//foundation/ace/napi/interfaces/kits", + "//third_party/cJSON", + "//third_party/libxml2/include", + "//third_party/curl/include", + "//third_party/openssl/include", + "//third_party/bounds_checking_function/include", + "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", + "//foundation/distributedschedule/safwk/services/safwk/include", + "//foundation/distributedschedule/safwk/interfaces/innerkits/safwk", + "//foundation/distributedschedule/samgr/adapter/interfaces/innerkits/include", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", + ] - deps = [ - "//third_party/googletest:gtest", - "//third_party/googletest:gmock", - "//utils/native/base:utils", - "//base/update/updater/services/log:libupdaterlog", - "//base/update/updater/utils:libutils", - "//third_party/bounds_checking_function:libsec_static", - "//third_party/lz4:liblz4_static", - "//base/update/updater/interfaces/kits/misc_info:libmiscinfo", - "//base/update/updater/interfaces/kits/updaterkits:libupdaterkits", - "//base/update/updater/services/package:libupdaterpackage", - "//base/update/updater/interfaces/kits/packages:libpackageExt", - "//third_party/cJSON:cjson_static", - "//third_party/curl:curl", - "//third_party/openssl:crypto_source", - "//third_party/openssl:ssl_source", - "//third_party/libxml2:xml2", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", - ] + deps = [ + "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", + "//base/update/updater/interfaces/kits/misc_info:libmiscinfo", + "//base/update/updater/interfaces/kits/packages:libpackageExt", + "//base/update/updater/interfaces/kits/updaterkits:libupdaterkits", + "//base/update/updater/services/log:libupdaterlog", + "//base/update/updater/services/package:libupdaterpackage", + "//base/update/updater/utils:libutils", + "//third_party/bounds_checking_function:libsec_static", + "//third_party/cJSON:cjson_static", + "//third_party/curl:curl", + "//third_party/googletest:gmock", + "//third_party/googletest:gtest", + "//third_party/libxml2:xml2", + "//third_party/lz4:liblz4_static", + "//third_party/openssl:libcrypto_static", + "//third_party/openssl:ssl_source", + "//utils/native/base:utils", + ] - defines = ["UPDATER_UT", "UPDATER_API_TEST"] + defines = [ + "UPDATER_UT", + "UPDATER_API_TEST", + ] - external_deps = [ - "safwk:system_ability_fwk", - "samgr_L2:samgr_proxy", - "ipc:ipc_core", - "startup_l2:syspara", - "hiviewdfx_hilog_native:libhilog", - ] + external_deps = [ + "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_core", + "safwk:system_ability_fwk", + "samgr_L2:samgr_proxy", + "startup_l2:syspara", + ] - cflags_cc = [ - "-fexceptions", - ] + cflags_cc = [ "-fexceptions" ] - public_configs = [ ":utest_config" ] - install_enable = true - part_name = "updater" + public_configs = [ ":utest_config" ] + install_enable = true + part_name = "updater" }