graphics_dEQP: Debug section should be indented one more level

The "if self._debug" section beginning on line 339 should be indented
one more level so it falls under the "else" clause beginning on
line 315. This debug code only applies to tests that are run, not
skipped tests.

BUG=None.
TEST=Tested on two devices that generate skipped tests (gles3.1 on
     link and falco) to ensure the debug path is not followed.
     Ran same tests on cyan to ensure the debug section is run
     and debug files are generated.

Change-Id: Ibb6a3be4b3207594ff591d7f550fa5433fbd593f
Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/341332
Commit-Ready: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
diff --git a/client/site_tests/graphics_dEQP/graphics_dEQP.py b/client/site_tests/graphics_dEQP/graphics_dEQP.py
index f293e1d..13caf42 100644
--- a/client/site_tests/graphics_dEQP/graphics_dEQP.py
+++ b/client/site_tests/graphics_dEQP/graphics_dEQP.py
@@ -304,6 +304,7 @@
                        '--deqp-log-filename=%s' %
                        (executable, test_case, self._surface, width, height,
                         log_file))
+
             if not self._can_run(executable):
                 result = 'Skipped'
                 logging.info('Skipping on %s: %s', self._gpu_type, test_case)
@@ -331,23 +332,23 @@
                 except Exception:
                     result = 'UnexpectedError'
 
-            if self._debug:
-                # Collect debug info and save to json file.
-                output_msgs = {'stdout': [], 'stderr': [], 'dmesg': []}
-                logs = self._log_reader.get_logs()
-                self._log_reader.set_start_by_current()
-                output_msgs['dmesg'] = [msg
-                                        for msg in logs.splitlines()
-                                        if self._log_filter.match(msg)]
-                if run_result:
-                    output_msgs['stdout'] = run_result.stdout.splitlines()
-                    output_msgs['stderr'] = run_result.stderr.splitlines()
-                with open(debug_file, 'w') as fd:
-                    json.dump(output_msgs,
-                              fd,
-                              indent=4,
-                              separators=(',', ' : '),
-                              sort_keys=True)
+                if self._debug:
+                    # Collect debug info and save to json file.
+                    output_msgs = {'stdout': [], 'stderr': [], 'dmesg': []}
+                    logs = self._log_reader.get_logs()
+                    self._log_reader.set_start_by_current()
+                    output_msgs['dmesg'] = [msg
+                                            for msg in logs.splitlines()
+                                            if self._log_filter.match(msg)]
+                    if run_result:
+                        output_msgs['stdout'] = run_result.stdout.splitlines()
+                        output_msgs['stderr'] = run_result.stderr.splitlines()
+                    with open(debug_file, 'w') as fd:
+                        json.dump(output_msgs,
+                                  fd,
+                                  indent=4,
+                                  separators=(',', ' : '),
+                                  sort_keys=True)
 
             logging.info('Result: %s', result)
             test_results[result] = test_results.get(result, 0) + 1