diff options
author | Yabin Cui <yabinc@google.com> | 2017-02-23 15:54:11 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2017-02-23 15:55:21 -0800 |
commit | ada97db3d4336faac601663e8bb4b59835ae49a0 (patch) | |
tree | d7e036162f24d6991ffc158c04927bf197f7c7af /simpleperf/cmd_report_test.cpp | |
parent | d9d23181768df567d166b79a89cfc0408e086509 (diff) | |
download | extras-ada97db3d4336faac601663e8bb4b59835ae49a0.tar.gz |
simpleperf: generate one report for each event attr.
Bug: http://b/35475170
Test: run simpleperf_unit_test.
Test: run report.py.
Change-Id: Ie9329a64c701bce38f7b440c16cb47e99e83db45
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r-- | simpleperf/cmd_report_test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp index 9a5c23bd..e7437d5a 100644 --- a/simpleperf/cmd_report_test.cpp +++ b/simpleperf/cmd_report_test.cpp @@ -324,8 +324,11 @@ TEST_F(ReportCommandTest, report_symbols_of_nativelib_in_apk) { TEST_F(ReportCommandTest, report_more_than_one_event_types) { Report(PERF_DATA_WITH_TWO_EVENT_TYPES); ASSERT_TRUE(success); - ASSERT_NE(content.find("cpu-cycles"), std::string::npos); - ASSERT_NE(content.find("cpu-clock"), std::string::npos); + size_t pos = 0; + ASSERT_NE(pos = content.find("cpu-cycles", pos), std::string::npos); + ASSERT_NE(pos = content.find("Samples:", pos), std::string::npos); + ASSERT_NE(pos = content.find("cpu-clock", pos), std::string::npos); + ASSERT_NE(pos = content.find("Samples:", pos), std::string::npos); } TEST_F(ReportCommandTest, report_kernel_symbol) { |