Index: build/android/pylib/gtest/gtest_test_instance.py |
diff --git a/build/android/pylib/gtest/gtest_test_instance.py b/build/android/pylib/gtest/gtest_test_instance.py |
index a4264282161fd43742a01adf4535a5b6101d131b..df285fbe5b62f89a5493268b0785840b95903c2c 100644 |
--- a/build/android/pylib/gtest/gtest_test_instance.py |
+++ b/build/android/pylib/gtest/gtest_test_instance.py |
@@ -334,11 +334,25 @@ class GtestTestInstance(test_instance.TestInstance): |
self._app_data_files = None |
self._app_data_file_dir = None |
- self._test_arguments = args.test_arguments |
+ self._flags = None |
+ self._initializeCommandLineFlags(args) |
# TODO(jbudorick): Remove this once it's deployed. |
self._enable_xml_result_parsing = args.enable_xml_result_parsing |
+ def _initializeCommandLineFlags(self, args): |
+ self._flags = [] |
+ if args.command_line_flags: |
+ self._flags.extend(args.command_line_flags) |
+ if args.device_flags_file: |
+ with open(args.device_flags_file) as f: |
+ stripped_lines = (l.strip() for l in f) |
+ self._flags.extend(flag for flag in stripped_lines if flag) |
+ if args.run_disabled: |
+ self._flags.append('--gtest_also_run_disabled_tests') |
+ if args.test_arguments: |
+ self._flags.extend(args.test_arguments.split()) |
+ |
@property |
def activity(self): |
return self._apk_helper and self._apk_helper.GetActivityName() |
@@ -380,8 +394,8 @@ class GtestTestInstance(test_instance.TestInstance): |
return self._extras |
@property |
- def gtest_also_run_disabled_tests(self): |
- return self._run_disabled |
+ def flags(self): |
+ return self._flags |
@property |
def gtest_filter(self): |
@@ -416,10 +430,6 @@ class GtestTestInstance(test_instance.TestInstance): |
return self._test_apk_incremental_install_script |
@property |
- def test_arguments(self): |
- return self._test_arguments |
- |
- @property |
def total_external_shards(self): |
return self._total_external_shards |