コード例 #1
0
 def get_all_tests(self):
     """Gets all tests to run in this object."""
     # Method names that starts with test* and also are in *TestCase classes
     # but they are not test-methods.
     # TODO(crbug.com/982435): Rename not test methods with test-suffix.
     none_tests = [
         'ChromeTestCase/testServer', 'FindInPageTestCase/testURL'
     ]
     # TODO(crbug.com/1123681): Move all_tests to class var. Set all_tests,
     # disabled_tests values in initialization to avoid multiple calls to otool.
     all_tests = []
     # Only store the tests when there is the test arg.
     store_disabled_tests = OUTPUT_DISABLED_TESTS_TEST_ARG in self.test_args
     self.disabled_tests = []
     for test_class, test_method in shard_util.fetch_test_names(
             self.test_app_path,
             self.host_app_path,
             self.release,
             enabled_tests_only=False):
         test_name = '%s/%s' % (test_class, test_method)
         if (test_name not in none_tests and
                 # inlcuded_tests contains the tests to execute, which may be a subset
                 # of all tests b/c of the iOS test sharding logic in run.py. Filter by
                 # self.included_tests if specified
             (test_class in self.included_tests
              if self.included_tests else True)):
             if test_method.startswith('test'):
                 all_tests.append(test_name)
             elif store_disabled_tests:
                 self.disabled_tests.append(test_name)
     return all_tests
コード例 #2
0
ファイル: test_apps.py プロジェクト: matrixreload/chromium.bb
 def get_all_tests(self):
   """Gets all tests to run in this object."""
   # Method names that starts with test* and also are in *TestCase classes
   # but they are not test-methods.
   # TODO(crbug.com/982435): Rename not test methods with test-suffix.
   none_tests = ['ChromeTestCase/testServer', 'FindInPageTestCase/testURL']
   all_tests = []
   for test_class, test_method in shard_util.fetch_test_names(
       self.test_app_path, self.host_app_path, self.release):
     test_name = '%s/%s' % (test_class, test_method)
     if (test_name not in none_tests and
         # inlcuded_tests contains the tests to execute, which may be a subset
         # of all tests b/c of the iOS test sharding logic in run.py. Filter by
         # self.included_tests if specified
         (test_class in self.included_tests if self.included_tests else True)):
       all_tests.append(test_name)
   return all_tests