OSDN Git Service

simpleperf: change the way running cts test.
authorYabin Cui <yabinc@google.com>
Wed, 30 Jan 2019 01:06:42 +0000 (17:06 -0800)
committerYabin Cui <yabinc@google.com>
Thu, 31 Jan 2019 22:31:09 +0000 (14:31 -0800)
commita24cf9633453220a75e34e339ee5b9c593198da4
tree8d6cde15487da77cb7dea1512137241b55da80b1
parent58a4d50ece679525d1c3a7fcd1bfa04701041a08
simpleperf: change the way running cts test.

To test profiling debuggable apps, simpleperf cts test sets default
app package name for all tests. But it has below problems:
1. It is not explicit in the code of each test, thus harder to maintain.
2. It doesn't profile an app process, thus can't test profiling Java code.
3. Some tests are not suitable to run with app package name and have to
   disable app package name manually. This will be true for more tests
   if testing profileable apps.

So this CL changes the way running cts tests:
1. Remove default app package name, so all tests by default run in
   shell context.
2. Add explict tests to test profiling debuggable apps and profileable
   apps.

Bug: 118835348
Test: run CtsSimpleperfTestCases.

Change-Id: I7eacaf0dc66357dbb339a6e6d4c5ca694afa2619
simpleperf/Android.bp
simpleperf/cmd_record.cpp
simpleperf/cmd_record_test.cpp
simpleperf/cmd_stat.cpp
simpleperf/cmd_stat_test.cpp
simpleperf/environment.cpp
simpleperf/environment.h
simpleperf/gtest_main.cpp
simpleperf/test_util.h