autotest: shill: improve failure message for DefaultProfileCreation

When the network_DefaultProfileCreation fails, it reports the missing
setting. We don't know whether just that specific setting was missing,
or if the entire file was empty. Help answer this question, by including
the full contents of the default profile, when the test fails.

BUG=chromium:325056
TEST=manual (see below)

Manual test
-----------
- modify network_DefaultProfileCreation by adding a bogus setting
  to EXPECTED_SETTINGS
- see that the test output includes the contents of the default
  profile

Change-Id: I1c1823475a92238b4836f6d357f5828bbbdfcdb2
Reviewed-on: https://chromium-review.googlesource.com/179366
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
diff --git a/client/site_tests/network_DefaultProfileCreation/network_DefaultProfileCreation.py b/client/site_tests/network_DefaultProfileCreation/network_DefaultProfileCreation.py
index 450438e..9349634 100644
--- a/client/site_tests/network_DefaultProfileCreation/network_DefaultProfileCreation.py
+++ b/client/site_tests/network_DefaultProfileCreation/network_DefaultProfileCreation.py
@@ -2,6 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import logging
 import os
 
 from autotest_lib.client.bin import test
@@ -46,4 +47,6 @@
         profile = open(self.DEFAULT_PROFILE_PATH).read()
         for setting in self.EXPECTED_SETTINGS:
             if setting not in profile:
-                raise error.TestFail('Missing setting ' + setting)
+                logging.error('Did not find setting %s', setting)
+                logging.error('Full profile contents are:\n%s', profile)
+                raise error.TestFail('Missing setting(s) in default profile.')