Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: build/android/pylib/gtest/gtest_test_instance.py

Issue 1570043004: Adds --skip-clear-data flag to android's test_runner.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update todo Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_options.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import re 7 import re
8 import tempfile 8 import tempfile
9 9
10 from devil.android import apk_helper 10 from devil.android import apk_helper
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 class GtestTestInstance(test_instance.TestInstance): 129 class GtestTestInstance(test_instance.TestInstance):
130 130
131 def __init__(self, args, isolate_delegate, error_func): 131 def __init__(self, args, isolate_delegate, error_func):
132 super(GtestTestInstance, self).__init__() 132 super(GtestTestInstance, self).__init__()
133 # TODO(jbudorick): Support multiple test suites. 133 # TODO(jbudorick): Support multiple test suites.
134 if len(args.suite_name) > 1: 134 if len(args.suite_name) > 1:
135 raise ValueError('Platform mode currently supports only 1 gtest suite') 135 raise ValueError('Platform mode currently supports only 1 gtest suite')
136 self._extract_test_list_from_filter = args.extract_test_list_from_filter 136 self._extract_test_list_from_filter = args.extract_test_list_from_filter
137 self._shard_timeout = args.shard_timeout 137 self._shard_timeout = args.shard_timeout
138 self._skip_clear_data = args.skip_clear_data
138 self._suite = args.suite_name[0] 139 self._suite = args.suite_name[0]
139 140
140 incremental_part = '_incremental' if args.incremental_install else '' 141 incremental_part = '_incremental' if args.incremental_install else ''
141 apk_path = os.path.join( 142 apk_path = os.path.join(
142 constants.GetOutDirectory(), '%s_apk' % self._suite, 143 constants.GetOutDirectory(), '%s_apk' % self._suite,
143 '%s-debug%s.apk' % (self._suite, incremental_part)) 144 '%s-debug%s.apk' % (self._suite, incremental_part))
144 self._exe_path = os.path.join(constants.GetOutDirectory(), 145 self._exe_path = os.path.join(constants.GetOutDirectory(),
145 self._suite) 146 self._suite)
146 if not os.path.exists(apk_path): 147 if not os.path.exists(apk_path):
147 self._apk_helper = None 148 self._apk_helper = None
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 242
242 @property 243 @property
243 def runner(self): 244 def runner(self):
244 return self._apk_helper and self._apk_helper.GetInstrumentationName() 245 return self._apk_helper and self._apk_helper.GetInstrumentationName()
245 246
246 @property 247 @property
247 def shard_timeout(self): 248 def shard_timeout(self):
248 return self._shard_timeout 249 return self._shard_timeout
249 250
250 @property 251 @property
252 def skip_clear_data(self):
253 return self._skip_clear_data
254
255 @property
251 def suite(self): 256 def suite(self):
252 return self._suite 257 return self._suite
253 258
254 @property 259 @property
255 def test_arguments(self): 260 def test_arguments(self):
256 return self._test_arguments 261 return self._test_arguments
257 262
258 @property 263 @property
259 def extract_test_list_from_filter(self): 264 def extract_test_list_from_filter(self):
260 return self._extract_test_list_from_filter 265 return self._extract_test_list_from_filter
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 result_type = None 369 result_type = None
365 370
366 return results 371 return results
367 372
368 #override 373 #override
369 def TearDown(self): 374 def TearDown(self):
370 """Clear the mappings created by SetUp.""" 375 """Clear the mappings created by SetUp."""
371 if self._isolate_delegate: 376 if self._isolate_delegate:
372 self._isolate_delegate.Clear() 377 self._isolate_delegate.Clear()
373 378
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_options.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698