From 1b039566a971b5a01c0b7f17484a5c7fb9e0b2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Wed, 21 Aug 2024 17:57:59 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=8F=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=A7=84=E9=81=BF=E5=8F=91=E5=B8=83=E7=89=88=E6=9C=AC?= =?UTF-8?q?so=E5=B8=A6=E8=B7=AF=E5=BE=84=E5=92=8C=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E9=97=AE=E9=A2=98=20Signed-off-by:=20?= =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- foundations/BUILD.gn | 4 ++++ foundations/ability/log/include/update_log.h | 15 +++++++++++---- frameworks/js/napi/update/BUILD.gn | 4 ++++ interfaces/inner_api/engine/BUILD.gn | 5 +++++ interfaces/inner_api/modulemgr/BUILD.gn | 5 +++++ services/engine/BUILD.gn | 4 ++++ 6 files changed, 33 insertions(+), 4 deletions(-) diff --git a/foundations/BUILD.gn b/foundations/BUILD.gn index 209453af..1d278ced 100644 --- a/foundations/BUILD.gn +++ b/foundations/BUILD.gn @@ -42,6 +42,10 @@ ohos_shared_library("update_foundations") { public_configs = [ ":update_service_foundations_config" ] + if (build_variant == "user") { + cflags = [ "-DIS_RELEASE_VERSION" ] + } + innerapi_tags = [ "platformsdk" ] part_name = "$updateengine_part_name" subsystem_name = "updater" diff --git a/foundations/ability/log/include/update_log.h b/foundations/ability/log/include/update_log.h index 3ca7e14b..87ed610c 100644 --- a/foundations/ability/log/include/update_log.h +++ b/foundations/ability/log/include/update_log.h @@ -96,7 +96,14 @@ private: static UpdateLogLevel level_; }; -#define R_FILENAME (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__) +#ifdef IS_RELEASE_VERSION +#define LOG_FILE_NAME "" +#else +#define LOG_FILE_NAME __FILE_NAME__ +#endif + +#define R_FILENAME (__builtin_strrchr(LOG_FILE_NAME, '/') ? __builtin_strrchr(LOG_FILE_NAME, '/') + 1 :\ + LOG_FILE_NAME) #define LONG_PRINT_HILOG(level, subtag, fmtlabel, fileName, line, fmt, ...) \ if (fmtlabel == PUBLIC_FMT_LABEL) { \ @@ -120,11 +127,11 @@ private: #define ENGINE_LOGD(fmt, ...) PRINT_LOGD(UPDATE_LOG_TAG_ID, fmt, ##__VA_ARGS__) #define PRINT_LONG_LOGD(subtag, label, fmt, args) UpdateLog::PrintLongLog(subtag, {label, \ - UpdateLogLevel::UPDATE_DEBUG, std::string(fmt), std::string(args), std::string(__FILE__), __LINE__}) + UpdateLogLevel::UPDATE_DEBUG, std::string(fmt), std::string(args), std::string(LOG_FILE_NAME), __LINE__}) #define PRINT_LONG_LOGI(subtag, label, fmt, args) UpdateLog::PrintLongLog(subtag, {label, \ - UpdateLogLevel::UPDATE_INFO, std::string(fmt), std::string(args), std::string(__FILE__), __LINE__}) + UpdateLogLevel::UPDATE_INFO, std::string(fmt), std::string(args), std::string(LOG_FILE_NAME), __LINE__}) #define PRINT_LONG_LOGE(subtag, label, fmt, args) UpdateLog::PrintLongLog(subtag, {label, \ - UpdateLogLevel::UPDATE_ERROR, std::string(fmt), std::string(args), std::string(__FILE__), __LINE__}) + UpdateLogLevel::UPDATE_ERROR, std::string(fmt), std::string(args), std::string(LOG_FILE_NAME), __LINE__}) #define ENGINE_LONG_LOGD(fmt, args) PRINT_LONG_LOGD(UPDATE_LOG_TAG_ID, UPDATE_LABEL[UPDATE_LOG_TAG_ID], fmt, args) #define ENGINE_LONG_LOGI(fmt, args) PRINT_LONG_LOGI(UPDATE_LOG_TAG_ID, UPDATE_LABEL[UPDATE_LOG_TAG_ID], fmt, args) diff --git a/frameworks/js/napi/update/BUILD.gn b/frameworks/js/napi/update/BUILD.gn index 0d7b70f1..6335aa10 100644 --- a/frameworks/js/napi/update/BUILD.gn +++ b/frameworks/js/napi/update/BUILD.gn @@ -67,4 +67,8 @@ ohos_shared_library("$updateengine_client_library_name") { "-Werror", "-DNAPI_VERSION=8", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } } diff --git a/interfaces/inner_api/engine/BUILD.gn b/interfaces/inner_api/engine/BUILD.gn index 9dcd2bb1..4d6686d9 100644 --- a/interfaces/inner_api/engine/BUILD.gn +++ b/interfaces/inner_api/engine/BUILD.gn @@ -81,6 +81,11 @@ ohos_shared_library("$updateengine_inner_library_name") { if (ability_ability_runtime_enable) { external_deps += [ "ability_runtime:extension_manager" ] } + + if (build_variant == "user") { + cflags = [ "-DIS_RELEASE_VERSION" ] + } + innerapi_tags = [ "platformsdk" ] part_name = "$updateengine_part_name" subsystem_name = "updater" diff --git a/interfaces/inner_api/modulemgr/BUILD.gn b/interfaces/inner_api/modulemgr/BUILD.gn index d145b344..9a4480fc 100644 --- a/interfaces/inner_api/modulemgr/BUILD.gn +++ b/interfaces/inner_api/modulemgr/BUILD.gn @@ -37,6 +37,11 @@ ohos_shared_library("update_module_mgr") { part_name = "$updateengine_part_name" subsystem_name = "updater" cflags = modulemgr_cflags + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + innerapi_tags = [ "sasdk" ] public_configs = [ ":module_mgr_library_native_config" ] } diff --git a/services/engine/BUILD.gn b/services/engine/BUILD.gn index c88b23cf..574b3315 100644 --- a/services/engine/BUILD.gn +++ b/services/engine/BUILD.gn @@ -43,4 +43,8 @@ ohos_shared_library("$updateengine_library_name") { subsystem_name = "updater" defines = sa_defines cflags = sa_cflags + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } } -- Gitee From c2ad6e93e41be728d6b5b6ff64e7adcce7b18973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Thu, 22 Aug 2024 01:12:15 +0000 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- foundations/ability/log/include/update_log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundations/ability/log/include/update_log.h b/foundations/ability/log/include/update_log.h index 87ed610c..d6b66b36 100644 --- a/foundations/ability/log/include/update_log.h +++ b/foundations/ability/log/include/update_log.h @@ -102,7 +102,7 @@ private: #define LOG_FILE_NAME __FILE_NAME__ #endif -#define R_FILENAME (__builtin_strrchr(LOG_FILE_NAME, '/') ? __builtin_strrchr(LOG_FILE_NAME, '/') + 1 :\ +#define R_FILENAME (__builtin_strrchr(LOG_FILE_NAME, '/') ? __builtin_strrchr(LOG_FILE_NAME, '/') + 1 : \ LOG_FILE_NAME) #define LONG_PRINT_HILOG(level, subtag, fmtlabel, fileName, line, fmt, ...) \ -- Gitee From 4e5a183981ff75a77c153e225ab91f2886303ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Thu, 22 Aug 2024 06:25:29 +0000 Subject: [PATCH 3/7] =?UTF-8?q?cflags=20=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- foundations/BUILD.gn | 8 +++++++- interfaces/inner_api/engine/BUILD.gn | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/foundations/BUILD.gn b/foundations/BUILD.gn index 1d278ced..68e37151 100644 --- a/foundations/BUILD.gn +++ b/foundations/BUILD.gn @@ -41,9 +41,15 @@ ohos_shared_library("update_foundations") { external_deps = foundations_external_deps public_configs = [ ":update_service_foundations_config" ] + + cflags = [ + "-fPIC", + "-Os", + "-Werror", + ] if (build_variant == "user") { - cflags = [ "-DIS_RELEASE_VERSION" ] + cflags += [ "-DIS_RELEASE_VERSION" ] } innerapi_tags = [ "platformsdk" ] diff --git a/interfaces/inner_api/engine/BUILD.gn b/interfaces/inner_api/engine/BUILD.gn index 4d6686d9..1dd1c4d2 100644 --- a/interfaces/inner_api/engine/BUILD.gn +++ b/interfaces/inner_api/engine/BUILD.gn @@ -82,8 +82,14 @@ ohos_shared_library("$updateengine_inner_library_name") { external_deps += [ "ability_runtime:extension_manager" ] } + cflags = [ + "-fPIC", + "-Os", + "-Werror", + ] + if (build_variant == "user") { - cflags = [ "-DIS_RELEASE_VERSION" ] + cflags += [ "-DIS_RELEASE_VERSION" ] } innerapi_tags = [ "platformsdk" ] -- Gitee From d65adefc5cc4341fb5642f873460a179fc02fe32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Thu, 22 Aug 2024 06:29:50 +0000 Subject: [PATCH 4/7] =?UTF-8?q?test=20=20=E6=96=B0=E5=A2=9Ecflags=20=20IS?= =?UTF-8?q?=5FRELEASE=5FVERSION?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- test/fuzztest/updateservicecancel_fuzzer/BUILD.gn | 5 +++++ test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn | 5 +++++ test/fuzztest/updateservicedownload_fuzzer/BUILD.gn | 5 +++++ test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn | 5 +++++ test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn | 5 +++++ .../updateserviceregisterupdatecallback_fuzzer/BUILD.gn | 5 +++++ test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn | 5 +++++ .../updateserviceunregisterupdatecallback_fuzzer/BUILD.gn | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn b/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn index a0b769b6..bb624b16 100644 --- a/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn @@ -36,6 +36,11 @@ ohos_fuzztest("UpdateServiceCancelFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp", diff --git a/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn b/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn index 477bafb5..8760f4b9 100644 --- a/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn @@ -35,6 +35,11 @@ ohos_fuzztest("UpdateServiceCheckNewVersionFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp", diff --git a/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn b/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn index 3ba5fba1..7d7e498f 100644 --- a/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn @@ -36,6 +36,11 @@ ohos_fuzztest("UpdateServiceDownloadFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp", diff --git a/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn b/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn index 0a94c440..44c4dd76 100644 --- a/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn @@ -36,6 +36,11 @@ ohos_fuzztest("UpdateServiceGetNewVersionFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp", diff --git a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn index f44ab3ba..6d8bb302 100644 --- a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn @@ -35,6 +35,11 @@ ohos_fuzztest("UpdateServiceGetUpgradePolicyFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp", diff --git a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn index d32f09ec..c61cf693 100644 --- a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn +++ b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn @@ -35,6 +35,11 @@ ohos_fuzztest("UpdateServiceRegisterUpdateCallbackFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp", diff --git a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn index 7294884c..db3e65a3 100644 --- a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn @@ -36,6 +36,11 @@ ohos_fuzztest("UpdateServiceSetUpgradePolicyFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp", diff --git a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn index 772f1b06..bab46df3 100644 --- a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn +++ b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn @@ -35,6 +35,11 @@ ohos_fuzztest("UpdateServiceUnregisterUpdateCallbackFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] + + if (build_variant == "user") { + cflags += [ "-DIS_RELEASE_VERSION" ] + } + sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp", -- Gitee From f363b1da3f91c36f25a3a35e05daa8c212865b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Thu, 22 Aug 2024 09:23:30 +0000 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- foundations/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundations/BUILD.gn b/foundations/BUILD.gn index 68e37151..e7fb032b 100644 --- a/foundations/BUILD.gn +++ b/foundations/BUILD.gn @@ -41,7 +41,7 @@ ohos_shared_library("update_foundations") { external_deps = foundations_external_deps public_configs = [ ":update_service_foundations_config" ] - + cflags = [ "-fPIC", "-Os", -- Gitee From d4286e018b8419af63d96bede27b7be642949da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Thu, 22 Aug 2024 13:54:27 +0000 Subject: [PATCH 6/7] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- test/fuzztest/updateservicecancel_fuzzer/BUILD.gn | 4 ---- test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn | 4 ---- test/fuzztest/updateservicedownload_fuzzer/BUILD.gn | 4 ---- test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn | 4 ---- test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn | 4 ---- .../updateserviceregisterupdatecallback_fuzzer/BUILD.gn | 4 ---- test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn | 4 ---- .../updateserviceunregisterupdatecallback_fuzzer/BUILD.gn | 4 ---- 8 files changed, 32 deletions(-) diff --git a/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn b/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn index bb624b16..4dfb6007 100644 --- a/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn @@ -37,10 +37,6 @@ ohos_fuzztest("UpdateServiceCancelFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp", diff --git a/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn b/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn index 8760f4b9..5bf10537 100644 --- a/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn @@ -36,10 +36,6 @@ ohos_fuzztest("UpdateServiceCheckNewVersionFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp", diff --git a/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn b/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn index 7d7e498f..9f1a9746 100644 --- a/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn @@ -37,10 +37,6 @@ ohos_fuzztest("UpdateServiceDownloadFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp", diff --git a/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn b/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn index 44c4dd76..805df369 100644 --- a/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn @@ -37,10 +37,6 @@ ohos_fuzztest("UpdateServiceGetNewVersionFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp", diff --git a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn index 6d8bb302..ad2a6d9f 100644 --- a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn @@ -36,10 +36,6 @@ ohos_fuzztest("UpdateServiceGetUpgradePolicyFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp", diff --git a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn index c61cf693..c1053e27 100644 --- a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn +++ b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn @@ -36,10 +36,6 @@ ohos_fuzztest("UpdateServiceRegisterUpdateCallbackFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp", diff --git a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn index db3e65a3..4b2887b7 100644 --- a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn @@ -37,10 +37,6 @@ ohos_fuzztest("UpdateServiceSetUpgradePolicyFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp", diff --git a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn index bab46df3..ee4cd49c 100644 --- a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn +++ b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn @@ -36,10 +36,6 @@ ohos_fuzztest("UpdateServiceUnregisterUpdateCallbackFuzzTest") { "-fno-omit-frame-pointer", ] - if (build_variant == "user") { - cflags += [ "-DIS_RELEASE_VERSION" ] - } - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp", -- Gitee From eae8043958440645fc16920cc1c5b615b35102c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Thu, 22 Aug 2024 13:56:46 +0000 Subject: [PATCH 7/7] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- test/fuzztest/updateservicecancel_fuzzer/BUILD.gn | 1 - test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn | 1 - test/fuzztest/updateservicedownload_fuzzer/BUILD.gn | 1 - test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn | 1 - test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn | 1 - .../fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn | 1 - test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn | 1 - .../updateserviceunregisterupdatecallback_fuzzer/BUILD.gn | 1 - 8 files changed, 8 deletions(-) diff --git a/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn b/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn index 4dfb6007..a0b769b6 100644 --- a/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicecancel_fuzzer/BUILD.gn @@ -36,7 +36,6 @@ ohos_fuzztest("UpdateServiceCancelFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp", diff --git a/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn b/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn index 5bf10537..477bafb5 100644 --- a/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicechecknewversion_fuzzer/BUILD.gn @@ -35,7 +35,6 @@ ohos_fuzztest("UpdateServiceCheckNewVersionFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp", diff --git a/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn b/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn index 9f1a9746..3ba5fba1 100644 --- a/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicedownload_fuzzer/BUILD.gn @@ -36,7 +36,6 @@ ohos_fuzztest("UpdateServiceDownloadFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp", diff --git a/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn b/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn index 805df369..0a94c440 100644 --- a/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicegetnewversion_fuzzer/BUILD.gn @@ -36,7 +36,6 @@ ohos_fuzztest("UpdateServiceGetNewVersionFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp", diff --git a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn index ad2a6d9f..f44ab3ba 100644 --- a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/BUILD.gn @@ -35,7 +35,6 @@ ohos_fuzztest("UpdateServiceGetUpgradePolicyFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp", diff --git a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn index c1053e27..d32f09ec 100644 --- a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn +++ b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/BUILD.gn @@ -35,7 +35,6 @@ ohos_fuzztest("UpdateServiceRegisterUpdateCallbackFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp", diff --git a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn index 4b2887b7..7294884c 100644 --- a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/BUILD.gn @@ -36,7 +36,6 @@ ohos_fuzztest("UpdateServiceSetUpgradePolicyFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp", diff --git a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn index ee4cd49c..772f1b06 100644 --- a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn +++ b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/BUILD.gn @@ -35,7 +35,6 @@ ohos_fuzztest("UpdateServiceUnregisterUpdateCallbackFuzzTest") { "-Wno-unused-variable", "-fno-omit-frame-pointer", ] - sources = [ "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", "$updateengine_root_path/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp", -- Gitee