Commit fce34299 authored by Nodir Turakulov's avatar Nodir Turakulov Committed by Commit Bot

Add test_target to buildbot JSON files

Add a fully-qualified target name, e.g. "//chrome/test:browser_tests"
in additional non-fully qualified target "browser_tests".
This will be used for the new test result storage.

Bug: 1033761
Change-Id: Ic58221ab01931162ed44f0be3db0469f22a6d598
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972572
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: default avatarAaron Gable <agable@chromium.org>
Cr-Commit-Position: refs/heads/master@{#725991}
parent 3064854b
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
} }
] ]
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -34,7 +35,8 @@ ...@@ -34,7 +35,8 @@
} }
] ]
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -56,7 +58,8 @@ ...@@ -56,7 +58,8 @@
} }
] ]
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -71,7 +74,8 @@ ...@@ -71,7 +74,8 @@
} }
] ]
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -93,7 +97,8 @@ ...@@ -93,7 +97,8 @@
} }
] ]
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -108,7 +113,8 @@ ...@@ -108,7 +113,8 @@
} }
] ]
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -130,7 +136,8 @@ ...@@ -130,7 +136,8 @@
} }
] ]
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -145,7 +152,8 @@ ...@@ -145,7 +152,8 @@
} }
] ]
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -167,7 +175,8 @@ ...@@ -167,7 +175,8 @@
} }
] ]
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -182,7 +191,8 @@ ...@@ -182,7 +191,8 @@
} }
] ]
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -204,7 +214,8 @@ ...@@ -204,7 +214,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -214,7 +225,8 @@ ...@@ -214,7 +225,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -231,7 +243,8 @@ ...@@ -231,7 +243,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -241,7 +254,8 @@ ...@@ -241,7 +254,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -258,7 +272,8 @@ ...@@ -258,7 +272,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -268,7 +283,8 @@ ...@@ -268,7 +283,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -285,7 +301,8 @@ ...@@ -285,7 +301,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -295,7 +312,8 @@ ...@@ -295,7 +312,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -312,7 +330,8 @@ ...@@ -312,7 +330,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -322,7 +341,8 @@ ...@@ -322,7 +341,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
...@@ -339,7 +359,8 @@ ...@@ -339,7 +359,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "base_unittests" "test": "base_unittests",
"test_target": "//base:base_unittests"
}, },
{ {
"merge": { "merge": {
...@@ -349,7 +370,8 @@ ...@@ -349,7 +370,8 @@
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_unittests" "test": "content_unittests",
"test_target": "//content/test:content_unittests"
} }
] ]
}, },
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
} }
] ]
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -47,7 +48,8 @@ ...@@ -47,7 +48,8 @@
} }
], ],
"shards": 4 "shards": 4
} },
"test_target": "//:devtools_web_tests"
}, },
{ {
"args": [ "args": [
...@@ -71,7 +73,8 @@ ...@@ -71,7 +73,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
} }
......
This diff is collapsed.
...@@ -1296,7 +1296,8 @@ ...@@ -1296,7 +1296,8 @@
} }
] ]
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1322,7 +1323,8 @@ ...@@ -1322,7 +1323,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
}, },
...@@ -1345,7 +1347,8 @@ ...@@ -1345,7 +1347,8 @@
} }
] ]
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1372,7 +1375,8 @@ ...@@ -1372,7 +1375,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
}, },
...@@ -1395,7 +1399,8 @@ ...@@ -1395,7 +1399,8 @@
} }
] ]
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1422,7 +1427,8 @@ ...@@ -1422,7 +1427,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
}, },
...@@ -1446,7 +1452,8 @@ ...@@ -1446,7 +1452,8 @@
], ],
"hard_timeout": 900 "hard_timeout": 900
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1472,7 +1479,8 @@ ...@@ -1472,7 +1479,8 @@
], ],
"hard_timeout": 900, "hard_timeout": 900,
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
}, },
...@@ -1495,7 +1503,8 @@ ...@@ -1495,7 +1503,8 @@
} }
] ]
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1520,7 +1529,8 @@ ...@@ -1520,7 +1529,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
}, },
...@@ -1547,7 +1557,8 @@ ...@@ -1547,7 +1557,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
}, },
......
...@@ -196,6 +196,7 @@ class BBJSONGenerator(object): ...@@ -196,6 +196,7 @@ class BBJSONGenerator(object):
self.test_suites = None self.test_suites = None
self.exceptions = None self.exceptions = None
self.mixins = None self.mixins = None
self.gn_isolate_map = None
def generate_abs_file_path(self, relative_path): def generate_abs_file_path(self, relative_path):
return os.path.join(self.this_dir, relative_path) # pragma: no cover return os.path.join(self.this_dir, relative_path) # pragma: no cover
...@@ -823,6 +824,27 @@ class BBJSONGenerator(object): ...@@ -823,6 +824,27 @@ class BBJSONGenerator(object):
new_test_suites[name] = value new_test_suites[name] = value
self.test_suites = new_test_suites self.test_suites = new_test_suites
def resolve_full_test_targets(self):
for suite in self.test_suites['basic_suites'].itervalues():
for key, test in suite.iteritems():
if not isinstance(test, dict):
# Some test definitions are just strings, such as CTS.
# Skip them.
continue
# This assumes the recipe logic which prefers 'test' to 'isolate_name'
# https://source.chromium.org/chromium/chromium/tools/build/+/master:scripts/slave/recipe_modules/chromium_tests/generators.py;l=89;drc=14c062ba0eb418d3c4623dde41a753241b9df06b
# TODO(crbug.com/1035124): clean this up.
isolate_name = test.get('test') or test.get('isolate_name') or key
gn_entry = self.gn_isolate_map.get(isolate_name)
if gn_entry:
test['test_target'] = gn_entry['label']
else: # pragma: no cover
# Some tests do not have an entry gn_isolate_map.pyl, such as
# telemetry tests.
# TODO(crbug.com/1035304): require an entry in gn_isolate_map.
pass
def resolve_composition_test_suites(self): def resolve_composition_test_suites(self):
self.check_composition_type_test_suites('compound_suites') self.check_composition_type_test_suites('compound_suites')
...@@ -881,8 +903,10 @@ class BBJSONGenerator(object): ...@@ -881,8 +903,10 @@ class BBJSONGenerator(object):
self.test_suites = self.load_pyl_file('test_suites.pyl') self.test_suites = self.load_pyl_file('test_suites.pyl')
self.exceptions = self.load_pyl_file('test_suite_exceptions.pyl') self.exceptions = self.load_pyl_file('test_suite_exceptions.pyl')
self.mixins = self.load_pyl_file('mixins.pyl') self.mixins = self.load_pyl_file('mixins.pyl')
self.gn_isolate_map = self.load_pyl_file('gn_isolate_map.pyl')
def resolve_configuration_files(self): def resolve_configuration_files(self):
self.resolve_full_test_targets()
self.resolve_composition_test_suites() self.resolve_composition_test_suites()
self.resolve_matrix_compound_test_suites() self.resolve_matrix_compound_test_suites()
self.flatten_test_suites() self.flatten_test_suites()
...@@ -1122,6 +1146,7 @@ class BBJSONGenerator(object): ...@@ -1122,6 +1146,7 @@ class BBJSONGenerator(object):
self.load_configuration_files() self.load_configuration_files()
self.check_composition_type_test_suites('compound_suites') self.check_composition_type_test_suites('compound_suites')
self.check_composition_type_test_suites('matrix_compound_suites') self.check_composition_type_test_suites('matrix_compound_suites')
self.resolve_full_test_targets()
self.flatten_test_suites() self.flatten_test_suites()
# All bots should exist. # All bots should exist.
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
} }
] ]
}, },
"test": "opus_tests" "test": "opus_tests",
"test_target": "//third_party/opus:opus_tests"
} }
] ]
}, },
...@@ -95,7 +96,8 @@ ...@@ -95,7 +96,8 @@
} }
] ]
}, },
"test": "blink_heap_unittests" "test": "blink_heap_unittests",
"test_target": "//third_party/blink/renderer/platform/heap:blink_heap_unittests"
}, },
{ {
"args": [ "args": [
...@@ -140,7 +142,8 @@ ...@@ -140,7 +142,8 @@
} }
] ]
}, },
"test": "blink_unittests" "test": "blink_unittests",
"test_target": "//third_party/blink/renderer/controller:blink_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -172,7 +175,8 @@ ...@@ -172,7 +175,8 @@
} }
], ],
"shards": 12 "shards": 12
} },
"test_target": "//:blink_web_tests"
} }
] ]
} }
......
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