diff options
author | Yabin Cui <yabinc@google.com> | 2016-07-21 18:32:53 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-07-22 14:16:58 -0700 |
commit | 8a599d7c95f2a8207fb3fe90e824aab1f30abe62 (patch) | |
tree | 3c8490acb33c1b25af5f4043d94e261cdd98201a /simpleperf/cmd_stat_test.cpp | |
parent | a33edd664d194e03ca25220f8657e2610449d632 (diff) | |
download | extras-8a599d7c95f2a8207fb3fe90e824aab1f30abe62.tar.gz |
simpleperf: add --duration for stat/record command.
Also fix a bug in ReportCommandTest.callgraph_option.
Bug: http://b/30292111
Change-Id: I21ced0c8aa7ec10c60c4fc1ddc6e5dfd256feeb1
Test: run simpleperf_unit_test.
Diffstat (limited to 'simpleperf/cmd_stat_test.cpp')
-rw-r--r-- | simpleperf/cmd_stat_test.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/simpleperf/cmd_stat_test.cpp b/simpleperf/cmd_stat_test.cpp index 4d63498a..2610926d 100644 --- a/simpleperf/cmd_stat_test.cpp +++ b/simpleperf/cmd_stat_test.cpp @@ -109,3 +109,7 @@ TEST(stat_cmd, auto_generated_summary) { // Check if the summary of cpu-clock is generated. ASSERT_NE(s.npos, s.find("cpu-clock", pos)); } + +TEST(stat_cmd, duration_option) { + ASSERT_TRUE(StatCmd()->Run({"--duration", "1.2"})); +} |