Commit 58b7c481 authored by b.kelemen@samsung.com's avatar b.kelemen@samsung.com

Drop warnings from adb shell output

This is a quick and dirty fix for a problem that occurs to me when
trying to run instrumentation tests in a simulator.
For some reason 'pm path org.chromium.content_shell_apk.tests' outputs
a warning message in my environment that confuses the python scripts
and they end up calling md5sum for the root directory which is a bit
slow... The real fix would be to be able drop the stderr of the command
but it needs a lot of plumbing and probably there is not that much chance
that something like that will happen again for someone.

BUG=334439

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247742 0039d316-1c4b-4281-b951-d872f2087c98
parent cc14c057
......@@ -641,6 +641,9 @@ class AndroidCommands(object):
if "'" in command: logging.warning(command + " contains ' quotes")
result = self._adb.SendShellCommand(
"'%s'" % command, timeout_time).splitlines()
# TODO(b.kelemen): we should really be able to drop the stderr of the
# command or raise an exception based on what the caller wants.
result = [ l for l in result if not l.startswith('WARNING') ]
if ['error: device not found'] == result:
raise errors.DeviceUnresponsiveError('device not found')
if log_result:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment