diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index ef334a832ad391583d0ab7da0ddd6ff8e1930a50..ba1e665131196deac6824e02516357fe37abc54d 100644 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -74,6 +74,7 @@ lite_component("acts_component") { "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest", "//test/xts/acts/global_lite:ActsGlobalTest", "//test/xts/acts/sensors_lite:sensorstest", + "//test/xts/acts/update_lite/updater_posix:ActsUpdateTest", ] } else if (ohos_kernel_type == "linux") { all_features += [ diff --git a/update_lite/updater_posix/src/UpdateTest.cpp b/update_lite/updater_posix/src/UpdateTest.cpp index e8159edf8351390a18580a4ad8f2ca52fdb3cf70..77a35ae2412e3bd38fe9139d6c09b1e864db2560 100755 --- a/update_lite/updater_posix/src/UpdateTest.cpp +++ b/update_lite/updater_posix/src/UpdateTest.cpp @@ -1,5 +1,7 @@ /* * Copyright (c) 2021 Huawei Device Co., Ltd. + */ +/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,15 +20,13 @@ #include "hota_updater.h" #include "ohos_types.h" -#define ERRORCALLBACK 0 -#define STATUSCALLBACK 0 -#define USE_HOS_PKG 1 -#define NOT_HOS_PKG 0 -#define ERR_PAK_FALG 2 -#define DATA_LENGTH 190 -#define READ_LENGTH 0 -#define ERR_LENGTH 9 -#define DATA_OFFSET 0 +const int USE_HOS_PKG = 1; +const int NOT_HOS_PKG = 0; +const int ERR_PAK_FALG = 2; +const int DATA_LENGTH = 190; +const int READ_LENGTH = 0; +const int ERR_LENGTH = 9; +const int DATA_OFFSET = 0; using namespace std; using namespace testing::ext; @@ -47,7 +47,7 @@ protected: HWTEST_F(UpdateTest, subUpgradeAPI0100, Function | MediumTest | Level1) { unsigned int ret; - ret = HotaInit(ERRORCALLBACK, STATUSCALLBACK); + ret = HotaInit(NULL, NULL); printf("HotaInit return = %d\r\n", ret); EXPECT_EQ(OHOS_SUCCESS, ret); };