Commit 005efa47 authored by Yun Liu's avatar Yun Liu Committed by Commit Bot

Add --coverage-dir to android gtest parser

Add the same flag as instrumentation and junit test options
to process coverage data later and avoid unknown flag on remote.

Bug: 972171
Change-Id: Ib982062adf64b5f7d7d221c166c5b0d23fab519f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1681273
Commit-Queue: Yun Liu <yliuyliu@google.com>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#673390}
parent 97b5560a
...@@ -257,13 +257,14 @@ class GtestTestInstance(test_instance.TestInstance): ...@@ -257,13 +257,14 @@ class GtestTestInstance(test_instance.TestInstance):
# TODO(jbudorick): Support multiple test suites. # TODO(jbudorick): Support multiple test suites.
if len(args.suite_name) > 1: if len(args.suite_name) > 1:
raise ValueError('Platform mode currently supports only 1 gtest suite') raise ValueError('Platform mode currently supports only 1 gtest suite')
self._isolated_script_test_perf_output = ( self._coverage_dir = args.coverage_dir
args.isolated_script_test_perf_output)
self._exe_dist_dir = None self._exe_dist_dir = None
self._external_shard_index = args.test_launcher_shard_index self._external_shard_index = args.test_launcher_shard_index
self._extract_test_list_from_filter = args.extract_test_list_from_filter self._extract_test_list_from_filter = args.extract_test_list_from_filter
self._filter_tests_lock = threading.Lock() self._filter_tests_lock = threading.Lock()
self._gs_test_artifacts_bucket = args.gs_test_artifacts_bucket self._gs_test_artifacts_bucket = args.gs_test_artifacts_bucket
self._isolated_script_test_perf_output = (
args.isolated_script_test_perf_output)
self._shard_timeout = args.shard_timeout self._shard_timeout = args.shard_timeout
self._store_tombstones = args.store_tombstones self._store_tombstones = args.store_tombstones
self._suite = args.suite_name[0] self._suite = args.suite_name[0]
...@@ -367,6 +368,10 @@ class GtestTestInstance(test_instance.TestInstance): ...@@ -367,6 +368,10 @@ class GtestTestInstance(test_instance.TestInstance):
def app_files(self): def app_files(self):
return self._app_data_files return self._app_data_files
@property
def coverage_dir(self):
return self._coverage_dir
@property @property
def enable_xml_result_parsing(self): def enable_xml_result_parsing(self):
return self._enable_xml_result_parsing return self._enable_xml_result_parsing
......
...@@ -370,6 +370,10 @@ def AddGTestOptions(parser): ...@@ -370,6 +370,10 @@ def AddGTestOptions(parser):
'-w', '--wait-for-java-debugger', action='store_true', '-w', '--wait-for-java-debugger', action='store_true',
help='Wait for java debugger to attach before running any application ' help='Wait for java debugger to attach before running any application '
'code. Also disables test timeouts and sets retries=0.') 'code. Also disables test timeouts and sets retries=0.')
parser.add_argument(
'--coverage-dir',
type=os.path.realpath,
help='Directory in which to place all generated coverage files.')
def AddInstrumentationTestOptions(parser): def AddInstrumentationTestOptions(parser):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment