[autotest] Add data for tests that have no DEPENDENCIES in suite_preprocessor.py

When preprocessing tests to extract suite information, it's important
that we keep track of tests with no DEPENDENCIES, as well as those that do.

This enables us to make good decisions later wrt padding out pools of
machines for suite runs.

BUG=chromium-os:22060
TEST=run suite_preprocessor.py

Change-Id: Ibba973a6e73d92402d10ed857c4f3288a86adb2f
Reviewed-on: https://gerrit.chromium.org/gerrit/24430
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
diff --git a/site_utils/suite_preprocessor.py b/site_utils/suite_preprocessor.py
index b5fd40d..a6768ea 100755
--- a/site_utils/suite_preprocessor.py
+++ b/site_utils/suite_preprocessor.py
@@ -46,17 +46,19 @@
     options = parse_options()
 
     fs_getter = dynamic_suite.Suite.create_fs_getter(options.autotest_dir)
-    predicate = lambda t: hasattr(t, 'suite')  # Filter for tests in suites.
+    predicate = lambda t: hasattr(t, 'suite')
     test_deps = {}  #  Format will be {suite: {test: [dep, dep]}}.
     for test in dynamic_suite.Suite.find_and_parse_tests(fs_getter,
                                                          predicate,
                                                          True):
-        if test.dependencies:
-            for suite in dynamic_suite.Suite.parse_tag(test.suite):
-                suite_deps = test_deps.setdefault(suite, {})
-                # Force this to a list so that we can parse it later with
-                # ast.literal_eval() -- which is MUCH safer than eval()
+        for suite in dynamic_suite.Suite.parse_tag(test.suite):
+            suite_deps = test_deps.setdefault(suite, {})
+            # Force this to a list so that we can parse it later with
+            # ast.literal_eval() -- which is MUCH safer than eval()
+            if test.dependencies:
                 suite_deps[test.path] = list(test.dependencies)
+            else:
+                suite_deps[test.path] = []
 
     if options.output_file:
         with open(options.output_file, 'w+') as fd: