OSDN Git Service

simpleperf: add tests for scripts.
authorYabin Cui <yabinc@google.com>
Tue, 18 Jul 2017 01:08:57 +0000 (18:08 -0700)
committerYabin Cui <yabinc@google.com>
Fri, 21 Jul 2017 22:13:15 +0000 (15:13 -0700)
commitbfe1a73b29661a79b3d58300bfe4ce539a5fee44
tree600ed51eab6a9f7f8ba7cec5af109a193717a257
parent945911cbae783f92d0aa525507742f7e52ff6278
simpleperf: add tests for scripts.

Also adjust scripts based on test results:
1. Use `pidof` in app_profiler.py.
2. Improve the way finding source files in annotate.py.
3. Change report.py to be a python wrapper of simpleperf report command,
   so users don't need to find different simpleperf binaries for different platforms.
4. Change README.md accordingly.

Bug: http://b/63006886
Test: run test.py on all platforms.

Change-Id: I00b098a1c72824226e509d7b1e5405c7cc43b856
24 files changed:
simpleperf/README.md
simpleperf/demo/README.md
simpleperf/scripts/Android.mk
simpleperf/scripts/annotate.py
simpleperf/scripts/app_profiler.py
simpleperf/scripts/binary_cache_builder.py
simpleperf/scripts/pprof_proto_generator.py
simpleperf/scripts/report.py
simpleperf/scripts/test.py [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExampleOfKotlin/app-profiling.apk [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExampleOfKotlin/java/com/example/simpleperf/simpleperfexampleofkotlin/MainActivity.kt [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExamplePureJava/app-profiling.apk [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExamplePureJava/java/com/example/simpleperf/simpleperfexamplepurejava/MainActivity.java [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/app-profiling.apk [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/cpp/native-lib.cpp [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/java/com/example/simpleperf/simpleperfexamplewithnative/MainActivity.java [new file with mode: 0644]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/arm64-v8a/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/armeabi-v7a/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/armeabi/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/mips/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/mips64/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/x86/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/testdata/SimpleperfExampleWithNative/shared_libs/cmake/profiling/obj/x86_64/libnative-lib.so [new file with mode: 0755]
simpleperf/scripts/utils.py