diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 09:49:31 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 09:49:31 +0000 |
commit | a644bc199536de369b6a9feb66dba1b4f2b69e0a (patch) | |
tree | 389db8dc95f845c56ba73a45554522a092988289 | |
parent | 33e8a361967746caed92d2a1e7cd245158af2109 (diff) | |
download | chromium_src-a644bc199536de369b6a9feb66dba1b4f2b69e0a.zip chromium_src-a644bc199536de369b6a9feb66dba1b4f2b69e0a.tar.gz chromium_src-a644bc199536de369b6a9feb66dba1b4f2b69e0a.tar.bz2 |
Android: a couple of fixes for perf tests.
Part of integrating build/android/test_runner.py perf with chromium.perf:
- The bots are failing since they can't find adb, use the named constant.
- Set the cwd as necessary (the buildbots run one level up from src/)
BUG=318369
TBR=frankf@chromium.org,tonyg@chromium.org
NOTRY=True
Review URL: https://codereview.chromium.org/67933003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234794 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/android/pylib/perf/setup.py | 6 | ||||
-rw-r--r-- | build/android/pylib/perf/test_runner.py | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/build/android/pylib/perf/setup.py b/build/android/pylib/perf/setup.py index 068212b..577e00a 100644 --- a/build/android/pylib/perf/setup.py +++ b/build/android/pylib/perf/setup.py @@ -33,9 +33,9 @@ def _KillPendingServers(): except Exception as e: logging.warning('Failed killing %s %s %s', server, pid, e) # Restart the adb server with taskset to set a single CPU affinity. - cmd_helper.RunCmd(['adb', 'kill-server']) - cmd_helper.RunCmd(['taskset', '-c', '0', 'adb', 'start-server']) - cmd_helper.RunCmd(['taskset', '-c', '0', 'adb', 'root']) + cmd_helper.RunCmd([constants.ADB_PATH, 'kill-server']) + cmd_helper.RunCmd(['taskset', '-c', '0', constants.ADB_PATH, 'start-server']) + cmd_helper.RunCmd(['taskset', '-c', '0', constants.ADB_PATH, 'root']) i = 1 while not android_commands.GetAttachedDevices(): time.sleep(i) diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py index 90a2dc3..b8ed416 100644 --- a/build/android/pylib/perf/test_runner.py +++ b/build/android/pylib/perf/test_runner.py @@ -144,8 +144,11 @@ class TestRunner(base_test_runner.BaseTestRunner): logfile = sys.stdout if self._options.single_step: logfile = None + cwd = os.path.abspath(constants.DIR_SOURCE_ROOT) + if full_cmd.startswith('src/'): + cwd = os.path.abspath(os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)) output, exit_code = pexpect.run( - full_cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT), + full_cmd, cwd=cwd, withexitstatus=True, logfile=logfile, timeout=timeout, env=os.environ) end_time = datetime.datetime.now() |