diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index f2f92a238c5d9ed5a3a898a2f915e3c80259fb91..0f5c3f9533d03b3d61dd234c8ce4e81509e1cc27 100755 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -40,6 +40,7 @@ lite_component("acts_component") { "//test/xts/acts/kernel_lite/kernelcmsis_hal:ActsCMSISTest", "//test/xts/acts/utils_lite/kvstore_hal:ActsKvStoreTest", "//test/xts/acts/security_lite/datahuks_hal:ActsSecurityDataTest", + "//test/xts/acts/hiviewdfx_lite/hilog_hal:ActsDfxFuncTest", "//test/xts/acts/distributed_schedule_lite/samgr_hal:ActsSamgrTest", "//test/xts/acts/update_lite/updater_hal:ActsUpdaterFuncTest", @@ -59,6 +60,7 @@ lite_component("acts_component") { #"//test/xts/acts/distributedschedule_lite/dtbschedmgr_posix:ActsDMSTest", "//test/xts/acts/security_lite/permission_posix/pms:ActsPMSTest", + "//test/xts/acts/hiviewdfx_lite/hilog_posix:ActsHilogTest", "//test/xts/acts/multimedia_lite/multimedia_posix/recorder:ActsMediaRecorderTest", "//test/xts/acts/graphic_lite:uikit_test", diff --git a/hiviewdfx_lite/hilog_hal/BUILD.gn b/hiviewdfx_lite/hilog_hal/BUILD.gn index 5628d6c74359864d188b106c009582f42acad2ee..e08bae607fd2114a350534e6b7c8bc4138db1596 100755 --- a/hiviewdfx_lite/hilog_hal/BUILD.gn +++ b/hiviewdfx_lite/hilog_hal/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//test/xts/tools/build/suite_lite.gni") +import("//test/xts/tools/lite/build/suite_lite.gni") hctest_suite("ActsDfxFuncTest") { suite_name = "acts" sources = [ @@ -20,12 +20,10 @@ hctest_suite("ActsDfxFuncTest") { include_dirs = [ "src", - "//base/hiviewdfx/interfaces/kits/hilog_lite", - "//base/hiviewdfx/interfaces/innerkits/hievent_lite", - "//base/hiviewdfx/utils/lite", - "//base/hiviewdfx/frameworks/hievent_lite", - "//base/hiviewdfx/frameworks/hilog_lite/mini", - "//base/hiviewdfx/services/hilogcat_lite/commond", + "//base/hiviewdfx/hiview_lite", + "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", + "//base/hiviewdfx/hievent_lite/interfaces/native/innerkits", + "//base/hiviewdfx/hilog_lite/frameworks/mini", "//vendor/hisi/hi3861/hi3861/include", "//vendor/hisi/hi3861/hi3861/components/lwip_sack/include" ] diff --git a/hiviewdfx_lite/hilog_hal/src/dfx_hilog.c b/hiviewdfx_lite/hilog_hal/src/dfx_hilog.c index e83686365148798033d1fb9aa95aaeb12195ee35..d59253751972eb3f4e155ff2660aaede28508ed5 100755 --- a/hiviewdfx_lite/hilog_hal/src/dfx_hilog.c +++ b/hiviewdfx_lite/hilog_hal/src/dfx_hilog.c @@ -18,7 +18,6 @@ #include #include #include -#include "hos_init.h" #include "hiview_output_log.h" #include "log.h" #include "hctest.h" diff --git a/hiviewdfx_lite/hilog_posix/src/HilogTest.cpp b/hiviewdfx_lite/hilog_posix/src/HilogTest.cpp index 790a403f2a5c7716849b3b105a158ceb28871ffe..c3c9f3a25e00a9aa10c78a22906588f54923c3e5 100755 --- a/hiviewdfx_lite/hilog_posix/src/HilogTest.cpp +++ b/hiviewdfx_lite/hilog_posix/src/HilogTest.cpp @@ -24,11 +24,11 @@ #define LOG_DOMAIN 0xD002D00 using namespace OHOS::HiviewDFX; -static constexpr HilogLabel LABEL = {LOG_CORE, 0xD002D00, "Test_TAG"}; +static constexpr HiLogLabel LABEL = {LOG_CORE, 0xD002D00, "Test_TAG"}; using namespace std; using namespace testing::ext; -class HilogTest : public testing::Test { +class HiLogTest : public testing::Test { protected: static void SetUpTestCase(void) {} static void TearDownTestCase(void) {} @@ -37,112 +37,112 @@ protected: }; /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0100 - * @tc.name : Hilog_DEBUG parameter legal test (Cortex-A, C) + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0100 + * @tc.name : HiLog_DEBUG parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0100, Function | MediumTest | Level0) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0100, Function | MediumTest | Level0) { - HILOG_DEBUG(LOG_CORE, "Debug log of Hilog API test"); + HILOG_DEBUG(LOG_CORE, "Debug log of HiLog API test"); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0200 + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0200 * @tc.name : HILOG_INFO parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0200, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0200, Function | MediumTest | Level1) { - HILOG_INFO(LOG_CORE, "Info log of Hilog API test"); + HILOG_INFO(LOG_CORE, "Info log of HiLog API test"); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0300 + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0300 * @tc.name : HILOG_WARN parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0300, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0300, Function | MediumTest | Level1) { - HILOG_WARN(LOG_CORE, "Warn log of Hilog API test"); + HILOG_WARN(LOG_CORE, "Warn log of HiLog API test"); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0400 + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0400 * @tc.name : HILOG_ERROR parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0400, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0400, Function | MediumTest | Level1) { - HILOG_ERROR(LOG_CORE, "Error log of Hilog API test"); + HILOG_ERROR(LOG_CORE, "Error log of HiLog API test"); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0500 + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0500 * @tc.name : HILOG_FATAL parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0500, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0500, Function | MediumTest | Level1) { - HILOG_FATAL(LOG_CORE, "Fatal log of Hilog API test"); + HILOG_FATAL(LOG_CORE, "Fatal log of HiLog API test"); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0600 - * @tc.name : Hilog::Debug parameter legal test (Cortex-A, C) + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0600 + * @tc.name : HiLog::Debug parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0600, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0600, Function | MediumTest | Level1) { - bool ret = True; - ret = Hilog::Debug(LABEL, "Debug log of Hilog API test"); + bool ret = true; + ret = HiLog::Debug(LABEL, "Debug log of HiLog API test"); EXPECT_TRUE(ret); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0700 - * @tc.name : Hilog::Error parameter legal test (Cortex-A, C) + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0700 + * @tc.name : HiLog::Error parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0700, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0700, Function | MediumTest | Level1) { - bool ret = True; - ret = Hilog::Error(LABEL, "Error log of Hilog API test"); + bool ret = true; + ret = HiLog::Error(LABEL, "Error log of HiLog API test"); EXPECT_TRUE(ret); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0800 - * @tc.name : Hilog::Fatal parameter legal test (Cortex-A, C) + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0800 + * @tc.name : HiLog::Fatal parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0800, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0800, Function | MediumTest | Level1) { - bool ret = True; - ret = Hilog::Fatal(LABEL, "Fatal log of Hilog API test"); + bool ret = true; + ret = HiLog::Fatal(LABEL, "Fatal log of HiLog API test"); EXPECT_TRUE(ret); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_0900 - * @tc.name : Hilog::Info parameter legal test (Cortex-A, C) + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0900 + * @tc.name : HiLog::Info parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi0900, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi0900, Function | MediumTest | Level1) { - bool ret = True; - ret = Hilog::Info(LABEL, "Info log of Hilog API test"); + bool ret = true; + ret = HiLog::Info(LABEL, "Info log of HiLog API test"); EXPECT_TRUE(ret); } /** - * @tc.number : Sub_Dfx_Dft_Hilog_Cortexaapi_1000 - * @tc.name : Hilog::Warn parameter legal test (Cortex-A, C) + * @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_1000 + * @tc.name : HiLog::Warn parameter legal test (Cortex-A, C) * @tc.desc : [C- SOFTWARE -0200] */ -HWTEST_F(HilogTest, subDfxDftHilogCortexaapi1000, Function | MediumTest | Level1) +HWTEST_F(HiLogTest, subDfxDftHiLogCortexaapi1000, Function | MediumTest | Level1) { - bool ret = True; - ret = Hilog::Warn(LABEL, "Warn log of Hilog API test"); + bool ret = true; + ret = HiLog::Warn(LABEL, "Warn log of HiLog API test"); EXPECT_TRUE(ret); }