telemetry: Raise error on failed gpu test

Detect a failed gpu_integration_test from the exit code and
raise an error so that the test failure bubbles up and is visible

BUG=chromium:879738
TEST=test_that telemetry_GpuTests.gpu_rasterization fails as expected

Change-Id: I19d4b1d59708fd775b47b0b4bffda9bfaa14b331
Reviewed-on: https://chromium-review.googlesource.com/1216883
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Trybot-Ready: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
diff --git a/server/cros/telemetry_runner.py b/server/cros/telemetry_runner.py
index 9f0274c..b5d8265 100644
--- a/server/cros/telemetry_runner.py
+++ b/server/cros/telemetry_runner.py
@@ -377,8 +377,8 @@
         @param args: additional list of arguments to pass to the telemetry
                      execution script.
 
-         @returns A TelemetryResult instance with the results of this telemetry
-                  execution.
+        @returns A TelemetryResult instance with the results of this telemetry
+                 execution.
         """
         script = os.path.join(DUT_CHROME_ROOT,
                               TELEMETRY_RUN_GPU_TESTS_SCRIPT)
@@ -395,6 +395,10 @@
         cmd = ' '.join(cmd)
         stdout, stderr, exit_code = self._run_cmd(cmd)
 
+        if exit_code:
+            raise error.TestFail('Gpu Integration Test: %s'
+                                 ' failed to run.' % test)
+
         return TelemetryResult(exit_code=exit_code, stdout=stdout,
                                stderr=stderr)