summaryrefslogtreecommitdiff
path: root/tools/auto_gen_test_config.py
diff options
context:
space:
mode:
author Dan Shi <dshi@google.com> 2024-09-26 17:45:06 +0000
committer Dan Shi <dshi@google.com> 2024-09-26 17:45:06 +0000
commit613b643ccfb09ccce2cae2a84cb64ee9c673680b (patch)
tree063340c5ee1ab67da569921261422f1bf51a6854 /tools/auto_gen_test_config.py
parentcebf3ed952bfe371f855c4b0d098eb4f11dfd54e (diff)
Support test_runner_options in android_test
Bug: 369606588 Test: m HelloActivityTests Change-Id: If36110dc4b3e8d76b6f57e1eb8e3b6f5bbb6cb25
Diffstat (limited to 'tools/auto_gen_test_config.py')
-rwxr-xr-xtools/auto_gen_test_config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/auto_gen_test_config.py b/tools/auto_gen_test_config.py
index 8ee599a1ec..d54c4121e4 100755
--- a/tools/auto_gen_test_config.py
+++ b/tools/auto_gen_test_config.py
@@ -34,6 +34,7 @@ PLACEHOLDER_MODULE = '{MODULE}'
PLACEHOLDER_PACKAGE = '{PACKAGE}'
PLACEHOLDER_RUNNER = '{RUNNER}'
PLACEHOLDER_TEST_TYPE = '{TEST_TYPE}'
+PLACEHOLDER_EXTRA_TEST_RUNNER_CONFIGS = '{EXTRA_TEST_RUNNER_CONFIGS}'
def main(argv):
@@ -59,6 +60,7 @@ def main(argv):
"instrumentation_test_config_template",
help="Path to the instrumentation test config template.")
parser.add_argument("--extra-configs", default="")
+ parser.add_argument("--extra-test-runner-configs", default="")
args = parser.parse_args(argv)
target_config = args.target_config
@@ -66,6 +68,7 @@ def main(argv):
empty_config = args.empty_config
instrumentation_test_config_template = args.instrumentation_test_config_template
extra_configs = '\n'.join(args.extra_configs.split('\\n'))
+ extra_test_runner_configs = '\n'.join(args.extra_test_runner_configs.split('\\n'))
module = os.path.splitext(os.path.basename(target_config))[0]
@@ -131,6 +134,7 @@ def main(argv):
config = config.replace(PLACEHOLDER_PACKAGE, package)
config = config.replace(PLACEHOLDER_TEST_TYPE, test_type)
config = config.replace(PLACEHOLDER_EXTRA_CONFIGS, extra_configs)
+ config = config.replace(PLACEHOLDER_EXTRA_TEST_RUNNER_CONFIGS, extra_test_runner_configs)
config = config.replace(PLACEHOLDER_RUNNER, runner)
with open(target_config, 'w') as config_file:
config_file.write(config)