Android perf tests: kill adbd on the device after running a test.

There's some data indicating that adbd on the device sometimes
spontaneously restores its connection.
After running a test, let's kill adbd and wait for bit.

This is a speculative change to try to make the bots healthier.

BUG=

Review URL: https://codereview.chromium.org/25574002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@226762 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
bulach@chromium.org 2013-10-03 15:24:36 +00:00
Родитель 33861a025b
Коммит cbb86738d1
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -459,6 +459,14 @@ class AndroidCommands(object):
if out.strip() != 'remount succeeded':
raise errors.MsgException('Remount failed: %s' % out)
def KillAdbdDevice(self):
logging.info('Killing adbd on the device...')
adb_pids = self.ExtractPid('adbd')
if adb_pids:
self.RunShellCommandWithSU('kill %s' % ' '.join(adb_pids))
logging.info('Waiting for device to settle...')
time.sleep(5)
def RestartAdbServer(self):
"""Restart the adb server."""
ret = self.KillAdbServer()

Просмотреть файл

@ -50,6 +50,7 @@ import pickle
import os
import sys
from pylib import android_commands
from pylib import constants
from pylib.base import base_test_result
from pylib.base import base_test_runner
@ -153,6 +154,11 @@ class TestRunner(base_test_runner.BaseTestRunner):
}
self._SaveResult(persisted_result)
try:
self.adb.KillAdbdDevice()
except Exception as e:
logging.error('Exception when killing adbd %s', e)
return (output, result_type)
def RunTest(self, test_name):