Surpress unimportant log messages on servo_test.

- Disable the ping messages, like:
11:19:12 INFO | PING 10.0.0.39 (10.0.0.39) 56(84) bytes of data.
11:19:12 INFO | From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
11:19:12 INFO |
11:19:12 INFO | --- 10.0.0.39 ping statistics ---
11:19:12 INFO | 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
11:19:12 INFO |

- Disable the SSH connection warning, like:
11:16:53 ERROR| [stderr] Warning: Permanently added '10.0.0.39' (RSA) to the list of known hosts.

- Disable the XML RPC server logging, like:
11:16:44 ERROR| localhost - - [10/Nov/2011 19:10:16] "POST /RPC2 HTTP/1.0" 200 -

BUG=chromium-os:22598
TEST=run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
        servo_vid=0x18d1 servo_pid=0x5001" firmware_TryFwB

Change-Id: I65d904775e66769e7a0a869539fb2a53bc85215d
Reviewed-on: https://gerrit.chromium.org/gerrit/11585
Reviewed-by: Todd Broch <tbroch@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/servo_test.py b/server/cros/servo_test.py
index e29a5ee..a47f749 100644
--- a/server/cros/servo_test.py
+++ b/server/cros/servo_test.py
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import logging
+import os
 import re
 import subprocess
 import time
@@ -237,8 +238,10 @@
           hostname: Hostname to ping.
           timeout: Time in seconds to wait for a response.
         """
-        return subprocess.call(['ping', '-c', '1', '-W',
-                                str(timeout), hostname]) == 0
+        with open(os.devnull, 'w') as fnull:
+            return subprocess.call(
+                    ['ping', '-c', '1', '-W', str(timeout), hostname],
+                    stdout=fnull, stderr=fnull) == 0
 
 
     def launch_client(self, info):
@@ -258,7 +261,7 @@
         self._kill_remote_process(info)
         logging.info('Client command: %s' % info['remote_command'])
         info['remote_process'] = subprocess.Popen([
-            'ssh -n %s root@%s \'%s\'' % (info['ssh_config'],
+            'ssh -n -q %s root@%s \'%s\'' % (info['ssh_config'],
             self._client.ip, info['remote_command'])], shell=True)
 
         # Connect to RPC object.
@@ -348,7 +351,7 @@
         """
         if not info['ssh_tunnel'] or info['ssh_tunnel'].poll() is not None:
             info['ssh_tunnel'] = subprocess.Popen([
-                'ssh -N -n %s -L %s:localhost:%s root@%s' %
+                'ssh -N -n -q %s -L %s:localhost:%s root@%s' %
                 (info['ssh_config'], info['port'], info['port'],
                 self._client.ip)], shell=True)
 
@@ -360,7 +363,7 @@
           info: A dict of remote info, see the definition of self._remote_infos.
         """
         kill_cmd = 'pkill -f %s' % info['remote_command_short']
-        subprocess.call(['ssh -n %s root@%s \'%s\'' %
+        subprocess.call(['ssh -n -q %s root@%s \'%s\'' %
                          (info['ssh_config'], self._client.ip, kill_cmd)],
                         shell=True)
         if info['remote_process'] and info['remote_process'].poll() is None: