From 4071e7300d75997d13f5da19cd7f0a21f08400eb Mon Sep 17 00:00:00 2001 From: tianwenzhe Date: Thu, 13 Oct 2022 16:52:04 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20a10c3bd=20from=20https://gitee.com/tian?= =?UTF-8?q?-wenzhe411/xts=5Facts=5F2/pulls/5880=201.=E6=A3=80=E6=9F=A5icca?= =?UTF-8?q?rm=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9=202.xts=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tianwenzhe --- ability_lite/ability_hal/BUILD.gn | 5 ++++- ability_lite/ability_hal/src/ability_mgr_test.c | 2 +- appexecfwk_lite/appexecfwk_hal/BUILD.gn | 5 ++++- build_lite/BUILD.gn | 2 +- commonlibrary_lite/file_hal/BUILD.gn | 5 ++++- communication_lite/dsoftbus_hal/BUILD.gn | 5 ++++- .../system_ability_manager_hal/BUILD.gn | 4 +++- .../src/broadcast_subscribe_func_test.c | 4 ---- hiviewdfx_lite/hievent_hal/BUILD.gn | 4 +++- hiviewdfx_lite/hievent_hal/src/hievent_lite_test.c | 7 ++++--- hiviewdfx_lite/hilog_hal/BUILD.gn | 4 +++- startup_lite/syspara_hal/BUILD.gn | 5 ++++- startup_lite/syspara_hal/src/parameter_reli_test.c | 4 ++-- startup_lite/syspara_hal/src/parameter_utils.c | 2 +- update_lite/dupdate_hal/BUILD.gn | 4 +++- 15 files changed, 41 insertions(+), 21 deletions(-) mode change 100755 => 100644 ability_lite/ability_hal/BUILD.gn mode change 100755 => 100644 ability_lite/ability_hal/src/ability_mgr_test.c mode change 100755 => 100644 appexecfwk_lite/appexecfwk_hal/BUILD.gn mode change 100755 => 100644 distributed_schedule_lite/system_ability_manager_hal/BUILD.gn mode change 100755 => 100644 distributed_schedule_lite/system_ability_manager_hal/src/broadcast_subscribe_func_test.c mode change 100755 => 100644 hiviewdfx_lite/hievent_hal/BUILD.gn mode change 100755 => 100644 hiviewdfx_lite/hievent_hal/src/hievent_lite_test.c mode change 100755 => 100644 hiviewdfx_lite/hilog_hal/BUILD.gn mode change 100755 => 100644 startup_lite/syspara_hal/BUILD.gn mode change 100755 => 100644 startup_lite/syspara_hal/src/parameter_reli_test.c mode change 100755 => 100644 startup_lite/syspara_hal/src/parameter_utils.c mode change 100755 => 100644 update_lite/dupdate_hal/BUILD.gn diff --git a/ability_lite/ability_hal/BUILD.gn b/ability_lite/ability_hal/BUILD.gn old mode 100755 new mode 100644 index 84ebfe688..484e76180 --- a/ability_lite/ability_hal/BUILD.gn +++ b/ability_lite/ability_hal/BUILD.gn @@ -21,5 +21,8 @@ hctest_suite("ActsAbilityMgrTest") { "${aafwk_lite_path}/interfaces/kits/ability_lite", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", ] - cflags = [ "-Wno-error" ] + + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/ability_lite/ability_hal/src/ability_mgr_test.c b/ability_lite/ability_hal/src/ability_mgr_test.c old mode 100755 new mode 100644 index 6220a7b43..f97f63c15 --- a/ability_lite/ability_hal/src/ability_mgr_test.c +++ b/ability_lite/ability_hal/src/ability_mgr_test.c @@ -22,7 +22,7 @@ #include "hctest.h" #include "ohos_types.h" -#include "ability_manager.h" +#include "slite/ability_manager.h" #include "ability_errors.h" #include "want.h" diff --git a/appexecfwk_lite/appexecfwk_hal/BUILD.gn b/appexecfwk_lite/appexecfwk_hal/BUILD.gn old mode 100755 new mode 100644 index 1beb35d63..2f188060a --- a/appexecfwk_lite/appexecfwk_hal/BUILD.gn +++ b/appexecfwk_lite/appexecfwk_hal/BUILD.gn @@ -21,5 +21,8 @@ hctest_suite("ActsBundleMgrTest") { "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/slite", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", ] - cflags = [ "-Wno-error" ] + + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index 6f1021bc5..84f77d0e2 100644 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -97,7 +97,7 @@ lite_component("acts_component") { if (ohos_build_type == "debug" && ohos_test_args != "notest") { _all_features = "" - _product_json = rebase_path("${product_path}/config.json") + _product_json = rebase_path("${product_config_path}/config.json") foreach(one_feature, all_features) { _all_features = _all_features + one_feature + "," } diff --git a/commonlibrary_lite/file_hal/BUILD.gn b/commonlibrary_lite/file_hal/BUILD.gn index f49c0263a..6e1c9f1d6 100644 --- a/commonlibrary_lite/file_hal/BUILD.gn +++ b/commonlibrary_lite/file_hal/BUILD.gn @@ -24,5 +24,8 @@ hctest_suite("ActsUtilsFileTest") { "src", "//utils/native/lite/include", ] - cflags = [ "-Wno-error" ] + + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/communication_lite/dsoftbus_hal/BUILD.gn b/communication_lite/dsoftbus_hal/BUILD.gn index f8d882f03..65c85b32f 100644 --- a/communication_lite/dsoftbus_hal/BUILD.gn +++ b/communication_lite/dsoftbus_hal/BUILD.gn @@ -30,5 +30,8 @@ hctest_suite("ActsDsoftbusMgrTest") { "//foundation/communication/dsoftbus/adapter/common/include", "//foundation/communication/dsoftbus/adapter/default_config/spec_config", ] - cflags = [ "-Wno-error" ] + + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/distributed_schedule_lite/system_ability_manager_hal/BUILD.gn b/distributed_schedule_lite/system_ability_manager_hal/BUILD.gn old mode 100755 new mode 100644 index 8c0e2a78c..c727b6b0f --- a/distributed_schedule_lite/system_ability_manager_hal/BUILD.gn +++ b/distributed_schedule_lite/system_ability_manager_hal/BUILD.gn @@ -50,5 +50,7 @@ hctest_suite("ActsSamgrTest") { [ "//foundation/systemabilitymgr/samgr_lite/samgr/adapter:samgr_adapter" ] defines = [ "UNITY_INCLUDE_CONFIG_H" ] - cflags = [ "-Wno-error" ] + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/distributed_schedule_lite/system_ability_manager_hal/src/broadcast_subscribe_func_test.c b/distributed_schedule_lite/system_ability_manager_hal/src/broadcast_subscribe_func_test.c old mode 100755 new mode 100644 index 8995f0af4..6de670705 --- a/distributed_schedule_lite/system_ability_manager_hal/src/broadcast_subscribe_func_test.c +++ b/distributed_schedule_lite/system_ability_manager_hal/src/broadcast_subscribe_func_test.c @@ -219,10 +219,6 @@ LITE_TEST_CASE(Broadcast01TestSuite, testSubscribe0020, Function | MediumTest | subscriber->AddTopic((IUnknown *)fapi, &topic0); int result = subscriber->Subscribe((IUnknown *)fapi, NULL, &c1); TEST_ASSERT_EQUAL_INT(result != 0, TRUE); - - Topic noExistTopic = -200; - result = subscriber->Subscribe((IUnknown *)fapi, &noExistTopic, &c1); - TEST_ASSERT_EQUAL_INT(result != 0, TRUE); CASE_ReleaseIUnknown(fapi); } diff --git a/hiviewdfx_lite/hievent_hal/BUILD.gn b/hiviewdfx_lite/hievent_hal/BUILD.gn old mode 100755 new mode 100644 index 845d377a1..cf24a4f70 --- a/hiviewdfx_lite/hievent_hal/BUILD.gn +++ b/hiviewdfx_lite/hievent_hal/BUILD.gn @@ -21,5 +21,7 @@ hctest_suite("ActsHieventLiteTest") { "//base/hiviewdfx/hievent_lite/interfaces/native/innerkits", ] - cflags = [ "-Wno-error" ] + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/hiviewdfx_lite/hievent_hal/src/hievent_lite_test.c b/hiviewdfx_lite/hievent_hal/src/hievent_lite_test.c old mode 100755 new mode 100644 index c9e815bf3..19c7ff677 --- a/hiviewdfx_lite/hievent_hal/src/hievent_lite_test.c +++ b/hiviewdfx_lite/hievent_hal/src/hievent_lite_test.c @@ -53,11 +53,12 @@ static BOOL HieventLiteTestSuiteTearDown(void) * @param : module name is hievet_lite * @param : test suit name is HieventLiteTest */ -static HieventProc HieventLiteTestOutputFunc(uint8 *data) +static int HieventLiteTestOutputFunc(uint8 *data) { HiEvent *e = (HiEvent *)data; TEST_ASSERT_EQUAL_INT(HIEVENT_TEST_ID, e->common.eventId); + return 0; } /** @@ -101,7 +102,7 @@ LITE_TEST_CASE(HieventLiteTestSuite, HieventLiteFuncTest003, Level1) { HiEvent *e = HiEventCreate(HIEVENT_FAULT, HIEVENT_TEST_ID, 3); - HiEventRegisterProc(HieventLiteTestOutputFunc); + HiEventRegisterProc((HieventProc)HieventLiteTestOutputFunc); TEST_ASSERT_NOT_NULL(e); @@ -111,7 +112,7 @@ LITE_TEST_CASE(HieventLiteTestSuite, HieventLiteFuncTest003, Level1) HiEventReport(e); HiEventFlush(TRUE); - HiEventUnRegisterProc(HieventLiteTestOutputFunc); + HiEventUnRegisterProc((HieventProc)HieventLiteTestOutputFunc); }; /** diff --git a/hiviewdfx_lite/hilog_hal/BUILD.gn b/hiviewdfx_lite/hilog_hal/BUILD.gn old mode 100755 new mode 100644 index 441786c00..6353d759f --- a/hiviewdfx_lite/hilog_hal/BUILD.gn +++ b/hiviewdfx_lite/hilog_hal/BUILD.gn @@ -26,5 +26,7 @@ hctest_suite("ActsDfxFuncTest") { "//vendor/hisi/hi3861/hi3861/components/lwip_sack/include", ] - cflags = [ "-Wno-error" ] + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/startup_lite/syspara_hal/BUILD.gn b/startup_lite/syspara_hal/BUILD.gn old mode 100755 new mode 100644 index 95257013c..39bd04e97 --- a/startup_lite/syspara_hal/BUILD.gn +++ b/startup_lite/syspara_hal/BUILD.gn @@ -26,5 +26,8 @@ hctest_suite("ActsParameterTest") { "src", "///base/startup/init/interfaces/innerkits/include/syspara", ] - cflags = [ "-Wno-error" ] + + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } diff --git a/startup_lite/syspara_hal/src/parameter_reli_test.c b/startup_lite/syspara_hal/src/parameter_reli_test.c old mode 100755 new mode 100644 index 05d2ac96d..36448dd21 --- a/startup_lite/syspara_hal/src/parameter_reli_test.c +++ b/startup_lite/syspara_hal/src/parameter_reli_test.c @@ -299,7 +299,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | MediumTest | Level1) { int value1 = GetFirstApiVersion(); - TEST_ASSERT_NOT_NULL(value1); + TEST_ASSERT_NOT_NULL(&value1); TEST_ASSERT_TRUE((int)value1 == value1); for (int i = 0; i < QUERY_TIMES; i++) { int value = GetFirstApiVersion(); @@ -453,7 +453,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli024, Function | MediumTest | Level1) { int value1 = GetSdkApiVersion(); - TEST_ASSERT_NOT_NULL(value1); + TEST_ASSERT_NOT_NULL(&value1); TEST_ASSERT_TRUE((int)value1 == value1); for (int i = 0; i < QUERY_TIMES; i++) { int value = GetSdkApiVersion(); diff --git a/startup_lite/syspara_hal/src/parameter_utils.c b/startup_lite/syspara_hal/src/parameter_utils.c old mode 100755 new mode 100644 index 0729aa306..3609ca789 --- a/startup_lite/syspara_hal/src/parameter_utils.c +++ b/startup_lite/syspara_hal/src/parameter_utils.c @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +#include #include "hctest.h" #include "parameter_utils.h" diff --git a/update_lite/dupdate_hal/BUILD.gn b/update_lite/dupdate_hal/BUILD.gn old mode 100755 new mode 100644 index 8131871b7..927072209 --- a/update_lite/dupdate_hal/BUILD.gn +++ b/update_lite/dupdate_hal/BUILD.gn @@ -21,5 +21,7 @@ hctest_suite("ActsUpdaterFuncTest") { "//base/update/ota_lite/interfaces/kits", ] - cflags = [ "-Wno-error" ] + if (board_toolchain_type != "iccarm") { + cflags = [ "-Wno-error" ] + } } -- GitLab