OSDN Git Service

simpleperf: change the way running cts tests.
authorYabin Cui <yabinc@google.com>
Fri, 14 Jul 2017 22:59:56 +0000 (15:59 -0700)
committerYabin Cui <yabinc@google.com>
Sat, 15 Jul 2017 00:58:51 +0000 (17:58 -0700)
commit616b3a020bf708f364e0608107ded083930ac6b4
treecf7de582ecda3ec87fe4a9f35b71f55aa996fe56
parent9aa1dc2f3039db9faee9d581360a5d65caddb8f4
simpleperf: change the way running cts tests.

Before this CL, CtsSimpleperfTestCases copies itself to the app's
directory, then run it using run-as.

With this CL, CtsSimpleperfTestCases keeps itself in /data/local/tmp,
but forces stat/record cmd to run with --app option. This gives
more freedom to tests:
1. They can stay in shell's context with --in-app option.
2. The stat/record cmds are started in the shell's context, so
they can collect information no available in app's context (like
data in /sys/kernel/debug/tracing/events).

This is a preparation to add tests for recording tracepoint events.
It also matches the way we want users to use simpleperf (with --app option).

Bug: http://b/29520177
Test: run CtsSimpleperfTestCases.

Change-Id: I1709adfb1ff7169df87560226c197e473fdf8516
14 files changed:
simpleperf/Android.mk
simpleperf/cmd_record.cpp
simpleperf/cmd_record_test.cpp
simpleperf/cmd_stat.cpp
simpleperf/cmd_stat_test.cpp
simpleperf/command.cpp
simpleperf/command.h
simpleperf/environment.cpp
simpleperf/environment.h
simpleperf/gtest_main.cpp
simpleperf/main.cpp
simpleperf/test_util.h
simpleperf/workload.cpp
simpleperf/workload.h