Commit b8033403 authored by Stephen Roe's avatar Stephen Roe Committed by Chromium LUCI CQ

[fuchsia] Add test implementing a fuchsia binary size check.

kmarshall, please review the //build and //fuchsia files
bpastene, please review the //testing/buildbot files
dpranke, please review //tools/perf/process_perf_results.py

Bug: 1126177
Change-Id: Ib98c6d47a74b84e3df42c17c28585e6f8ee983d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2553150Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Commit-Queue: Stephen Roe <steveroe@google.com>
Cr-Commit-Position: refs/heads/master@{#833507}
parent 018af23d
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/util/generate_wrapper.gni")
template("compute_fuchsia_package_sizes") {
generate_wrapper(target_name) {
forward_variables_from(invoker,
[
"data",
"data_deps",
])
testonly = true
executable = "//build/fuchsia/binary_sizes.py"
wrapper_script = "$root_out_dir/bin/run_${target_name}"
assert(
target_cpu == "arm64" || target_cpu == "x64",
"target_cpu must be arm64 or x64 in fuchsia_sizes_test($target_name)")
if (!defined(data)) {
data = []
}
if (!defined(data_deps)) {
data_deps = []
}
# Declares the files that are needed for test execution on the
# swarming test client.
data += [
"//build/fuchsia/",
"//third_party/fuchsia-sdk/sdk/tools/${target_cpu}/",
"//third_party/zstd-linux-${target_cpu}/",
"//tools/binary_size/",
]
executable_args = [
"--output-directory",
"@WrappedPath(.)",
]
if (defined(invoker.executable_args)) {
executable_args += invoker.executable_args
}
}
}
This diff is collapsed.
......@@ -37,6 +37,7 @@ group("gn_all") {
"engine:web_engine_unittests",
"http:http_service_tests",
"mojom:fuchsia_mojo_unittests",
"release:fuchsia_sizes",
"runners:cast_runner",
"runners:cast_runner_browsertests",
"runners:cast_runner_integration_tests",
......
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(is_fuchsia)
import("//build/config/fuchsia/sizes.gni")
compute_fuchsia_package_sizes("fuchsia_sizes") {
data_deps = [
"//fuchsia/engine:web_engine",
"//fuchsia/runners:cast_runner_pkg",
]
}
......@@ -14341,6 +14341,35 @@
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/"
},
{
"args": [
"--far-file",
"gen/fuchsia/engine/web_engine/web_engine.far",
"--far-file",
"gen/fuchsia/runners/cast_runner/cast_runner.far",
"--total-size-name",
"chrome_fuchsia",
"--compression-args",
"-14"
],
"isolate_name": "fuchsia_sizes",
"merge": {
"script": "//tools/perf/process_perf_results.py"
},
"name": "fuchsia_sizes",
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"cpu": "arm64",
"inside_docker": "1",
"os": "Ubuntu-16.04"
}
],
"service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
},
"test_id_prefix": "ninja://fuchsia/release:fuchsia_sizes/"
}
]
},
......@@ -858,6 +858,10 @@
"script": "//testing/scripts/run_flatbuffers_unittests.py",
"type": "script",
},
"fuchsia_sizes": {
"label": "//fuchsia/release:fuchsia_sizes",
"type": "generated_script",
},
"fuchsia_telemetry_gpu_integration_test": {
"args": [
"../../content/test/gpu/run_gpu_integration_test_fuchsia.py",
......
......@@ -1646,6 +1646,24 @@
},
},
'fuchsia_sizes_tests': {
'fuchsia_sizes': {
'merge': {
'script': '//tools/perf/process_perf_results.py',
},
'args': [
'--far-file',
'gen/fuchsia/engine/web_engine/web_engine.far',
'--far-file',
'gen/fuchsia/runners/cast_runner/cast_runner.far',
'--total-size-name',
'chrome_fuchsia',
'--compression-args',
'-14',
],
},
},
'gl_gtests_validating': {
'gl_tests_validating': {
'test': 'gl_tests',
......@@ -5420,6 +5438,11 @@
'layout_ng_gtests',
],
'fuchsia_arm64_isolated_scripts': [
'fuchsia_sizes_tests',
'gpu_angle_fuchsia_unittests_isolated_scripts',
],
'fuchsia_x64_isolated_scripts': [
'chromium_webkit_isolated_scripts',
'gpu_angle_fuchsia_unittests_isolated_scripts'
......
......@@ -2379,7 +2379,7 @@
],
'test_suites': {
'gtest_tests': 'fuchsia_gtests',
'isolated_scripts': 'gpu_angle_fuchsia_unittests_isolated_scripts',
'isolated_scripts': 'fuchsia_arm64_isolated_scripts',
},
'mixins': [
'arm64',
......
......@@ -62,12 +62,16 @@ def _GetMachineGroup(build_properties):
# in the build properties
machine_group = build_properties['perf_dashboard_machine_group']
else:
mastername_mapping = {}
builder_group_mapping = {}
with open(MACHINE_GROUP_JSON_FILE) as fp:
mastername_mapping = json.load(fp)
legacy_mastername = build_properties['mastername']
if mastername_mapping.get(legacy_mastername):
machine_group = mastername_mapping[legacy_mastername]
builder_group_mapping = json.load(fp)
if build_properties.get('builder_group', False):
legacy_builder_group = build_properties['builder_group']
else:
# TODO(crbug.com/1153958): remove reference to mastername.
legacy_builder_group = build_properties['mastername']
if builder_group_mapping.get(legacy_builder_group):
machine_group = builder_group_mapping[legacy_builder_group]
if not machine_group:
raise ValueError(
'Must set perf_dashboard_machine_group or have a valid '
......
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