diff --git a/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp b/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp index 607b7054adda93f35c1ea375f72f6a6f129ab5b8..5de1310c2bee49c707fde6e3bdfbba4e2f9fe190 100755 --- a/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp +++ b/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp @@ -69,8 +69,7 @@ HWTEST_F(LibhilogCtest, HILOG_INFO, Function|MediumTest|Level2) "%{private}lf,%{public}.2f,%s,%{private}c", i, 1.00001, 2.333333, "sse", 'a'); std::string expected{"I 03e00/testtag0testtag0testtag0testta: \ 123456789_1234567890_publicandprivatelogtestis:1,,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); std::cout<<"cmdRunResult = " + cmdRunResult<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2147483647,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2000,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1024,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2147483647,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2147483647,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,4000,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,65535,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1.010000,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.147484,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.15,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,321.1,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,b,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,20,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,23,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,10,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,0x13,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,16,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,19,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,0X1C,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1F,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,STRING2,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,中文,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.231000e+10,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,5.676767E-02,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.231e+10,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,0.0567677,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,,,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,,,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<