1"""This module defines the android_benchmark_test macro.""" 2 3load("//tools/testrunners/common/android:android_test.bzl", "android_test") 4 5def android_benchmark_test(args = [], **kwargs): 6 """Defines an Android benchmark test. 7 8 This macro is just a wrapper around the android_test macro with the necessary defaults for 9 Android benchmark tests. See the android_test macro documentation for details. 10 11 Args: 12 args: Any command-line arguments to pass to the test. 13 **kwargs: Any arguments to pass to the underlying android_test macro instance. 14 """ 15 android_test( 16 extra_args = args + [ 17 "--outputDir", 18 # This environment variable is set by the adb_test_runner.go program. 19 "$ADB_TEST_OUTPUT_DIR", 20 ], 21 benchmark = True, 22 save_output_files = True, # Save any produced PNG and JSON files as undeclared outputs. 23 **kwargs 24 ) 25