As mentioned earlier, native metric tests are typically used for exercising HAL or interacting directly with lower level system services, and to leverage continuous testing service, native metric tests should be built with google-benchmark framework.
Here are some general instructions:
See sample native test module setup at: bionic/benchmarks/bionic-benchmarks
Test module makefile should use BUILD_NATIVE_BENCHMARK
build rule so that google-benchmark dependencies are included automatically
Build the test module with make:
make -j40 bionic-benchmarks
Automatic installation and run with the TradeFederation test harness:
make tradefed-all -j tradefed.sh run template/local_min --template:map test=bionic-benchmarks
Manually Install and Run:
Push the generated test binary onto device:
adb push ${OUT}/data/benchmarktest/bionic-benchmarks/bionic-benchmarks32 \ /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32
Execute the test by invoking test binary on device:
adb shell /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32