[autotest] Move experimental filtering out more

BUG=chromium:672348
TEST=None

Change-Id: I13651192469c013b15b7fa8c0e97456231087440
Reviewed-on: https://chromium-review.googlesource.com/452674
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/server/cros/dynamic_suite/suite.py b/server/cros/dynamic_suite/suite.py
index ad741f6..55eee22 100644
--- a/server/cros/dynamic_suite/suite.py
+++ b/server/cros/dynamic_suite/suite.py
@@ -463,7 +463,7 @@
 
 
 def _find_test_control_data_for_suite(
-        cf_getter, suite_name='', add_experimental=False,
+        cf_getter, suite_name='',
         forgiving_parser=True, run_prod_code=False,
         test_args=None):
     """
@@ -489,7 +489,6 @@
            and fetch the content of control files
     @param suite_name: If specified, this method will attempt to restrain
                        the search space to just this suite's control files.
-    @param add_experimental: add tests with experimental attribute set.
     @param forgiving_parser: If False, will raise ControlVariableExceptions
                              if any are encountered when parsing control
                              files. Note that this can raise an exception
@@ -525,15 +524,11 @@
     else:
         control_file_texts = _get_control_file_texts(
                 cf_getter, filtered_files)
-    tests = _parse_control_file_texts(
+    return _parse_control_file_texts(
             control_file_texts=control_file_texts,
             forgiving_parser=forgiving_parser,
             run_prod_code=run_prod_code,
             test_args=test_args)
-    if not add_experimental:
-        tests = {path: test_data for path, test_data in tests.iteritems()
-                 if not test_data.experimental}
-    return tests
 
 
 def _parse_control_file_texts(control_file_texts,
@@ -854,9 +849,11 @@
             on the TIME setting in control file, slowest test comes first.
     """
     tests = _find_test_control_data_for_suite(
-            cf_getter, suite_name, add_experimental, forgiving_parser,
-            run_prod_code=run_prod_code,
-            test_args=test_args)
+            cf_getter, suite_name, forgiving_parser,
+            run_prod_code=run_prod_code, test_args=test_args)
+    if not add_experimental:
+        tests = {path: test_data for path, test_data in tests.iteritems()
+                 if not test_data.experimental}
     logging.debug('Parsed %s control files.', len(tests))
     tests = [test for test in tests.itervalues() if predicate(test)]
     tests.sort(key=lambda t:
@@ -888,8 +885,7 @@
             match ratio.
     """
     tests = _find_test_control_data_for_suite(
-            cf_getter, suite_name,
-            add_experimental=True, forgiving_parser=True)
+            cf_getter, suite_name, forgiving_parser=True)
     logging.debug('Parsed %s control files.', len(tests))
     similarities = {}
     for test in tests.itervalues():