Chromium Code Reviews| Index: build/android/pylib/perf/setup.py |
| diff --git a/build/android/pylib/perf/setup.py b/build/android/pylib/perf/setup.py |
| index 0c976bd7f11f0b808d2c06935f8384c0b5432513..ddbbe5aa7b1362d0e9e70a6c2f912f2d74e1359d 100644 |
| --- a/build/android/pylib/perf/setup.py |
| +++ b/build/android/pylib/perf/setup.py |
| @@ -13,39 +13,13 @@ import signal |
| import shutil |
| import time |
| -from pylib import android_commands |
| -from pylib import cmd_helper |
| from pylib import constants |
| from pylib import forwarder |
| -from pylib import ports |
| +from pylib.utils import test_environment |
| import test_runner |
| -def _KillPendingServers(): |
| - for retry in range(5): |
| - for server in ['lighttpd', 'web-page-replay']: |
| - pids = [p.pid for p in psutil.process_iter() if server in p.name] |
| - for pid in pids: |
| - try: |
| - logging.warning('Killing %s %s', server, pid) |
| - os.kill(pid, signal.SIGQUIT) |
| - 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([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) |
| - i *= 2 |
| - if i > 10: |
| - break |
| - |
| - forwarder.Forwarder.UseMultiprocessing() |
| - |
| - |
| def Setup(test_options): |
| """Create and return the test runner factory and tests. |
| @@ -62,7 +36,9 @@ def Setup(test_options): |
| os.makedirs(constants.PERF_OUTPUT_DIR) |
| # Before running the tests, kill any leftover server. |
| - _KillPendingServers() |
| + logging.info('Restarting adb and waiting for device.') |
|
tonyg
2013/11/25 15:46:33
Is this necessary given that the methods themselve
Primiano Tucci (use gerrit)
2013/11/27 15:14:41
Done.
|
| + test_environment.CleanupPendingProcesses() |
| + forwarder.Forwarder.UseMultiprocessing() |
| if test_options.single_step: |
| # Running a single command, build the tests structure. |