Print more insightful message for audio test  when cras is not working.

BUG=chrome-os-partner:61700
TEST=run power_LoadTest on DUT

Change-Id: I0ee58de8dd23e50939dfe93e0897711c5d88c57a
Signed-off-by: Xiaochu Liu <xiaochu@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/426340
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
diff --git a/client/cros/audio/audio_helper.py b/client/cros/audio/audio_helper.py
index 2019c2f..0fdb0c7 100644
--- a/client/cros/audio/audio_helper.py
+++ b/client/cros/audio/audio_helper.py
@@ -88,12 +88,16 @@
     @param capture: The capture gain to set.
     """
     logging.info('Setting volume level to %d', volume)
-    utils.system('/usr/bin/cras_test_client --volume %d' % volume)
-    logging.info('Setting capture gain to %d', capture)
-    utils.system('/usr/bin/cras_test_client --capture_gain %d' % capture)
-    utils.system('/usr/bin/cras_test_client --dump_server_info')
-    utils.system('/usr/bin/cras_test_client --mute 0')
-    utils.system('amixer -c 0 contents')
+    try:
+        utils.system('/usr/bin/cras_test_client --volume %d' % volume)
+        logging.info('Setting capture gain to %d', capture)
+        utils.system('/usr/bin/cras_test_client --capture_gain %d' % capture)
+        utils.system('/usr/bin/cras_test_client --dump_server_info')
+        utils.system('/usr/bin/cras_test_client --mute 0')
+        utils.system('amixer -c 0 contents')
+    except error.CmdError, e:
+        raise error.TestError(
+                '*** Can not tune volume through CRAS. *** (' + str(e) + ')')
 
 def loopback_latency_check(**args):
     """Checks loopback latency.