Exemplo n.º 1
0
def get_suite_metadata(test_suite):
  """Gets all test names, and passing and failing test-backend pairs."""
  passing = utils.get_test_targets(test_suite)
  failing = utils.get_test_targets(f'{test_suite}_failing')

  # Remove bazel path.
  passing = [test.replace(f'{test_suite}__', '') for test in passing]
  failing = [test.replace(f'{test_suite}_failing__', '') for test in failing]

  # Split into a dictionary mapping 'src', 'target_backend', ... to the
  # appropriate values for each test target.
  passing_info = [parse_test_name(test, test_suite) for test in passing]
  failing_info = [parse_test_name(test, test_suite) for test in failing]
  return passing_info, failing_info
Exemplo n.º 2
0
def get_suite_metadata(test_suite):
    """Gets all test names, and passing and failing test-backend pairs."""
    passing = utils.get_test_targets(test_suite)
    failing = utils.get_test_targets(f'{test_suite}_failing')

    # Remove bazel path.
    passing = [test.replace(f'{test_suite}_', '') for test in passing]
    failing = [test.replace(f'{test_suite}_failing_', '') for test in failing]

    # Split into (test_name, target_backend).
    passing = [get_name_and_backend(test) for test in passing]
    failing = [get_name_and_backend(test) for test in failing]
    passing_names = [test[0] for test in passing]
    failing_names = [test[0] for test in failing]
    all_names = list(sorted(set(passing_names + failing_names)))
    return all_names, passing, failing
Exemplo n.º 3
0
def get_test_paths_and_names(test_suite_path: str):
    """Get the paths Bazel stores test outputs in and the matching test names."""
    targets = utils.get_test_targets(test_suite_path)
    test_paths = [_target_to_testlogs_path(target) for target in targets]
    test_names = [
        _target_to_test_name(target, test_suite_path) for target in targets
    ]
    return test_paths, test_names