Example #1
0
def get_all_tests():
  """Returns the list of all unittest names."""
  test_info_files = file_util.read_metadata_file(
      build_common.get_all_unittest_info_path())
  tests = set()
  for test_info_file in test_info_files:
    # The basename of |test_info_file| is something like bionic_test.1.json.
    m = re.match(r'(.+)\.[0-9]+\.json', os.path.basename(test_info_file))
    if not m:
      continue
    tests.add(m.group(1))
  return sorted(tests)
Example #2
0
def generate_test_ninjas():
    if not open_source.is_open_source_repo():
        # expected_driver_times_test.py and run_integration_tests_test.py have extra
        # implicit dependencies, so generate the ninja for them separately.
        test_list_paths = [
            build_common.get_all_integration_test_lists_path(),
            build_common.get_all_unittest_info_path()
        ]
        implicit_map = dict.fromkeys([
            'src/build/cts/expected_driver_times_test.py',
            'src/build/run_integration_tests_test.py'
        ], test_list_paths)
        ninja_generator.generate_python_test_ninjas_for_path(
            'src/build', implicit_map=implicit_map, exclude='perf_test.py')
    ninja_generator_runner.request_run_in_parallel(_generate_lint_test_ninjas)
Example #3
0
def generate_test_ninjas():
  if not open_source.is_open_source_repo():
    # expected_driver_times_test.py and run_integration_tests_test.py have extra
    # implicit dependencies, so generate the ninja for them separately.
    test_list_paths = [build_common.get_all_integration_test_lists_path(),
                       build_common.get_all_unittest_info_path()]
    implicit_map = dict.fromkeys(
        ['src/build/cts/expected_driver_times_test.py',
         'src/build/run_integration_tests_test.py'],
        test_list_paths)
    ninja_generator.generate_python_test_ninjas_for_path(
        'src/build',
        implicit_map=implicit_map,
        exclude='perf_test.py')
  ninja_generator_runner.request_run_in_parallel(
      _generate_lint_test_ninjas)