Commit 1e0384f8 authored by maruel's avatar maruel Committed by Commit bot

Make sure a test cannot be listed twice for one builder.

This check is now made at presubmit time, preventing hard to debug failure on
the infrastructure.

The failure mode is not obvious, the recipe throw an exception at trigger time
and this is hard to diagnose.

This fixes the problem before this is even sent to run as a try job.

Tested manually.

R=thakis@chromium.org
BUG=626766

Review-Url: https://codereview.chromium.org/2151503003
Cr-Commit-Position: refs/heads/master@{#405194}
parent cd3d2ef0
......@@ -224,6 +224,7 @@ def process_file(mode, test_name, tests_location, filepath, ninja_targets,
raise Error(
'%s: %s is broken: %s' % (filename, builder, data['gtest_tests']))
seen = set()
for d in data['gtest_tests']:
if (d['test'] not in ninja_targets and
d['test'] not in SKIP_GN_ISOLATE_MAP_TARGETS):
......@@ -232,6 +233,12 @@ def process_file(mode, test_name, tests_location, filepath, ninja_targets,
elif d['test'] in ninja_targets:
ninja_targets_seen.add(d['test'])
name = d.get('name', d['test'])
if name in seen:
raise Error('%s: %s / %s is listed multiple times.' %
(filename, builder, name))
seen.add(name)
config[builder]['gtest_tests'] = sorted(
data['gtest_tests'], key=lambda x: x['test'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment