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

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: rebase Created 4 years, 11 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
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 sys 8 import sys
9 import tempfile 9 import tempfile
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 class GtestTestInstance(test_instance.TestInstance): 130 class GtestTestInstance(test_instance.TestInstance):
131 131
132 def __init__(self, args, isolate_delegate, error_func): 132 def __init__(self, args, isolate_delegate, error_func):
133 super(GtestTestInstance, self).__init__() 133 super(GtestTestInstance, self).__init__()
134 # TODO(jbudorick): Support multiple test suites. 134 # TODO(jbudorick): Support multiple test suites.
135 if len(args.suite_name) > 1: 135 if len(args.suite_name) > 1:
136 raise ValueError('Platform mode currently supports only 1 gtest suite') 136 raise ValueError('Platform mode currently supports only 1 gtest suite')
137 self._extract_test_list_from_filter = args.extract_test_list_from_filter 137 self._extract_test_list_from_filter = args.extract_test_list_from_filter
138 self._shard_timeout = args.shard_timeout 138 self._shard_timeout = args.shard_timeout
139 self._skip_clear_data = args.skip_clear_data
139 self._suite = args.suite_name[0] 140 self._suite = args.suite_name[0]
140 141
141 incremental_part = '_incremental' if args.incremental_install else '' 142 incremental_part = '_incremental' if args.incremental_install else ''
142 apk_path = os.path.join( 143 apk_path = os.path.join(
143 constants.GetOutDirectory(), '%s_apk' % self._suite, 144 constants.GetOutDirectory(), '%s_apk' % self._suite,
144 '%s-debug%s.apk' % (self._suite, incremental_part)) 145 '%s-debug%s.apk' % (self._suite, incremental_part))
145 self._exe_path = os.path.join(constants.GetOutDirectory(), 146 self._exe_path = os.path.join(constants.GetOutDirectory(),
146 self._suite) 147 self._suite)
147 if not os.path.exists(apk_path): 148 if not os.path.exists(apk_path):
148 self._apk_helper = None 149 self._apk_helper = None
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 243
243 @property 244 @property
244 def runner(self): 245 def runner(self):
245 return self._apk_helper and self._apk_helper.GetInstrumentationName() 246 return self._apk_helper and self._apk_helper.GetInstrumentationName()
246 247
247 @property 248 @property
248 def shard_timeout(self): 249 def shard_timeout(self):
249 return self._shard_timeout 250 return self._shard_timeout
250 251
251 @property 252 @property
253 def skip_clear_data(self):
254 return self._skip_clear_data
255
256 @property
252 def suite(self): 257 def suite(self):
253 return self._suite 258 return self._suite
254 259
255 @property 260 @property
256 def test_arguments(self): 261 def test_arguments(self):
257 return self._test_arguments 262 return self._test_arguments
258 263
259 @property 264 @property
260 def extract_test_list_from_filter(self): 265 def extract_test_list_from_filter(self):
261 return self._extract_test_list_from_filter 266 return self._extract_test_list_from_filter
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 result_type = None 370 result_type = None
366 371
367 return results 372 return results
368 373
369 #override 374 #override
370 def TearDown(self): 375 def TearDown(self):
371 """Clear the mappings created by SetUp.""" 376 """Clear the mappings created by SetUp."""
372 if self._isolate_delegate: 377 if self._isolate_delegate:
373 self._isolate_delegate.Clear() 378 self._isolate_delegate.Clear()
374 379
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698