Merge pull request !1968 from 牛国亮/master
This commit is contained in:
openharmony_ci 2024-10-17 04:39:29 +00:00 committed by Gitee
commit 737a9faee6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -300,42 +300,6 @@ HWTEST_F(SPdaemonTest, StopTestCase, TestSize.Level1)
EXPECT_EQ(flag, true);
}
/**
* @tc.name: ProfilerFpsTestCase
* @tc.desc: Test ProfilerFps
* @tc.type: FUNC
*/
HWTEST_F(SPdaemonTest, ProfilerFpsTestCase, TestSize.Level1)
{
ProfilerFPS &profiler = ProfilerFPS::GetInstance();
std::string packName = "ohos.samples.ecg";
int sectionsNum = 10;
FpsInfoProfiler fpsInfoResult;
int nums = 10;
int printCount = 10;
long long msStartTime = 0;
int numb = 20;
long long harTime = 0;
profiler.GetResultFPS(sectionsNum);
profiler.CalcFpsAndJitters();
profiler.GetSectionsFps(fpsInfoResult, nums);
profiler.GetSectionsPrint(printCount, msStartTime, numb, harTime);
std::string cmd = "SP_daemon -profilerfps 10";
std::string result = "";
bool flag = false;
auto ret = SPUtils::LoadCmd(cmd, result);
std::string::size_type strOne = result.find("set");
std::string::size_type strTwo = result.find("success");
if ((strOne != result.npos) && (strTwo != result.npos)) {
flag = true;
}
EXPECT_EQ(ret, true);
EXPECT_EQ(flag, true);
}
/**
* @tc.name: ScreenTestCase
* @tc.desc: Test Screen