diff --git a/hiviewdfx/hilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp b/hiviewdfx/hilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp index ca39528ed6cc94ae3e8361136625525164e5c764..32ac7122dd5d0504a93f9e4e549d78628bcb8e55 100755 --- a/hiviewdfx/hilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp +++ b/hiviewdfx/hilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp @@ -46,11 +46,6 @@ void LibhilogCPPtest::TearDown() } void LibhilogCPPtest::SetUpTestCase() { - std::vector cmdret; - string cmd = "setprop persist.sys.hilog.debug.on false"; - ExecCmdWithRet(cmd, cmdret); - cmd = "setprop hilog.debug.on false"; - ExecCmdWithRet(cmd, cmdret); } void LibhilogCPPtest::TearDownTestCase() { diff --git a/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp b/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp index dc041095977e6f911da848b2bd2528a11b1b49c8..0e44b0cb38305f0d3ebe866992797a68e78ce9c7 100755 --- a/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp +++ b/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp @@ -49,11 +49,6 @@ void LibhilogCtest::TearDown() } void LibhilogCtest::SetUpTestCase() { - std::vector cmdret; - string cmd = "setprop persist.sys.hilog.debug.on false"; - ExecCmdWithRet(cmd, cmdret); - cmd = "setprop hilog.debug.on false"; - ExecCmdWithRet(cmd, cmdret); } void LibhilogCtest::TearDownTestCase() { diff --git a/hiviewdfx/hisyseventtest/hisyseventcpptest/HiSysEventCPPTest.cpp b/hiviewdfx/hisyseventtest/hisyseventcpptest/HiSysEventCPPTest.cpp index 3d2ea2c3f5b8885003e991ce77546109387c7a4a..f825d688c7428536defafafd5e9dd0651f2b1b2f 100755 --- a/hiviewdfx/hisyseventtest/hisyseventcpptest/HiSysEventCPPTest.cpp +++ b/hiviewdfx/hisyseventtest/hisyseventcpptest/HiSysEventCPPTest.cpp @@ -39,11 +39,7 @@ private: void HiSysEventCPPTest::SetUp() { std::cout << "SetUp" << std::endl; - std::vector cmdret; - string cmd = "hilog -r"; - ExecCmdWithRet(cmd, cmdret); - cmd = "setprop persist.sys.hilog.debug.on false"; - ExecCmdWithRet(cmd, cmdret); + CleanCmd(); } void HiSysEventCPPTest::TearDown() { diff --git a/hiviewdfx/utils/native/file_utils.cpp b/hiviewdfx/utils/native/file_utils.cpp index aa88bc44a22ea90baa6e01f9a9d162b6dcdb2894..bdfaa1cebec3dc0bb2bfc9e7379e0c6bcde1a0c8 100755 --- a/hiviewdfx/utils/native/file_utils.cpp +++ b/hiviewdfx/utils/native/file_utils.cpp @@ -87,6 +87,7 @@ void CleanCmd() std::string cleanCmd = "hilog -r"; CmdRun(cleanCmd, cmdResult); std::cout << cmdResult; + sleep(1); } std::string ExecuteCmd(std::string cmd)