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

Unified Diff: build/android/pylib/flag_changer.py

Issue 11876021: Support startup performance tests on Galaxy S3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: S3 startup performance tests - fixes to file_changer Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | build/android/pylib/perf_tests_helper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/flag_changer.py
diff --git a/build/android/pylib/flag_changer.py b/build/android/pylib/flag_changer.py
index 8b8dbca59055f4a4c7ac1005fd95669ef599dd11..b8fc2ab696dcbd6de64e3115753aca321061cdd3 100644
--- a/build/android/pylib/flag_changer.py
+++ b/build/android/pylib/flag_changer.py
@@ -9,6 +9,7 @@ import warnings
# Location where chrome reads command line flags from
CHROME_COMMAND_FILE = '/data/local/chrome-command-line'
+CHROME_TEMP_COMMAND_FILE='/sdcard/chrome-command-line-temp'
bulach 2013/01/15 09:51:01 I guess "sdcard" should be "$EXTERNAL_STORAGE"
class FlagChanger(object):
"""Changes the flags Chrome runs with.
@@ -89,11 +90,18 @@ class FlagChanger(object):
print "Current flags: ", self._current_flags
if self._current_flags:
- self._android_cmd.SetFileContents(CHROME_COMMAND_FILE,
+ # The command file is protected, so we have to go via a temp file
+ self._android_cmd.SetFileContents(CHROME_TEMP_COMMAND_FILE,
'chrome ' +
' '.join(self._current_flags))
+ self._android_cmd.RunShellCommand('su -c dd if=' +
+ CHROME_TEMP_COMMAND_FILE +
+ ' of=' + CHROME_COMMAND_FILE)
+ self._android_cmd.RunShellCommand('su -c chmod 777 ' +
+ CHROME_COMMAND_FILE)
+ self._android_cmd.RunShellCommand('rm ' + CHROME_TEMP_COMMAND_FILE)
bulach 2013/01/15 09:51:01 we could potentially generate a shell script for t
else:
- self._android_cmd.RunShellCommand('rm ' + CHROME_COMMAND_FILE)
+ self._android_cmd.RunShellCommand('su -c rm ' + CHROME_COMMAND_FILE)
def _TokenizeFlags(self, line):
"""Changes the string containing the command line into a list of flags.
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | build/android/pylib/perf_tests_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698