[autotest] Add suite_enumerator.py

suite_enumerator.py is a command line tool that enumerates all tests
in a given dynamic_suite-based test suite.

I also did some refactoring so that code which imports
dynamic_suite.py will be able to easily enumerate all tests in a suite
as well.

BUG=chromium-os:26667
TEST=unit tests
TEST=./test_suites/suite_enumerator.py -a /path/to/autotest/files bvt
STATUS=Fixed

Change-Id: I16cc89eae0d04b6b19b8715ae9e3787bdd4f656d
Reviewed-on: https://gerrit.chromium.org/gerrit/16390
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
diff --git a/server/cros/dynamic_suite_unittest.py b/server/cros/dynamic_suite_unittest.py
index bf8f0f5..2eb934e 100755
--- a/server/cros/dynamic_suite_unittest.py
+++ b/server/cros/dynamic_suite_unittest.py
@@ -318,7 +318,7 @@
         self.mock_control_file_parsing()
         self.mox.ReplayAll()
         suite = dynamic_suite.Suite.create_from_name(self._TAG, self.tmpdir,
-                                                     self.afe, self.tko)
+                                                     afe=self.afe, tko=self.tko)
 
         self.assertTrue(self.files['one'] in suite.tests)
         self.assertTrue(self.files['two'] in suite.tests)
@@ -352,7 +352,7 @@
 
         self.mox.ReplayAll()
         suite = dynamic_suite.Suite.create_from_name(self._TAG, self._BUILD,
-                                                     self.afe, self.tko)
+                                                     afe=self.afe, tko=self.tko)
         suite.schedule()
 
 
@@ -363,7 +363,7 @@
 
         self.mox.ReplayAll()
         suite = dynamic_suite.Suite.create_from_name(self._TAG, self._BUILD,
-                                                     self.afe, self.tko)
+                                                     afe=self.afe, tko=self.tko)
         suite.schedule(add_experimental=False)
 
 
@@ -381,12 +381,11 @@
 
         @return Suite object, after mocking out behavior needed to create it.
         """
-        self.mox.StubOutWithMock(dynamic_suite.Suite, 'create_cf_getter')
-        dynamic_suite.Suite.create_cf_getter(self.tmpdir).AndReturn(self.getter)
         self.expect_control_file_parsing()
         self.mox.ReplayAll()
         suite = dynamic_suite.Suite.create_from_name(self._TAG, self.tmpdir,
-                                                     self.afe, self.tko)
+                                                     self.getter, self.afe,
+                                                     self.tko)
         self.mox.ResetAll()
         return suite