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

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

Issue 13257008: Android: Enable a bunch of InProcessBrowserLayoutTests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update disabled list with failing tests. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 glob 5 import glob
6 import logging 6 import logging
7 import os 7 import os
8 8
9 from pylib import android_commands 9 from pylib import android_commands
10 from pylib import constants 10 from pylib import constants
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 elif test_suite_basename == 'perf_tests': 124 elif test_suite_basename == 'perf_tests':
125 return [ 125 return [
126 'base/test/data', 126 'base/test/data',
127 ] 127 ]
128 elif test_suite_basename == 'content_browsertests': 128 elif test_suite_basename == 'content_browsertests':
129 return [ 129 return [
130 'content/test/data', 130 'content/test/data',
131 ] 131 ]
132 return [] 132 return []
133 133
134 def _GetOptionalDataFilesForTestSuite(test_suite_basename):
Yaron 2013/04/02 01:54:43 Why are these optional? Why might they not exist?
nilesh 2013/04/02 17:04:01 On the svn workflow these directories do not exist
135 """Returns a list of data files/dirs that are pushed if present.
136
137 Args:
138 test_suite_basename: The test suite basename for which to return file paths.
139
140 Returns:
141 A list of test file and directory paths.
142 """
143 if test_suite_basename == 'content_browsertests':
Yaron 2013/04/02 01:54:43 How much data does this end up copying?
nilesh 2013/04/02 17:04:01 less than 50MB (but only when someone is trying to
144 return [
145 'third_party/WebKit/LayoutTests/fast/events',
146 'third_party/WebKit/LayoutTests/fast/files',
147 'third_party/WebKit/LayoutTests/fast/filesystem',
148 'third_party/WebKit/LayoutTests/fast/js/resources',
149 'third_party/WebKit/LayoutTests/fast/workers',
150 'third_party/WebKit/LayoutTests/http/tests',
151 'third_party/WebKit/LayoutTests/media',
152 'third_party/WebKit/LayoutTests/storage/indexeddb',
153 ]
154 return []
155
134 156
135 def _TestSuiteRequiresMockTestServer(test_suite_basename): 157 def _TestSuiteRequiresMockTestServer(test_suite_basename):
136 """Returns True if the test suite requires mock test server.""" 158 """Returns True if the test suite requires mock test server."""
137 tests_require_net_test_server = ['unit_tests', 'net_unittests', 159 tests_require_net_test_server = ['unit_tests', 'net_unittests',
138 'content_unittests', 160 'content_unittests',
139 'content_browsertests'] 161 'content_browsertests']
140 return (test_suite_basename in 162 return (test_suite_basename in
141 tests_require_net_test_server) 163 tests_require_net_test_server)
142 164
143 165
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 218
197 219
198 def StripAndCopyFiles(self): 220 def StripAndCopyFiles(self):
199 """Strips and copies the required data files for the test suite.""" 221 """Strips and copies the required data files for the test suite."""
200 self.test_package.StripAndCopyExecutable() 222 self.test_package.StripAndCopyExecutable()
201 self.test_package.PushDataAndPakFiles() 223 self.test_package.PushDataAndPakFiles()
202 self.tool.CopyFiles() 224 self.tool.CopyFiles()
203 test_data = _GetDataFilesForTestSuite(self.test_package.test_suite_basename) 225 test_data = _GetDataFilesForTestSuite(self.test_package.test_suite_basename)
204 if test_data: 226 if test_data:
205 # Make sure SD card is ready. 227 # Make sure SD card is ready.
206 self.adb.WaitForSdCardReady(20) 228 self.adb.WaitForSdCardReady(20)
Yaron 2013/04/02 01:54:43 Maybe you should also be waiting for sd card to be
nilesh 2013/04/02 17:04:01 Done.
207 for data in test_data: 229 for data in test_data:
208 self.CopyTestData([data], self.adb.GetExternalStorage()) 230 self.CopyTestData([data], self.adb.GetExternalStorage())
231 optional_test_data = _GetOptionalDataFilesForTestSuite(
232 self.test_package.test_suite_basename)
233 if optional_test_data:
234 for data in optional_test_data:
235 if os.path.exists(data):
Yaron 2013/04/02 01:54:43 At least output what paths are being skipped, if a
nilesh 2013/04/02 17:04:01 These will always be ignored on the bots.
236 self.CopyTestData([data], self.adb.GetExternalStorage())
209 if self.test_package.test_suite_basename == 'webkit_unit_tests': 237 if self.test_package.test_suite_basename == 'webkit_unit_tests':
210 self.PushWebKitUnitTestsData() 238 self.PushWebKitUnitTestsData()
211 239
212 def PushWebKitUnitTestsData(self): 240 def PushWebKitUnitTestsData(self):
213 """Pushes the webkit_unit_tests data files to the device. 241 """Pushes the webkit_unit_tests data files to the device.
214 242
215 The path of this directory is different when the suite is being run as 243 The path of this directory is different when the suite is being run as
216 part of a WebKit check-out. 244 part of a WebKit check-out.
217 """ 245 """
218 webkit_src = os.path.join(constants.CHROME_DIR, 'third_party', 'WebKit') 246 webkit_src = os.path.join(constants.CHROME_DIR, 'third_party', 'WebKit')
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 self.LaunchChromeTestServerSpawner() 308 self.LaunchChromeTestServerSpawner()
281 self.tool.SetupEnvironment() 309 self.tool.SetupEnvironment()
282 310
283 #override 311 #override
284 def TearDown(self): 312 def TearDown(self):
285 """Cleans up the test enviroment for the test suite.""" 313 """Cleans up the test enviroment for the test suite."""
286 self.tool.CleanUpEnvironment() 314 self.tool.CleanUpEnvironment()
287 if self._cleanup_test_files: 315 if self._cleanup_test_files:
288 self.adb.RemovePushedFiles() 316 self.adb.RemovePushedFiles()
289 super(TestRunner, self).TearDown() 317 super(TestRunner, self).TearDown()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698