Autotest: grab additional logging in bluetooth autotests

For the Bluetooth tests which run in the wificells, there are two
involved devices: a DUT and a tester.  The server side test creates
xmlrpc connections to both devices.

1. Create logging files on each device, to which logging and command
   results are piped.
2. Grab the test results.  Normally, sysinfo changes are grabbed
   automatically. This test setup has two hosts, which the default
   logger is not intended to handle.  Instead, copy logs explicitly.

Having logs from the DUT and tester, rather than just the server
side test, will ease debugging attempts.

BUG=chromium:426260
TEST=ran all bluetooth tests on a lab wificell: see all logs
Change-Id: I046726957f0fa83e65d29ec3982142af8c9949cb
Reviewed-on: https://chromium-review.googlesource.com/289860
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Katherine Threlkeld <kathrelkeld@chromium.org>
Tested-by: Katherine Threlkeld <kathrelkeld@chromium.org>
diff --git a/server/cros/bluetooth/bluetooth_tester.py b/server/cros/bluetooth/bluetooth_tester.py
index be213bc..e3e2b50 100644
--- a/server/cros/bluetooth/bluetooth_tester.py
+++ b/server/cros/bluetooth/bluetooth_tester.py
@@ -21,6 +21,7 @@
 
 
     XMLRPC_BRINGUP_TIMEOUT_SECONDS = 60
+    XMLRPC_LOG_PATH = '/var/log/bluetooth_xmlrpc_tester.log'
 
     def __init__(self, tester_host):
         """Construct a BluetoothTester.
@@ -41,7 +42,8 @@
                   constants.BLUETOOTH_TESTER_XMLRPC_SERVER_CLEANUP_PATTERN,
                 ready_test_name=
                   constants.BLUETOOTH_TESTER_XMLRPC_SERVER_READY_METHOD,
-                timeout_seconds=self.XMLRPC_BRINGUP_TIMEOUT_SECONDS)
+                timeout_seconds=self.XMLRPC_BRINGUP_TIMEOUT_SECONDS,
+                logfile=self.XMLRPC_LOG_PATH)
 
 
     def setup(self, profile):
@@ -120,6 +122,15 @@
         )
 
 
+    def copy_logs(self, destination):
+        """Copy the logs generated by this tester to a given location.
+
+        @param destination: destination directory for the logs.
+
+        """
+        self.host.collect_logs(self.XMLRPC_LOG_PATH, destination)
+
+
     def close(self):
         """Tear down state associated with the client."""
         # This kills the RPC server.