summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2020-05-27 13:37:18 -0700
committerYabin Cui <yabinc@google.com>2020-05-27 13:37:18 -0700
commit30cc3c5e319bf50dc3d5c06ff25383d870da9eb1 (patch)
treef5ec48785239bcff54b18424691cd05f7902bc6b /simpleperf/cmd_report_test.cpp
parent8279e6342e4a79b6579129f1ab05dddd27688c94 (diff)
downloadextras-30cc3c5e319bf50dc3d5c06ff25383d870da9eb1.tar.gz
simpleperf: support report --csv option.
Bug: 156776613 Test: run simpleperf_unit_test. Change-Id: Ib9f34c49ab48ae40012a50b327c8673fd6a1df5d
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r--simpleperf/cmd_report_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index e112d0d0..36837f9e 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -495,6 +495,16 @@ TEST_F(ReportCommandTest, report_big_trace_data) {
ASSERT_TRUE(success);
}
+TEST_F(ReportCommandTest, csv_option) {
+ Report(PERF_DATA, {"--csv"});
+ ASSERT_TRUE(success);
+ ASSERT_NE(content.find("EventCount,EventName"), std::string::npos);
+
+ Report(CALLGRAPH_FP_PERF_DATA, {"--children", "--csv"});
+ ASSERT_TRUE(success);
+ ASSERT_NE(content.find("AccEventCount,SelfEventCount,EventName"), std::string::npos);
+}
+
#if defined(__linux__)
#include "event_selection_set.h"