[Chromium-Android] Restart the device's shell in root before pushing data
authorpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Nov 2012 19:12:12 +0000 (19:12 +0000)
committerpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Nov 2012 19:12:12 +0000 (19:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=101944

Reviewed by Adam Barth.

Setting up md5sum and pushing the executable, fonts and test resources was
unintentionally being done prior to executing the "adb root" command,
which restarts the device's shell to be root. Since test data is still
being pushed to /data/local/tmp, writing to which requires root access,
devices not running as root would throw a ScriptError.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py

index bc4f124..46cdd5d 100644 (file)
@@ -1,3 +1,19 @@
+2012-11-12  Peter Beverloo  <peter@chromium.org>
+
+        [Chromium-Android] Restart the device's shell in root before pushing data
+        https://bugs.webkit.org/show_bug.cgi?id=101944
+
+        Reviewed by Adam Barth.
+
+        Setting up md5sum and pushing the executable, fonts and test resources was
+        unintentionally being done prior to executing the "adb root" command,
+        which restarts the device's shell to be root. Since test data is still
+        being pushed to /data/local/tmp, writing to which requires root access,
+        devices not running as root would throw a ScriptError.
+
+        * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+        (ChromiumAndroidDriver._setup_test):
+
 2012-11-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         [Qt] Support ResourceRequest's setTimeoutInterval
index b8ac55a..d059dfc 100644 (file)
@@ -354,10 +354,11 @@ class ChromiumAndroidDriver(driver.Driver):
         if self._has_setup:
             return
 
+        self._run_adb_command(['root'])
         self._setup_md5sum_and_push_data_if_needed()
         self._has_setup = True
-        self._run_adb_command(['root'])
         self._setup_performance()
+
         # Required by webkit_support::GetWebKitRootDirFilePath().
         # Other directories will be created automatically by adb push.
         self._run_adb_command(['shell', 'mkdir', '-p', DEVICE_SOURCE_ROOT_DIR + 'chrome'])