Commit 7cc571e3 authored by peter@chromium.org's avatar peter@chromium.org
Browse files

[Chromium] Switch back to a fixed fifo path for Android

https://bugs.webkit.org/show_bug.cgi?id=97230

Reviewed by Tony Chang.

Because not all external storage cards will be formated using a file
system that supports named pipes, Chromium has been changed to creating
the pipes in a temporary folder on the internal storage. Adapt this in
WebKit so we can continue to run layout tests.

This also includes an *unreviewed* fix for a breakage in the webkitpy
tests I made in r129221. Two lines and related to this code, so I decided
to include it in this change.

* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver.__init__):
(ChromiumAndroidDriver._setup_test):
(ChromiumAndroidDriver._update_version):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e4534296
2012-09-21 Peter Beverloo <peter@chromium.org>
[Chromium] Switch back to a fixed fifo path for Android
https://bugs.webkit.org/show_bug.cgi?id=97230
Reviewed by Tony Chang.
Because not all external storage cards will be formated using a file
system that supports named pipes, Chromium has been changed to creating
the pipes in a temporary folder on the internal storage. Adapt this in
WebKit so we can continue to run layout tests.
This also includes an *unreviewed* fix for a breakage in the webkitpy
tests I made in r129221. Two lines and related to this code, so I decided
to include it in this change.
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver.__init__):
(ChromiumAndroidDriver._setup_test):
(ChromiumAndroidDriver._update_version):
2012-09-20 Peter Beverloo <peter@chromium.org>
 
Leverage Chromium's code to set up FIFOs for Chromium Android layout tests
......
......@@ -56,6 +56,9 @@ COMMAND_LINE_FILE = DEVICE_SOURCE_ROOT_DIR + 'chrome-native-tests-command-line'
DEVICE_DRT_DIR = DEVICE_SOURCE_ROOT_DIR + 'drt/'
DEVICE_FORWARDER_PATH = DEVICE_DRT_DIR + 'forwarder'
# Path on the device where the test framework will create the fifo pipes.
DEVICE_FIFO_PATH = '/data/data/org.chromium.native_test/files/'
DRT_APP_PACKAGE = 'org.chromium.native_test'
DRT_ACTIVITY_FULL_NAME = DRT_APP_PACKAGE + '/.ChromeNativeTestActivity'
DRT_APP_CACHE_DIR = DEVICE_DRT_DIR + 'cache/'
......@@ -311,9 +314,9 @@ class ChromiumAndroidDriver(driver.Driver):
def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
super(ChromiumAndroidDriver, self).__init__(port, worker_number, pixel_tests, no_timeout)
self._cmd_line = None
self._in_fifo_path = ''
self._out_fifo_path = ''
self._err_fifo_path = ''
self._in_fifo_path = DEVICE_FIFO_PATH + 'stdin.fifo'
self._out_fifo_path = DEVICE_FIFO_PATH + 'test.fifo'
self._err_fifo_path = DEVICE_FIFO_PATH + 'stderr.fifo'
self._read_stdout_process = None
self._read_stderr_process = None
self._forwarder_process = None
......@@ -321,7 +324,6 @@ class ChromiumAndroidDriver(driver.Driver):
self._original_governors = {}
self._device_serial = port._get_device_serial(worker_number)
self._adb_command = ['adb', '-s', self._device_serial]
self._external_storage = ''
def __del__(self):
self._teardown_performance()
......@@ -343,11 +345,6 @@ class ChromiumAndroidDriver(driver.Driver):
if self._has_setup:
return
# Set up the fifo paths used for getting DumpRenderTree's output.
self._in_fifo_path = self._get_external_storage() + '/native_tests/stdin.fifo'
self._out_fifo_path = self._get_external_storage() + '/native_tests/test.fifo'
self._err_fifo_path = self._get_external_storage() + '/native_tests/stderr.fifo'
self._setup_md5sum_and_push_data_if_needed()
self._has_setup = True
self._run_adb_command(['root'])
......@@ -429,12 +426,6 @@ class ChromiumAndroidDriver(driver.Driver):
def _update_version(self, dir, version):
self._run_adb_command(['shell', 'echo %d > %sVERSION' % (version, dir)])
def _get_external_storage(self):
if not self._external_storage:
self._external_storage = self._run_adb_command(['shell', 'echo', '$EXTERNAL_STORAGE']).splitlines()[0]
assert self._external_storage, 'Unable to find $EXTERNAL_STORAGE'
return self._external_storage
def _run_adb_command(self, cmd, ignore_error=False):
self._log_debug('Run adb command: ' + str(cmd))
if ignore_error:
......
......@@ -232,9 +232,8 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
def test_drt_cmd_line(self):
cmd_line = self.driver._drt_cmd_line(True, ['--a'])
self.assertTrue('--a' in cmd_line)
self.assertTrue('--in-fifo=' + chromium_android.DEVICE_DRT_DIR + 'DumpRenderTree.in' in cmd_line)
self.assertTrue('--out-fifo=' + chromium_android.DEVICE_DRT_DIR + 'DumpRenderTree.out' in cmd_line)
self.assertTrue('--err-fifo=' + chromium_android.DEVICE_DRT_DIR + 'DumpRenderTree.err' in cmd_line)
self.assertTrue('--create-stdin-fifo' in cmd_line)
self.assertTrue('--separate-stderr-fifo' in cmd_line)
def test_read_prompt(self):
self.driver._server_process = driver_unittest.MockServerProcess(lines=['root@android:/ # '])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment