Changeset 122251 in webkit
- Timestamp:
- Jul 10, 2012 12:56:37 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r122234 r122251 1 2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> 2 3 [Chromium-Android] Use setup_test_runner() instead of start_helper() to setup test environment 4 https://bugs.webkit.org/show_bug.cgi?id=90894 5 6 Reviewed by Adam Barth. 7 8 start_helper() is actually start_pixel_test_helper() since r115601 (bug 81729). 9 Should use setup_test_runner() to setup test environment for chromium-android. 10 11 * Scripts/webkitpy/layout_tests/port/chromium_android.py: 12 (ChromiumAndroidPort.setup_test_run): Renamed from start_helper(). Added cache cleanup code. 13 (ChromiumAndroidPort.clean_up_test_run): Renamed from stop_helper(). 14 (ChromiumAndroidPort._path_to_helper): Returns None as we don't have a helper now. 15 (ChromiumAndroidPort): 16 (ChromiumAndroidPort._path_to_forwarder): Original _path_to_helper(). 17 (ChromiumAndroidPort._push_executable): 18 (ChromiumAndroidDriver.__init__): 19 (ChromiumAndroidDriver.cmd_line): 20 1 21 2012-07-09 Ojan Vafai <ojan@chromium.org> 2 22 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
r121812 r122251 58 58 DRT_APP_PACKAGE = 'org.chromium.native_test' 59 59 DRT_ACTIVITY_FULL_NAME = DRT_APP_PACKAGE + '/.ChromeNativeTestActivity' 60 DRT_APP_FILE_DIR = '/data/user/0/' + DRT_APP_PACKAGE + '/files/' 60 DRT_APP_DIR = '/data/user/0/' + DRT_APP_PACKAGE + '/' 61 DRT_APP_FILES_DIR = DRT_APP_DIR + 'files/' 62 DRT_APP_CACHE_DIR = DIR_APP_DIR + 'cache/' 61 63 62 64 # This only works for single core devices so far. … … 236 238 pass 237 239 238 def s tart_helper(self):240 def setup_test_run(self): 239 241 self._run_adb_command(['root']) 240 242 self._setup_performance() … … 250 252 self._synchronize_datetime() 251 253 254 # Delete the disk cache if any to ensure a clean test run. 255 # This is like what's done in ChromiumPort.setup_test_run but on the device. 256 self._run_adb_command(['shell', 'rm', '-r', DEVICE_APP_CACHE_DIR]) 257 252 258 # Start the HTTP server so that the device can access the test cases. 253 259 chromium.ChromiumPort.start_http_server(self, additional_dirs={TEST_PATH_PREFIX: self.layout_tests_dir()}) 254 260 255 261 _log.debug('Starting forwarder') 256 cmd =self._run_adb_command(['shell', '%s %s' % (DEVICE_FORWARDER_PATH, FORWARD_PORTS)])257 258 def stop_helper(self):262 self._run_adb_command(['shell', '%s %s' % (DEVICE_FORWARDER_PATH, FORWARD_PORTS)]) 263 264 def clean_up_test_run(self): 259 265 # Leave the forwarder and tests httpd server there because they are 260 266 # useful for debugging and do no harm to subsequent tests. … … 285 291 286 292 def _path_to_helper(self): 293 return None 294 295 def _path_to_forwarder(self): 287 296 return self._build_path(self.get_option('configuration'), 'forwarder') 288 297 … … 321 330 def _push_executable(self): 322 331 drt_host_path = self._path_to_driver() 323 forwarder_host_path = self._path_to_ helper()332 forwarder_host_path = self._path_to_forwarder() 324 333 host_stamp = int(float(max(os.stat(drt_host_path).st_mtime, 325 334 os.stat(forwarder_host_path).st_mtime))) … … 453 462 def __init__(self, port, worker_number, pixel_tests, no_timeout=False): 454 463 chromium.ChromiumDriver.__init__(self, port, worker_number, pixel_tests, no_timeout) 455 self._in_fifo_path = DRT_APP_FILE _DIR + 'DumpRenderTree.in'456 self._out_fifo_path = DRT_APP_FILE _DIR + 'DumpRenderTree.out'457 self._err_file_path = DRT_APP_FILE _DIR + 'DumpRenderTree.err'464 self._in_fifo_path = DRT_APP_FILES_DIR + 'DumpRenderTree.in' 465 self._out_fifo_path = DRT_APP_FILES_DIR + 'DumpRenderTree.out' 466 self._err_file_path = DRT_APP_FILES_DIR + 'DumpRenderTree.err' 458 467 self._restart_after_killed = False 459 468 self._read_fifo_proc = None … … 468 477 for param in original_cmd: 469 478 if param.startswith('--pixel-tests='): 470 self._device_image_path = DRT_APP_FILE _DIR + self._port.host.filesystem.basename(self._image_path)479 self._device_image_path = DRT_APP_FILES_DIR + self._port.host.filesystem.basename(self._image_path) 471 480 param = '--pixel-tests=' + self._device_image_path 472 481 cmd.append(param)
Note: See TracChangeset
for help on using the changeset viewer.