diff --git a/engine/src/flutter/bar.patch b/engine/src/flutter/bar.patch new file mode 100644 index 0000000000..837a5b4307 --- /dev/null +++ b/engine/src/flutter/bar.patch @@ -0,0 +1,32 @@ +commit 2f12ff08cc9215273040893a9b6c2b3fabccfb6b +Author: Adam Barth +Date: Thu Jul 16 18:00:01 2015 -0700 + + Cherry-pick build fix from Mojo + +diff --git a/services/android/rules.gni b/services/android/rules.gni +index 350b421..c2c286b 100644 +--- a/services/android/rules.gni ++++ b/services/android/rules.gni +@@ -44,6 +44,10 @@ template("mojo_android_java_application") { + action(android_with_manifest_name) { + script = "${servicess_android_path}/add_manifest_entry.py" + ++ deps = [ ++ ":$android_standalone_name" ++ ] ++ + input = dex_output_path + inputs = [ + input, +@@ -74,6 +78,10 @@ template("mojo_android_java_application") { + action(target_name) { + script = rebase_path("mojo/public/tools/prepend.py", ".", mojo_root) + ++ deps = [ ++ ":$android_with_manifest_name" ++ ] ++ + input = dex_with_manifest_output_path + inputs = [ + input, diff --git a/engine/src/flutter/build/all.gyp b/engine/src/flutter/build/all.gyp index 6b8ad831a4..b36fae6a57 100644 --- a/engine/src/flutter/build/all.gyp +++ b/engine/src/flutter/build/all.gyp @@ -86,16 +86,15 @@ '../android_webview/android_webview.gyp:android_webview_apk', '../android_webview/android_webview.gyp:system_webview_apk', '../android_webview/android_webview_shell.gyp:android_webview_shell_apk', - '../android_webview/android_webview_telemetry_shell.gyp:android_webview_telemetry_shell_apk', '../chrome/android/chrome_apk.gyp:chrome_public_apk', '../chrome/chrome.gyp:chrome_shell_apk', '../chrome/chrome.gyp:chrome_sync_shell_apk', '../remoting/remoting.gyp:remoting_apk', ], }], - ['target_arch == "arm" or target_arch == "arm64"', { + # TODO: Enable packed relocations for x64. See: b/20532404 + ['target_arch != "x64"', { 'dependencies': [ - # The relocation packer is currently used only for ARM or ARM64. '../third_party/android_platform/relocation_packer.gyp:android_relocation_packer_unittests#host', ], }], @@ -161,6 +160,7 @@ 'dependencies': [ '../device/bluetooth/bluetooth.gyp:*', '../device/device_tests.gyp:*', + '../gpu/skia_runner/skia_runner.gyp:*', ], }], ['use_openssl==0 and (OS=="mac" or OS=="ios" or OS=="win")', { @@ -379,6 +379,7 @@ 'dependencies': [ '../chrome/chrome.gyp:crash_service', '../chrome/chrome.gyp:installer_util_unittests', + '../chrome/chrome.gyp:setup_unittests', # ../chrome/test/mini_installer requires mini_installer. '../chrome/installer/mini_installer.gyp:mini_installer', '../chrome_elf/chrome_elf.gyp:chrome_elf_unittests', @@ -809,7 +810,6 @@ '../breakpad/breakpad.gyp:symupload#host', '../breakpad/breakpad.gyp:minidump_dump#host', '../breakpad/breakpad.gyp:minidump_stackwalk#host', - '../build/android/tests/multiple_proguards/multiple_proguards.gyp:multiple_proguards_test_apk', '../build/android/pylib/device/commands/commands.gyp:chromium_commands', '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_perftests_apk', @@ -887,6 +887,7 @@ '../chrome/chrome.gyp:chrome_shell_uiautomator_tests', '../chrome/chrome.gyp:chromedriver_webview_shell_apk', '../chrome/chrome.gyp:unit_tests_apk', + '../third_party/custom_tabs_client/src/custom_tabs_client.gyp:custom_tabs_client_example_apk', ], }], ], @@ -1070,6 +1071,7 @@ '../chrome/chrome.gyp:installer_util_unittests', '../chrome/chrome.gyp:interactive_ui_tests', '../chrome/chrome.gyp:performance_browser_tests', + '../chrome/chrome.gyp:setup_unittests', '../chrome/chrome.gyp:sync_integration_tests', '../chrome/chrome.gyp:unit_tests', '../cloud_print/cloud_print.gyp:cloud_print_unittests', @@ -1162,6 +1164,7 @@ '../chrome/chrome.gyp:chrome_app_unittests', '../chrome/chrome.gyp:chromedriver_unittests', '../chrome/chrome.gyp:installer_util_unittests', + '../chrome/chrome.gyp:setup_unittests', '../chrome/chrome.gyp:unit_tests', '../chrome_elf/chrome_elf.gyp:chrome_elf_unittests', '../cloud_print/cloud_print.gyp:cloud_print_unittests', @@ -1272,6 +1275,36 @@ }], # branding=="Chrome" ], # conditions }], # OS="win" + ['chromeos==1', { + 'targets': [ + { + 'target_name': 'chromiumos_preflight', + 'type': 'none', + 'dependencies': [ + '../breakpad/breakpad.gyp:minidump_stackwalk', + '../chrome/chrome.gyp:chrome', + '../chrome/chrome.gyp:chromedriver', + '../content/content_shell_and_tests.gyp:video_decode_accelerator_unittest', + '../content/content_shell_and_tests.gyp:video_encode_accelerator_unittest', + '../media/media.gyp:media_unittests', + '../ppapi/ppapi_internal.gyp:ppapi_example_video_decode', + '../sandbox/sandbox.gyp:chrome_sandbox', + '../sandbox/sandbox.gyp:sandbox_linux_unittests', + '../third_party/mesa/mesa.gyp:osmesa', + '../tools/telemetry/telemetry.gyp:bitmaptools#host', + '../tools/perf/clear_system_cache/clear_system_cache.gyp:clear_system_cache', + ], + 'conditions': [ + ['disable_nacl==0', { + 'dependencies': [ + '../components/nacl.gyp:nacl_helper', + '../native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap', + ], + }], + ], + }, + ], # targets + }], # "chromeos==1" ['use_aura==1', { 'targets': [ { @@ -1387,7 +1420,7 @@ 'target_name': 'chromoting_swarm_tests', 'type': 'none', 'dependencies': [ - '../testing/chromoting/integration_tests.gyp:chromoting_integration_tests_run', + '../testing/chromoting/integration_tests.gyp:*', ], }, # target_name: chromoting_swarm_tests ] diff --git a/engine/src/flutter/build/android/BUILD.gn b/engine/src/flutter/build/android/BUILD.gn new file mode 100644 index 0000000000..d90ad70abe --- /dev/null +++ b/engine/src/flutter/build/android/BUILD.gn @@ -0,0 +1,56 @@ +# Copyright 2014 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/config/android/rules.gni") + +sun_tools_jar_path = "$root_gen_dir/sun_tools_jar/tools.jar" + +action("find_sun_tools_jar") { + script = "//build/android/gyp/find_sun_tools_jar.py" + depfile = "$target_gen_dir/$target_name.d" + outputs = [ + depfile, + sun_tools_jar_path, + ] + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--output", + rebase_path(sun_tools_jar_path, root_build_dir), + ] +} + +java_prebuilt("sun_tools_java") { + jar_path = sun_tools_jar_path + jar_dep = ":find_sun_tools_jar" +} + +action("cpplib_stripped") { + _strip_bin = "${android_tool_prefix}strip" + _soname = "libc++_shared.so" + _input_so = "${android_libcpp_root}/libs/${android_app_abi}/${_soname}" + _output_so = "${root_out_dir}/lib.stripped/${_soname}" + + script = "//build/gn_run_binary.py" + inputs = [ + _strip_bin, + ] + sources = [ + _input_so, + ] + outputs = [ + _output_so, + ] + + _rebased_strip_bin = rebase_path(_strip_bin, root_out_dir) + _rebased_input_so = rebase_path(_input_so, root_out_dir) + _rebased_output_so = rebase_path(_output_so, root_out_dir) + args = [ + _rebased_strip_bin, + "--strip-unneeded", + "-o", + _rebased_output_so, + _rebased_input_so, + ] +} diff --git a/engine/src/flutter/build/android/adb_install_apk.py b/engine/src/flutter/build/android/adb_install_apk.py index 00bd38e182..50faea7d29 100755 --- a/engine/src/flutter/build/android/adb_install_apk.py +++ b/engine/src/flutter/build/android/adb_install_apk.py @@ -6,84 +6,109 @@ """Utility script to install APKs from the command line quickly.""" -import optparse +import argparse +import glob +import logging import os import sys from pylib import constants +from pylib.device import device_blacklist from pylib.device import device_errors from pylib.device import device_utils +from pylib.utils import apk_helper +from pylib.utils import run_tests_helper -def AddInstallAPKOption(option_parser): - """Adds apk option used to install the APK to the OptionParser.""" - option_parser.add_option('--apk', - help=('DEPRECATED The name of the apk containing the' - ' application (with the .apk extension).')) - option_parser.add_option('--apk_package', - help=('DEPRECATED The package name used by the apk ' - 'containing the application.')) - option_parser.add_option('--keep_data', - action='store_true', - default=False, - help=('Keep the package data when installing ' - 'the application.')) - option_parser.add_option('--debug', action='store_const', const='Debug', - dest='build_type', - default=os.environ.get('BUILDTYPE', 'Debug'), - help='If set, run test suites under out/Debug. ' +def main(): + parser = argparse.ArgumentParser() + + apk_group = parser.add_mutually_exclusive_group(required=True) + apk_group.add_argument('--apk', dest='apk_name', + help='DEPRECATED The name of the apk containing the' + ' application (with the .apk extension).') + apk_group.add_argument('apk_path', nargs='?', + help='The path to the APK to install.') + + # TODO(jbudorick): Remove once no clients pass --apk_package + parser.add_argument('--apk_package', help='DEPRECATED unused') + parser.add_argument('--split', + action='append', + dest='splits', + help='A glob matching the apk splits. ' + 'Can be specified multiple times.') + parser.add_argument('--keep_data', + action='store_true', + default=False, + help='Keep the package data when installing ' + 'the application.') + parser.add_argument('--debug', action='store_const', const='Debug', + dest='build_type', + default=os.environ.get('BUILDTYPE', 'Debug'), + help='If set, run test suites under out/Debug. ' 'Default is env var BUILDTYPE or Debug') - option_parser.add_option('--release', action='store_const', const='Release', - dest='build_type', - help='If set, run test suites under out/Release. ' + parser.add_argument('--release', action='store_const', const='Release', + dest='build_type', + help='If set, run test suites under out/Release. ' 'Default is env var BUILDTYPE or Debug.') - option_parser.add_option('-d', '--device', dest='device', - help='Target device for apk to install on.') + parser.add_argument('-d', '--device', dest='device', + help='Target device for apk to install on.') + parser.add_argument('-v', '--verbose', action='count', + help='Enable verbose logging.') + args = parser.parse_args() -def ValidateInstallAPKOption(option_parser, options, args): - """Validates the apk option and potentially qualifies the path.""" - if not options.apk: - if len(args) > 1: - options.apk = args[1] - else: - option_parser.error('apk target not specified.') + run_tests_helper.SetLogLevel(args.verbose) + constants.SetBuildType(args.build_type) - if not options.apk.endswith('.apk'): - options.apk += '.apk' + apk = args.apk_path or args.apk_name + if not apk.endswith('.apk'): + apk += '.apk' + if not os.path.exists(apk): + apk = os.path.join(constants.GetOutDirectory(), 'apks', apk) + if not os.path.exists(apk): + parser.error('%s not found.' % apk) - if not os.path.exists(options.apk): - options.apk = os.path.join(constants.GetOutDirectory(), 'apks', - options.apk) - - -def main(argv): - parser = optparse.OptionParser() - parser.set_usage("usage: %prog [options] target") - AddInstallAPKOption(parser) - options, args = parser.parse_args(argv) - - if len(args) > 1 and options.apk: - parser.error("Appending the apk as argument can't be used with --apk.") - elif len(args) > 2: - parser.error("Too many arguments.") - - constants.SetBuildType(options.build_type) - ValidateInstallAPKOption(parser, options, args) + if args.splits: + splits = [] + base_apk_package = apk_helper.ApkHelper(apk).GetPackageName() + for split_glob in args.splits: + apks = [f for f in glob.glob(split_glob) if f.endswith('.apk')] + if not apks: + logging.warning('No apks matched for %s.' % split_glob) + for f in apks: + helper = apk_helper.ApkHelper(f) + if (helper.GetPackageName() == base_apk_package + and helper.GetSplitName()): + splits.append(f) devices = device_utils.DeviceUtils.HealthyDevices() - if options.device: - devices = [d for d in devices if d == options.device] + if args.device: + devices = [d for d in devices if d == args.device] if not devices: - raise device_errors.DeviceUnreachableError(options.device) + raise device_errors.DeviceUnreachableError(args.device) elif not devices: raise device_errors.NoDevicesError() - device_utils.DeviceUtils.parallel(devices).Install( - options.apk, reinstall=options.keep_data) + def blacklisting_install(device): + try: + if args.splits: + device.InstallSplitApk(apk, splits, reinstall=args.keep_data) + else: + device.Install(apk, reinstall=args.keep_data) + except device_errors.CommandFailedError: + logging.exception('Failed to install %s', args.apk_name) + device_blacklist.ExtendBlacklist([str(device)]) + logging.warning('Blacklisting %s', str(device)) + except device_errors.CommandTimeoutError: + logging.exception('Timed out while installing %s', args.apk_name) + device_blacklist.ExtendBlacklist([str(device)]) + logging.warning('Blacklisting %s', str(device)) + + device_utils.DeviceUtils.parallel(devices).pMap(blacklisting_install) if __name__ == '__main__': - sys.exit(main(sys.argv)) + sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/apk_install.py b/engine/src/flutter/build/android/gyp/apk_install.py index c9098676f1..a512e50e3d 100755 --- a/engine/src/flutter/build/android/gyp/apk_install.py +++ b/engine/src/flutter/build/android/gyp/apk_install.py @@ -23,28 +23,6 @@ sys.path.append(BUILD_ANDROID_DIR) from pylib import constants from pylib.utils import apk_helper -_DPI_TO_DENSITY = { - 120: 'ldpi', - 160: 'mdpi', - 240: 'hdpi', - 320: 'xhdpi', - 480: 'xxhdpi', - } - - -def RetrieveDeviceConfig(device): - """Probes the given device for its split-select config. - - For example: en-rUS-xhdpi:armeabi-v7a - Run "split-select --help" for more info about the format. - """ - language = device.GetProp('persist.sys.language') - country = device.GetProp('persist.sys.country') - density_dpi = int(device.GetProp('ro.sf.lcd_density')) - density = _DPI_TO_DENSITY.get(density_dpi, 'tvdpi') - abi = device.product_cpu_abi - return '%s-r%s-%s:%s' % (language, country, density, abi) - def GetNewMetadata(device, apk_package): """Gets the metadata on the device for the apk_package apk.""" @@ -114,34 +92,10 @@ def main(): # the build, then the APK has to be installed (regardless of the md5 record). force_install = HasInstallMetadataChanged(device, apk_package, metadata_path) - def SelectSplits(target_config, base_apk, split_apks, android_sdk_tools): - cmd = [os.path.join(android_sdk_tools, 'split-select'), - '--target', target_config, - '--base', base_apk, - ] - for split in split_apks: - cmd.extend(('--split', split)) - - # split-select outputs one path per line and a blank line at the end. - output = build_utils.CheckOutput(cmd) - return [x for x in output.split('\n') if x] def Install(): if options.split_apk_path: - requiredSdkVersion = constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP - actualSdkVersion = device.device.build_version_sdk - if actualSdkVersion < requiredSdkVersion: - raise Exception(('--split-apk-path requires sdk version %s. Device has ' - 'version %s') % (requiredSdkVersion, actualSdkVersion)) - device_config = RetrieveDeviceConfig(device.device) - active_splits = SelectSplits( - device_config, - options.apk_path, - options.split_apk_path, - options.android_sdk_tools) - - all_apks = [options.apk_path] + active_splits - device.device.adb.InstallMultiple(all_apks, reinstall=True) + device.InstallSplitApk(options.apk_path, options.split_apk_path) else: device.Install(options.apk_path, reinstall=True) diff --git a/engine/src/flutter/build/android/gyp/create_java_binary_script.py b/engine/src/flutter/build/android/gyp/create_java_binary_script.py index d632728ac7..5de43f2d4a 100755 --- a/engine/src/flutter/build/android/gyp/create_java_binary_script.py +++ b/engine/src/flutter/build/android/gyp/create_java_binary_script.py @@ -36,6 +36,7 @@ if os.getcwd() != self_dir: java_args = [ "java", "-classpath", ":".join(classpath), + "-enableassertions", \"{main_class}\"] + sys.argv[1:] os.execvp("java", java_args) """ diff --git a/engine/src/flutter/build/android/gyp/create_test_runner_script.py b/engine/src/flutter/build/android/gyp/create_test_runner_script.py index e72f364aad..247bf20ad5 100755 --- a/engine/src/flutter/build/android/gyp/create_test_runner_script.py +++ b/engine/src/flutter/build/android/gyp/create_test_runner_script.py @@ -57,6 +57,7 @@ def main(): group = parser.add_argument_group('Test runner path arguments.') group.add_argument('--output-directory') group.add_argument('--isolate-file-path') + group.add_argument('--support-apk') args, test_runner_args = parser.parse_known_args() def RelativizePathToScript(path): @@ -74,6 +75,9 @@ def main(): if args.isolate_file_path: test_runner_path_args['--isolate-file-path'] = RelativizePathToScript( args.isolate_file_path) + if args.support_apk: + test_runner_path_args['--support-apk'] = RelativizePathToScript( + args.support_apk) with open(args.script_output_path, 'w') as script: script.write(SCRIPT_TEMPLATE.format( diff --git a/engine/src/flutter/build/android/gyp/dex.py b/engine/src/flutter/build/android/gyp/dex.py index 4e6233270a..c26d23a611 100755 --- a/engine/src/flutter/build/android/gyp/dex.py +++ b/engine/src/flutter/build/android/gyp/dex.py @@ -28,7 +28,9 @@ def DoDex(options, paths): input_paths=paths, input_strings=dex_cmd, force=not os.path.exists(options.dex_path)) - build_utils.WriteJson(paths, options.dex_path + '.inputs') + build_utils.WriteJson( + [os.path.relpath(p, options.output_directory) for p in paths], + options.dex_path + '.inputs') def main(): @@ -39,6 +41,9 @@ def main(): parser.add_option('--android-sdk-tools', help='Android sdk build tools directory.') + parser.add_option('--output-directory', + default=os.getcwd(), + help='Path to the output build directory.') parser.add_option('--dex-path', help='Dex output path.') parser.add_option('--configuration-name', help='The build CONFIGURATION_NAME.') @@ -66,8 +71,10 @@ def main(): paths += build_utils.ParseGypList(options.inputs) if options.excluded_paths: + # Excluded paths are relative to the output directory. exclude_paths = build_utils.ParseGypList(options.excluded_paths) - paths = [p for p in paths if not p in exclude_paths] + paths = [p for p in paths if not + os.path.relpath(p, options.output_directory) in exclude_paths] DoDex(options, paths) diff --git a/engine/src/flutter/build/android/gyp/finalize_splits.py b/engine/src/flutter/build/android/gyp/finalize_splits.py index 97a65fa920..a6796bbe4f 100755 --- a/engine/src/flutter/build/android/gyp/finalize_splits.py +++ b/engine/src/flutter/build/android/gyp/finalize_splits.py @@ -12,6 +12,7 @@ import optparse import sys import finalize_apk +from util import build_utils def main(): parser = optparse.OptionParser() @@ -25,20 +26,27 @@ def main(): parser.add_option('--key-name', help='Keystore name') parser.add_option('--densities', help='Comma separated list of densities finalize.') + parser.add_option('--languages', + help='GYP list of language splits to finalize.') options, _ = parser.parse_args() options.load_library_from_zip = 0 if options.densities: for density in options.densities.split(','): - options.unsigned_apk_path = ("%s-%s" % + options.unsigned_apk_path = ("%s_%s" % (options.resource_packaged_apk_path, density)) options.final_apk_path = ("%s-density-%s.apk" % (options.base_output_path, density)) finalize_apk.FinalizeApk(options) - else: - raise Exception('Language splits not yet implemented') + if options.languages: + for lang in build_utils.ParseGypList(options.languages): + options.unsigned_apk_path = ("%s_%s" % + (options.resource_packaged_apk_path, lang)) + options.final_apk_path = ("%s-lang-%s.apk" % + (options.base_output_path, lang)) + finalize_apk.FinalizeApk(options) if __name__ == '__main__': sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/find_sun_tools_jar.py b/engine/src/flutter/build/android/gyp/find_sun_tools_jar.py new file mode 100755 index 0000000000..2f15a154ab --- /dev/null +++ b/engine/src/flutter/build/android/gyp/find_sun_tools_jar.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# +# Copyright 2014 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. + +"""This finds the java distribution's tools.jar and copies it somewhere. +""" + +import argparse +import os +import re +import shutil +import sys + +from util import build_utils + +RT_JAR_FINDER = re.compile(r'\[Opened (.*)/jre/lib/rt.jar\]') + +def main(): + parser = argparse.ArgumentParser(description='Find Sun Tools Jar') + parser.add_argument('--depfile', + help='Path to depfile. This must be specified as the ' + 'action\'s first output.') + parser.add_argument('--output', required=True) + args = parser.parse_args() + + sun_tools_jar_path = FindSunToolsJarPath() + + if sun_tools_jar_path is None: + raise Exception("Couldn\'t find tools.jar") + + # Using copyfile instead of copy() because copy() calls copymode() + # We don't want the locked mode because we may copy over this file again + shutil.copyfile(sun_tools_jar_path, args.output) + + if args.depfile: + build_utils.WriteDepfile( + args.depfile, + [sun_tools_jar_path] + build_utils.GetPythonDependencies()) + + +def FindSunToolsJarPath(): + # This works with at least openjdk 1.6, 1.7 and sun java 1.6, 1.7 + stdout = build_utils.CheckOutput( + ["java", "-verbose", "-version"], print_stderr=False) + for ln in stdout.splitlines(): + match = RT_JAR_FINDER.match(ln) + if match: + return os.path.join(match.group(1), 'lib', 'tools.jar') + + return None + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/generate_split_manifest.py b/engine/src/flutter/build/android/gyp/generate_split_manifest.py index 1a312eda6a..9cb3bca4b5 100755 --- a/engine/src/flutter/build/android/gyp/generate_split_manifest.py +++ b/engine/src/flutter/build/android/gyp/generate_split_manifest.py @@ -9,8 +9,8 @@ Given the manifest file for the main APK, generates an AndroidManifest.xml with the value required for a Split APK (package, versionCode, etc). """ -import lxml.etree import optparse +import xml.etree.ElementTree from util import build_utils @@ -66,8 +66,8 @@ def Build(main_manifest, split, has_code): The XML split manifest as a string """ - doc = lxml.etree.fromstring(main_manifest) - package = doc.xpath('/manifest/@package')[0] + doc = xml.etree.ElementTree.fromstring(main_manifest) + package = doc.get('package') return MANIFEST_TEMPLATE % { 'package': package, @@ -90,7 +90,7 @@ def main(): if options.depfile: build_utils.WriteDepfile( options.depfile, - [main_manifest] + build_utils.GetPythonDependencies()) + [options.main_manifest] + build_utils.GetPythonDependencies()) if __name__ == '__main__': diff --git a/engine/src/flutter/build/android/gyp/jar_toc.py b/engine/src/flutter/build/android/gyp/jar_toc.py index b7fe099598..774475bf73 100755 --- a/engine/src/flutter/build/android/gyp/jar_toc.py +++ b/engine/src/flutter/build/android/gyp/jar_toc.py @@ -38,18 +38,16 @@ def GetClassesInZipFile(zip_file): def CallJavap(classpath, classes): - output = '' - for i in range(0, len(classes), 2000): - javap_cmd = [ - 'javap', - '-package', # Show public/protected/package. - # -verbose is required to get constant values (which can be inlined in - # dependents). - '-verbose', - '-classpath', classpath - ] + classes[i:i+2000] - output += build_utils.CheckOutput(javap_cmd) - return output + javap_cmd = [ + 'javap', + '-package', # Show public/protected/package. + # -verbose is required to get constant values (which can be inlined in + # dependents). + '-verbose', + '-J-XX:NewSize=4m', + '-classpath', classpath + ] + classes + return build_utils.CheckOutput(javap_cmd) def ExtractToc(disassembled_classes): diff --git a/engine/src/flutter/build/android/gyp/javac.py b/engine/src/flutter/build/android/gyp/javac.py index e36fd43bc0..dafe5dff0a 100755 --- a/engine/src/flutter/build/android/gyp/javac.py +++ b/engine/src/flutter/build/android/gyp/javac.py @@ -54,8 +54,20 @@ def ColorJavacOutput(output): return '\n'.join(map(ApplyColor, output.split('\n'))) +ERRORPRONE_OPTIONS = [ + '-Xepdisable:' + # Something in chrome_private_java makes this check crash. + 'com.google.errorprone.bugpatterns.ClassCanBeStatic,' + # These crash on lots of targets. + 'com.google.errorprone.bugpatterns.WrongParameterPackage,' + 'com.google.errorprone.bugpatterns.GuiceOverridesGuiceInjectableMethod,' + 'com.google.errorprone.bugpatterns.GuiceOverridesJavaxInjectableMethod,' + 'com.google.errorprone.bugpatterns.ElementsCountedInLoop' +] + def DoJavac( - classpath, classes_dir, chromium_code, java_files): + bootclasspath, classpath, classes_dir, chromium_code, + use_errorprone_path, java_files): """Runs javac. Builds |java_files| with the provided |classpath| and puts the generated @@ -75,10 +87,16 @@ def DoJavac( # Chromium only allows UTF8 source files. Being explicit avoids # javac pulling a default encoding from the user's environment. '-encoding', 'UTF-8', - '-source', '1.7', - '-target', '1.7', '-classpath', ':'.join(classpath), '-d', classes_dir] + + if bootclasspath: + javac_args.extend([ + '-bootclasspath', ':'.join(bootclasspath), + '-source', '1.7', + '-target', '1.7', + ]) + if chromium_code: # TODO(aurimas): re-enable '-Xlint:deprecation' checks once they are fixed. javac_args.extend(['-Xlint:unchecked']) @@ -88,7 +106,12 @@ def DoJavac( # trigger a compile warning or error. javac_args.extend(['-XDignore.symbol.file']) - javac_cmd = ['javac'] + javac_args + java_files + if use_errorprone_path: + javac_cmd = [use_errorprone_path] + ERRORPRONE_OPTIONS + else: + javac_cmd = ['javac'] + + javac_cmd = javac_cmd + javac_args + java_files def Compile(): build_utils.CheckOutput( @@ -163,6 +186,12 @@ def main(argv): action='append', default=[], help='List of srcjars to include in compilation.') + parser.add_option( + '--bootclasspath', + action='append', + default=[], + help='Boot classpath for javac. If this is specified multiple times, ' + 'they will all be appended to construct the classpath.') parser.add_option( '--classpath', action='append', @@ -183,6 +212,10 @@ def main(argv): help='Whether code being compiled should be built with stricter ' 'warnings for chromium code.') + parser.add_option( + '--use-errorprone-path', + help='Use the Errorprone compiler at this path.') + parser.add_option( '--classes-dir', help='Directory for compiled .class files.') @@ -202,6 +235,10 @@ def main(argv): if options.main_class and not options.jar_path: parser.error('--main-class requires --jar-path') + bootclasspath = [] + for arg in options.bootclasspath: + bootclasspath += build_utils.ParseGypList(arg) + classpath = [] for arg in options.classpath: classpath += build_utils.ParseGypList(arg) @@ -215,7 +252,7 @@ def main(argv): src_gendirs = build_utils.ParseGypList(options.src_gendirs) java_files += build_utils.FindInDirectories(src_gendirs, '*.java') - input_files = classpath + java_srcjars + java_files + input_files = bootclasspath + classpath + java_srcjars + java_files with build_utils.TempDir() as temp_dir: classes_dir = os.path.join(temp_dir, 'classes') os.makedirs(classes_dir) @@ -238,9 +275,11 @@ def main(argv): if len(java_files) != 0: DoJavac( + bootclasspath, classpath, classes_dir, options.chromium_code, + options.use_errorprone_path, java_files) if options.jar_path: diff --git a/engine/src/flutter/build/android/gyp/lint.py b/engine/src/flutter/build/android/gyp/lint.py index 9402780b09..6c4645abea 100755 --- a/engine/src/flutter/build/android/gyp/lint.py +++ b/engine/src/flutter/build/android/gyp/lint.py @@ -20,8 +20,7 @@ _SRC_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), def _RunLint(lint_path, config_path, processed_config_path, manifest_path, - result_path, product_dir, sources, jar_path, resource_dir=None, - can_fail_build=False): + result_path, product_dir, sources, jar_path, resource_dir=None): def _RelativizePath(path): """Returns relative path to top-level src dir. @@ -122,7 +121,7 @@ def _RunLint(lint_path, config_path, processed_config_path, manifest_path, if not os.path.exists(result_path): print 'Something is wrong:' print e - return 0 + return 1 # There are actual lint issues else: @@ -133,7 +132,7 @@ def _RunLint(lint_path, config_path, processed_config_path, manifest_path, print 'File contents:' with open(result_path) as f: print f.read() - return 0 + return 1 _ProcessResultFile() msg = ('\nLint found %d new issues.\n' @@ -148,7 +147,7 @@ def _RunLint(lint_path, config_path, processed_config_path, manifest_path, 'lint', 'suppress.py')), _RelativizePath(result_path))) print >> sys.stderr, msg - return 1 if can_fail_build else 0 + return 1 return 0 @@ -198,7 +197,7 @@ def main(): options.processed_config_path, options.manifest_path, options.result_path, options.product_dir, sources, options.jar_path, - options.resource_dir, options.can_fail_build) + options.resource_dir) if options.depfile: build_utils.WriteDepfile( @@ -208,7 +207,7 @@ def main(): if options.stamp and not rc: build_utils.Touch(options.stamp) - return rc + return rc if options.can_fail_build else 0 if __name__ == '__main__': diff --git a/engine/src/flutter/build/android/gyp/locale_pak_resources.py b/engine/src/flutter/build/android/gyp/locale_pak_resources.py new file mode 100755 index 0000000000..84c4a37ba9 --- /dev/null +++ b/engine/src/flutter/build/android/gyp/locale_pak_resources.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python +# +# Copyright 2015 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. +"""Creates a resources.zip for locale .pak files. + +Places the locale.pak files into appropriate resource configs +(e.g. en-GB.pak -> res/raw-en/en_gb.lpak). Also generates a locale_paks +TypedArray so that resource files can be enumerated at runtime. +""" + +import collections +import optparse +import os +import sys +import zipfile + +from util import build_utils + + +# This should stay in sync with: +# base/android/java/src/org/chromium/base/LocaleUtils.java +_CHROME_TO_ANDROID_LOCALE_MAP = { + 'he': 'iw', + 'id': 'in', + 'fil': 'tl', +} + + +def ToResourceFileName(name): + """Returns the resource-compatible file name for the given file.""" + # Resources file names must consist of [a-z0-9_.]. + # Changes extension to .lpak so that compression can be toggled separately for + # locale pak files vs other pak files. + return name.replace('-', '_').replace('.pak', '.lpak').lower() + + +def CreateLocalePaksXml(names): + """Creates the contents for the locale-paks.xml files.""" + VALUES_FILE_TEMPLATE = ''' + + %s + + +''' + VALUES_ITEM_TEMPLATE = ''' + @raw/%s''' + + res_names = (os.path.splitext(name)[0] for name in names) + items = ''.join((VALUES_ITEM_TEMPLATE % name for name in res_names)) + return VALUES_FILE_TEMPLATE % items + + +def ComputeMappings(sources): + """Computes the mappings of sources -> resources. + + Returns a tuple of: + - mappings: List of (src, dest) paths + - lang_to_locale_map: Map of language -> list of resource names + e.g. "en" -> ["en_gb.lpak"] + """ + lang_to_locale_map = collections.defaultdict(list) + mappings = [] + for src_path in sources: + basename = os.path.basename(src_path) + name = os.path.splitext(basename)[0] + res_name = ToResourceFileName(basename) + if name == 'en-US': + dest_dir = 'raw' + else: + # Chrome's uses different region mapping logic from Android, so include + # all regions for each language. + android_locale = _CHROME_TO_ANDROID_LOCALE_MAP.get(name, name) + lang = android_locale[0:2] + dest_dir = 'raw-' + lang + lang_to_locale_map[lang].append(res_name) + mappings.append((src_path, os.path.join(dest_dir, res_name))) + return mappings, lang_to_locale_map + + +def main(): + parser = optparse.OptionParser() + build_utils.AddDepfileOption(parser) + parser.add_option('--locale-paks', help='List of files for res/raw-LOCALE') + parser.add_option('--resources-zip', help='Path to output resources.zip') + parser.add_option('--print-languages', + action='store_true', + help='Print out the list of languages that cover the given locale paks ' + '(using Android\'s language codes)') + + options, _ = parser.parse_args() + build_utils.CheckOptions(options, parser, + required=['locale_paks']) + + sources = build_utils.ParseGypList(options.locale_paks) + + if options.depfile: + deps = sources + build_utils.GetPythonDependencies() + build_utils.WriteDepfile(options.depfile, deps) + + mappings, lang_to_locale_map = ComputeMappings(sources) + if options.print_languages: + print '\n'.join(sorted(lang_to_locale_map)) + + if options.resources_zip: + with zipfile.ZipFile(options.resources_zip, 'w', zipfile.ZIP_STORED) as out: + for mapping in mappings: + out.write(mapping[0], mapping[1]) + + # Create TypedArray resources so ResourceExtractor can enumerate files. + def WriteValuesFile(lang, names): + dest_dir = 'values' + if lang: + dest_dir += '-' + lang + # Always extract en-US.lpak since it's the fallback. + xml = CreateLocalePaksXml(names + ['en_us.lpak']) + out.writestr(os.path.join(dest_dir, 'locale-paks.xml'), xml) + + for lang, names in lang_to_locale_map.iteritems(): + WriteValuesFile(lang, names) + WriteValuesFile(None, []) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/pack_arm_relocations.py b/engine/src/flutter/build/android/gyp/pack_relocations.py similarity index 100% rename from engine/src/flutter/build/android/gyp/pack_arm_relocations.py rename to engine/src/flutter/build/android/gyp/pack_relocations.py diff --git a/engine/src/flutter/build/android/gyp/package_resources.py b/engine/src/flutter/build/android/gyp/package_resources.py index f2c2a6ed9e..d17d1fe2f9 100755 --- a/engine/src/flutter/build/android/gyp/package_resources.py +++ b/engine/src/flutter/build/android/gyp/package_resources.py @@ -15,6 +15,7 @@ https://android.googlesource.com/platform/sdk/+/master/files/ant/build.xml import optparse import os +import re import shutil import zipfile @@ -54,6 +55,14 @@ DENSITY_SPLITS = { 'ldrtl-sw600dp-xxhdpi-v17', 'xxhdpi-v21', ), + 'xxxhdpi': ( + 'xxxhdpi-v4', + 'ldrtl-xxxhdpi-v4', + 'sw600dp-xxxhdpi-v13', + 'ldrtl-xxxhdpi-v17', + 'ldrtl-sw600dp-xxxhdpi-v17', + 'xxxhdpi-v21', + ), 'tvdpi': ( 'tvdpi-v4', 'sw600dp-tvdpi-v13', @@ -95,6 +104,8 @@ def ParseArgs(): '--create-density-splits', action='store_true', help='Enables density splits') + parser.add_option('--language-splits', + help='GYP list of languages to create splits for') parser.add_option('--apk-path', help='Path to output (partial) apk.') @@ -165,23 +176,28 @@ def RenameDensitySplits(apk_path): """Renames all density splits to have shorter / predictable names.""" for density, config in DENSITY_SPLITS.iteritems(): src_path = '%s_%s' % (apk_path, '_'.join(config)) - dst_path = '%s-%s' % (apk_path, density) - if os.path.exists(dst_path): - os.unlink(dst_path) - os.rename(src_path, dst_path) + dst_path = '%s_%s' % (apk_path, density) + if src_path != dst_path: + if os.path.exists(dst_path): + os.unlink(dst_path) + os.rename(src_path, dst_path) -def CheckDensityMissedConfigs(apk_path): - """Raises an exception if apk_path contains any density-specifc files.""" - triggers = ['-%s' % density for density in DENSITY_SPLITS] +def CheckForMissedConfigs(apk_path, check_density, languages): + """Raises an exception if apk_path contains any unexpected configs.""" + triggers = [] + if check_density: + triggers.extend(re.compile('-%s' % density) for density in DENSITY_SPLITS) + if languages: + triggers.extend(re.compile(r'-%s\b' % lang) for lang in languages) with zipfile.ZipFile(apk_path) as main_apk_zip: for name in main_apk_zip.namelist(): for trigger in triggers: - if trigger in name and not 'mipmap-' in name: - raise Exception(('Found density in main apk that should have been ' + + if trigger.search(name) and not 'mipmap-' in name: + raise Exception(('Found config in main apk that should have been ' + 'put into a split: %s\nYou need to update ' + 'package_resources.py to include this new ' + - 'config.') % name) + 'config (trigger=%s)') % (name, trigger.pattern)) def main(): @@ -225,14 +241,23 @@ def main(): for config in DENSITY_SPLITS.itervalues(): package_command.extend(('--split', ','.join(config))) + language_splits = None + if options.language_splits: + language_splits = build_utils.ParseGypList(options.language_splits) + for lang in language_splits: + package_command.extend(('--split', lang)) + if 'Debug' in options.configuration_name: package_command += ['--debug-mode'] build_utils.CheckOutput( package_command, print_stdout=False, print_stderr=False) + if options.create_density_splits or language_splits: + CheckForMissedConfigs( + options.apk_path, options.create_density_splits, language_splits) + if options.create_density_splits: - CheckDensityMissedConfigs(options.apk_path) RenameDensitySplits(options.apk_path) if options.depfile: diff --git a/engine/src/flutter/build/android/gyp/util/build_device.py b/engine/src/flutter/build/android/gyp/util/build_device.py index 7e0d57ba38..8ab11124f7 100644 --- a/engine/src/flutter/build/android/gyp/util/build_device.py +++ b/engine/src/flutter/build/android/gyp/util/build_device.py @@ -42,6 +42,9 @@ class BuildDevice(object): def Install(self, *args, **kwargs): return self.device.Install(*args, **kwargs) + def InstallSplitApk(self, *args, **kwargs): + return self.device.InstallSplitApk(*args, **kwargs) + def GetInstallMetadata(self, apk_package): """Gets the metadata on the device for the apk_package apk.""" # Matches lines like: diff --git a/engine/src/flutter/build/android/gyp/write_build_config.py b/engine/src/flutter/build/android/gyp/write_build_config.py index 8507a95d0b..3773e98bc7 100755 --- a/engine/src/flutter/build/android/gyp/write_build_config.py +++ b/engine/src/flutter/build/android/gyp/write_build_config.py @@ -181,7 +181,8 @@ def main(argv): possible_deps_config_paths = build_utils.ParseGypList( options.possible_deps_configs) - allow_unknown_deps = options.type == 'android_apk' + allow_unknown_deps = (options.type == 'android_apk' or + options.type == 'android_resources') unknown_deps = [ c for c in possible_deps_config_paths if not os.path.exists(c)] if unknown_deps and not allow_unknown_deps: diff --git a/engine/src/flutter/build/android/gyp/write_ordered_libraries.py b/engine/src/flutter/build/android/gyp/write_ordered_libraries.py index 67e7805cd2..0fc9a8ca3e 100755 --- a/engine/src/flutter/build/android/gyp/write_ordered_libraries.py +++ b/engine/src/flutter/build/android/gyp/write_ordered_libraries.py @@ -73,7 +73,7 @@ def GetDependencies(library_or_executable): def GetNonSystemDependencies(library_name): - all_deps = GetDependencies(FullLibraryPath(library_name)) + all_deps = GetDependencies(library_name) return set((lib for lib in all_deps if not IsSystemLibrary(lib))) @@ -119,8 +119,13 @@ def main(): java_libraries_list = ( '{%s}' % ','.join(['"%s"' % s[3:-3] for s in libraries])) + out_json = { + 'libraries': libraries, + 'lib_paths': [FullLibraryPath(l) for l in libraries], + 'java_libraries_list': java_libraries_list + } build_utils.WriteJson( - {'libraries': libraries, 'java_libraries_list': java_libraries_list}, + out_json, options.output, only_if_changed=True) diff --git a/engine/src/flutter/build/android/lint/suppressions.xml b/engine/src/flutter/build/android/lint/suppressions.xml index 6921695e6a..e44faef7f6 100644 --- a/engine/src/flutter/build/android/lint/suppressions.xml +++ b/engine/src/flutter/build/android/lint/suppressions.xml @@ -51,11 +51,16 @@ Still reading? + - + + + + + @@ -72,6 +77,7 @@ Still reading? + @@ -87,11 +93,13 @@ Still reading? - - + + + + + + + diff --git a/engine/src/flutter/build/android/method_count.py b/engine/src/flutter/build/android/method_count.py new file mode 100755 index 0000000000..93250b5c54 --- /dev/null +++ b/engine/src/flutter/build/android/method_count.py @@ -0,0 +1,55 @@ +#! /usr/bin/env python +# Copyright 2015 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 argparse +import os +import re +import sys + +from pylib import constants +from pylib.sdk import dexdump + +sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', + 'common')) +import perf_tests_results_helper + + +_METHOD_IDS_SIZE_RE = re.compile(r'^method_ids_size +: +(\d+)$') + +def MethodCount(dexfile): + for line in dexdump.DexDump(dexfile, file_summary=True): + m = _METHOD_IDS_SIZE_RE.match(line) + if m: + return m.group(1) + raise Exception('"method_ids_size" not found in dex dump of %s' % dexfile) + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument( + '--apk-name', help='Name of the APK to which the dexfile corresponds.') + parser.add_argument('dexfile') + + args = parser.parse_args() + + if not args.apk_name: + dirname, basename = os.path.split(args.dexfile) + while basename: + if 'apk' in basename: + args.apk_name = basename + break + dirname, basename = os.path.split(dirname) + else: + parser.error( + 'Unable to determine apk name from %s, ' + 'and --apk-name was not provided.' % args.dexfile) + + method_count = MethodCount(args.dexfile) + perf_tests_results_helper.PrintPerfResult( + '%s_methods' % args.apk_name, 'total', [method_count], 'methods') + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/engine/src/flutter/build/android/preprocess_google_play_services.config.json b/engine/src/flutter/build/android/preprocess_google_play_services.config.json new file mode 100644 index 0000000000..8b3198be7a --- /dev/null +++ b/engine/src/flutter/build/android/preprocess_google_play_services.config.json @@ -0,0 +1,90 @@ +{ + "lib_version": "7.3.0", + "clients": [ + "play-services-base", + "play-services-cast", + "play-services-identity" + ], + "client_filter": [ + "res/drawable*", + "res/values-af", + "res/values-az", + "res/values-be", + "res/values-bn", + "res/values-bn-rBD", + "res/values-de-rAT", + "res/values-de-rCH", + "res/values-en-rIE", + "res/values-en-rIN", + "res/values-en-rSG", + "res/values-en-rZA", + "res/values-es-rAR", + "res/values-es-rBO", + "res/values-es-rCL", + "res/values-es-rCO", + "res/values-es-rCR", + "res/values-es-rDO", + "res/values-es-rEC", + "res/values-es-rGT", + "res/values-es-rHN", + "res/values-es-rMX", + "res/values-es-rNI", + "res/values-es-rPA", + "res/values-es-rPE", + "res/values-es-rPR", + "res/values-es-rPY", + "res/values-es-rSV", + "res/values-es-rUS", + "res/values-es-rUY", + "res/values-es-rVE", + "res/values-eu-rES", + "res/values-fr-rCA", + "res/values-fr-rCH", + "res/values-gl", + "res/values-gl-rES", + "res/values-gu", + "res/values-he", + "res/values-hy", + "res/values-hy-rAM", + "res/values-in", + "res/values-is", + "res/values-is-rIS", + "res/values-ka", + "res/values-ka-rGE", + "res/values-kk-rKZ", + "res/values-km", + "res/values-km-rKH", + "res/values-kn", + "res/values-kn-rIN", + "res/values-ky", + "res/values-ky-rKG", + "res/values-lo", + "res/values-lo-rLA", + "res/values-mk-rMK", + "res/values-ml", + "res/values-ml-rIN", + "res/values-mn", + "res/values-mn-rMN", + "res/values-mo", + "res/values-mr", + "res/values-mr-rIN", + "res/values-ms", + "res/values-ms-rMY", + "res/values-my-rMM", + "res/values-nb", + "res/values-ne", + "res/values-ne-rNP", + "res/values-si", + "res/values-si-rLK", + "res/values-ta", + "res/values-ta-rIN", + "res/values-te", + "res/values-te-rIN", + "res/values-tl", + "res/values-ur-rPK", + "res/values-uz-rUZ", + "res/values-zh", + "res/values-zh-rHK", + "res/values-zu" + ] +} diff --git a/engine/src/flutter/build/android/preprocess_google_play_services.py b/engine/src/flutter/build/android/preprocess_google_play_services.py new file mode 100755 index 0000000000..85d239ad30 --- /dev/null +++ b/engine/src/flutter/build/android/preprocess_google_play_services.py @@ -0,0 +1,238 @@ +#!/usr/bin/env python +# +# Copyright 2015 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. + +'''Prepares the Google Play services split client libraries before usage by +Chrome's build system. + +We need to preprocess Google Play services before using it in Chrome +builds for 2 main reasons: + +- Getting rid of unused resources: unsupported languages, unused +drawables, etc. + +- Merging the differents jars so that it can be proguarded more +easily. This is necessary since debug and test apks get very close +to the dex limit. + +The script is supposed to be used with the maven repository that can be obtained +by downloading the "extra-google-m2repository" from the Android SDK Manager. It +also supports importing from already extracted AAR files using the +--is-extracted-repo flag. + +The json config (see the -c argument) file should provide the following fields: + +- lib_version: String. Used when building from the maven repository. It should + be the package's version (e.g. "7.3.0") + +- clients: String array. List of clients to pick. For example, when building + from the maven repository, it's the artifactId (e.g. "play-services-base") of + each client. + +- client_filter: String array. Pattern of files to prune from the clients once + extracted. Metacharacters are allowed. (e.g. "res/drawable*") + +The output is a directory with the following structure: + + OUT_DIR + +-- google-play-services.jar + +-- res + | +-- CLIENT_1 + | | +-- color + | | +-- values + | | +-- etc. + | +-- CLIENT_2 + | +-- ... + +-- stub + +-- res/[.git-keep-directory] + +-- src/android/UnusedStub.java + +Requires the `jar` utility in the path. + +''' + +import argparse +import glob +import itertools +import json +import os +import shutil +import stat +import sys + +from pylib import cmd_helper +from pylib import constants + +sys.path.append( + os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp')) +from util import build_utils + + +M2_PKG_PATH = os.path.join('com', 'google', 'android', 'gms') + + +def main(): + parser = argparse.ArgumentParser(description=("Prepares the Google Play " + "services split client libraries before usage by Chrome's build system")) + parser.add_argument('-r', + '--repository', + help='The Google Play services repository location', + required=True, + metavar='FILE') + parser.add_argument('-o', + '--out-dir', + help='The output directory', + required=True, + metavar='FILE') + parser.add_argument('-c', + '--config-file', + help='Config file path', + required=True, + metavar='FILE') + parser.add_argument('-g', + '--git-friendly', + action='store_true', + default=False, + help='Add a .gitkeep file to the empty directories') + parser.add_argument('-x', + '--is-extracted-repo', + action='store_true', + default=False, + help='The provided repository is not made of AAR files.') + + args = parser.parse_args() + + ProcessGooglePlayServices(args.repository, + args.out_dir, + args.config_file, + args.git_friendly, + args.is_extracted_repo) + + +def ProcessGooglePlayServices(repo, out_dir, config_path, git_friendly, + is_extracted_repo): + with open(config_path, 'r') as json_file: + config = json.load(json_file) + + with build_utils.TempDir() as tmp_root: + tmp_paths = _SetupTempDir(tmp_root) + + if is_extracted_repo: + _ImportFromExtractedRepo(config, tmp_paths, repo) + else: + _ImportFromAars(config, tmp_paths, repo) + + _GenerateCombinedJar(tmp_paths) + _ProcessResources(config, tmp_paths) + _BuildOutput(config, tmp_paths, out_dir, git_friendly) + + +def _SetupTempDir(tmp_root): + tmp_paths = { + 'root': tmp_root, + 'imported_clients': os.path.join(tmp_root, 'imported_clients'), + 'extracted_jars': os.path.join(tmp_root, 'jar'), + 'combined_jar': os.path.join(tmp_root, 'google-play-services.jar'), + } + os.mkdir(tmp_paths['imported_clients']) + os.mkdir(tmp_paths['extracted_jars']) + + return tmp_paths + + +def _SetupOutputDir(out_dir): + out_paths = { + 'root': out_dir, + 'res': os.path.join(out_dir, 'res'), + 'jar': os.path.join(out_dir, 'google-play-services.jar'), + 'stub': os.path.join(out_dir, 'stub'), + } + + shutil.rmtree(out_paths['jar'], ignore_errors=True) + shutil.rmtree(out_paths['res'], ignore_errors=True) + shutil.rmtree(out_paths['stub'], ignore_errors=True) + + return out_paths + + +def _MakeWritable(dir_path): + for root, dirs, files in os.walk(dir_path): + for path in itertools.chain(dirs, files): + st = os.stat(os.path.join(root, path)) + os.chmod(os.path.join(root, path), st.st_mode | stat.S_IWUSR) + + +def _ImportFromAars(config, tmp_paths, repo): + for client in config['clients']: + aar_name = '%s-%s.aar' % (client, config['lib_version']) + aar_path = os.path.join(repo, M2_PKG_PATH, client, + config['lib_version'], aar_name) + aar_out_path = os.path.join(tmp_paths['imported_clients'], client) + build_utils.ExtractAll(aar_path, aar_out_path) + + client_jar_path = os.path.join(aar_out_path, 'classes.jar') + build_utils.ExtractAll(client_jar_path, tmp_paths['extracted_jars'], + no_clobber=False) + + +def _ImportFromExtractedRepo(config, tmp_paths, repo): + # Import the clients + try: + for client in config['clients']: + client_out_dir = os.path.join(tmp_paths['imported_clients'], client) + shutil.copytree(os.path.join(repo, client), client_out_dir) + + client_jar_path = os.path.join(client_out_dir, 'classes.jar') + build_utils.ExtractAll(client_jar_path, tmp_paths['extracted_jars'], + no_clobber=False) + finally: + _MakeWritable(tmp_paths['imported_clients']) + + +def _GenerateCombinedJar(tmp_paths): + out_file_name = tmp_paths['combined_jar'] + working_dir = tmp_paths['extracted_jars'] + cmd_helper.Call(['jar', '-cf', out_file_name, '-C', working_dir, '.']) + + +def _ProcessResources(config, tmp_paths): + # Prune unused resources + for res_filter in config['client_filter']: + glob_pattern = os.path.join(tmp_paths['imported_clients'], '*', res_filter) + for prune_target in glob.glob(glob_pattern): + shutil.rmtree(prune_target) + + +def _BuildOutput(config, tmp_paths, out_dir, git_friendly): + out_paths = _SetupOutputDir(out_dir) + + # Copy the resources to the output dir + for client in config['clients']: + res_in_tmp_dir = os.path.join(tmp_paths['imported_clients'], client, 'res') + if os.path.isdir(res_in_tmp_dir) and os.listdir(res_in_tmp_dir): + res_in_final_dir = os.path.join(out_paths['res'], client) + shutil.copytree(res_in_tmp_dir, res_in_final_dir) + + # Copy the jar + shutil.copyfile(tmp_paths['combined_jar'], out_paths['jar']) + + # Write the java dummy stub. Needed for gyp to create the resource jar + stub_location = os.path.join(out_paths['stub'], 'src', 'android') + os.makedirs(stub_location) + with open(os.path.join(stub_location, 'UnusedStub.java'), 'w') as stub: + stub.write('package android;' + 'public final class UnusedStub {' + ' private UnusedStub() {}' + '}') + + # Create the main res directory. Will be empty but is needed by gyp + stub_res_location = os.path.join(out_paths['stub'], 'res') + os.makedirs(stub_res_location) + if git_friendly: + build_utils.Touch(os.path.join(stub_res_location, '.git-keep-directory')) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/engine/src/flutter/build/android/provision_devices.py b/engine/src/flutter/build/android/provision_devices.py index 259bd55ab2..a5f8fc6723 100755 --- a/engine/src/flutter/build/android/provision_devices.py +++ b/engine/src/flutter/build/android/provision_devices.py @@ -11,6 +11,7 @@ Usage: """ import argparse +import json import logging import os import posixpath @@ -61,6 +62,9 @@ def ProvisionDevices(options): if options.auto_reconnect: _LaunchHostHeartbeat() blacklist = device_blacklist.ReadBlacklist() + if options.output_device_blacklist: + with open(options.output_device_blacklist, 'w') as f: + json.dump(blacklist, f) if all(d in blacklist for d in devices): raise device_errors.NoDevicesError return 0 @@ -79,7 +83,11 @@ def ProvisionDevice(device, options): return not options.phases or phase_name in options.phases def run_phase(phase_func, reboot=True): - device.WaitUntilFullyBooted(timeout=reboot_timeout) + try: + device.WaitUntilFullyBooted(timeout=reboot_timeout, retries=0) + except device_errors.CommandTimeoutError: + logging.error('Device did not finish booting. Will try to reboot.') + device.Reboot(timeout=reboot_timeout) phase_func(device, options) if reboot: device.Reboot(False, retries=0) @@ -173,25 +181,19 @@ def SetProperties(device, options): else: device_settings.ConfigureContentSettings( device, device_settings.ENABLE_LOCATION_SETTINGS) + + if options.disable_mock_location: + device_settings.ConfigureContentSettings( + device, device_settings.DISABLE_MOCK_LOCATION_SETTINGS) + else: + device_settings.ConfigureContentSettings( + device, device_settings.ENABLE_MOCK_LOCATION_SETTINGS) + device_settings.SetLockScreenSettings(device) if options.disable_network: device_settings.ConfigureContentSettings( device, device_settings.NETWORK_DISABLED_SETTINGS) - if options.min_battery_level is not None: - try: - battery = battery_utils.BatteryUtils(device) - battery.ChargeDeviceToLevel(options.min_battery_level) - except device_errors.CommandFailedError as e: - logging.exception('Unable to charge device to specified level.') - - if options.max_battery_temp is not None: - try: - battery = battery_utils.BatteryUtils(device) - battery.LetBatteryCoolToTemperature(options.max_battery_temp) - except device_errors.CommandFailedError as e: - logging.exception('Unable to let battery cool to specified temperature.') - def _ConfigureLocalProperties(device, java_debug=True): """Set standard readonly testing device properties prior to reboot.""" local_props = [ @@ -218,6 +220,20 @@ def _ConfigureLocalProperties(device, java_debug=True): def FinishProvisioning(device, options): + if options.min_battery_level is not None: + try: + battery = battery_utils.BatteryUtils(device) + battery.ChargeDeviceToLevel(options.min_battery_level) + except device_errors.CommandFailedError: + logging.exception('Unable to charge device to specified level.') + + if options.max_battery_temp is not None: + try: + battery = battery_utils.BatteryUtils(device) + battery.LetBatteryCoolToTemperature(options.max_battery_temp) + except device_errors.CommandFailedError: + logging.exception('Unable to let battery cool to specified temperature.') + device.RunShellCommand( ['date', '-s', time.strftime('%Y%m%d.%H%M%S', time.gmtime())], as_root=True, check_return=True) @@ -301,6 +317,8 @@ def main(): ' level before trying to continue') parser.add_argument('--disable-location', action='store_true', help='disable Google location services on devices') + parser.add_argument('--disable-mock-location', action='store_true', + default=False, help='Set ALLOW_MOCK_LOCATION to false') parser.add_argument('--disable-network', action='store_true', help='disable network access on devices') parser.add_argument('--disable-java-debug', action='store_false', @@ -317,6 +335,8 @@ def main(): help='Log more information.') parser.add_argument('--max-battery-temp', type=int, metavar='NUM', help='Wait for the battery to have this temp or lower.') + parser.add_argument('--output-device-blacklist', + help='Json file to output the device blacklist.') args = parser.parse_args() constants.SetBuildType(args.target) diff --git a/engine/src/flutter/build/android/pylib/constants/__init__.py b/engine/src/flutter/build/android/pylib/constants/__init__.py index 8821f97dd3..0beb0dc435 100644 --- a/engine/src/flutter/build/android/pylib/constants/__init__.py +++ b/engine/src/flutter/build/android/pylib/constants/__init__.py @@ -184,7 +184,7 @@ class ANDROID_SDK_VERSION_CODES(object): LOLLIPOP_MR1 = 22 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1 -ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.1' +ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0' ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 'third_party/android_tools/sdk') ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, diff --git a/engine/src/flutter/build/android/pylib/device/battery_utils.py b/engine/src/flutter/build/android/pylib/device/battery_utils.py index d160bbbd7b..eab558ea9a 100644 --- a/engine/src/flutter/build/android/pylib/device/battery_utils.py +++ b/engine/src/flutter/build/android/pylib/device/battery_utils.py @@ -80,18 +80,16 @@ _DEVICE_PROFILES = [ 'echo Connected > ' '/sys/bus/i2c/drivers/bq2419x/0-006b/input_cable_state && ' 'dumpsys battery set ac 0 && dumpsys battery set usb 0'), - 'charge_counter': ( - '/sys/class/power_supply/max170xx_battery/charge_counter_ext'), - 'voltage': '/sys/class/power_supply/max170xx_battery/voltage_now', - 'current': '/sys/class/power_supply/max170xx_battery/current_now', + 'charge_counter': '/sys/class/power_supply/battery/charge_counter_ext', + 'voltage': '/sys/class/power_supply/battery/voltage_now', + 'current': '/sys/class/power_supply/battery/current_now', }, { 'name': 'Nexus 10', 'witness_file': None, 'enable_command': None, 'disable_command': None, - 'charge_counter': ( - '/sys/class/power_supply/ds2784-fuelgauge/charge_counter_ext'), + 'charge_counter': None, 'voltage': '/sys/class/power_supply/ds2784-fuelgauge/voltage_now', 'current': '/sys/class/power_supply/ds2784-fuelgauge/current_now', diff --git a/engine/src/flutter/build/android/pylib/device/commands/java/src/org/chromium/android/commands/unzip/Unzip.java b/engine/src/flutter/build/android/pylib/device/commands/java/src/org/chromium/android/commands/unzip/Unzip.java index 4d2a04518e..7cbbb732ce 100644 --- a/engine/src/flutter/build/android/pylib/device/commands/java/src/org/chromium/android/commands/unzip/Unzip.java +++ b/engine/src/flutter/build/android/pylib/device/commands/java/src/org/chromium/android/commands/unzip/Unzip.java @@ -38,6 +38,7 @@ public class Unzip { s.println("unzip [zipfile]"); } + @SuppressWarnings("Finally") private void unzip(String[] args) { ZipInputStream zis = null; try { diff --git a/engine/src/flutter/build/android/pylib/device/device_utils.py b/engine/src/flutter/build/android/pylib/device/device_utils.py index 3a6563e844..f201ef36b8 100644 --- a/engine/src/flutter/build/android/pylib/device/device_utils.py +++ b/engine/src/flutter/build/android/pylib/device/device_utils.py @@ -949,7 +949,8 @@ class DeviceUtils(object): for h, d in host_device_tuples: if os.path.isdir(h): self.RunShellCommand(['mkdir', '-p', d], check_return=True) - (changed_files, stale_files) = self._GetChangedAndStaleFiles(h, d) + changed_files, stale_files = ( + self._GetChangedAndStaleFiles(h, d, delete_device_stale)) all_changed_files += changed_files all_stale_files += stale_files @@ -962,17 +963,19 @@ class DeviceUtils(object): self._PushFilesImpl(host_device_tuples, all_changed_files) - def _GetChangedAndStaleFiles(self, host_path, device_path): + def _GetChangedAndStaleFiles(self, host_path, device_path, track_stale=False): """Get files to push and delete Args: host_path: an absolute path of a file or directory on the host device_path: an absolute path of a file or directory on the device + track_stale: whether to bother looking for stale files (slower) Returns: a two-element tuple 1st element: a list of (host_files_path, device_files_path) tuples to push - 2nd element: a list of stale files under device_path + 2nd element: a list of stale files under device_path, or [] when + track_stale == False """ real_host_path = os.path.realpath(host_path) try: @@ -985,8 +988,13 @@ class DeviceUtils(object): try: host_checksums = md5sum.CalculateHostMd5Sums([real_host_path]) + interesting_device_paths = [real_device_path] + if not track_stale and os.path.isdir(real_host_path): + interesting_device_paths = [ + posixpath.join(real_device_path, os.path.relpath(p, real_host_path)) + for p in host_checksums.keys()] device_checksums = md5sum.CalculateDeviceMd5Sums( - [real_device_path], self) + interesting_device_paths, self) except EnvironmentError as e: logging.warning('Error calculating md5: %s', e) return ([(host_path, device_path)], []) diff --git a/engine/src/flutter/build/android/pylib/device_settings.py b/engine/src/flutter/build/android/pylib/device_settings.py index 97e966322c..beabcff1f3 100644 --- a/engine/src/flutter/build/android/pylib/device_settings.py +++ b/engine/src/flutter/build/android/pylib/device_settings.py @@ -127,6 +127,18 @@ DISABLE_LOCATION_SETTINGS = [ ]), ] +ENABLE_MOCK_LOCATION_SETTINGS = [ + ('settings/secure', [ + ('mock_location', 1), + ]), +] + +DISABLE_MOCK_LOCATION_SETTINGS = [ + ('settings/secure', [ + ('mock_location', 0), + ]), +] + DETERMINISTIC_DEVICE_SETTINGS = [ ('settings/global', [ ('assisted_gps_enabled', 0), diff --git a/engine/src/flutter/build/android/pylib/gtest/filter/content_browsertests_disabled b/engine/src/flutter/build/android/pylib/gtest/filter/content_browsertests_disabled index 39eff4dfcb..dcad240a40 100644 --- a/engine/src/flutter/build/android/pylib/gtest/filter/content_browsertests_disabled +++ b/engine/src/flutter/build/android/pylib/gtest/filter/content_browsertests_disabled @@ -49,9 +49,6 @@ DownloadContentTest.ResumeWithDeletedFile # http://crbug.com/386227 IndexedDBBrowserTest.VersionChangeCrashResilience -# http://crbug.com/386222 -IndexedDBBrowserTest.DoesntHangTest - # http://crbug.com/233118 IndexedDBBrowserTest.NullKeyPathPersistence diff --git a/engine/src/flutter/build/android/pylib/gtest/test_package_apk.py b/engine/src/flutter/build/android/pylib/gtest/test_package_apk.py index 16ef21c6e4..a679b0358e 100644 --- a/engine/src/flutter/build/android/pylib/gtest/test_package_apk.py +++ b/engine/src/flutter/build/android/pylib/gtest/test_package_apk.py @@ -43,6 +43,11 @@ class TestPackageApk(TestPackage): else: self._package_info = constants.PACKAGE_INFO['gtest'] + if suite_name == 'net_unittests': + self._extras = {'RunInSubThread': ''} + else: + self._extras = [] + def _CreateCommandLineFileOnDevice(self, device, options): device.WriteFile(self._package_info.cmdline_file, self.suite_name + ' ' + options) @@ -74,7 +79,8 @@ class TestPackageApk(TestPackage): device.StartActivity( intent.Intent(package=self._package_info.package, activity=self._package_info.activity, - action='android.intent.action.MAIN'), + action='android.intent.action.MAIN', + extras=self._extras), # No wait since the runner waits for FIFO creation anyway. blocking=False, force_stop=force_stop) diff --git a/engine/src/flutter/build/android/pylib/instrumentation/test_package.py b/engine/src/flutter/build/android/pylib/instrumentation/test_package.py index f32556f33d..5be061d4af 100644 --- a/engine/src/flutter/build/android/pylib/instrumentation/test_package.py +++ b/engine/src/flutter/build/android/pylib/instrumentation/test_package.py @@ -16,6 +16,8 @@ class TestPackage(test_jar.TestJar): if not os.path.exists(apk_path): raise Exception('%s not found, please build it' % apk_path) + if test_support_apk_path and not os.path.exists(test_support_apk_path): + raise Exception('%s not found, please build it' % test_support_apk_path) self._apk_path = apk_path self._apk_name = os.path.splitext(os.path.basename(apk_path))[0] self._package_name = apk_helper.GetPackageName(self._apk_path) diff --git a/engine/src/flutter/build/android/pylib/perf/test_options.py b/engine/src/flutter/build/android/pylib/perf/test_options.py index e6ef5602d9..eff928e115 100644 --- a/engine/src/flutter/build/android/pylib/perf/test_options.py +++ b/engine/src/flutter/build/android/pylib/perf/test_options.py @@ -18,4 +18,5 @@ PerfOptions = collections.namedtuple('PerfOptions', [ 'collect_chartjson_data', 'output_chartjson_data', 'max_battery_temp', + 'min_battery_level', ]) diff --git a/engine/src/flutter/build/android/pylib/perf/test_runner.py b/engine/src/flutter/build/android/pylib/perf/test_runner.py index 31eb0e9e9a..d21a9b71b1 100644 --- a/engine/src/flutter/build/android/pylib/perf/test_runner.py +++ b/engine/src/flutter/build/android/pylib/perf/test_runner.py @@ -277,6 +277,12 @@ class TestRunner(base_test_runner.BaseTestRunner): self._device_battery.LetBatteryCoolToTemperature( self._options.max_battery_temp) + logging.info('Charge level: %s%%', + str(self._device_battery.GetBatteryInfo().get('level'))) + if self._options.min_battery_level: + self._device_battery.ChargeDeviceToLevel( + self._options.min_battery_level) + logging.info('%s : %s', test_name, cmd) start_time = datetime.datetime.now() diff --git a/engine/src/flutter/build/android/pylib/sdk/aapt.py b/engine/src/flutter/build/android/pylib/sdk/aapt.py new file mode 100644 index 0000000000..3d317ff2c5 --- /dev/null +++ b/engine/src/flutter/build/android/pylib/sdk/aapt.py @@ -0,0 +1,42 @@ +# Copyright 2015 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. + +"""This module wraps the Android Asset Packaging Tool.""" + +import os + +from pylib import cmd_helper +from pylib import constants +from pylib.utils import timeout_retry + +_AAPT_PATH = os.path.join(constants.ANDROID_SDK_TOOLS, 'aapt') + +def _RunAaptCmd(args): + """Runs an aapt command. + + Args: + args: A list of arguments for aapt. + + Returns: + The output of the command. + """ + cmd = [_AAPT_PATH] + args + status, output = cmd_helper.GetCmdStatusAndOutput(cmd) + if status != 0: + raise Exception('Failed running aapt command: "%s" with output "%s".' % + (' '.join(cmd), output)) + return output + +def Dump(what, apk, assets=None): + """Returns the output of the aapt dump command. + + Args: + what: What you want to dump. + apk: Path to apk you want to dump information for. + assets: List of assets in apk you want to dump information for. + """ + assets = assets or [] + if isinstance(assets, basestring): + assets = [assets] + return _RunAaptCmd(['dump', what, apk] + assets).splitlines() \ No newline at end of file diff --git a/engine/src/flutter/build/android/pylib/sdk/split_select.py b/engine/src/flutter/build/android/pylib/sdk/split_select.py index 8752129c04..e204662142 100644 --- a/engine/src/flutter/build/android/pylib/sdk/split_select.py +++ b/engine/src/flutter/build/android/pylib/sdk/split_select.py @@ -3,7 +3,6 @@ # found in the LICENSE file. """This module wraps Android's split-select tool.""" -# pylint: disable=unused-argument import os @@ -12,25 +11,21 @@ from pylib import constants from pylib.utils import timeout_retry _SPLIT_SELECT_PATH = os.path.join(constants.ANDROID_SDK_TOOLS, 'split-select') -_DEFAULT_TIMEOUT = 30 -_DEFAULT_RETRIES = 2 -def _RunSplitSelectCmd(args, timeout=None, retries=None): +def _RunSplitSelectCmd(args): """Runs a split-select command. Args: args: A list of arguments for split-select. - timeout: Timeout in seconds. - retries: Number of retries. Returns: The output of the command. """ cmd = [_SPLIT_SELECT_PATH] + args - status, output = cmd_helper.GetCmdStatusAndOutputWithTimeout( - cmd, timeout_retry.CurrentTimeoutThread().GetRemainingTime()) + status, output = cmd_helper.GetCmdStatusAndOutput(cmd) if status != 0: - raise Exception('Failed running command %s' % str(cmd)) + raise Exception('Failed running command "%s" with output "%s".' % + (' '.join(cmd), output)) return output def _SplitConfig(device): @@ -45,16 +40,13 @@ def _SplitConfig(device): device.screen_density, device.product_cpu_abi)) -def SelectSplits(device, base_apk, split_apks, - timeout=_DEFAULT_TIMEOUT, retries=_DEFAULT_RETRIES): +def SelectSplits(device, base_apk, split_apks): """Determines which APK splits the device requires. Args: device: A DeviceUtils object. base_apk: The path of the base APK. split_apks: A list of paths of APK splits. - timeout: Timeout in seconds. - retries: Number of retries. Returns: The list of APK splits that the device requires. @@ -63,4 +55,4 @@ def SelectSplits(device, base_apk, split_apks, args = ['--target', config, '--base', base_apk] for split in split_apks: args.extend(['--split', split]) - return _RunSplitSelectCmd(args, timeout=timeout, retries=retries).splitlines() \ No newline at end of file + return _RunSplitSelectCmd(args).splitlines() \ No newline at end of file diff --git a/engine/src/flutter/build/android/pylib/utils/apk_helper.py b/engine/src/flutter/build/android/pylib/utils/apk_helper.py index 6dd209e3dc..a556e7b31e 100644 --- a/engine/src/flutter/build/android/pylib/utils/apk_helper.py +++ b/engine/src/flutter/build/android/pylib/utils/apk_helper.py @@ -9,12 +9,15 @@ import re from pylib import cmd_helper from pylib import constants +from pylib.sdk import aapt _AAPT_PATH = os.path.join(constants.ANDROID_SDK_TOOLS, 'aapt') _MANIFEST_ATTRIBUTE_RE = re.compile( r'\s*A: ([^\(\)= ]*)\([^\(\)= ]*\)="(.*)" \(Raw: .*\)$') _MANIFEST_ELEMENT_RE = re.compile(r'\s*(?:E|N): (\S*) .*$') +_PACKAGE_NAME_RE = re.compile(r'package: .*name=\'(\S*)\'') +_SPLIT_NAME_RE = re.compile(r'package: .*split=\'(\S*)\'') def GetPackageName(apk_path): @@ -30,8 +33,7 @@ def GetInstrumentationName(apk_path): def _ParseManifestFromApk(apk_path): - aapt_cmd = [_AAPT_PATH, 'dump', 'xmltree', apk_path, 'AndroidManifest.xml'] - aapt_output = cmd_helper.GetCmdOutput(aapt_cmd).split('\n') + aapt_output = aapt.Dump('xmltree', apk_path, 'AndroidManifest.xml') parsed_manifest = {} node_stack = [parsed_manifest] @@ -70,6 +72,7 @@ class ApkHelper(object): self._apk_path = apk_path self._manifest = None self._package_name = None + self._split_name = None def GetActivityName(self): """Returns the name of the Activity in the apk.""" @@ -100,16 +103,27 @@ class ApkHelper(object): if self._package_name: return self._package_name - aapt_cmd = [_AAPT_PATH, 'dump', 'badging', self._apk_path] - aapt_output = cmd_helper.GetCmdOutput(aapt_cmd).split('\n') - package_name_re = re.compile(r'package: .*name=\'(\S*)\'') + aapt_output = aapt.Dump('badging', self._apk_path) for line in aapt_output: - m = package_name_re.match(line) + m = _PACKAGE_NAME_RE.match(line) if m: self._package_name = m.group(1) return self._package_name raise Exception('Failed to determine package name of %s' % self._apk_path) + def GetSplitName(self): + """Returns the name of the split of the apk.""" + if self._split_name: + return self._split_name + + aapt_output = aapt.Dump('badging', self._apk_path) + for line in aapt_output: + m = _SPLIT_NAME_RE.match(line) + if m: + self._split_name = m.group(1) + return self._split_name + return None + def _GetManifest(self): if not self._manifest: self._manifest = _ParseManifestFromApk(self._apk_path) diff --git a/engine/src/flutter/build/android/setup.gyp b/engine/src/flutter/build/android/setup.gyp index b3c3422163..0e1c2c4b49 100644 --- a/engine/src/flutter/build/android/setup.gyp +++ b/engine/src/flutter/build/android/setup.gyp @@ -77,6 +77,35 @@ }, ], }, # build_output_dirs + { + 'target_name': 'sun_tools_java', + 'type': 'none', + 'variables': { + 'found_jar_path': '<(PRODUCT_DIR)/sun_tools_java/tools.jar', + 'jar_path': '<(found_jar_path)', + }, + 'includes': [ + '../../build/host_prebuilt_jar.gypi', + ], + 'actions': [ + { + 'action_name': 'find_sun_tools_jar', + 'variables' : { + }, + 'inputs' : [ + 'gyp/find_sun_tools_jar.py', + 'gyp/util/build_utils.py', + ], + 'outputs': [ + '<(found_jar_path)', + ], + 'action': [ + 'python', 'gyp/find_sun_tools_jar.py', + '--output', '<(found_jar_path)', + ], + }, + ], + }, # sun_tools_java ] } diff --git a/engine/src/flutter/build/android/test_runner.py b/engine/src/flutter/build/android/test_runner.py index d508ef8d7c..1fc48ecf50 100755 --- a/engine/src/flutter/build/android/test_runner.py +++ b/engine/src/flutter/build/android/test_runner.py @@ -332,6 +332,11 @@ def AddInstrumentationTestOptions(parser): help=('The name of the apk containing the tests ' '(without the .apk extension; ' 'e.g. "ContentShellTest").')) + group.add_argument('--support-apk', dest='test_support_apk_path', + help=('The path to an optional support apk to be ' + 'installed alongside the test apk. The ' + 'path should be relative to the output ' + 'directory (--output-directory).')) group.add_argument('--coverage-dir', help=('Directory in which to place all generated ' 'EMMA coverage files.')) @@ -379,8 +384,6 @@ def ProcessInstrumentationOptions(args): constants.GetOutDirectory(), constants.SDK_BUILD_TEST_JAVALIB_DIR, '%s.jar' % args.test_apk) - args.test_support_apk_path = '%sSupport%s' % ( - os.path.splitext(args.test_apk_path)) args.test_runner = apk_helper.GetInstrumentationName(args.test_apk_path) @@ -613,6 +616,9 @@ def AddPerfTestOptions(parser): 'temperature (0.1 C)') group.add_argument('single_step_command', nargs='*', action=SingleStepAction, help='If --single-step is specified, the command to run.') + group.add_argument('--min-battery-level', type=int, + help='Only starts tests when the battery is charged above ' + 'given level.') AddCommonOptions(parser) AddDeviceOptions(parser) @@ -635,7 +641,7 @@ def ProcessPerfTestOptions(args): args.steps, args.flaky_steps, args.output_json_list, args.print_step, args.no_timeout, args.test_filter, args.dry_run, args.single_step, args.collect_chartjson_data, - args.output_chartjson_data, args.max_battery_temp) + args.output_chartjson_data, args.max_battery_temp, args.min_battery_level) def AddPythonTestOptions(parser): diff --git a/engine/src/flutter/build/android/tests/multiple_proguards/AndroidManifest.xml b/engine/src/flutter/build/android/tests/multiple_proguards/AndroidManifest.xml deleted file mode 100644 index 1794712bb3..0000000000 --- a/engine/src/flutter/build/android/tests/multiple_proguards/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/engine/src/flutter/build/android/tests/multiple_proguards/multiple_proguards.gyp b/engine/src/flutter/build/android/tests/multiple_proguards/multiple_proguards.gyp deleted file mode 100644 index 48a5d7ba8b..0000000000 --- a/engine/src/flutter/build/android/tests/multiple_proguards/multiple_proguards.gyp +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2013 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. -{ - 'variables': { - 'chromium_code': 1, - }, - 'targets': [ - { - 'target_name': 'multiple_proguards_test_apk', - 'type': 'none', - 'variables': { - 'app_manifest_version_name%': '<(android_app_version_name)', - 'java_in_dir': '.', - 'proguard_enabled': 'true', - 'proguard_flags_paths': [ - # Both these proguard?.flags files need to be part of the build to - # remove both warnings from the src/dummy/DummyActivity.java file, else the - # build will fail. - 'proguard1.flags', - 'proguard2.flags', - ], - 'R_package': 'dummy', - 'R_package_relpath': 'dummy', - 'apk_name': 'MultipleProguards', - # This is a build-only test. There's nothing to install. - 'gyp_managed_install': 0, - # The Java code produces warnings, so force the build to not show them. - 'chromium_code': 0, - }, - 'includes': [ '../../../../build/java_apk.gypi' ], - }, - ], -} diff --git a/engine/src/flutter/build/android/tests/multiple_proguards/proguard1.flags b/engine/src/flutter/build/android/tests/multiple_proguards/proguard1.flags deleted file mode 100644 index 95a814cda6..0000000000 --- a/engine/src/flutter/build/android/tests/multiple_proguards/proguard1.flags +++ /dev/null @@ -1 +0,0 @@ --dontwarn sun.misc.Unsafe diff --git a/engine/src/flutter/build/android/tests/multiple_proguards/proguard2.flags b/engine/src/flutter/build/android/tests/multiple_proguards/proguard2.flags deleted file mode 100644 index ceac62b1c6..0000000000 --- a/engine/src/flutter/build/android/tests/multiple_proguards/proguard2.flags +++ /dev/null @@ -1 +0,0 @@ --dontwarn sun.reflect.Reflection diff --git a/engine/src/flutter/build/android/tests/multiple_proguards/src/dummy/DummyActivity.java b/engine/src/flutter/build/android/tests/multiple_proguards/src/dummy/DummyActivity.java deleted file mode 100644 index e138acca5f..0000000000 --- a/engine/src/flutter/build/android/tests/multiple_proguards/src/dummy/DummyActivity.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2013 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. - -package dummy; - -import android.app.Activity; - -/** - * Dummy activity to build apk. - * - * This class is created to ensure that proguard will produce two separate warnings. - */ -public class DummyActivity extends Activity { - private static void doBadThings1() { - try { - sun.misc.Unsafe.getUnsafe(); - } catch (Exception e) { - throw new Error(e); - } - } - - private static void doBadThings2() { - sun.reflect.Reflection.getCallerClass(2); - } -} diff --git a/engine/src/flutter/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java b/engine/src/flutter/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java deleted file mode 100644 index 2f7db71958..0000000000 --- a/engine/src/flutter/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2014 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. - -package org.chromium.base.library_loader; - -/** - * This is a complete dummy, required because base now requires a version of - * NativeLibraries to build, but doesn't include it in its jar file. - */ -public class NativeLibraries { - public static boolean sUseLinker = false; - public static boolean sUseLibraryInZipFile = false; - public static boolean sEnableLinkerTests = false; - static final String[] LIBRARIES = {}; - static String sVersionNumber = ""; -} diff --git a/engine/src/flutter/build/android/update_verification.py b/engine/src/flutter/build/android/update_verification.py index 06cd2d6954..05d083b32a 100755 --- a/engine/src/flutter/build/android/update_verification.py +++ b/engine/src/flutter/build/android/update_verification.py @@ -49,7 +49,7 @@ def TestUpdate(device, old_apk, new_apk, app_data, package_name): # Restore command is not synchronous raw_input('Select "Restore my data" on the device. Then press enter to ' 'continue.') - device_path = device.GetApplicationPath(package_name) + device_path = device.GetApplicationPaths(package_name) if not device_path: raise Exception('Expected package %s to already be installed. ' 'Package name might have changed!' % package_name) diff --git a/engine/src/flutter/build/android_sdk_extras.json b/engine/src/flutter/build/android_sdk_extras.json index 456272627e..25b47c360a 100644 --- a/engine/src/flutter/build/android_sdk_extras.json +++ b/engine/src/flutter/build/android_sdk_extras.json @@ -3,6 +3,7 @@ "dir_name": "google", "version": "21.0.0", "zip": "google_google_play_services_21.0.0.zip", - "package": "google_play_services" + "package": "google_play_services", + "package_id": "extra-google-google_play_services" } ] diff --git a/engine/src/flutter/build/check_sdk_extras_version.py b/engine/src/flutter/build/check_sdk_extras_version.py new file mode 100755 index 0000000000..9b2f10d2ab --- /dev/null +++ b/engine/src/flutter/build/check_sdk_extras_version.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python +# Copyright 2015 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. + +'''Checks the status of an Android SDK package. + +Verifies the given package has been installed from the Android SDK Manager and +that its version is at least the minimum version required by the project +configuration. +''' + +import argparse +import json +import os +import re +import sys + + +COLORAMA_ROOT = os.path.join(os.path.dirname(__file__), + os.pardir, 'third_party', 'colorama', 'src') + +sys.path.append(COLORAMA_ROOT) +import colorama + + +UDPATE_SCRIPT_PATH = 'build/install-android-sdks.sh' + +SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), + 'android_sdk_extras.json') + +PACKAGE_VERSION_PATTERN = r'^Pkg\.Revision=(?P\d+).*$' + +PKG_NOT_FOUND_MSG = ('Error while checking Android SDK extras versions. ' + 'Could not find the "{package_id}" package in ' + '{checked_location}. Please run {script} to download it.') +UPDATE_NEEDED_MSG = ('Error while checking Android SDK extras versions. ' + 'Version {minimum_version} or greater is required for the ' + 'package "{package_id}". Version {actual_version} found. ' + 'Please run {script} to update it.') +REQUIRED_VERSION_ERROR_MSG = ('Error while checking Android SDK extras ' + 'versions. ' + 'Could not retrieve the required version for ' + 'package "{package_id}".') + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--package-id', + help=('id of the package to check for. The list of ' + 'available packages and their ids can be obtained ' + 'by running ' + 'third_party/android_tools/sdk/tools/android list ' + 'sdk --extended')) + parser.add_argument('--package-location', + help='path to the package\'s expected install location.', + metavar='DIR') + parser.add_argument('--stamp', + help=('if specified, a stamp file will be created at the ' + 'provided location.'), + metavar='FILE') + + args = parser.parse_args() + + if not ShouldSkipVersionCheck(): + minimum_version = GetRequiredMinimumVersion(args.package_id) + CheckPackageVersion(args.package_id, args.package_location, minimum_version) + + # Create the stamp file. + if args.stamp: + with open(args.stamp, 'a'): + os.utime(args.stamp, None) + + sys.exit(0) + +def ExitError(msg): + sys.exit(colorama.Fore.MAGENTA + colorama.Style.BRIGHT + msg + + colorama.Style.RESET_ALL) + + +def GetRequiredMinimumVersion(package_id): + with open(SDK_EXTRAS_JSON_FILE, 'r') as json_file: + packages = json.load(json_file) + + for package in packages: + if package['package_id'] == package_id: + return int(package['version'].split('.')[0]) + + ExitError(REQUIRED_VERSION_ERROR_MSG.format(package_id=package_id)) + + +def CheckPackageVersion(pkg_id, location, minimum_version): + version_file_path = os.path.join(location, 'source.properties') + # Extracts the version of the package described by the property file. We only + # care about the major version number here. + version_pattern = re.compile(PACKAGE_VERSION_PATTERN, re.MULTILINE) + + if not os.path.isfile(version_file_path): + ExitError(PKG_NOT_FOUND_MSG.format( + package_id=pkg_id, + checked_location=location, + script=UDPATE_SCRIPT_PATH)) + + with open(version_file_path, 'r') as f: + match = version_pattern.search(f.read()) + + if not match: + ExitError(PKG_NOT_FOUND_MSG.format( + package_id=pkg_id, + checked_location=location, + script=UDPATE_SCRIPT_PATH)) + + pkg_version = int(match.group('version')) + if pkg_version < minimum_version: + ExitError(UPDATE_NEEDED_MSG.format( + package_id=pkg_id, + minimum_version=minimum_version, + actual_version=pkg_version, + script=UDPATE_SCRIPT_PATH)) + + # Everything looks ok, print nothing. + +def ShouldSkipVersionCheck(): + ''' + Bots should not run the version check, since they download the sdk extras + in a different way. + ''' + return bool(os.environ.get('CHROME_HEADLESS')) + +if __name__ == '__main__': + main() diff --git a/engine/src/flutter/build/clobber.py b/engine/src/flutter/build/clobber.py new file mode 100755 index 0000000000..785011a171 --- /dev/null +++ b/engine/src/flutter/build/clobber.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python +# Copyright 2015 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. + +"""This script provides methods for clobbering build directories.""" + +import argparse +import os +import shutil +import sys + + +def extract_gn_build_commands(build_ninja_file): + """Extracts from a build.ninja the commands to run GN. + + The commands to run GN are the gn rule and build.ninja build step at the + top of the build.ninja file. We want to keep these when deleting GN builds + since we want to preserve the command-line flags to GN. + + On error, returns the empty string.""" + result = "" + with open(build_ninja_file, 'r') as f: + # Read until the second blank line. The first thing GN writes to the file + # is the "rule gn" and the second is the section for "build build.ninja", + # separated by blank lines. + num_blank_lines = 0 + while num_blank_lines < 2: + line = f.readline() + if len(line) == 0: + return '' # Unexpected EOF. + result += line + if line[0] == '\n': + num_blank_lines = num_blank_lines + 1 + return result + + +def delete_build_dir(build_dir): + # GN writes a build.ninja.d file. Note that not all GN builds have args.gn. + build_ninja_d_file = os.path.join(build_dir, 'build.ninja.d') + if not os.path.exists(build_ninja_d_file): + shutil.rmtree(build_dir) + return + + # GN builds aren't automatically regenerated when you sync. To avoid + # messing with the GN workflow, erase everything but the args file, and + # write a dummy build.ninja file that will automatically rerun GN the next + # time Ninja is run. + build_ninja_file = os.path.join(build_dir, 'build.ninja') + build_commands = extract_gn_build_commands(build_ninja_file) + + try: + gn_args_file = os.path.join(build_dir, 'args.gn') + with open(gn_args_file, 'r') as f: + args_contents = f.read() + except IOError: + args_contents = '' + + shutil.rmtree(build_dir) + + # Put back the args file (if any). + os.mkdir(build_dir) + if args_contents != '': + with open(gn_args_file, 'w') as f: + f.write(args_contents) + + # Write the build.ninja file sufficiently to regenerate itself. + with open(os.path.join(build_dir, 'build.ninja'), 'w') as f: + if build_commands != '': + f.write(build_commands) + else: + # Couldn't parse the build.ninja file, write a default thing. + f.write('''rule gn +command = gn -q gen //out/%s/ +description = Regenerating ninja files + +build build.ninja: gn +generator = 1 +depfile = build.ninja.d +''' % (os.path.split(build_dir)[1])) + + # Write a .d file for the build which references a nonexistant file. This + # will make Ninja always mark the build as dirty. + with open(build_ninja_d_file, 'w') as f: + f.write('build.ninja: nonexistant_file.gn\n') + + +def clobber(out_dir): + """Clobber contents of build directory. + + Don't delete the directory itself: some checkouts have the build directory + mounted.""" + for f in os.listdir(out_dir): + path = os.path.join(out_dir, f) + if os.path.isfile(path): + os.unlink(path) + elif os.path.isdir(path): + delete_build_dir(path) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('out_dir', help='The output directory to clobber') + args = parser.parse_args() + clobber(args.out_dir) + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/engine/src/flutter/build/config/BUILD.gn b/engine/src/flutter/build/config/BUILD.gn index f28f0cf8ee..287a1e762b 100644 --- a/engine/src/flutter/build/config/BUILD.gn +++ b/engine/src/flutter/build/config/BUILD.gn @@ -80,6 +80,9 @@ config("feature_flags") { if (enable_spellcheck) { defines += [ "ENABLE_SPELLCHECK=1" ] } + if (use_platform_spellchecker) { + defines += [ "USE_PLATFORM_SPELLCHECKER=1" ] + } if (dont_embed_build_metadata) { defines += [ "DONT_EMBED_BUILD_METADATA" ] } @@ -90,9 +93,6 @@ config("feature_flags") { # TODO(brettw) should probably be "=1". defines += [ "USE_UDEV" ] } - if (toolkit_views) { - defines += [ "TOOLKIT_VIEWS=1" ] - } if (ui_compositor_image_transport) { # TODO(brettw) should probably be "=1". defines += [ "UI_COMPOSITOR_IMAGE_TRANSPORT" ] @@ -228,7 +228,7 @@ config("feature_flags") { defines += [ "ENABLE_HIDPI=1" ] } if (enable_topchrome_md) { - defines += [ "ENABLE_TOPCHRME_MD=1" ] + defines += [ "ENABLE_TOPCHROME_MD=1" ] } if (proprietary_codecs) { defines += [ "USE_PROPRIETARY_CODECS" ] @@ -272,6 +272,9 @@ config("feature_flags") { if (enable_media_router) { defines += [ "ENABLE_MEDIA_ROUTER=1" ] } + if (enable_webvr) { + defines += [ "ENABLE_WEBVR" ] + } } # Debug/release ---------------------------------------------------------------- @@ -396,3 +399,31 @@ config("default_libs") { libs = [ "dl" ] } } + +# Add this config to your target to enable precompiled headers. +# +# On Windows, precompiled headers are done on a per-target basis. If you have +# just a couple of files, the time it takes to precompile (~2 seconds) can +# actually be longer than the time saved. On a Z620, a 100 file target compiles +# about 2 seconds faster with precompiled headers, with greater savings for +# larger targets. +# +# Recommend precompiled headers for targets with more than 50 .cc files. +config("precompiled_headers") { + # TODO(brettw) enable this when GN support in the binary has been rolled. + #if (is_win) { + if (false) { + # This is a string rather than a file GN knows about. It has to match + # exactly what's in the /FI flag below, and what might appear in the source + # code in quotes for an #include directive. + precompiled_header = "build/precompile.h" + + # This is a file that GN will compile with the above header. It will be + # implicitly added to the sources (potentially multiple times, with one + # variant for each language used in the target). + precompiled_source = "//build/precompile.cc" + + # Force include the header. + cflags = [ "/FI$precompiled_header" ] + } +} diff --git a/engine/src/flutter/build/config/BUILDCONFIG.gn b/engine/src/flutter/build/config/BUILDCONFIG.gn index 10d9d3fb18..5822d61a06 100644 --- a/engine/src/flutter/build/config/BUILDCONFIG.gn +++ b/engine/src/flutter/build/config/BUILDCONFIG.gn @@ -2,6 +2,38 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# ============================================================================= +# PLATFORM SELECTION +# ============================================================================= +# +# There are two main things to set: "os" and "cpu". The "toolchain" is the name +# of the GN thing that encodes combinations of these things. +# +# Users typically only set the variables "target_os" and "target_cpu" in "gn +# args", the rest are set up by our build and internal to GN. +# +# There are three different types of each of these things: The "host" +# represents the computer doing the compile and never changes. The "target" +# represents the main thing we're trying to build. The "current" represents +# which configuration is currently being defined, which can be either the +# host, the target, or something completely different (like nacl). GN will +# run the same build file multiple times for the different required +# configuration in the same build. +# +# This gives the following variables: +# - host_os, host_cpu, host_toolchain +# - target_os, target_cpu, default_toolchain +# - current_os, current_cpu, current_toolchain. +# +# Note the default_toolchain isn't symmetrical (you would expect +# target_toolchain). This is because the "default" toolchain is a GN built-in +# concept, and "target" is something our build sets up that's symmetrical with +# its GYP counterpart. Potentially the built-in default_toolchain variable +# could be renamed in the future. +# +# When writing build files, to do something only for the host: +# if (current_toolchain == host_toolchain) { ... + if (target_os == "") { target_os = host_os } @@ -101,18 +133,6 @@ declare_args() { is_clang = current_os == "mac" || current_os == "ios" || current_os == "linux" || current_os == "chromeos" - # Selects the desired build flavor. Official builds get additional - # processing to prepare for release. Normally you will want to develop and - # test with this flag off. - # TODO(brettw) move to chrome_build.gni when DEPS are updated. - is_official_build = false - - # Select the desired branding flavor. False means normal Chromium branding, - # true means official Google Chrome branding (requires extra Google-internal - # resources). - # TODO(brettw) move to chrome_build.gni when DEPS are updated. - is_chrome_branded = false - # Compile for Address Sanitizer to find memory bugs. is_asan = false diff --git a/engine/src/flutter/build/config/android/config.gni b/engine/src/flutter/build/config/android/config.gni index 7aa7f74e57..f11ac41b62 100644 --- a/engine/src/flutter/build/config/android/config.gni +++ b/engine/src/flutter/build/config/android/config.gni @@ -17,7 +17,7 @@ if (is_android) { if (!defined(default_android_sdk_root)) { default_android_sdk_root = "//third_party/android_tools/sdk" default_android_sdk_version = "22" - default_android_sdk_build_tools_version = "22.0.1" + default_android_sdk_build_tools_version = "22.0.0" } if (!defined(google_play_services_library)) { @@ -42,6 +42,9 @@ if (is_android) { # Set to true to run findbugs on JAR targets. run_findbugs = false + + # Set to true to enable the Errorprone compiler + use_errorprone_java_compiler = false } # Host stuff ----------------------------------------------------------------- @@ -159,14 +162,19 @@ if (is_android) { android_gdbserver = "$android_ndk_root/prebuilt/$android_prebuilt_arch/gdbserver/gdbserver" - # libc++ stuff --------------------------------------------------------------- + # Toolchain stuff ------------------------------------------------------------ + android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" if (component_mode == "shared_library") { android_libcpp_library = "c++_shared" } else { android_libcpp_library = "c++_static" } + # By appending .cr, we prevent name collisions with libraries already + # loaded by the Android zygote. + android_product_extension = ".cr.so" + # ABI ------------------------------------------------------------------------ if (current_cpu == "x86") { diff --git a/engine/src/flutter/build/config/android/internal_rules.gni b/engine/src/flutter/build/config/android/internal_rules.gni index d3d54f1ce7..ab154b411b 100644 --- a/engine/src/flutter/build/config/android/internal_rules.gni +++ b/engine/src/flutter/build/config/android/internal_rules.gni @@ -86,6 +86,14 @@ template("findbugs") { rebased_build_config = rebase_path(build_config, root_build_dir) + if (defined(invoker.deps)) { + deps = invoker.deps + } + + if (defined(invoker.testonly)) { + testonly = invoker.testonly + } + inputs = [ "//build/android/pylib/utils/findbugs.py", exclusions_file, @@ -603,17 +611,26 @@ template("create_apk") { _configuration_name = "Debug" } - _create_density_splits = - defined(invoker.create_density_splits) && invoker.create_density_splits - if (_create_density_splits) { + _keystore_path = invoker.keystore_path + _keystore_name = invoker.keystore_name + _keystore_password = invoker.keystore_password + + _split_densities = [] + if (defined(invoker.create_density_splits) && invoker.create_density_splits) { _split_densities = [ "hdpi", "xhdpi", "xxhdpi", + "xxxhdpi", "tvdpi", ] } + _split_languages = [] + if (defined(invoker.language_splits)) { + _split_languages = invoker.language_splits + } + _package_resources_target_name = "${target_name}__package_resources" action(_package_resources_target_name) { deps = _package_deps @@ -664,12 +681,24 @@ template("create_apk") { if (_shared_resources) { args += [ "--shared-resources" ] } - if (_create_density_splits) { + if (_split_densities != []) { args += [ "--create-density-splits" ] foreach(_density, _split_densities) { - outputs += [ "${_resource_packaged_apk_path}-${_density}" ] + outputs += [ "${_resource_packaged_apk_path}_${_density}" ] } } + if (_split_languages != []) { + args += [ "--language-splits=$_split_languages" ] + foreach(_language, _split_languages) { + outputs += [ "${_resource_packaged_apk_path}_${_language}" ] + } + } + if (defined(invoker.extensions_to_not_compress)) { + args += [ + "--no-compress", + invoker.extensions_to_not_compress, + ] + } } package_target = "${target_name}__package" @@ -736,9 +765,9 @@ template("create_apk") { finalize_apk(_finalize_apk_rule_name) { input_apk_path = _packaged_apk_path output_apk_path = _final_apk_path - keystore_path = invoker.keystore_path - keystore_name = invoker.keystore_name - keystore_password = invoker.keystore_password + keystore_path = _keystore_path + keystore_name = _keystore_name + keystore_password = _keystore_password rezip_apk = _load_library_from_apk public_deps = [ @@ -749,23 +778,41 @@ template("create_apk") { _final_deps = [ ":${_finalize_apk_rule_name}" ] - if (_create_density_splits) { - foreach(_density, _split_densities) { - _finalize_split_rule_name = "${target_name}__finalize_${_density}_split" - finalize_apk(_finalize_split_rule_name) { - input_apk_path = "${_resource_packaged_apk_path}-${_density}" - _output_paths = process_file_template( - [ _final_apk_path ], - "{{source_dir}}/{{source_name_part}}-${_density}.apk") - output_apk_path = _output_paths[0] - keystore_path = invoker.keystore_path - keystore_name = invoker.keystore_name - keystore_password = invoker.keystore_password - } - _final_deps += [ ":${_finalize_split_rule_name}" ] + template("finalize_split") { + finalize_apk(target_name) { + _config = invoker.split_config + _type = invoker.split_type + input_apk_path = "${_resource_packaged_apk_path}_${_config}" + _output_paths = process_file_template( + [ _final_apk_path ], + "{{source_dir}}/{{source_name_part}}-${_type}-${_config}.apk") + output_apk_path = _output_paths[0] + keystore_path = _keystore_path + keystore_name = _keystore_name + keystore_password = _keystore_password + deps = [ + ":${_package_resources_target_name}", + ] } } + foreach(_split, _split_densities) { + _split_rule = "${target_name}__finalize_${_split}_split" + finalize_split(_split_rule) { + split_type = "density" + split_config = _split + } + _final_deps += [ ":$_split_rule" ] + } + foreach(_split, _split_languages) { + _split_rule = "${target_name}__finalize_${_split}_split" + finalize_split(_split_rule) { + split_type = "lang" + split_config = _split + } + _final_deps += [ ":$_split_rule" ] + } + group(target_name) { public_deps = _final_deps } @@ -787,6 +834,14 @@ template("java_prebuilt_impl") { if (_supports_android) { _dex_path = _base_path + ".dex.jar" } + _deps = [] + if (defined(invoker.deps)) { + _deps = invoker.deps + } + _jar_deps = [] + if (defined(invoker.jar_dep)) { + _jar_deps = [ invoker.jar_dep ] + } _template_name = target_name @@ -802,10 +857,7 @@ template("java_prebuilt_impl") { requires_android = defined(invoker.requires_android) && invoker.requires_android - deps = [] - if (defined(invoker.deps)) { - deps += invoker.deps - } + deps = _deps build_config = _build_config jar_path = _jar_path if (_supports_android) { @@ -828,9 +880,7 @@ template("java_prebuilt_impl") { input_jar_path = invoker.jar_path output_jar_path = _jar_path - deps = [ - ":$build_config_target_name", - ] + deps = [ ":$build_config_target_name" ] + _deps + _jar_deps } if (_supports_android) { @@ -839,9 +889,7 @@ template("java_prebuilt_impl") { _jar_path, ] output = _dex_path - deps = [ - ":$process_jar_target_name", - ] + deps = [ ":$process_jar_target_name" ] + _deps + _jar_deps } } @@ -849,6 +897,9 @@ template("java_prebuilt_impl") { deps = [ ":$process_jar_target_name", ] + if (defined(invoker.data_deps)) { + data_deps = invoker.data_deps + } if (_supports_android) { deps += [ ":$dex_target_name" ] } @@ -895,6 +946,17 @@ template("compile_java") { if (defined(invoker.chromium_code)) { _chromium_code = invoker.chromium_code } + + _supports_android = true + if (defined(invoker.supports_android)) { + _supports_android = invoker.supports_android + } + + _enable_errorprone = use_errorprone_java_compiler + if (defined(invoker.enable_errorprone)) { + _enable_errorprone = invoker.enable_errorprone + } + _manifest_entries = [] if (defined(invoker.manifest_entries)) { _manifest_entries = invoker.manifest_entries @@ -958,13 +1020,23 @@ template("compile_java") { "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", "--jar-excluded-classes=$_jar_excluded_patterns", ] + if (_supports_android) { + _rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) + args += [ "--bootclasspath=$_rebased_android_sdk_jar" ] + } foreach(e, _manifest_entries) { args += [ "--manifest-entry=" + e ] } if (_chromium_code) { args += [ "--chromium-code=1" ] } - + if (_enable_errorprone) { + deps += [ "//third_party/errorprone:chromium_errorprone" ] + args += [ + "--use-errorprone-path", + "bin/chromium_errorprone", + ] + } args += rebase_path(_java_files, root_build_dir) } @@ -1114,6 +1186,9 @@ template("java_library_impl") { chromium_code = _chromium_code android = _requires_android + if (defined(invoker.enable_errorprone)) { + enable_errorprone = invoker.enable_errorprone + } if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoker.jar_excluded_patterns } @@ -1130,6 +1205,7 @@ template("java_library_impl") { manifest_entries = invoker.manifest_entries } + supports_android = _supports_android deps = build_config_deps } @@ -1414,6 +1490,9 @@ template("generate_split_manifest") { action(target_name) { depfile = "$target_gen_dir/$target_name.d" + if (defined(invoker.deps)) { + deps = invoker.deps + } args = [ "--main-manifest", rebase_path(invoker.main_manifest, root_build_dir), @@ -1484,6 +1563,12 @@ template("test_runner_script") { "--test-apk", invoker.test_apk, ] + if (defined(invoker.support_apk_path)) { + test_runner_args += [ + "--support-apk", + rebase_path(invoker.support_apk_path, root_build_dir), + ] + } } else { assert(false, "Invalid test type: $_test_type.") } diff --git a/engine/src/flutter/build/config/android/rules.gni b/engine/src/flutter/build/config/android/rules.gni index 0c135b3628..00609bf2d2 100644 --- a/engine/src/flutter/build/config/android/rules.gni +++ b/engine/src/flutter/build/config/android/rules.gni @@ -544,6 +544,69 @@ template("jinja_template_resources") { } } +# Creates a resources.zip with locale.pak files placed into appropriate +# resource configs (e.g. en-GB.pak -> res/raw-en/en_gb.pak). Also generates +# a locale_paks TypedArray so that resource files can be enumerated at runtime. +# +# If this target is included in the deps of an android resources/library/apk, +# the resources will be included with that target. +# +# Variables: +# sources: List of .pak files. Names must be of the form "en.pak" or +# "en-US.pak". +# deps: (optional) List of dependencies that might be needed to generate +# the .pak files. +# +# Example +# locale_pak_resources("locale_paks") { +# sources = [ "path/en-US.pak", "path/fr.pak", ... ] +# } +template("locale_pak_resources") { + set_sources_assignment_filter([]) + assert(defined(invoker.sources)) + + _base_path = "$target_gen_dir/$target_name" + _resources_zip = _base_path + ".resources.zip" + _build_config = _base_path + ".build_config" + + write_build_config("${target_name}__build_config") { + build_config = _build_config + resources_zip = _resources_zip + type = "android_resources" + } + + action("${target_name}__create_resources_zip") { + sources = invoker.sources + script = "//build/android/gyp/locale_pak_resources.py" + depfile = "$target_gen_dir/$target_name.d" + + outputs = [ + depfile, + _resources_zip, + ] + + _rebased_sources = rebase_path(invoker.sources, root_build_dir) + args = [ + "--locale-paks=${_rebased_sources}", + "--resources-zip", + rebase_path(_resources_zip, root_build_dir), + "--depfile", + rebase_path(depfile, root_build_dir), + ] + + if (defined(invoker.deps)) { + deps = invoker.deps + } + } + + group(target_name) { + deps = [ + ":${target_name}__build_config", + ":${target_name}__create_resources_zip", + ] + } +} + # Declare an Android resources target # # This creates a resources zip file that will be used when building an Android @@ -798,6 +861,7 @@ template("java_strings_grd_prebuilt") { # android_library target, for example. # # chromium_code: If true, extra analysis warning/errors will be enabled. +# enable_errorprone: If true, enables the errorprone compiler. # # data_deps, testonly # @@ -825,6 +889,9 @@ template("java_binary") { if (defined(invoker.deps)) { deps = invoker.deps } + if (defined(invoker.enable_errorprone)) { + enable_errorprone = invoker.enable_errorprone + } if (defined(invoker.java_files)) { java_files = invoker.java_files } @@ -841,6 +908,7 @@ template("java_binary") { testonly = invoker.testonly } + supports_android = false main_class = invoker.main_class } } @@ -919,6 +987,8 @@ template("junit_binary") { # ease the gyp->gn conversion and will be removed in the future. # # chromium_code: If true, extra analysis warning/errors will be enabled. +# enable_errorprone: If true, enables the errorprone compiler. +# # jar_excluded_patterns: List of patterns of .class files to exclude from the # final jar. # @@ -967,6 +1037,9 @@ template("java_library") { if (defined(invoker.deps)) { deps = invoker.deps } + if (defined(invoker.enable_errorprone)) { + enable_errorprone = invoker.enable_errorprone + } if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoker.jar_excluded_patterns } @@ -1007,6 +1080,7 @@ template("java_library") { # deps: Specifies the dependencies of this target. Java targets in this list # will be added to the javac classpath. # jar_path: Path to the prebuilt jar. +# jar_dep: Target that builds jar_path (optional). # proguard_preprocess: If true, proguard preprocessing will be run. This can # be used to remove unwanted parts of the library. # proguard_config: Path to the proguard config for preprocessing. @@ -1023,12 +1097,18 @@ template("java_prebuilt") { set_sources_assignment_filter([]) java_prebuilt_impl(target_name) { jar_path = invoker.jar_path + if (defined(invoker.jar_dep)) { + jar_dep = invoker.jar_dep + } if (defined(invoker.testonly)) { testonly = invoker.testonly } if (defined(invoker.deps)) { deps = invoker.deps } + if (defined(invoker.data_deps)) { + data_deps = invoker.data_deps + } if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_config } @@ -1058,6 +1138,8 @@ template("java_prebuilt") { # ease the gyp->gn conversion and will be removed in the future. # # chromium_code: If true, extra analysis warning/errors will be enabled. +# enable_errorprone: If true, enables the errorprone compiler. +# # jar_excluded_patterns: List of patterns of .class files to exclude from the # final jar. # @@ -1103,6 +1185,9 @@ template("android_library") { if (defined(invoker.deps)) { deps = invoker.deps } + if (defined(invoker.enable_errorprone)) { + enable_errorprone = invoker.enable_errorprone + } if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoker.jar_excluded_patterns } @@ -1201,6 +1286,9 @@ template("android_java_prebuilt") { if (defined(invoker.deps)) { deps = invoker.deps } + if (defined(invoker.data_deps)) { + data_deps = invoker.data_deps + } if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_config } @@ -1217,6 +1305,7 @@ template("android_java_prebuilt") { # # Variables # android_manifest: Path to AndroidManifest.xml. +# android_manifest_dep: Target that generates AndroidManifest (if applicable) # data_deps: List of dependencies needed at runtime. These will be built but # won't change the generated .apk in any way (in fact they may be built # after the .apk is). @@ -1348,15 +1437,22 @@ template("android_apk") { "Relocation packing requires use of the" + " Chromium linker.") } - _native_libs = process_file_template( - invoker.native_libs, - "$root_build_dir/lib.stripped/{{source_file_part}}") + if (is_component_build) { + _native_libs += [ "$root_out_dir/lib.stripped/libc++_shared.so" ] + _chromium_linker_dep += [ "//build/android:cpplib_stripped" ] + } + + # Allow native_libs to be in the form "foo.so" or "foo.cr.so" + _first_ext_removed = + process_file_template(invoker.native_libs, "{{source_name_part}}") + _native_libs += process_file_template( + _first_ext_removed, + "$root_build_dir/lib.stripped/{{source_name_part}}$android_product_extension") _native_libs_dir = base_path + "/libs" if (_use_chromium_linker) { - _native_libs += - [ "$root_build_dir/lib.stripped/libchromium_android_linker.so" ] + _native_libs += [ "$root_build_dir/lib.stripped/libchromium_android_linker$android_product_extension" ] } _enable_relocation_packing = false @@ -1365,13 +1461,22 @@ template("android_apk") { _enable_relocation_packing = true } - _native_lib_version_name = "" - if (defined(invoker.native_lib_version_name)) { - _native_lib_version_name = invoker.native_lib_version_name + _native_lib_version_rule = "" + if (defined(invoker.native_lib_version_rule)) { + _native_lib_version_rule = invoker.native_lib_version_rule + } + _native_lib_version_arg = "\"\"" + if (defined(invoker.native_lib_version_arg)) { + _native_lib_version_arg = invoker.native_lib_version_arg } } + _android_manifest_deps = [] + if (defined(invoker.android_manifest_dep)) { + _android_manifest_deps = [ invoker.android_manifest_dep ] + } _android_manifest = invoker.android_manifest + _rebased_build_config = rebase_path(_build_config, root_build_dir) _create_abi_split = defined(invoker.create_abi_split) && invoker.create_abi_split @@ -1389,7 +1494,7 @@ template("android_apk") { build_config = _build_config android_manifest = _android_manifest - deps = _chromium_linker_dep + deps = _chromium_linker_dep + _android_manifest_deps if (defined(invoker.deps)) { deps += invoker.deps } @@ -1419,9 +1524,7 @@ template("android_apk") { } build_config = _build_config - deps = [ - ":$build_config_target", - ] + deps = _android_manifest_deps + [ ":$build_config_target" ] if (defined(invoker.deps)) { deps += invoker.deps } @@ -1445,11 +1548,14 @@ template("android_apk") { deps = [ ":$build_config_target", ] + if (_native_lib_version_rule != "") { + deps += [ _native_lib_version_rule ] + } defines = [ "NATIVE_LIBRARIES_LIST=" + "@FileArg($_rebased_build_config:native:java_libraries_list)", - "NATIVE_LIBRARIES_VERSION_NUMBER=\"$_native_lib_version_name\"", + "NATIVE_LIBRARIES_VERSION_NUMBER=$_native_lib_version_arg", ] if (_use_chromium_linker) { defines += [ "ENABLE_CHROMIUM_LINKER" ] @@ -1470,9 +1576,7 @@ template("android_apk") { supports_android = true requires_android = true override_build_config = _build_config - deps = [ - ":$build_config_target", - ] + deps = _android_manifest_deps + [ ":$build_config_target" ] android_manifest = _android_manifest chromium_code = true @@ -1544,7 +1648,7 @@ template("android_apk") { if (_native_libs != []) { action("${_template_name}__prepare_native") { - script = "//build/android/gyp/pack_arm_relocations.py" + script = "//build/android/gyp/pack_relocations.py" packed_libraries_dir = "$_native_libs_dir/$android_app_abi" depfile = "$target_gen_dir/$target_name.d" outputs = [ @@ -1559,7 +1663,7 @@ template("android_apk") { skip_packing_list = [ "gdbserver", - "libchromium_android_linker.so", + "libchromium_android_linker$android_product_extension", ] enable_packing_arg = 0 @@ -1609,6 +1713,17 @@ template("android_apk") { dex_path = final_dex_path load_library_from_apk = _load_library_from_apk create_density_splits = _create_density_splits + if (defined(invoker.language_splits)) { + language_splits = invoker.language_splits + } + if (defined(invoker.extensions_to_not_compress)) { + extensions_to_not_compress = invoker.extensions_to_not_compress + } else { + # Allow icu data, v8 snapshots, and pak files to be loaded directly from + # the .apk. + # Note: These are actually suffix matches, not necessarily extensions. + extensions_to_not_compress = ".dat,.bin,.pak" + } version_code = _version_code version_name = _version_name @@ -1618,10 +1733,10 @@ template("android_apk") { keystore_password = _keystore_password # This target generates the input file _all_resources_zip_path. - deps = [ - ":$process_resources_target", - ":$final_dex_target_name", - ] + deps = _android_manifest_deps + [ + ":$process_resources_target", + ":$final_dex_target_name", + ] if (defined(invoker.deps)) { deps += invoker.deps } @@ -1650,6 +1765,7 @@ template("android_apk") { out_manifest = "$gen_dir/split-manifests/${android_app_abi}/AndroidManifest.xml" split_name = "abi_${android_app_abi}" + deps = _android_manifest_deps } _apk_rule = "${_template_name}__split_apk_abi_${android_app_abi}" @@ -1675,6 +1791,7 @@ template("android_apk") { native_libs_dir = _native_libs_dir deps = [ ":${_template_name}__prepare_native", + ":${_manifest_rule}", ] } } @@ -1705,6 +1822,9 @@ template("android_apk") { # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars # will be added to java_files and be included in this apk. # apk_name: Name for final apk. +# support_apk_path: Path to a support apk. If present, the test runner script +# will install it on the device before running the instrumentation tests. +# Should be a path relative to the src root. # final_apk_path: Path to final built apk. Default is # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. # native_libs: List paths of native libraries to include in this apk. If these @@ -1744,6 +1864,9 @@ template("instrumentation_test_apk") { if (defined(invoker.isolate_file)) { isolate_file = invoker.isolate_file } + if (defined(invoker.support_apk_path)) { + support_apk_path = invoker.support_apk_path + } } } @@ -1830,7 +1953,7 @@ template("unittest_apk") { if (defined(invoker.unittests_binary)) { unittests_binary = invoker.unittests_binary } else { - unittests_binary = "lib" + test_suite_name + ".so" + unittests_binary = "lib${test_suite_name}${android_product_extension}" } if (defined(invoker.apk_name)) { @@ -1856,6 +1979,7 @@ template("unittest_apk") { "//base:base_java", "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk", "//testing/android/appurify_support:appurify_support_java", + "//testing/android/reporter:reporter_java", ] if (defined(invoker.deps)) { deps += invoker.deps @@ -1979,11 +2103,6 @@ template("create_native_executable_dist") { libraries_list = "${target_gen_dir}/${template_name}_library_dependencies.list" - # TODO(gyp) - #'dependencies': [ - #'<(DEPTH)/build/android/setup.gyp:copy_system_libraries', - #], - find_deps_target_name = "${template_name}__find_library_dependencies" copy_target_name = "${template_name}__copy_libraries_and_exe" @@ -2031,7 +2150,7 @@ template("create_native_executable_dist") { rebased_libraries_list = rebase_path(libraries_list, root_build_dir) args = [ "--files=$rebased_binaries_list", - "--files=@FileArg($rebased_libraries_list:libraries)", + "--files=@FileArg($rebased_libraries_list:lib_paths)", ] deps = [ diff --git a/engine/src/flutter/build/config/chrome_build.gni b/engine/src/flutter/build/config/chrome_build.gni index e2ff123543..c2132c4a16 100644 --- a/engine/src/flutter/build/config/chrome_build.gni +++ b/engine/src/flutter/build/config/chrome_build.gni @@ -6,17 +6,14 @@ declare_args() { # Selects the desired build flavor. Official builds get additional # processing to prepare for release. Normally you will want to develop and # test with this flag off. - # TODO(brettw) move here from BUILDCONFIG.gn when DEPS are updated. - #is_official_build = false + is_official_build = false # Select the desired branding flavor. False means normal Chromium branding, # true means official Google Chrome branding (requires extra Google-internal # resources). - # TODO(brettw) move here from BUILDCONFIG.gn when DEPS are updated. - #is_chrome_branded = false + is_chrome_branded = false # Break chrome.dll into multple pieces based on process type. Only available # on Windows. - # TODO(brettw) make this work. When it does, the declaration should be: is_multi_dll_chrome = is_win && !is_component_build } diff --git a/engine/src/flutter/build/config/compiler/BUILD.gn b/engine/src/flutter/build/config/compiler/BUILD.gn index f779795804..140e329360 100644 --- a/engine/src/flutter/build/config/compiler/BUILD.gn +++ b/engine/src/flutter/build/config/compiler/BUILD.gn @@ -13,6 +13,9 @@ if (current_cpu == "mipsel" || current_cpu == "mips64el") { if (is_posix) { import("//build/config/gcc/gcc_version.gni") } +if (is_win) { + import("//build/config/win/visual_studio_version.gni") +} import("//build/toolchain/ccache.gni") import("//build/config/sanitizers/sanitizers.gni") @@ -48,8 +51,8 @@ declare_args() { # with some utilities such as icecc and ccache. Requires gold and # gcc >= 4.8 or clang. # http://gcc.gnu.org/wiki/DebugFission - use_debug_fission = - !is_win && use_gold && linux_use_bundled_binutils && !use_ccache + use_debug_fission = is_debug && !is_win && use_gold && + linux_use_bundled_binutils && !use_ccache if (is_win) { # Whether the VS xtree header has been patched to disable warning 4702. If @@ -127,6 +130,14 @@ config("compiler") { } else { cflags += [ "-m64" ] } + if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == + "True") { + cflags += [ + # cmd.exe doesn't understand ANSI escape codes by default, + # so only enable them if something emulating them is around. + "-fansi-escape-codes", + ] + } } } else { # Common GCC compiler flags setup. @@ -405,13 +416,6 @@ config("compiler") { } else { cflags += [ "-funwind-tables" ] } - - if (is_clang && !is_nacl && !is_debug) { - # Non-unique section names appears to make linker dead stripping - # less effective. See http://crbug.com/483026#c20 - # TODO(hans): Remove this if resolved upstream. - cflags += [ "-funique-section-names" ] - } } # Linux/Android common flags setup. @@ -463,17 +467,7 @@ config("compiler") { if (!is_asan && !is_msan && !is_lsan && !is_tsan) { # TODO(brettw) common.gypi has this only for target toolset. - if (current_cpu == "x64") { - # --icf=safe disables much more folding on x86_64 than elsewhere, see - # http://crbug.com/492177. Turning it on saves over 12 MB of binary - # size, but it seems to regress cold startup time by over a second - # (see http://crbug.com/492809). - # TODO(thakis): Check if disabling ICF would inmprove android cold start - # times by several seconds too. - ldflags += [ "-Wl,--icf=safe" ] - } else { - ldflags += [ "-Wl,--icf=all" ] - } + ldflags += [ "-Wl,--icf=all" ] } # TODO(thestig): Make this flag work with GN. @@ -657,8 +651,6 @@ config("runtime_library") { # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit # strange errors. The include ordering here is important; change with # caution. - android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" - cflags += [ "-isystem" + rebase_path("$android_libcpp_root/libcxx/include", root_build_dir), @@ -671,13 +663,6 @@ config("runtime_library") { ] lib_dirs += [ "$android_libcpp_root/libs/$android_app_abi" ] - - if (component_mode == "shared_library") { - android_libcpp_library = "c++_shared" - } else { - android_libcpp_library = "c++_static" - } - libs += [ "$android_libcpp_library" ] if (current_cpu == "mipsel") { @@ -767,6 +752,12 @@ if (is_win) { # prevent it. "/wd4503", + # Warning C4589 says: "Constructor of abstract class ignores + # initializer for virtual base class." Disable this warning because it + # is flaky in VS 2015 RTM. It triggers on compiler generated + # copy-constructors in some cases. + "/wd4589", + # C4611: interaction between 'function' and C++ object destruction is # non-portable # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN @@ -803,40 +794,14 @@ if (is_win) { # Keep this in sync with the similar block in build/common.gypi if (is_clang) { default_warning_flags += [ - # TODO(hans): Make this list shorter eventually. - "-Qunused-arguments", - "-Wno-c++11-compat-deprecated-writable-strings", - "-Wno-deprecated-declarations", - "-Wno-empty-body", - "-Wno-enum-conversion", - "-Wno-extra-tokens", - "-Wno-ignored-attributes", - "-Wno-incompatible-pointer-types", - "-Wno-int-to-void-pointer-cast", - "-Wno-invalid-noreturn", - "-Wno-logical-op-parentheses", - "-Wno-microsoft", - "-Wno-missing-braces", - "-Wno-missing-declarations", - "-Wno-msvc-include", - "-Wno-null-dereference", - "-Wno-overloaded-virtual", - "-Wno-parentheses", - "-Wno-pointer-sign", - "-Wno-reorder", - "-Wno-return-type-c-linkage", - "-Wno-self-assign", - "-Wno-sometimes-uninitialized", - "-Wno-switch", - "-Wno-tautological-compare", - "-Wno-unknown-pragmas", - "-Wno-unsequenced", - "-Wno-unused-function", - "-Wno-unused-private-field", - "-Wno-unused-value", - "-Wno-unused-variable", + # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 + "-Qunused-arguments", # http://crbug.com/504658 + "-Wno-microsoft", # http://crbug.com/505296 + "-Wno-switch", # http://crbug.com/505308 + "-Wno-unknown-pragmas", # http://crbug.com/505314 + "-Wno-unused-function", # http://crbug.com/505316 + "-Wno-unused-value", # http://crbug.com/505318 "-Wno-unused-local-typedef", # http://crbug.com/411648 - "-Wno-inconsistent-missing-override", #http://crbug.com/428099 ] } } else { @@ -943,8 +908,11 @@ if (is_clang) { if (!is_nacl) { # Flags NaCl does not recognize. default_warning_flags += [ - # TODO(hans): Get this cleaned up. + # TODO(hans): Get this cleaned up, http://crbug.com/428099 "-Wno-inconsistent-missing-override", + + # TODO(thakis): Enable this, crbug.com/507717 + "-Wno-shift-negative-value", ] } } @@ -1016,6 +984,18 @@ config("no_chromium_code") { cflags += [ "-Wno-unused-result" ] } + if (is_clang) { + cflags += [ + # TODO(mgiuca): Move this suppression into individual third-party + # libraries as required. http://crbug.com/505301. + "-Wno-overloaded-virtual", + + # Lots of third-party libraries have unused variables. Instead of + # suppressing them individually, we just blanket suppress them here. + "-Wno-unused-variable", + ] + } + if (is_linux || is_android) { cflags += [ # Don't warn about printf format problems. This is off by default in gcc @@ -1088,12 +1068,11 @@ config("no_size_t_to_int_warning") { # configs += [ "//build/config/compiler/optimize_max" ] # Shared settings for both "optimize" and "optimize_max" configs. +# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags. if (is_win) { common_optimize_on_cflags = [ - "/O2", - "/Ob2", # both explicit and auto inlining. - "/Oy-", # disable omitting frame pointers, must be after /o2. - "/Os", # favor size over speed. + "/Ob2", # Both explicit and auto inlining. + "/Oy-", # Disable omitting frame pointers, must be after /O2. ] if (!is_asan) { common_optimize_on_cflags += [ @@ -1159,15 +1138,16 @@ if (is_win) { # Default "optimization on" config. On Windows, this favors size over speed. config("optimize") { - cflags = common_optimize_on_cflags - ldflags = common_optimize_on_ldflags if (is_win) { - cflags += [ "/Os" ] # favor size over speed. + # Favor size over speed, /O1 must be before the common flags. The GYP + # build also specifies /Os and /GF but these are implied by /O1. + cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] } else if (is_android || is_ios) { - cflags += [ "-Os" ] # Favor size over speed. + cflags = [ "-Os" ] + common_optimize_on_cflags # Favor size over speed. } else { - cflags += [ "-O2" ] + cflags = [ "-O2" ] + common_optimize_on_cflags } + ldflags = common_optimize_on_ldflags } # Turn off optimizations. @@ -1199,11 +1179,11 @@ config("no_optimize") { # optimization and link-time code generation which is very expensive and should # be used sparingly. config("optimize_max") { - cflags = common_optimize_on_cflags ldflags = common_optimize_on_ldflags if (is_win) { - cflags -= [ "/Os" ] - cflags += [ "/Ot" ] # Favor speed over size. + # Favor speed over size, /O2 must be before the common flags. The GYP + # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. + cflags = [ "/O2" ] + common_optimize_on_cflags if (is_official_build) { # TODO(GYP): TODO(dpranke): Should these only be on in an official # build, or on all the time? For now we'll require official build so @@ -1220,7 +1200,7 @@ config("optimize_max") { ldflags += [ "/LTCG" ] } } else { - cflags += [ "-O2" ] + cflags = [ "-O2" ] + common_optimize_on_cflags } } diff --git a/engine/src/flutter/build/config/crypto.gni b/engine/src/flutter/build/config/crypto.gni index 4d42a375bc..90a45eafee 100644 --- a/engine/src/flutter/build/config/crypto.gni +++ b/engine/src/flutter/build/config/crypto.gni @@ -12,10 +12,9 @@ # to set up feature flags. declare_args() { - # Use OpenSSL instead of NSS. This is used for Android, Mac, NaCl untrusted - # code, and Windows, and is experimental in other cases (see - # http://crbug.com/62803). - use_openssl = is_android || is_mac || is_nacl || is_win + # Use OpenSSL instead of NSS. This is used for all platforms but iOS. (See + # http://crbug.com/338886). + use_openssl = !is_ios } # True when we're using OpenSSL for representing certificates. When targeting diff --git a/engine/src/flutter/build/config/features.gni b/engine/src/flutter/build/config/features.gni index f362777e92..93b19dd143 100644 --- a/engine/src/flutter/build/config/features.gni +++ b/engine/src/flutter/build/config/features.gni @@ -125,6 +125,9 @@ use_udev = is_linux # Enable the spell checker. enable_spellcheck = !is_android +# Use the operating system's spellchecker rather than hunspell. +use_platform_spellchecker = is_android || is_mac + enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win) # Enable basic printing support and UI. @@ -165,7 +168,8 @@ win_pdf_metafile_for_printing = true # Whether we are using the rlz library or not. Platforms like Android send # rlz codes for searches but do not use the library. -enable_rlz = is_chrome_branded && (is_win || is_mac || is_ios || is_chromeos) +enable_rlz_support = is_win || is_mac || is_ios || is_chromeos +enable_rlz = is_chrome_branded && enable_rlz_support enable_settings_app = enable_app_list && !is_chromeos @@ -183,8 +187,6 @@ enable_chromevox_next = false # Use brlapi from brltty for braille display support. use_brlapi = is_chromeos -enable_media_router = !is_ios && !is_android - # Option controlling the use of GConf (the classic GNOME configuration # system). # TODO(GYP) also require !embedded to enable. @@ -197,3 +199,6 @@ enable_hangout_services_extension = false # Whether to back up data before sync. enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) + +# WebVR support disabled until platform implementations have been added +enable_webvr = false diff --git a/engine/src/flutter/build/config/linux/BUILD.gn b/engine/src/flutter/build/config/linux/BUILD.gn index 3d65937dd4..202fd73189 100644 --- a/engine/src/flutter/build/config/linux/BUILD.gn +++ b/engine/src/flutter/build/config/linux/BUILD.gn @@ -35,25 +35,6 @@ config("sdk") { } } -pkg_config("atk") { - packages = [ "atk" ] - atk_lib_dir = exec_script(pkg_config_script, - [ - "--libdir", - "atk", - ], - "string") - defines = [ "ATK_LIB_DIR=\"$atk_lib_dir\"" ] -} - -# gn orders flags on a target before flags from configs. The default config -# adds -Wall, and these flags have to be after -Wall -- so they need to come -# from a config and can't be on the target directly. -config("atk_warnings") { - # glib uses the pre-c++11 typedef-as-static_assert hack. - cflags = [ "-Wno-unused-local-typedef" ] -} - config("fontconfig") { libs = [ "fontconfig" ] } diff --git a/engine/src/flutter/build/config/sanitizers/BUILD.gn b/engine/src/flutter/build/config/sanitizers/BUILD.gn index 023315f12b..899695127e 100644 --- a/engine/src/flutter/build/config/sanitizers/BUILD.gn +++ b/engine/src/flutter/build/config/sanitizers/BUILD.gn @@ -8,12 +8,9 @@ import("//build/config/sanitizers/sanitizers.gni") # shared_libraries. Unconditionally depend upon this target as it is empty if # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. group("deps") { - # TODO(vtl): Chromium has the following (but we don't have - # instrumented_libraries). - # deps = [ - # "//third_party/instrumented_libraries:deps", - # ] - deps = [] + deps = [ + "//third_party/instrumented_libraries:deps", + ] if (is_asan || is_lsan || is_tsan || is_msan) { public_configs = [ ":sanitizer_options_link_helper" ] deps += [ ":options_sources" ] diff --git a/engine/src/flutter/build/config/sanitizers/sanitizers.gni b/engine/src/flutter/build/config/sanitizers/sanitizers.gni index 0edc144285..a7b965824a 100644 --- a/engine/src/flutter/build/config/sanitizers/sanitizers.gni +++ b/engine/src/flutter/build/config/sanitizers/sanitizers.gni @@ -6,9 +6,7 @@ declare_args() { # Use libc++ (buildtools/third_party/libc++ and # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library. # This is intended to be used for instrumented builds. - # TODO(vtl): We don't use this, since building fails, for some reason. - use_custom_libcxx = false - # use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan + use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan # Track where uninitialized memory originates from. From fastest to slowest: # 0 - no tracking, 1 - track only the initial allocation site, 2 - track the diff --git a/engine/src/flutter/build/config/sysroot.gni b/engine/src/flutter/build/config/sysroot.gni index e5a9c2b20a..ffd8921f85 100644 --- a/engine/src/flutter/build/config/sysroot.gni +++ b/engine/src/flutter/build/config/sysroot.gni @@ -36,10 +36,9 @@ if (current_toolchain == default_toolchain && target_sysroot != "") { # For official builds, use the sysroot checked into the internal source repo # so that the builds work on older versions of Linux. if (current_cpu == "x64") { - sysroot = - rebase_path("//chrome/installer/linux/debian_wheezy_amd64-sysroot") + sysroot = rebase_path("//build/linux/debian_wheezy_amd64-sysroot") } else if (current_cpu == "x86") { - sysroot = rebase_path("//chrome/installer/linux/debian_wheezy_i386-sysroot") + sysroot = rebase_path("//build/linux/debian_wheezy_i386-sysroot") } else { # Any other builds don't use a sysroot. sysroot = "" diff --git a/engine/src/flutter/build/config/win/BUILD.gn b/engine/src/flutter/build/config/win/BUILD.gn index 8b0910f9fd..261a1ac4de 100644 --- a/engine/src/flutter/build/config/win/BUILD.gn +++ b/engine/src/flutter/build/config/win/BUILD.gn @@ -103,8 +103,8 @@ if (current_cpu == "x64") { # 5.02 = Windows Server 2003. subsystem_version_suffix = ",5.02" } else { - # Don't specify a min version on x86. - subsystem_version_suffix = "" + # 5.01 = Windows XP. + subsystem_version_suffix = ",5.01" } config("console") { diff --git a/engine/src/flutter/build/get_landmines.py b/engine/src/flutter/build/get_landmines.py index 26b2565858..873563da2a 100755 --- a/engine/src/flutter/build/get_landmines.py +++ b/engine/src/flutter/build/get_landmines.py @@ -34,7 +34,8 @@ def print_landmines(): builder() == 'ninja'): print 'Need to clobber winja goma due to backend cwd cache fix.' if platform() == 'android': - print 'Clobber because of unions.' + print 'Clobber: to handle new way of suppressing findbugs failures.' + print 'Clobber to fix gyp not rename package name (crbug.com/457038)' if platform() == 'win' and builder() == 'ninja': print 'Compile on cc_unittests fails due to symbols removed in r185063.' if platform() == 'linux' and builder() == 'ninja': @@ -72,7 +73,8 @@ def print_landmines(): print 'Remove NaCl toolchains from the output dir (crbug.com/456902)' if platform() == 'ios': print 'Clobber iOS to workaround Xcode deps bug (crbug.com/485435)' - print 'Clobber: https://github.com/domokit/mojo/issues/269' + if platform() == 'win': + print 'Clobber to delete stale generated files (crbug.com/510086)' def main(): diff --git a/engine/src/flutter/build/get_sdk_extras_packages.py b/engine/src/flutter/build/get_sdk_extras_packages.py index 6d870cc86f..a90b8a8b4a 100755 --- a/engine/src/flutter/build/get_sdk_extras_packages.py +++ b/engine/src/flutter/build/get_sdk_extras_packages.py @@ -13,9 +13,12 @@ SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), def main(): with open(SDK_EXTRAS_JSON_FILE) as json_file: packages = json.load(json_file) - for package in packages: - print package['package'].replace('_', ' ') + out = [] + for package in packages: + out.append(package['package_id']) + + print ','.join(out) if __name__ == '__main__': sys.exit(main()) diff --git a/engine/src/flutter/build/get_syzygy_binaries.py b/engine/src/flutter/build/get_syzygy_binaries.py index 2577c7cb7f..1cab3fcf48 100755 --- a/engine/src/flutter/build/get_syzygy_binaries.py +++ b/engine/src/flutter/build/get_syzygy_binaries.py @@ -5,7 +5,6 @@ """A utility script for downloading versioned Syzygy binaries.""" -import cStringIO import hashlib import errno import json @@ -17,15 +16,15 @@ import shutil import stat import sys import subprocess -import urllib2 +import tempfile +import time import zipfile _LOGGER = logging.getLogger(os.path.basename(__file__)) -# The URL where official builds are archived. -_SYZYGY_ARCHIVE_URL = ('https://syzygy-archive.commondatastorage.googleapis.com' - '/builds/official/%(revision)s') +# The relative path where official builds are archived in their GS bucket. +_SYZYGY_ARCHIVE_PATH = ('/builds/official/%(revision)s') # A JSON file containing the state of the download directory. If this file and # directory state do not agree, then the binaries will be downloaded and @@ -49,17 +48,6 @@ _RESOURCES = [ lambda x: x.filename.endswith('.dll.pdb'))] -def _Shell(*cmd, **kw): - """Runs |cmd|, returns the results from Popen(cmd).communicate().""" - _LOGGER.debug('Executing %s.', cmd) - prog = subprocess.Popen(cmd, shell=True, **kw) - - stdout, stderr = prog.communicate() - if prog.returncode != 0: - raise RuntimeError('Command "%s" returned %d.' % (cmd, prog.returncode)) - return (stdout, stderr) - - def _LoadState(output_dir): """Loads the contents of the state file for a given |output_dir|, returning None if it doesn't exist. @@ -248,12 +236,50 @@ def _CleanState(output_dir, state, dry_run=False): return deleted -def _Download(url): - """Downloads the given URL and returns the contents as a string.""" - response = urllib2.urlopen(url) - if response.code != 200: - raise RuntimeError('Failed to download "%s".' % url) - return response.read() +def _FindGsUtil(): + """Looks for depot_tools and returns the absolute path to gsutil.py.""" + for path in os.environ['PATH'].split(os.pathsep): + path = os.path.abspath(path) + git_cl = os.path.join(path, 'git_cl.py') + gs_util = os.path.join(path, 'gsutil.py') + if os.path.exists(git_cl) and os.path.exists(gs_util): + return gs_util + return None + + +def _GsUtil(*cmd): + """Runs the given command in gsutil with exponential backoff and retries.""" + gs_util = _FindGsUtil() + cmd = [sys.executable, gs_util] + list(cmd) + + retries = 3 + timeout = 4 # Seconds. + while True: + _LOGGER.debug('Running %s', cmd) + prog = subprocess.Popen(cmd, shell=False) + prog.communicate() + + # Stop retrying on success. + if prog.returncode == 0: + return + + # Raise a permanent failure if retries have been exhausted. + if retries == 0: + raise RuntimeError('Command "%s" returned %d.' % (cmd, prog.returncode)) + + _LOGGER.debug('Sleeping %d seconds and trying again.', timeout) + time.sleep(timeout) + retries -= 1 + timeout *= 2 + + +def _Download(resource): + """Downloads the given GS resource to a temporary file, returning its path.""" + tmp = tempfile.mkstemp(suffix='syzygy_archive') + os.close(tmp[0]) + url = 'gs://syzygy-archive' + resource + _GsUtil('cp', url, tmp[1]) + return tmp[1] def _InstallBinaries(options, deleted={}): @@ -261,7 +287,7 @@ def _InstallBinaries(options, deleted={}): already been cleaned, as it will refuse to overwrite existing files.""" contents = {} state = { 'revision': options.revision, 'contents': contents } - archive_url = _SYZYGY_ARCHIVE_URL % { 'revision': options.revision } + archive_path = _SYZYGY_ARCHIVE_PATH % { 'revision': options.revision } if options.resources: resources = [(resource, resource, '', None) for resource in options.resources] @@ -278,33 +304,37 @@ def _InstallBinaries(options, deleted={}): if not options.dry_run: os.makedirs(fulldir) - # Download the archive. - url = archive_url + '/' + base - _LOGGER.debug('Retrieving %s archive at "%s".', name, url) - data = _Download(url) + # Download and read the archive. + resource = archive_path + '/' + base + _LOGGER.debug('Retrieving %s archive at "%s".', name, resource) + path = _Download(resource) _LOGGER.debug('Unzipping %s archive.', name) - archive = zipfile.ZipFile(cStringIO.StringIO(data)) - for entry in archive.infolist(): - if not filt or filt(entry): - fullpath = os.path.normpath(os.path.join(fulldir, entry.filename)) - relpath = os.path.relpath(fullpath, options.output_dir) - if os.path.exists(fullpath): - # If in a dry-run take into account the fact that the file *would* - # have been deleted. - if options.dry_run and relpath in deleted: - pass - else: - raise Exception('Path already exists: %s' % fullpath) + with open(path, 'rb') as data: + archive = zipfile.ZipFile(data) + for entry in archive.infolist(): + if not filt or filt(entry): + fullpath = os.path.normpath(os.path.join(fulldir, entry.filename)) + relpath = os.path.relpath(fullpath, options.output_dir) + if os.path.exists(fullpath): + # If in a dry-run take into account the fact that the file *would* + # have been deleted. + if options.dry_run and relpath in deleted: + pass + else: + raise Exception('Path already exists: %s' % fullpath) - # Extract the file and update the state dictionary. - _LOGGER.debug('Extracting "%s".', fullpath) - if not options.dry_run: - archive.extract(entry.filename, fulldir) - md5 = _Md5(fullpath) - contents[relpath] = md5 - if sys.platform == 'cygwin': - os.chmod(fullpath, os.stat(fullpath).st_mode | stat.S_IXUSR) + # Extract the file and update the state dictionary. + _LOGGER.debug('Extracting "%s".', fullpath) + if not options.dry_run: + archive.extract(entry.filename, fulldir) + md5 = _Md5(fullpath) + contents[relpath] = md5 + if sys.platform == 'cygwin': + os.chmod(fullpath, os.stat(fullpath).st_mode | stat.S_IXUSR) + + _LOGGER.debug('Removing temporary file "%s".', path) + os.remove(path) return state @@ -316,6 +346,9 @@ def _ParseCommandLine(): help='If true then will simply list actions that would be performed.') option_parser.add_option('--force', action='store_true', default=False, help='Force an installation even if the binaries are up to date.') + option_parser.add_option('--no-cleanup', action='store_true', default=False, + help='Allow installation on non-Windows platforms, and skip the forced ' + 'cleanup step.') option_parser.add_option('--output-dir', type='string', help='The path where the binaries will be replaced. Existing binaries ' 'will only be overwritten if not up to date.') @@ -408,7 +441,10 @@ def main(): # wasn't gated on OS types, and those OSes downloaded and installed binaries. # This will cleanup orphaned files on those operating systems. if sys.platform not in ('win32', 'cygwin'): - return _RemoveOrphanedFiles(options) + if options.no_cleanup: + _LOGGER.debug('Skipping usual cleanup for non-Windows platforms.') + else: + return _RemoveOrphanedFiles(options) # Load the current installation state, and validate it against the # requested installation. diff --git a/engine/src/flutter/build/gyp_chromium_test.py.remove b/engine/src/flutter/build/gyp_chromium_test.py similarity index 100% rename from engine/src/flutter/build/gyp_chromium_test.py.remove rename to engine/src/flutter/build/gyp_chromium_test.py diff --git a/engine/src/flutter/build/install-android-sdks.sh b/engine/src/flutter/build/install-android-sdks.sh index 5c4edafec5..1119b7d7fd 100755 --- a/engine/src/flutter/build/install-android-sdks.sh +++ b/engine/src/flutter/build/install-android-sdks.sh @@ -12,14 +12,9 @@ echo 'checking for sdk packages install' cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook. packages="$(python ${cwd}/get_sdk_extras_packages.py)" -for package in "${packages}"; do - pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \ - grep -i "$package," | \ - awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}') - if [[ -n ${pkg_id} ]]; then - ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \ - --filter ${pkg_id} - fi -done +if [[ -n "${packages}" ]]; then + ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \ + --filter ${packages} +fi echo "install-android-sdks.sh complete." diff --git a/engine/src/flutter/build/install-build-deps-mac.sh b/engine/src/flutter/build/install-build-deps-mac.sh deleted file mode 100755 index 625ddf4a64..0000000000 --- a/engine/src/flutter/build/install-build-deps-mac.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -e - -# Copyright (c) 2015 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. -# -# Script to install dependencies for developing Mojo on Mac OS X. - -XCODE_APP="/Applications/Xcode.app" -JDK_VERSION="1.7.0" - -echo - -INSTRUCTIONS="" - -if [ ! -d $XCODE_APP ]; then - INSTRUCTIONS="${INSTRUCTIONS}\n** Install the latest version of Xcode from the Mac App Store." -fi - -if [ -z $(which java) ] || ! java -version 2>&1 | grep -q ${JDK_VERSION}; then - temp=$( - echo "** Download the Java JDK (Java SE Development Kit) 7:" - echo " http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html" - ) - - INSTRUCTIONS="${INSTRUCTIONS}\n$temp" -fi - - -if [ -z $(which gclient) ] && [ ! -d $HOME/depot_tools ]; then - echo "*** Installing depot_tools in $HOME" - echo - cd $HOME - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git - - temp=$( - echo "** Add this to your .bash_profile or similar:" - echo " export PATH=\"\${HOME}/depot_tools:\${PATH}\"" - ) - - INSTRUCTIONS="${INSTRUCTIONS}\n$temp" -fi - -if [ ! -z $(which brew) ]; then - brew install ant -elif [ ! -z $(which port) ]; then - sudo `which port` install apache-ant -else - INSTRUCTIONS="${INSTRUCTIONS}\n** Install homebrew (brew.sh) or macports (macports.org) and re-run this script." -fi - -sudo easy_install pip -sudo pip install requests - - -echo -echo "All done!" - -if [ ! -z "$INSTRUCTIONS" ]; then - echo - echo - echo "**** Follow these final instructions to get going." - echo $INSTRUCTIONS -fi diff --git a/engine/src/flutter/build/install-build-deps.py b/engine/src/flutter/build/install-build-deps.py new file mode 100755 index 0000000000..7cc3760df7 --- /dev/null +++ b/engine/src/flutter/build/install-build-deps.py @@ -0,0 +1,430 @@ +#!/usr/bin/env python +# Copyright 2015 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 argparse +import operator +import os +import platform +import re +import subprocess +import sys + + +SUPPORTED_UBUNTU_VERSIONS = ( + {'number': '12.04', 'codename': 'precise'}, + {'number': '14.04', 'codename': 'trusty'}, + {'number': '14.10', 'codename': 'utopic'}, + {'number': '15.04', 'codename': 'vivid'}, +) + + +# Packages needed for chromeos only. +_packages_chromeos_dev = ( + 'libbluetooth-dev', + 'libxkbcommon-dev', + 'realpath', +) + + +# Packages needed for development. +_packages_dev = ( + 'apache2.2-bin', + 'bison', + 'cdbs', + 'curl', + 'devscripts', + 'dpkg-dev', + 'elfutils', + 'fakeroot', + 'flex', + 'fonts-thai-tlwg', + 'g++', + 'git-core', + 'git-svn', + 'gperf', + 'language-pack-da', + 'language-pack-fr', + 'language-pack-he', + 'language-pack-zh-hant', + 'libapache2-mod-php5', + 'libasound2-dev', + 'libav-tools', + 'libbrlapi-dev', + 'libbz2-dev', + 'libcairo2-dev', + 'libcap-dev', + 'libcups2-dev', + 'libcurl4-gnutls-dev', + 'libdrm-dev', + 'libelf-dev', + 'libexif-dev', + 'libgconf2-dev', + 'libglib2.0-dev', + 'libglu1-mesa-dev', + 'libgnome-keyring-dev', + 'libgtk2.0-dev', + 'libkrb5-dev', + 'libnspr4-dev', + 'libnss3-dev', + 'libpam0g-dev', + 'libpci-dev', + 'libpulse-dev', + 'libsctp-dev', + 'libspeechd-dev', + 'libsqlite3-dev', + 'libssl-dev', + 'libudev-dev', + 'libwww-perl', + 'libxslt1-dev', + 'libxss-dev', + 'libxt-dev', + 'libxtst-dev', + 'openbox', + 'patch', + 'perl', + 'php5-cgi', + 'pkg-config', + 'python', + 'python-cherrypy3', + 'python-crypto', + 'python-dev', + 'python-numpy', + 'python-opencv', + 'python-openssl', + 'python-psutil', + 'python-yaml', + 'rpm', + 'ruby', + 'subversion', + 'ttf-dejavu-core', + 'ttf-indic-fonts', + 'ttf-kochi-gothic', + 'ttf-kochi-mincho', + 'wdiff', + 'xfonts-mathml', + 'zip', +) + + +# Run-time libraries required by chromeos only. +_packages_chromeos_lib = ( + 'libbz2-1.0', + 'libpulse0', +) + + +# Full list of required run-time libraries. +_packages_lib = ( + 'libasound2', + 'libatk1.0-0', + 'libc6', + 'libcairo2', + 'libcap2', + 'libcups2', + 'libexif12', + 'libexpat1', + 'libfontconfig1', + 'libfreetype6', + 'libglib2.0-0', + 'libgnome-keyring0', + 'libgtk2.0-0', + 'libpam0g', + 'libpango1.0-0', + 'libpci3', + 'libpcre3', + 'libpixman-1-0', + 'libpng12-0', + 'libspeechd2', + 'libsqlite3-0', + 'libstdc++6', + 'libx11-6', + 'libxau6', + 'libxcb1', + 'libxcomposite1', + 'libxcursor1', + 'libxdamage1', + 'libxdmcp6', + 'libxext6', + 'libxfixes3', + 'libxi6', + 'libxinerama1', + 'libxrandr2', + 'libxrender1', + 'libxtst6', + 'zlib1g', +) + + +# Debugging symbols for all of the run-time libraries. +_packages_dbg = ( + 'libatk1.0-dbg', + 'libc6-dbg', + 'libcairo2-dbg', + 'libfontconfig1-dbg', + 'libglib2.0-0-dbg', + 'libgtk2.0-0-dbg', + 'libpango1.0-0-dbg', + 'libpcre3-dbg', + 'libpixman-1-0-dbg', + 'libsqlite3-0-dbg', + 'libx11-6-dbg', + 'libxau6-dbg', + 'libxcb1-dbg', + 'libxcomposite1-dbg', + 'libxcursor1-dbg', + 'libxdamage1-dbg', + 'libxdmcp6-dbg', + 'libxext6-dbg', + 'libxfixes3-dbg', + 'libxi6-dbg', + 'libxinerama1-dbg', + 'libxrandr2-dbg', + 'libxrender1-dbg', + 'libxtst6-dbg', + 'zlib1g-dbg', +) + + +# 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf. +_packages_lib32 = ( + 'linux-libc-dev:i386', +) + + +# arm cross toolchain packages needed to build chrome on armhf. +_packages_arm = ( + 'g++-arm-linux-gnueabihf', + 'libc6-dev-armhf-cross', + 'linux-libc-dev-armhf-cross', +) + + +# Packages to build NaCl, its toolchains, and its ports. +_packages_naclports = ( + 'ant', + 'autoconf', + 'bison', + 'cmake', + 'gawk', + 'intltool', + 'xsltproc', + 'xutils-dev', +) +_packages_nacl = ( + 'g++-mingw-w64-i686', + 'lib32ncurses5-dev', + 'lib32z1-dev', + 'libasound2:i386', + 'libcap2:i386', + 'libelf-dev:i386', + 'libexif12:i386', + 'libfontconfig1:i386', + 'libgconf-2-4:i386', + 'libglib2.0-0:i386', + 'libgpm2:i386', + 'libgtk2.0-0:i386', + 'libncurses5:i386', + 'libnss3:i386', + 'libpango1.0-0:i386', + 'libssl1.0.0:i386', + 'libtinfo-dev', + 'libtinfo-dev:i386', + 'libtool', + 'libxcomposite1:i386', + 'libxcursor1:i386', + 'libxdamage1:i386', + 'libxi6:i386', + 'libxrandr2:i386', + 'libxss1:i386', + 'libxtst6:i386', + 'texinfo', + 'xvfb', +) + + +def is_userland_64_bit(): + return platform.architecture()[0] == '64bit' + + +def package_exists(pkg): + return pkg in subprocess.check_output(['apt-cache', 'pkgnames']).splitlines() + + +def lsb_release_short_codename(): + return subprocess.check_output( + ['lsb_release', '--codename', '--short']).strip() + + +def write_error(message): + sys.stderr.write('ERROR: %s\n' % message) + sys.stderr.flush() + + +def nonfatal_get_output(*popenargs, **kwargs): + process = subprocess.Popen( + stdout=subprocess.PIPE, stderr=subprocess.PIPE, *popenargs, **kwargs) + stdout, stderr = process.communicate() + retcode = process.poll() + return retcode, stdout, stderr + + +def compute_dynamic_package_lists(): + global _packages_arm + global _packages_dbg + global _packages_dev + global _packages_lib + global _packages_lib32 + global _packages_nacl + + if is_userland_64_bit(): + # 64-bit systems need a minimum set of 32-bit compat packages + # for the pre-built NaCl binaries. + _packages_dev += ( + 'lib32gcc1', + 'lib32stdc++6', + 'libc6-i386', + ) + + # When cross building for arm/Android on 64-bit systems the host binaries + # that are part of v8 need to be compiled with -m32 which means + # that basic multilib support is needed. + # gcc-multilib conflicts with the arm cross compiler (at least in trusty) + # but g++-X.Y-multilib gives us the 32-bit support that we need. Find out + # the appropriate value of X and Y by seeing what version the current + # distribution's g++-multilib package depends on. + output = subprocess.check_output(['apt-cache', 'depends', 'g++-multilib']) + multilib_package = re.search(r'g\+\+-[0-9.]+-multilib', output).group() + _packages_lib32 += (multilib_package,) + + lsb_codename = lsb_release_short_codename() + + # Find the proper version of libstdc++6-4.x-dbg. + if lsb_codename == 'precise': + _packages_dbg += ('libstdc++6-4.6-dbg',) + elif lsb_codename == 'trusty': + _packages_dbg += ('libstdc++6-4.8-dbg',) + else: + _packages_dbg += ('libstdc++6-4.9-dbg',) + + # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 . + if lsb_codename == 'trusty': + _packages_arm += ( + 'g++-4.8-multilib-arm-linux-gnueabihf', + 'gcc-4.8-multilib-arm-linux-gnueabihf', + ) + + # Find the proper version of libgbm-dev. We can't just install libgbm-dev as + # it depends on mesa, and only one version of mesa can exists on the system. + # Hence we must match the same version or this entire script will fail. + mesa_variant = '' + for variant in ('-lts-trusty', '-lts-utopic'): + rc, stdout, stderr = nonfatal_get_output( + ['dpkg-query', '-Wf\'{Status}\'', 'libgl1-mesa-glx' + variant]) + if 'ok installed' in output: + mesa_variant = variant + _packages_dev += ( + 'libgbm-dev' + mesa_variant, + 'libgl1-mesa-dev' + mesa_variant, + 'libgles2-mesa-dev' + mesa_variant, + 'mesa-common-dev' + mesa_variant, + ) + + if package_exists('ttf-mscorefonts-installer'): + _packages_dev += ('ttf-mscorefonts-installer',) + else: + _packages_dev += ('msttcorefonts',) + + if package_exists('libnspr4-dbg'): + _packages_dbg += ('libnspr4-dbg', 'libnss3-dbg') + _packages_lib += ('libnspr4', 'libnss3') + else: + _packages_dbg += ('libnspr4-0d-dbg', 'libnss3-1d-dbg') + _packages_lib += ('libnspr4-0d', 'libnss3-1d') + + if package_exists('libjpeg-dev'): + _packages_dev += ('libjpeg-dev',) + else: + _packages_dev += ('libjpeg62-dev',) + + if package_exists('libudev1'): + _packages_dev += ('libudev1',) + _packages_nacl += ('libudev1:i386',) + else: + _packages_dev += ('libudev0',) + _packages_nacl += ('libudev0:i386',) + + if package_exists('libbrlapi0.6'): + _packages_dev += ('libbrlapi0.6',) + else: + _packages_dev += ('libbrlapi0.5',) + + # Some packages are only needed if the distribution actually supports + # installing them. + if package_exists('appmenu-gtk'): + _packages_lib += ('appmenu-gtk',) + + _packages_dev += _packages_chromeos_dev + _packages_lib += _packages_chromeos_lib + _packages_nacl += _packages_naclports + + +def quick_check(packages): + rc, stdout, stderr = nonfatal_get_output([ + 'dpkg-query', '-W', '-f', '${PackageSpec}:${Status}\n'] + list(packages)) + if rc == 0 and not stderr: + return 0 + print stderr + return 1 + + +def main(argv): + parser = argparse.ArgumentParser() + parser.add_argument('--quick-check', action='store_true', + help='quickly try to determine if dependencies are ' + 'installed (this avoids interactive prompts and ' + 'sudo commands so might not be 100% accurate)') + parser.add_argument('--unsupported', action='store_true', + help='attempt installation even on unsupported systems') + args = parser.parse_args(argv) + + lsb_codename = lsb_release_short_codename() + if not args.unsupported and not args.quick_check: + if lsb_codename not in map( + operator.itemgetter('codename'), SUPPORTED_UBUNTU_VERSIONS): + supported_ubuntus = ['%(number)s (%(codename)s)' % v + for v in SUPPORTED_UBUNTU_VERSIONS] + write_error('Only Ubuntu %s are currently supported.' % + ', '.join(supported_ubuntus)) + return 1 + + if platform.machine() not in ('i686', 'x86_64'): + write_error('Only x86 architectures are currently supported.') + return 1 + + if os.geteuid() != 0 and not args.quick_check: + print 'Running as non-root user.' + print 'You might have to enter your password one or more times' + print 'for \'sudo\'.' + print + + compute_dynamic_package_lists() + + packages = (_packages_dev + _packages_lib + _packages_dbg + _packages_lib32 + + _packages_arm + _packages_nacl) + def packages_key(pkg): + s = pkg.rsplit(':', 1) + if len(s) == 1: + return (s, '') + return s + packages = sorted(set(packages), key=packages_key) + + if args.quick_check: + return quick_check(packages) + + return 0 + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/install-chroot.sh b/engine/src/flutter/build/install-chroot.sh index e2d558b76c..99451ed7ea 100755 --- a/engine/src/flutter/build/install-chroot.sh +++ b/engine/src/flutter/build/install-chroot.sh @@ -223,7 +223,8 @@ target="${distname}${arch}" d|D) sudo rm -rf "/var/lib/chroot/${target}" \ "/usr/local/bin/${target%bit}" \ "/etc/schroot/mount-${target}" \ - "/etc/schroot/script-${target}" + "/etc/schroot/script-${target}" \ + "/etc/schroot/${target}" sudo sed -ni '/^[[]'"${target%bit}"']$/,${ :1;n;/^[[]/b2;b1;:2;p;n;b2};p' \ "/etc/schroot/schroot.conf" @@ -349,13 +350,41 @@ grep -qs ubuntu.com /usr/share/debootstrap/scripts/"${distname}" && if [ -z "${chroot_groups}" ]; then chroot_groups="${admin},$(id -gn)" fi -# Older versions of schroot wanted a "priority=" line, whereas recent -# versions deprecate "priority=" and warn if they see it. We don't have -# a good feature test, but scanning for the string "priority=" in the -# existing "schroot.conf" file is a good indication of what to do. -priority=$(grep -qs 'priority=' /etc/schroot/schroot.conf && + +if [ -d '/etc/schroot/default' ]; then + new_version=1 + fstab="/etc/schroot/${target}/fstab" +else + new_version=0 + fstab="/etc/schroot/mount-${target}" +fi + +if [ "$new_version" = "1" ]; then + sudo cp -ar /etc/schroot/default /etc/schroot/${target} + + sudo sh -c 'cat >>/etc/schroot/schroot.conf' <>${fstab}" +else + # Older versions of schroot wanted a "priority=" line, whereas recent + # versions deprecate "priority=" and warn if they see it. We don't have + # a good feature test, but scanning for the string "priority=" in the + # existing "schroot.conf" file is a good indication of what to do. + priority=$(grep -qs 'priority=' /etc/schroot/schroot.conf && echo 'priority=3' || :) -sudo sh -c 'cat >>/etc/schroot/schroot.conf' <>/etc/schroot/schroot.conf' </etc/schroot/script-'"${target}" -sed '\,^/home[/[:space:]],s/\([,[:space:]]\)bind[[:space:]]/\1rbind /' \ - /etc/schroot/mount-defaults | - sudo sh -c 'cat > /etc/schroot/mount-'"${target}" + # Set up a list of mount points that is specific to this + # chroot environment. + sed '/^FSTAB=/s,"[^"]*","'"${fstab}"'",' \ + /etc/schroot/script-defaults | + sudo sh -c 'cat >/etc/schroot/script-'"${target}" + sed '\,^/home[/[:space:]],s/\([,[:space:]]\)bind[[:space:]]/\1rbind /' \ + /etc/schroot/mount-defaults | + sudo sh -c "cat > ${fstab}" +fi # Add the extra mount points that the user told us about [ -n "${bind_mounts}" -a "${bind_mounts}" != "NONE" ] && printf "${bind_mounts}" | - sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" + sudo sh -c 'cat >>'"${fstab}" # If this system has a "/media" mountpoint, import it into the chroot # environment. Most modern distributions use this mount point to # automatically mount devices such as CDROMs, USB sticks, etc... if [ -d /media ] && - ! grep -qs '^/media' /etc/schroot/mount-"${target}"; then + ! grep -qs '^/media' "${fstab}"; then echo '/media /media none rw,rbind 0 0' | - sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" + sudo sh -c 'cat >>'"${fstab}" fi # Share /dev/shm, /run and /run/shm. -grep -qs '^/dev/shm' /etc/schroot/mount-"${target}" || +grep -qs '^/dev/shm' "${fstab}" || echo '/dev/shm /dev/shm none rw,bind 0 0' | - sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" + sudo sh -c 'cat >>'"${fstab}" if [ ! -d "/var/lib/chroot/${target}/run" ] && - ! grep -qs '^/run' /etc/schroot/mount-"${target}"; then + ! grep -qs '^/run' "${fstab}"; then echo '/run /run none rw,bind 0 0' | - sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" + sudo sh -c 'cat >>'"${fstab}" fi -if ! grep -qs '^/run/shm' /etc/schroot/mount-"${target}"; then +if ! grep -qs '^/run/shm' "${fstab}"; then { [ -d /run ] && echo '/run/shm /run/shm none rw,bind 0 0' || echo '/dev/shm /run/shm none rw,bind 0 0'; } | - sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" + sudo sh -c 'cat >>'"${fstab}" fi # Set up a special directory that changes contents depending on the target @@ -412,7 +442,7 @@ fi d="$(readlink -f "${HOME}/chroot" 2>/dev/null || echo "${HOME}/chroot")" s="${d}/.${target}" echo "${s} ${d} none rw,bind 0 0" | - sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" + sudo sh -c 'cat >>'"${target}" mkdir -p "${s}" # Install a helper script to launch commands in the chroot @@ -717,7 +747,7 @@ if [ -x "${script}" ]; then # installing the Chrome build depencies. This prevents the chroot # session from being closed. So, we always try to shut down any running # instance of dbus and rsyslog. - sudo /usr/local/bin/"${target%bit}" sh -c "${script} --no-lib32; + sudo /usr/local/bin/"${target%bit}" sh -c "${script}; rc=$?; /etc/init.d/cron stop >/dev/null 2>&1 || :; /etc/init.d/rsyslog stop >/dev/null 2>&1 || :; diff --git a/engine/src/flutter/build/ios/grit_whitelist.txt b/engine/src/flutter/build/ios/grit_whitelist.txt index 8fb4f0ec90..a976daf16b 100644 --- a/engine/src/flutter/build/ios/grit_whitelist.txt +++ b/engine/src/flutter/build/ios/grit_whitelist.txt @@ -21,6 +21,7 @@ IDR_DEFAULT_FAVICON_64 IDR_DIR_HEADER_HTML IDR_DISTILLABLE_PAGE_SERIALIZED_MODEL IDR_DISTILLER_CSS +IDR_DISTILLER_IOS_CSS IDR_DISTILLER_JS IDR_DOM_DISTILLER_VIEWER_HTML IDR_DOM_DISTILLER_VIEWER_JS @@ -104,7 +105,6 @@ IDR_TRANSLATE_JS IDR_UBER_UTILS_JS IDR_WEBUI_CSS_TEXT_DEFAULTS IDR_WEBUI_I18N_TEMPLATE_JS -IDR_WEBUI_I18N_TEMPLATE_POLYMER_JS IDR_WEBUI_JSTEMPLATE_JS IDR_WEBUI_JS_LOAD_TIME_DATA IDS_ABOUT_MAC @@ -143,8 +143,6 @@ IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX -IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE -IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE IDS_AUTOFILL_CC_AMEX IDS_AUTOFILL_CC_AMEX_SHORT IDS_AUTOFILL_CC_DINERS @@ -326,6 +324,7 @@ IDS_DOM_DISTILLER_JAVASCRIPT_DISABLED_CONTENT IDS_DOM_DISTILLER_QUALITY_ANSWER_NO IDS_DOM_DISTILLER_QUALITY_ANSWER_YES IDS_DOM_DISTILLER_QUALITY_QUESTION +IDS_DOM_DISTILLER_VIEWER_CLOSE_READER_VIEW IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_TITLE IDS_DOM_DISTILLER_VIEWER_LOADING_STRING @@ -536,12 +535,12 @@ IDS_FLAGS_DISABLE_WEBGL_NAME IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION IDS_FLAGS_DISABLE_WEBRTC_NAME IDS_FLAGS_ENABLE +IDS_FLAGS_ENABLE_ACCELERATED_MJPEG_DECODE_DESCRIPTION +IDS_FLAGS_ENABLE_ACCELERATED_MJPEG_DECODE_NAME IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION -IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION -IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION @@ -820,9 +819,7 @@ IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_NO_CT IDS_PAGE_INFO_SECURITY_TAB_SSL_VERSION IDS_PAGE_INFO_SECURITY_TAB_UNABLE_TO_CHECK_REVOCATION IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY -IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT -IDS_PAGE_INFO_SITE_INFO_TITLE IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON diff --git a/engine/src/flutter/build/landmines.py b/engine/src/flutter/build/landmines.py index bac29823c3..4db23807cc 100755 --- a/engine/src/flutter/build/landmines.py +++ b/engine/src/flutter/build/landmines.py @@ -15,14 +15,15 @@ build is clobbered. import difflib import errno +import gyp_environment import logging import optparse import os -import shutil import sys import subprocess import time +import clobber import landmine_utils @@ -55,79 +56,6 @@ def get_build_dir(build_tool, is_iphone=False): return os.path.abspath(ret) -def extract_gn_build_commands(build_ninja_file): - """Extracts from a build.ninja the commands to run GN. - - The commands to run GN are the gn rule and build.ninja build step at the - top of the build.ninja file. We want to keep these when deleting GN builds - since we want to preserve the command-line flags to GN. - - On error, returns the empty string.""" - result = "" - with open(build_ninja_file, 'r') as f: - # Read until the second blank line. The first thing GN writes to the file - # is the "rule gn" and the second is the section for "build build.ninja", - # separated by blank lines. - num_blank_lines = 0 - while num_blank_lines < 2: - line = f.readline() - if len(line) == 0: - return '' # Unexpected EOF. - result += line - if line[0] == '\n': - num_blank_lines = num_blank_lines + 1 - return result - -def delete_build_dir(build_dir): - # GN writes a build.ninja.d file. Note that not all GN builds have args.gn. - build_ninja_d_file = os.path.join(build_dir, 'build.ninja.d') - if not os.path.exists(build_ninja_d_file): - shutil.rmtree(build_dir) - return - - # GN builds aren't automatically regenerated when you sync. To avoid - # messing with the GN workflow, erase everything but the args file, and - # write a dummy build.ninja file that will automatically rerun GN the next - # time Ninja is run. - build_ninja_file = os.path.join(build_dir, 'build.ninja') - build_commands = extract_gn_build_commands(build_ninja_file) - - try: - gn_args_file = os.path.join(build_dir, 'args.gn') - with open(gn_args_file, 'r') as f: - args_contents = f.read() - except IOError: - args_contents = '' - - shutil.rmtree(build_dir) - - # Put back the args file (if any). - os.mkdir(build_dir) - if args_contents != '': - with open(gn_args_file, 'w') as f: - f.write(args_contents) - - # Write the build.ninja file sufficiently to regenerate itself. - with open(os.path.join(build_dir, 'build.ninja'), 'w') as f: - if build_commands != '': - f.write(build_commands) - else: - # Couldn't parse the build.ninja file, write a default thing. - f.write('''rule gn -command = gn -q gen //out/%s/ -description = Regenerating ninja files - -build build.ninja: gn -generator = 1 -depfile = build.ninja.d -''' % (os.path.split(build_dir)[1])) - - # Write a .d file for the build which references a nonexistant file. This - # will make Ninja always mark the build as dirty. - with open(build_ninja_d_file, 'w') as f: - f.write('build.ninja: nonexistant_file.gn\n') - - def clobber_if_necessary(new_landmines): """Does the work of setting, planting, and triggering landmines.""" out_dir = get_build_dir(landmine_utils.builder()) @@ -149,14 +77,7 @@ def clobber_if_necessary(new_landmines): sys.stdout.write('Clobbering due to:\n') sys.stdout.writelines(diff) - # Clobber contents of build directory but not directory itself: some - # checkouts have the build directory mounted. - for f in os.listdir(out_dir): - path = os.path.join(out_dir, f) - if os.path.isfile(path): - os.unlink(path) - elif os.path.isdir(path): - delete_build_dir(path) + clobber.clobber(out_dir) # Save current set of landmines for next time. with open(landmines_path, 'w') as f: @@ -199,6 +120,7 @@ def main(): if landmine_utils.builder() in ('dump_dependency_json', 'eclipse'): return 0 + gyp_environment.SetEnvironment() landmines = [] for s in landmine_scripts: diff --git a/engine/src/flutter/build/module_args/nacl.gni b/engine/src/flutter/build/module_args/nacl.gni new file mode 100644 index 0000000000..61e0768e13 --- /dev/null +++ b/engine/src/flutter/build/module_args/nacl.gni @@ -0,0 +1,6 @@ +# Copyright 2015 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. + +# Override nacl's build directory. +nacl_shared_build_dir = "//build" diff --git a/engine/src/flutter/build/module_args/v8.gni b/engine/src/flutter/build/module_args/v8.gni index aa2848c40b..8b5204c68e 100644 --- a/engine/src/flutter/build/module_args/v8.gni +++ b/engine/src/flutter/build/module_args/v8.gni @@ -9,5 +9,5 @@ if (is_android) { # TODO(sky): nuke this. Temporary while sorting out http://crbug.com/465456. enable_correct_v8_arch = false -v8_use_external_startup_data = false +v8_use_external_startup_data = !(is_chromeos || is_win) v8_extra_library_files = [] diff --git a/engine/src/flutter/build/sanitizers/lsan_suppressions.cc b/engine/src/flutter/build/sanitizers/lsan_suppressions.cc index ac2defa11b..e9a8b7eb47 100644 --- a/engine/src/flutter/build/sanitizers/lsan_suppressions.cc +++ b/engine/src/flutter/build/sanitizers/lsan_suppressions.cc @@ -97,6 +97,9 @@ char kLSanDefaultSuppressions[] = // http://crbug.com/356306 "leak:content::SetProcessTitleFromCommandLine\n" +// http://crbug.com/506433 +"leak:blink::ResourceFetcher::garbageCollectDocumentResources\n" + // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. // End of suppressions. diff --git a/engine/src/flutter/build/sanitizers/tsan_suppressions.cc b/engine/src/flutter/build/sanitizers/tsan_suppressions.cc index ace6075662..fe64dd2c1d 100644 --- a/engine/src/flutter/build/sanitizers/tsan_suppressions.cc +++ b/engine/src/flutter/build/sanitizers/tsan_suppressions.cc @@ -270,9 +270,6 @@ char kTSanDefaultSuppressions[] = "race:g_next_user_script_id\n" // http://crbug.com/389098 -"race:webrtc::RtpToNtpMs\n" -"race:webrtc::UpdateRtcpList\n" -"race:webrtc::RemoteNtpTimeEstimator::Estimate\n" "race:webrtc::voe::TransmitMixer::EnableStereoChannelSwapping\n" // http://crbug.com/397022 @@ -306,6 +303,8 @@ char kTSanDefaultSuppressions[] = // https://crbug.com/455665 "race:mojo::common::*::tick_clock\n" +"race:mojo::common::internal::NowTicks\n" +"race:tracked_objects::ThreadData::InitializeThreadContext\n" // https://crbug.com/459429 "race:randomnessPid\n" diff --git a/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn b/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn index a20a09d4db..073faec562 100644 --- a/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn +++ b/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn @@ -111,6 +111,16 @@ static_library("gtest") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] + + config("gtest_warnings") { + if (is_win && is_clang) { + # The Mutex constructor initializer list in gtest-port.cc is incorrectly + # ordered. See + # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. + cflags = [ "-Wno-reorder" ] + } + } + configs += [ ":gtest_warnings" ] } source_set("gtest_main") { diff --git a/engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn b/engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn index dc934cb93e..df2368bfe2 100644 --- a/engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn +++ b/engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn @@ -28,6 +28,23 @@ android_java_prebuilt("uiautomator_java") { jar_path = "$android_sdk/uiautomator.jar" } +android_resources("android_support_design_resources") { + v14_skip = true + resource_dirs = [ "$android_sdk_root/extras/android/support/design/res" ] + deps = [ + ":android_support_v7_appcompat_resources", + ] + custom_package = "android.support.design" +} + +android_java_prebuilt("android_support_design_java") { + deps = [ + ":android_support_v7_appcompat_java", + ":android_support_design_resources", + ] + jar_path = "$android_sdk_root/extras/android/support/design/libs/android-support-design.jar" +} + android_java_prebuilt("android_support_v13_java") { jar_path = "$android_sdk_root/extras/android/support/v13/android-support-v13.jar" @@ -88,7 +105,33 @@ android_resources("google_play_services_default_resources") { android_java_prebuilt("google_play_services_default_java") { deps = [ ":android_support_v13_java", + ":android_support_v7_mediarouter_java", ":google_play_services_default_resources", ] + proguard_preprocess = true + proguard_config = "//third_party/android_tools/proguard.flags" + + # TODO(dgn) deps should not complain about having a custom action here + # Currently, there is no guarantee that the data_deps actions will complete before the current one runs + data_deps = [ ":check_sdk_extras_version" ] jar_path = "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar" } + +action("check_sdk_extras_version") { + script = "//build/check_sdk_extras_version.py" + args = [ + "--package-id", + "extra-google-google_play_services", + "--package-location", + rebase_path("$android_sdk_root/extras/google/google_play_services"), + "--stamp", + rebase_path("$target_gen_dir/checked_sdk_extras_version.stamp"), + ] + inputs = [ + "//build/android_sdk_extras.json", + "$android_sdk_root/extras/google/google_play_services/source.properties", + ] + outputs = [ + "$target_gen_dir/checked_sdk_extras_version.stamp", + ] +} diff --git a/engine/src/flutter/build/secondary/third_party/cacheinvalidation/BUILD.gn b/engine/src/flutter/build/secondary/third_party/cacheinvalidation/BUILD.gn deleted file mode 100644 index 17e4d1c4a1..0000000000 --- a/engine/src/flutter/build/secondary/third_party/cacheinvalidation/BUILD.gn +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 2014 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("//testing/test.gni") - -config("cacheinvalidation_config") { - include_dirs = [ - "overrides", - "src", - ] -} - -static_library("cacheinvalidation") { - sources = [ - "overrides/google/cacheinvalidation/deps/callback.h", - "overrides/google/cacheinvalidation/deps/gmock.h", - "overrides/google/cacheinvalidation/deps/googletest.h", - "overrides/google/cacheinvalidation/deps/logging.h", - "overrides/google/cacheinvalidation/deps/mutex.h", - "overrides/google/cacheinvalidation/deps/random.cc", - "overrides/google/cacheinvalidation/deps/random.h", - "overrides/google/cacheinvalidation/deps/scoped_ptr.h", - "overrides/google/cacheinvalidation/deps/sha1-digest-function.h", - "overrides/google/cacheinvalidation/deps/stl-namespace.h", - "overrides/google/cacheinvalidation/deps/string_util.h", - "overrides/google/cacheinvalidation/deps/time.h", - "src/google/cacheinvalidation/deps/digest-function.h", - "src/google/cacheinvalidation/impl/basic-system-resources.cc", - "src/google/cacheinvalidation/impl/basic-system-resources.h", - "src/google/cacheinvalidation/impl/checking-invalidation-listener.cc", - "src/google/cacheinvalidation/impl/checking-invalidation-listener.h", - "src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h", - "src/google/cacheinvalidation/impl/constants.cc", - "src/google/cacheinvalidation/impl/constants.h", - "src/google/cacheinvalidation/impl/digest-store.h", - "src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.cc", - "src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.h", - "src/google/cacheinvalidation/impl/invalidation-client-core.cc", - "src/google/cacheinvalidation/impl/invalidation-client-core.h", - "src/google/cacheinvalidation/impl/invalidation-client-factory.cc", - "src/google/cacheinvalidation/impl/invalidation-client-impl.cc", - "src/google/cacheinvalidation/impl/invalidation-client-impl.h", - "src/google/cacheinvalidation/impl/invalidation-client-util.h", - "src/google/cacheinvalidation/impl/log-macro.h", - "src/google/cacheinvalidation/impl/object-id-digest-utils.cc", - "src/google/cacheinvalidation/impl/object-id-digest-utils.h", - "src/google/cacheinvalidation/impl/persistence-utils.cc", - "src/google/cacheinvalidation/impl/persistence-utils.h", - "src/google/cacheinvalidation/impl/proto-converter.cc", - "src/google/cacheinvalidation/impl/proto-converter.h", - "src/google/cacheinvalidation/impl/proto-helpers.cc", - "src/google/cacheinvalidation/impl/proto-helpers.h", - "src/google/cacheinvalidation/impl/protocol-handler.cc", - "src/google/cacheinvalidation/impl/protocol-handler.h", - "src/google/cacheinvalidation/impl/recurring-task.cc", - "src/google/cacheinvalidation/impl/recurring-task.h", - "src/google/cacheinvalidation/impl/registration-manager.cc", - "src/google/cacheinvalidation/impl/registration-manager.h", - "src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h", - "src/google/cacheinvalidation/impl/run-state.h", - "src/google/cacheinvalidation/impl/safe-storage.cc", - "src/google/cacheinvalidation/impl/safe-storage.h", - "src/google/cacheinvalidation/impl/simple-registration-store.cc", - "src/google/cacheinvalidation/impl/simple-registration-store.h", - "src/google/cacheinvalidation/impl/smearer.h", - "src/google/cacheinvalidation/impl/statistics.cc", - "src/google/cacheinvalidation/impl/statistics.h", - "src/google/cacheinvalidation/impl/throttle.cc", - "src/google/cacheinvalidation/impl/throttle.h", - "src/google/cacheinvalidation/impl/ticl-message-validator.cc", - "src/google/cacheinvalidation/impl/ticl-message-validator.h", - "src/google/cacheinvalidation/include/invalidation-client-factory.h", - "src/google/cacheinvalidation/include/invalidation-client.h", - "src/google/cacheinvalidation/include/invalidation-listener.h", - "src/google/cacheinvalidation/include/system-resources.h", - "src/google/cacheinvalidation/include/types.h", - ] - - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - public_configs = [ ":cacheinvalidation_config" ] - - public_deps = [ - "src/google/cacheinvalidation:cacheinvalidation_proto_cpp", - ] - - deps = [ - "//base", - ] -} - -test("cacheinvalidation_unittests") { - sources = [ - "src/google/cacheinvalidation/impl/invalidation-client-impl_test.cc", - "src/google/cacheinvalidation/impl/protocol-handler_test.cc", - "src/google/cacheinvalidation/impl/recurring-task_test.cc", - "src/google/cacheinvalidation/impl/throttle_test.cc", - "src/google/cacheinvalidation/test/deterministic-scheduler.cc", - "src/google/cacheinvalidation/test/deterministic-scheduler.h", - "src/google/cacheinvalidation/test/test-logger.cc", - "src/google/cacheinvalidation/test/test-logger.h", - "src/google/cacheinvalidation/test/test-utils.cc", - "src/google/cacheinvalidation/test/test-utils.h", - ] - - deps = [ - ":cacheinvalidation", - "src/google/cacheinvalidation:cacheinvalidation_proto_cpp", - "//base", - "//base/test:run_all_unittests", - "//testing/gmock", - "//testing/gtest", - ] -} - -# TODO(GYP) Test isolation stuff. -if (is_android) { - import("//build/config/android/rules.gni") - - # GYP: //third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_java - proto_java_library("cacheinvalidation_proto_java") { - proto_path = "src/proto" - sources = [ - "$proto_path/android_channel.proto", - "$proto_path/android_listener.proto", - "$proto_path/android_service.proto", - "$proto_path/channel_common.proto", - "$proto_path/client.proto", - "$proto_path/client_protocol.proto", - "$proto_path/java_client.proto", - "$proto_path/types.proto", - ] - } - - # GYP: //third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib - android_library("cacheinvalidation_javalib") { - deps = [ - ":cacheinvalidation_proto_java", - "//third_party/android_protobuf:protobuf_nano_javalib", - "//third_party/android_tools:android_gcm_java", - ] - - DEPRECATED_java_in_dir = "src/java" - } -} diff --git a/engine/src/flutter/build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn b/engine/src/flutter/build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn deleted file mode 100644 index 3bbb844eea..0000000000 --- a/engine/src/flutter/build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2014 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("//third_party/protobuf/proto_library.gni") - -proto_library("cacheinvalidation_proto_cpp") { - # Depend on cacheinvalidation instead. - visibility = [ "//third_party/cacheinvalidation/*" ] - - sources = [ - "client.proto", - "client_gateway.proto", - "client_protocol.proto", - "client_test_internal.proto", - "types.proto", - ] - - if (!is_android) { - sources += [ - "android_channel.proto", - "channel_common.proto", - ] - } - - proto_out_dir = "google/cacheinvalidation" -} diff --git a/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni b/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni index 95a5e2e133..bdf812f219 100644 --- a/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni +++ b/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni @@ -11,11 +11,10 @@ # Path to .grd file. # # outputs (required) -# List of outputs from grit, relative to the target_gen_dir. If supplied, -# a call to Grit to compute the outputs can be skipped which will make -# GN run faster. Grit will verify at build time that this list is correct -# and will fail if there is a mismatch between the outputs specified by -# the .grd file and the outputs list here. +# List of outputs from grit, relative to the target_gen_dir. Grit will +# verify at build time that this list is correct and will fail if there +# is a mismatch between the outputs specified by the .grd file and the +# outputs list here. # # To get this list, you can look in the .grd file for # 1: negative_patterns = pattern_groups[1].split(':') diff --git a/engine/src/flutter/foo.patch b/engine/src/flutter/foo.patch new file mode 100644 index 0000000000..dc9d8df3c6 --- /dev/null +++ b/engine/src/flutter/foo.patch @@ -0,0 +1,56 @@ +commit 2f12ff08cc9215273040893a9b6c2b3fabccfb6b +Author: Adam Barth +Date: Thu Jul 16 18:00:01 2015 -0700 + + Improve dependencies + +diff --git a/sky/build/sky_app.gni b/sky/build/sky_app.gni +index 950bf82..6890cf6 100644 +--- a/sky/build/sky_app.gni ++++ b/sky/build/sky_app.gni +@@ -28,7 +28,7 @@ template("sky_app") { + + bundle_prefix = target_name + +- copy("copy_${bundle_prefix}_bundle") { ++ copy("gen_${bundle_prefix}_bundle") { + sources = [ + "$target_gen_dir/app.skyx", + ] +@@ -50,16 +50,20 @@ template("sky_app") { + "$target_gen_dir/app.skyx", + ] + deps = [ +- "//third_party/icu", +- ":copy_${bundle_prefix}_bundle", ++ ":$skyx_target_name", ++ ":gen_${bundle_prefix}_bundle", ++ "//third_party/icu:icudata", + ] + + if (defined(invoker.bundles)) { + foreach(bundle, invoker.bundles) { + bundle_gen_dir = get_label_info(bundle, "target_gen_dir") ++ bundle_dir = get_label_info(bundle, "dir") + bundle_name = get_label_info(bundle, "name") + sources += [ "$bundle_gen_dir/${bundle_name}.skyx" ] +- deps += [ bundle ] ++ deps += [ ++ "$bundle_dir:gen_${bundle_name}_bundle", ++ ] + } + } + } +diff --git a/sky/shell/BUILD.gn b/sky/shell/BUILD.gn +index 88c9d68..ae169d3 100644 +--- a/sky/shell/BUILD.gn ++++ b/sky/shell/BUILD.gn +@@ -136,7 +136,7 @@ if (is_android) { + "$root_build_dir/icudtl.dat", + ] + deps = [ +- "//third_party/icu", ++ "//third_party/icu:icudata", + ] + } + } else if (is_ios) { diff --git a/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java b/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java index 167e7b92a4..e006954cfb 100644 --- a/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java +++ b/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java @@ -20,6 +20,7 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator { public Bundle generate(Map rawResults) { int testsPassed = 0; int testsFailed = 0; + int testsErrored = 0; for (Map.Entry entry : rawResults.entrySet()) { switch (entry.getValue()) { @@ -32,6 +33,9 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator { Log.d(TAG, "FAILED: " + entry.getKey()); ++testsFailed; break; + case UNKNOWN: + ++testsErrored; + break; default: Log.w(TAG, "Unhandled: " + entry.getKey() + ", " + entry.getValue().toString()); @@ -40,10 +44,11 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator { } StringBuilder resultBuilder = new StringBuilder(); - if (testsFailed > 0) { - resultBuilder.append( - "\nFAILURES!!! Tests run: " + Integer.toString(rawResults.size()) - + ", Failures: " + Integer.toString(testsFailed) + ", Errors: 0"); + if (testsFailed > 0 || testsErrored > 0) { + resultBuilder.append("\nFAILURES!!! ") + .append("Tests run: ").append(Integer.toString(rawResults.size())) + .append(", Failures: ").append(Integer.toString(testsFailed)) + .append(", Errors: ").append(Integer.toString(testsErrored)); } else { resultBuilder.append("\nOK (" + Integer.toString(testsPassed) + " tests)"); } diff --git a/engine/src/flutter/testing/android/native_test.gyp b/engine/src/flutter/testing/android/native_test.gyp index fcfd7d7028..734a00f0ca 100644 --- a/engine/src/flutter/testing/android/native_test.gyp +++ b/engine/src/flutter/testing/android/native_test.gyp @@ -55,6 +55,7 @@ 'type': 'none', 'dependencies': [ 'appurify_support.gyp:appurify_support_java', + 'on_device_instrumentation.gyp:reporter_java', '../../base/base.gyp:base_native_libraries_gen', '../../base/base.gyp:base_java', ], diff --git a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java index ac2ddeef84..0f6628a648 100644 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java +++ b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java @@ -6,11 +6,17 @@ package org.chromium.native_test; import android.os.Bundle; +import org.chromium.base.Log; + +import java.io.File; + /** * An {@link android.app.Activity} for running native browser tests. */ public abstract class NativeBrowserTestActivity extends NativeTestActivity { + private static final String TAG = "cr.native_test"; + private static final String BROWSER_TESTS_FLAGS[] = { // content::kSingleProcessTestsFlag "--single_process", @@ -32,15 +38,48 @@ public abstract class NativeBrowserTestActivity extends NativeTestActivity { @Override public void onStart() { + deletePrivateDataDirectory(); initializeBrowserProcess(); super.onStart(); } + /** Deletes a file or directory along with any of its children. + * + * Note that, like File.delete(), this returns false if the file or directory couldn't be + * fully deleted. This means that, in the directory case, some files may be deleted even if + * the entire directory couldn't be. + * + * @param file The file or directory to delete. + * @return Whether or not the file or directory was deleted. + */ + private static boolean deleteRecursive(File file) { + if (file == null) return true; + + File[] children = file.listFiles(); + if (children != null) { + for (File child : children) { + if (!deleteRecursive(child)) { + return false; + } + } + } + return file.delete(); + } + + private void deletePrivateDataDirectory() { + File privateDataDirectory = getPrivateDataDirectory(); + if (!deleteRecursive(privateDataDirectory)) { + Log.e(TAG, "Failed to remove %s", privateDataDirectory.getAbsolutePath()); + } + } + + /** Returns the test suite's private data directory. */ + protected abstract File getPrivateDataDirectory(); + /** Initializes the browser process. * * This generally includes loading native libraries and switching to the native command line, * among other things. */ protected abstract void initializeBrowserProcess(); - } diff --git a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java index 35a79f8c4f..8e147201c5 100644 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java +++ b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java @@ -10,12 +10,16 @@ import android.content.Intent; import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.Process; import org.chromium.base.CommandLine; import org.chromium.base.JNINamespace; import org.chromium.base.Log; +import org.chromium.test.reporter.TestStatusReporter; import java.io.File; +import java.util.ArrayList; +import java.util.Iterator; /** * Android's NativeActivity is mostly useful for pure-native code. @@ -28,16 +32,17 @@ public class NativeTestActivity extends Activity { "org.chromium.native_test.NativeTestActivity.CommandLineFile"; public static final String EXTRA_COMMAND_LINE_FLAGS = "org.chromium.native_test.NativeTestActivity.CommandLineFlags"; + public static final String EXTRA_SHARD = + "org.chromium.native_test.NativeTestActivity.Shard"; public static final String EXTRA_STDOUT_FILE = "org.chromium.native_test.NativeTestActivity.StdoutFile"; private static final String TAG = "cr.native_test"; private static final String EXTRA_RUN_IN_SUB_THREAD = "RunInSubThread"; - // We post a delayed task to run tests so that we do not block onCreate(). - private static final long RUN_TESTS_DELAY_IN_MS = 300; private String mCommandLineFilePath; private StringBuilder mCommandLineFlags = new StringBuilder(); + private TestStatusReporter mReporter; private boolean mRunInSubThread = false; private boolean mStdoutFifo = false; private String mStdoutFilePath; @@ -48,6 +53,7 @@ public class NativeTestActivity extends Activity { CommandLine.init(new String[]{}); parseArgumentsFromIntent(getIntent()); + mReporter = new TestStatusReporter(this); } private void parseArgumentsFromIntent(Intent intent) { @@ -68,6 +74,19 @@ public class NativeTestActivity extends Activity { mRunInSubThread = intent.hasExtra(EXTRA_RUN_IN_SUB_THREAD); + ArrayList shard = intent.getStringArrayListExtra(EXTRA_SHARD); + if (shard != null) { + StringBuilder filterFlag = new StringBuilder(); + filterFlag.append("--gtest_filter="); + for (Iterator test_iter = shard.iterator(); test_iter.hasNext();) { + filterFlag.append(test_iter.next()); + if (test_iter.hasNext()) { + filterFlag.append(":"); + } + } + appendCommandLineFlags(filterFlag.toString()); + } + mStdoutFilePath = intent.getStringExtra(EXTRA_STDOUT_FILE); if (mStdoutFilePath == null) { mStdoutFilePath = new File(getFilesDir(), "test.fifo").getAbsolutePath(); @@ -94,19 +113,21 @@ public class NativeTestActivity extends Activity { } else { // Post a task to run the tests. This allows us to not block // onCreate and still run tests on the main thread. - new Handler().postDelayed(new Runnable() { + new Handler().post(new Runnable() { @Override public void run() { runTests(); } - }, RUN_TESTS_DELAY_IN_MS); + }); } } private void runTests() { + mReporter.testRunStarted(Process.myPid()); nativeRunTests(mCommandLineFlags.toString(), mCommandLineFilePath, mStdoutFilePath, mStdoutFifo, getApplicationContext()); finish(); + mReporter.testRunFinished(Process.myPid()); } // Signal a failure of the native test loader to python scripts diff --git a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java index 5c0cb9308e..6e39401882 100644 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java +++ b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java @@ -5,13 +5,19 @@ package org.chromium.native_test; import android.app.Activity; +import android.app.ActivityManager; import android.app.Instrumentation; import android.content.ComponentName; +import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Environment; +import android.os.Handler; +import android.os.Process; +import android.util.SparseArray; import org.chromium.base.Log; +import org.chromium.test.reporter.TestStatusReceiver; import org.chromium.test.support.ResultsBundleGenerator; import org.chromium.test.support.RobotiumBundleGenerator; @@ -20,10 +26,15 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; +import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; +import java.util.ArrayDeque; +import java.util.ArrayList; import java.util.HashMap; import java.util.Map; +import java.util.Queue; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -33,22 +44,38 @@ import java.util.regex.Pattern; public class NativeTestInstrumentationTestRunner extends Instrumentation { public static final String EXTRA_NATIVE_TEST_ACTIVITY = - "org.chromium.native_test.NativeTestInstrumentationTestRunner." - + "NativeTestActivity"; + "org.chromium.native_test.NativeTestInstrumentationTestRunner.NativeTestActivity"; + public static final String EXTRA_SHARD_NANO_TIMEOUT = + "org.chromium.native_test.NativeTestInstrumentationTestRunner.ShardNanoTimeout"; + public static final String EXTRA_SHARD_SIZE_LIMIT = + "org.chromium.native_test.NativeTestInstrumentationTestRunner.ShardSizeLimit"; + public static final String EXTRA_TEST_LIST_FILE = + "org.chromium.native_test.NativeTestInstrumentationTestRunner.TestList"; private static final String TAG = "cr.native_test"; - private static final int ACCEPT_TIMEOUT_MS = 5000; + private static final long DEFAULT_SHARD_NANO_TIMEOUT = 60 * 1000000000L; + // Default to no size limit. + private static final int DEFAULT_SHARD_SIZE_LIMIT = 0; private static final String DEFAULT_NATIVE_TEST_ACTIVITY = "org.chromium.native_test.NativeUnitTestActivity"; - private static final Pattern RE_TEST_OUTPUT = Pattern.compile("\\[ *([^ ]*) *\\] ?([^ ]+) .*"); + private static final Pattern RE_TEST_OUTPUT = + Pattern.compile("\\[ *([^ ]*) *\\] ?([^ ]+)( .*)?$"); private ResultsBundleGenerator mBundleGenerator = new RobotiumBundleGenerator(); private String mCommandLineFile; private String mCommandLineFlags; + private Handler mHandler = new Handler(); private String mNativeTestActivity; private Bundle mLogBundle = new Bundle(); + private TestStatusReceiver mReceiver; + private Map mResults = + new HashMap(); + private Queue> mShards = new ArrayDeque>(); + private long mShardNanoTimeout = DEFAULT_SHARD_NANO_TIMEOUT; + private int mShardSizeLimit = DEFAULT_SHARD_SIZE_LIMIT; private File mStdoutFile; + private SparseArray mMonitors = new SparseArray(); @Override public void onCreate(Bundle arguments) { @@ -57,6 +84,39 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation { mNativeTestActivity = arguments.getString(EXTRA_NATIVE_TEST_ACTIVITY); if (mNativeTestActivity == null) mNativeTestActivity = DEFAULT_NATIVE_TEST_ACTIVITY; + String shardNanoTimeout = arguments.getString(EXTRA_SHARD_NANO_TIMEOUT); + if (shardNanoTimeout != null) mShardNanoTimeout = Long.parseLong(shardNanoTimeout); + + String shardSizeLimit = arguments.getString(EXTRA_SHARD_SIZE_LIMIT); + if (shardSizeLimit != null) mShardSizeLimit = Integer.parseInt(shardSizeLimit); + + String testListFilePath = arguments.getString(EXTRA_TEST_LIST_FILE); + if (testListFilePath != null) { + File testListFile = new File(testListFilePath); + try { + BufferedReader testListFileReader = + new BufferedReader(new FileReader(testListFile)); + + String test; + ArrayList workingShard = new ArrayList(); + while ((test = testListFileReader.readLine()) != null) { + workingShard.add(test); + if (workingShard.size() == mShardSizeLimit) { + mShards.add(workingShard); + workingShard = new ArrayList(); + } + } + + if (!workingShard.isEmpty()) { + mShards.add(workingShard); + } + + testListFileReader.close(); + } catch (IOException e) { + Log.e(TAG, "Error reading %s", testListFile.getAbsolutePath(), e); + } + } + try { mStdoutFile = File.createTempFile( ".temp_stdout_", ".txt", Environment.getExternalStorageDirectory()); @@ -66,62 +126,153 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation { finish(Activity.RESULT_CANCELED, new Bundle()); return; } + start(); } @Override public void onStart() { super.onStart(); - Bundle results = runTests(); - finish(Activity.RESULT_OK, results); + + mReceiver = new TestStatusReceiver(); + mReceiver.register(getContext()); + mReceiver.registerCallback(new TestStatusReceiver.TestRunCallback() { + @Override + public void testRunStarted(int pid) { + if (pid != Process.myPid()) { + ShardMonitor m = new ShardMonitor( + pid, System.nanoTime() + mShardNanoTimeout); + mMonitors.put(pid, m); + mHandler.post(m); + } + } + + @Override + public void testRunFinished(int pid) { + ShardMonitor m = mMonitors.get(pid); + if (m != null) { + m.stopped(); + mMonitors.remove(pid); + } + mHandler.post(new ShardEnder(pid)); + } + }); + + mHandler.post(new ShardStarter()); } - /** Runs the tests in the NativeTestActivity and returns a Bundle containing the results. - */ - private Bundle runTests() { - Log.i(TAG, "Creating activity."); - Activity activityUnderTest = startNativeTestActivity(); + /** Monitors a test shard's execution. */ + private class ShardMonitor implements Runnable { + private static final int MONITOR_FREQUENCY_MS = 1000; - Log.i(TAG, "Waiting for tests to finish."); - try { - while (!activityUnderTest.isFinishing()) { - Thread.sleep(100); - } - } catch (InterruptedException e) { - Log.e(TAG, "Interrupted while waiting for activity to be destroyed: ", e); + private long mExpirationNanoTime; + private int mPid; + private AtomicBoolean mStopped; + + public ShardMonitor(int pid, long expirationNanoTime) { + mPid = pid; + mExpirationNanoTime = expirationNanoTime; + mStopped = new AtomicBoolean(false); } - Log.i(TAG, "Getting results."); - Map results = parseResults(activityUnderTest); + public void stopped() { + mStopped.set(true); + } - Log.i(TAG, "Parsing results and generating output."); - return mBundleGenerator.generate(results); + @Override + public void run() { + if (mStopped.get()) { + return; + } + + if (isAppProcessAlive(getContext(), mPid)) { + if (System.nanoTime() > mExpirationNanoTime) { + Log.e(TAG, "Test process %d timed out.", mPid); + mHandler.post(new ShardEnder(mPid)); + return; + } else { + mHandler.postDelayed(this, MONITOR_FREQUENCY_MS); + return; + } + } + + Log.e(TAG, "Test process %d died unexpectedly.", mPid); + mHandler.post(new ShardEnder(mPid)); + } + + } + + private static boolean isAppProcessAlive(Context context, int pid) { + ActivityManager activityManager = + (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); + for (ActivityManager.RunningAppProcessInfo processInfo : + activityManager.getRunningAppProcesses()) { + if (processInfo.pid == pid) return true; + } + return false; } /** Starts the NativeTestActivty. */ - private Activity startNativeTestActivity() { - Intent i = new Intent(Intent.ACTION_MAIN); - i.setComponent(new ComponentName(getContext().getPackageName(), mNativeTestActivity)); - i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - if (mCommandLineFile != null) { - Log.i(TAG, "Passing command line file extra: %s", mCommandLineFile); - i.putExtra(NativeTestActivity.EXTRA_COMMAND_LINE_FILE, mCommandLineFile); + private class ShardStarter implements Runnable { + @Override + public void run() { + Intent i = new Intent(Intent.ACTION_MAIN); + i.setComponent(new ComponentName(getContext().getPackageName(), mNativeTestActivity)); + i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + if (mCommandLineFile != null) { + Log.i(TAG, "Passing command line file extra: %s", mCommandLineFile); + i.putExtra(NativeTestActivity.EXTRA_COMMAND_LINE_FILE, mCommandLineFile); + } + if (mCommandLineFlags != null) { + Log.i(TAG, "Passing command line flag extra: %s", mCommandLineFlags); + i.putExtra(NativeTestActivity.EXTRA_COMMAND_LINE_FLAGS, mCommandLineFlags); + } + if (mShards != null && !mShards.isEmpty()) { + ArrayList shard = mShards.remove(); + i.putStringArrayListExtra(NativeTestActivity.EXTRA_SHARD, shard); + } + i.putExtra(NativeTestActivity.EXTRA_STDOUT_FILE, mStdoutFile.getAbsolutePath()); + getContext().startActivity(i); } - if (mCommandLineFlags != null) { - Log.i(TAG, "Passing command line flag extra: %s", mCommandLineFlags); - i.putExtra(NativeTestActivity.EXTRA_COMMAND_LINE_FLAGS, mCommandLineFlags); + } + + private class ShardEnder implements Runnable { + private static final int WAIT_FOR_DEATH_MILLIS = 10; + + private int mPid; + + public ShardEnder(int pid) { + mPid = pid; + } + + @Override + public void run() { + if (mPid != Process.myPid()) { + Process.killProcess(mPid); + try { + while (isAppProcessAlive(getContext(), mPid)) { + Thread.sleep(WAIT_FOR_DEATH_MILLIS); + } + } catch (InterruptedException e) { + Log.e(TAG, "%d may still be alive.", mPid, e); + } + } + mResults.putAll(parseResults()); + + if (mShards != null && !mShards.isEmpty()) { + mHandler.post(new ShardStarter()); + } else { + finish(Activity.RESULT_OK, mBundleGenerator.generate(mResults)); + } } - i.putExtra(NativeTestActivity.EXTRA_STDOUT_FILE, mStdoutFile.getAbsolutePath()); - return startActivitySync(i); } /** * Generates a map between test names and test results from the instrumented Activity's * output. */ - private Map parseResults( - Activity activityUnderTest) { + private Map parseResults() { Map results = new HashMap(); @@ -153,7 +304,7 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation { Log.i(TAG, l); } } catch (FileNotFoundException e) { - Log.e(TAG, "Couldn't find stdout file file: ", e); + Log.e(TAG, "Couldn't find stdout file: ", e); } catch (IOException e) { Log.e(TAG, "Error handling stdout file: ", e); } finally { diff --git a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java index 2a2a8dd65b..3d5e572d2c 100644 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java +++ b/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java @@ -9,7 +9,6 @@ import android.os.Bundle; import org.chromium.base.Log; import org.chromium.base.PathUtils; import org.chromium.base.PowerMonitor; -import org.chromium.base.ResourceExtractor; import org.chromium.base.library_loader.NativeLibraries; /** @@ -27,11 +26,6 @@ public class NativeUnitTestActivity extends NativeTestActivity { // Needed by path_utils_unittest.cc PathUtils.setPrivateDataDirectorySuffix("chrome", getApplicationContext()); - ResourceExtractor resourceExtractor = ResourceExtractor.get(getApplicationContext()); - resourceExtractor.setExtractAllPaksAndV8SnapshotForTesting(); - resourceExtractor.startExtractingResources(); - resourceExtractor.waitForCompletion(); - // Needed by system_monitor_unittest.cc PowerMonitor.createForTests(this); diff --git a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReceiver.java b/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReceiver.java index e4af9b652e..1f410a9fa8 100644 --- a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReceiver.java +++ b/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReceiver.java @@ -8,7 +8,8 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.util.Log; + +import org.chromium.base.Log; import java.util.ArrayList; import java.util.List; @@ -18,12 +19,13 @@ import java.util.List; */ public class TestStatusReceiver extends BroadcastReceiver { - private static final String TAG = "ResultReceiver"; + private static final String TAG = "cr.test.reporter"; private final List mFailCallbacks = new ArrayList(); private final List mHeartbeatCallbacks = new ArrayList(); private final List mPassCallbacks = new ArrayList(); private final List mStartCallbacks = new ArrayList(); + private final List mTestRunCallbacks = new ArrayList(); /** An IntentFilter that matches the intents that this class can receive. */ private static final IntentFilter INTENT_FILTER; @@ -33,6 +35,8 @@ public class TestStatusReceiver extends BroadcastReceiver { filter.addAction(TestStatusReporter.ACTION_TEST_FAILED); filter.addAction(TestStatusReporter.ACTION_TEST_PASSED); filter.addAction(TestStatusReporter.ACTION_TEST_STARTED); + filter.addAction(TestStatusReporter.ACTION_TEST_RUN_STARTED); + filter.addAction(TestStatusReporter.ACTION_TEST_RUN_FINISHED); try { filter.addDataType(TestStatusReporter.DATA_TYPE_HEARTBEAT); filter.addDataType(TestStatusReporter.DATA_TYPE_RESULT); @@ -62,6 +66,12 @@ public class TestStatusReceiver extends BroadcastReceiver { void testStarted(String testClass, String testMethod); } + /** A callback used when a test run has started or finished. */ + public interface TestRunCallback { + void testRunStarted(int pid); + void testRunFinished(int pid); + } + /** Register a callback for when a test has failed. */ public void registerCallback(FailCallback c) { mFailCallbacks.add(c); @@ -82,6 +92,11 @@ public class TestStatusReceiver extends BroadcastReceiver { mStartCallbacks.add(c); } + /** Register a callback for when a test run has started or finished. */ + public void registerCallback(TestRunCallback c) { + mTestRunCallbacks.add(c); + } + /** Register this receiver using the provided context. */ public void register(Context c) { c.registerReceiver(this, INTENT_FILTER); @@ -94,6 +109,7 @@ public class TestStatusReceiver extends BroadcastReceiver { */ @Override public void onReceive(Context context, Intent intent) { + int pid = intent.getIntExtra(TestStatusReporter.EXTRA_PID, 0); String testClass = intent.getStringExtra(TestStatusReporter.EXTRA_TEST_CLASS); String testMethod = intent.getStringExtra(TestStatusReporter.EXTRA_TEST_METHOD); @@ -118,8 +134,18 @@ public class TestStatusReceiver extends BroadcastReceiver { c.heartbeat(); } break; + case TestStatusReporter.ACTION_TEST_RUN_STARTED: + for (TestRunCallback c: mTestRunCallbacks) { + c.testRunStarted(pid); + } + break; + case TestStatusReporter.ACTION_TEST_RUN_FINISHED: + for (TestRunCallback c: mTestRunCallbacks) { + c.testRunFinished(pid); + } + break; default: - Log.e(TAG, "Unrecognized intent received: " + intent.toString()); + Log.e(TAG, "Unrecognized intent received: %s", intent.toString()); break; } } diff --git a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java b/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java index 6ac7312fad..85355f9033 100644 --- a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java +++ b/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java @@ -24,8 +24,14 @@ public class TestStatusReporter { "org.chromium.test.reporter.TestStatusReporter.TEST_PASSED"; public static final String ACTION_TEST_FAILED = "org.chromium.test.reporter.TestStatusReporter.TEST_FAILED"; + public static final String ACTION_TEST_RUN_STARTED = + "org.chromium.test.reporter.TestStatusReporter.TEST_RUN_STARTED"; + public static final String ACTION_TEST_RUN_FINISHED = + "org.chromium.test.reporter.TestStatusReporter.TEST_RUN_FINISHED"; public static final String DATA_TYPE_HEARTBEAT = "org.chromium.test.reporter/heartbeat"; public static final String DATA_TYPE_RESULT = "org.chromium.test.reporter/result"; + public static final String EXTRA_PID = + "org.chromium.test.reporter.TestStatusReporter.PID"; public static final String EXTRA_TEST_CLASS = "org.chromium.test.reporter.TestStatusReporter.TEST_CLASS"; public static final String EXTRA_TEST_METHOD = @@ -57,22 +63,18 @@ public class TestStatusReporter { } public void testStarted(String testClass, String testMethod) { - sendBroadcast(testClass, testMethod, ACTION_TEST_STARTED); + sendTestBroadcast(ACTION_TEST_STARTED, testClass, testMethod); } public void testPassed(String testClass, String testMethod) { - sendBroadcast(testClass, testMethod, ACTION_TEST_PASSED); + sendTestBroadcast(ACTION_TEST_PASSED, testClass, testMethod); } public void testFailed(String testClass, String testMethod) { - sendBroadcast(testClass, testMethod, ACTION_TEST_FAILED); + sendTestBroadcast(ACTION_TEST_FAILED, testClass, testMethod); } - public void stopHeartbeat() { - mKeepBeating.set(false); - } - - private void sendBroadcast(String testClass, String testMethod, String action) { + private void sendTestBroadcast(String action, String testClass, String testMethod) { Intent i = new Intent(action); i.setType(DATA_TYPE_RESULT); i.putExtra(EXTRA_TEST_CLASS, testClass); @@ -80,4 +82,23 @@ public class TestStatusReporter { mContext.sendBroadcast(i); } + public void testRunStarted(int pid) { + sendTestRunBroadcast(ACTION_TEST_RUN_STARTED, pid); + } + + public void testRunFinished(int pid) { + sendTestRunBroadcast(ACTION_TEST_RUN_FINISHED, pid); + } + + private void sendTestRunBroadcast(String action, int pid) { + Intent i = new Intent(action); + i.setType(DATA_TYPE_RESULT); + i.putExtra(EXTRA_PID, pid); + mContext.sendBroadcast(i); + } + + public void stopHeartbeat() { + mKeepBeating.set(false); + } + } diff --git a/engine/src/flutter/testing/buildbot/chromium.chromiumos.json b/engine/src/flutter/testing/buildbot/chromium.chromiumos.json index daa9b22642..0cadd6a89e 100644 --- a/engine/src/flutter/testing/buildbot/chromium.chromiumos.json +++ b/engine/src/flutter/testing/buildbot/chromium.chromiumos.json @@ -52,6 +52,9 @@ ], "gtest_tests": [ { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" } ] @@ -106,6 +109,9 @@ ], "gtest_tests": [ { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" } ] @@ -125,27 +131,48 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromeos_unittests" }, { "test": "chromevox_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { @@ -156,6 +183,9 @@ "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { @@ -168,12 +198,21 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -183,18 +222,30 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -205,24 +256,42 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -238,33 +307,57 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { "args": [ "--test-launcher-print-test-stdio=always" ], + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { "test": "ui_chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -274,12 +367,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] @@ -299,6 +398,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -308,6 +410,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -324,18 +429,30 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromeos_unittests" }, { "test": "chromevox_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -360,12 +477,21 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -375,18 +501,30 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -396,24 +534,42 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -426,33 +582,57 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { "args": [ "--test-launcher-print-test-stdio=always" ], + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { "test": "ui_chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -462,12 +642,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] @@ -487,6 +673,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -496,6 +685,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -512,15 +704,27 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -546,12 +750,21 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -561,18 +774,30 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -583,24 +808,42 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -613,33 +856,57 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { "args": [ "--test-launcher-print-test-stdio=always" ], + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { "test": "ui_chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -649,12 +916,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] diff --git a/engine/src/flutter/testing/buildbot/chromium.fyi.json b/engine/src/flutter/testing/buildbot/chromium.fyi.json index f3ce76092d..4ff6efb260 100644 --- a/engine/src/flutter/testing/buildbot/chromium.fyi.json +++ b/engine/src/flutter/testing/buildbot/chromium.fyi.json @@ -4,16 +4,49 @@ { "args": [ "--enable-browser-side-navigation", - "--gtest_filter=-CrossSiteRedirectorBrowserTest.VerifyCrossSiteRedirectURL:CrossSiteTransferTest.NoLeakOnCrossSiteCancel:CrossSiteTransferTest.ReplaceEntryCrossProcessThenTransfer:CrossSiteTransferTest.ReplaceEntryCrossProcessTwice:CrossSiteTransferTest.ReplaceEntryInProcessThenTranfers:DevToolsProtocolTest.NavigationPreservesMessages:NavigationControllerBrowserTest.CorrectLengthWithCurrentItemReplacement:NavigationControllerBrowserTest.FrameNavigationEntry_BlankAutoSubframe:NavigationControllerBrowserTest.NavigationTypeClassification_ClientSideRedirect:NavigationControllerBrowserTest.NavigationTypeClassification_ExistingPage:NavigationControllerBrowserTest.NavigationTypeClassification_InPage:NavigationControllerBrowserTest.NavigationTypeClassification_NewAndAutoSubframe:NavigationControllerBrowserTest.NavigationTypeClassification_NewPage:NavigationControllerBrowserTest.PreventSpoofFromSubframeAndReplace:NavigationControllerBrowserTest.StopCausesFailureDespiteJavaScriptURL:RenderViewImplTest.DecideNavigationPolicy:RenderViewImplTest.NavigationStartOverride:RenderViewImplTest.OnNavigationHttpPost:RenderViewImplTest.ReloadWhileSwappedOut:RenderViewImplTest.TestBackForward:SecurityExploitBrowserTest.AttemptDuplicateRenderViewHost:SecurityExploitBrowserTest.AttemptDuplicateRenderWidgetHost:SecurityExploitBrowserTest.InterstitialCommandFromUnderlyingContent:ServiceWorkerBrowserTest.CrossSiteTransfer:ServiceWorkerBrowserTest.ImportsBustMemcache:ServiceWorkerBrowserTest.Reload:ServiceWorkerBrowserTest.ResponseFromHTTPServiceWorkerIsNotMarkedAsSecure:ServiceWorkerBrowserTest.ResponseFromHTTPSServiceWorkerIsMarkedAsSecure:SessionHistoryTest.CrossFrameFormBackForward:SessionHistoryTest.FrameBackForward:SessionHistoryTest.FrameFormBackForward:SessionHistoryTest.LocationChangeInSubframe:SitePerProcessBrowserTest.CrossSiteDidStopLoading:WebContentsImplBrowserTest.ClearNonVisiblePendingOnFail:WebContentsViewAuraTest.ReplaceStateReloadPushState:WebRtcBrowserTest.CallInsideIframe:WebUIMojoTest.EndToEndPing" + "--gtest_filter=-ActivityLogApiTest.TriggerEvent:ActivityLogPrerenderTest.TestScriptInjected:AdbClientSocketTest.TestAdbClientSocket:AllUrlsApiTest.WhitelistedExtension:AppBannerDataFetcherBrowserTest.CancelBanner:AppBannerDataFetcherBrowserTest.NoManifest:AppBannerDataFetcherBrowserTest.PromptBanner:AppBannerDataFetcherBrowserTest.PromptBannerInHandler:AppBannerDataFetcherBrowserTest.WebAppBannerCreated:AppBannerDataFetcherBrowserTest.WebAppBannerInIFrame:AppBannerDataFetcherBrowserTest.WebAppBannerNoTypeInManifest:AppBannerDataFetcherBrowserTest.WebAppBannerNoTypeInManifestCapsExtension:AppEventPageTest.OnSuspendNoApiUse:AppEventPageTest.OnSuspendUseStorageApi:AppListSpeechRecognizerBrowserTest.RecognizeSpeech:AppViewTest.KillGuestCommunicatingWithWrongAppView:AppViewTest.TestAppViewEmbedSelfShouldFail:AppViewTest.TestAppViewGoodDataShouldSucceed:AppViewTest.TestAppViewMultipleConnects:AppViewTest.TestAppViewRefusedDataShouldFail:AppViewTest.TestAppViewWithUndefinedDataShouldSucceed:AppWindowAPITest.TestCloseEvent:AppWindowAPITest.TestCreate:AppWindowAPITest.TestFrameColors:AppWindowAPITest.TestSingleton:AppWindowAPITest.TestVisibleOnAllWorkspaces:AppWindowBrowserTest.FrameInsetsForColoredFrame:AppWindowBrowserTest.FrameInsetsForNoFrame:AutofillTest.AggregatesMinValidProfile:AutofillTest.AggregatesMinValidProfileDifferentJS:AutofillTest.AppendCountryCodeForAggregatedPhones:AutofillTest.CCInfoNotStoredWhenAutocompleteOff:AutofillTest.InvalidCreditCardNumberIsNotAggregated:AutofillTest.ProfileSavedWithValidCountryPhone:AutofillTest.ProfilesNotAggregatedWithInvalidEmail:AutofillTest.ProfilesNotAggregatedWithNoAddress:AutofillTest.ProfilesNotAggregatedWithSubmitHandler:AutofillTest.ProfileWithEmailInOtherFieldNotSaved:AutofillTest.UsePlusSignForInternationalNumber:AutofillTest.WhitespacesAndSeparatorCharsStrippedForValidCCNums:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithDangerousUrlDownload/0:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithDangerousUrlDownload/1:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithDownloads/0:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithDownloads/1:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithDownloadsFromDifferentProfiles/0:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithDownloadsFromDifferentProfiles/1:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithOffTheRecordDownloads/0:BrowserCloseManagerWithDownloadsBrowserTest/BrowserCloseManagerWithDownloadsBrowserTest.TestWithOffTheRecordDownloads/1:BrowserNavigatorTest.NavigateFromNTPToOptionsInSameTab:BrowserTest.BeforeUnloadVsBeforeReload:BrowserTest.CanDuplicateTab:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.InterstitialCancelsGuestViewDialogs:BrowserTest.InterstitialClosesDialogs:BrowserTest.InterstitialCloseTab:BrowserTest.InterstitialCommandDisable:BrowserTest.NoStopDuringTransferUntilCommit:BrowserTest.SecurityStyleChangedObserver:BrowserTest.ShouldShowLocationBar:BrowserViewTest.DevToolsUpdatesBrowserWindow:BrowsingDataRemoverBrowserTest.Download:BrowsingDataRemoverBrowserTest.DownloadProhibited:CaptivePortalBlockingPageIDNTest.ShowLoginIDNIfPortalRedirectsDetectionURL:CaptivePortalBlockingPageTest.CertReportingOptIn:CaptivePortalBlockingPageTest.CertReportingOptOut:CaptivePortalBlockingPageTest.WiFi_NoSSID_LoginURL:CaptivePortalBlockingPageTest.WiFi_NoSSID_NoLoginURL:CaptivePortalBlockingPageTest.WiFi_SSID_LoginURL:CaptivePortalBlockingPageTest.WiFi_SSID_NoLoginURL:CaptivePortalBlockingPageTest.WiredNetwork_LoginURL:CaptivePortalBlockingPageTest.WiredNetwork_LoginURL_With_SSID:CaptivePortalBlockingPageTest.WiredNetwork_NoLoginURL:CaptivePortalBlockingPageTest.WiredNetwork_NoLoginURL_With_SSID:CaptivePortalBrowserTest.AbortLoad:CaptivePortalBrowserTest.CloseLoginTab:CaptivePortalBrowserTest.Disabled:CaptivePortalBrowserTest.GoBack:CaptivePortalBrowserTest.GoBackToTimeout:CaptivePortalBrowserTest.HstsLogin:CaptivePortalBrowserTest.HttpsToHttpRedirect:CaptivePortalBrowserTest.HttpTimeout:CaptivePortalBrowserTest.HttpToHttpsRedirectLogin:CaptivePortalBrowserTest.InternetConnected:CaptivePortalBrowserTest.InterstitialTimerCertErrorAfterSlowLoad:CaptivePortalBrowserTest.InterstitialTimerNavigateAwayWhileLoading:CaptivePortalBrowserTest.InterstitialTimerNavigateWhileLoading_EndWithCaptivePortalInterstitial:CaptivePortalBrowserTest.InterstitialTimerNavigateWhileLoading_EndWithSSLInterstitial:CaptivePortalBrowserTest.InterstitialTimerReloadWhileLoading:CaptivePortalBrowserTest.InterstitialTimerStopNavigationWhileLoading:CaptivePortalBrowserTest.Login:CaptivePortalBrowserTest.LoginExtraNavigations:CaptivePortalBrowserTest.LoginFastTimeout:CaptivePortalBrowserTest.LoginIncognito:CaptivePortalBrowserTest.LoginSlow:CaptivePortalBrowserTest.NavigateBrokenTab:CaptivePortalBrowserTest.NavigateLoadingTabToTimeoutSingleSite:CaptivePortalBrowserTest.NavigateLoadingTabToTimeoutThreeSites:CaptivePortalBrowserTest.NavigateLoadingTabToTimeoutTwoSites:CaptivePortalBrowserTest.RedirectSSLCertError:CaptivePortalBrowserTest.ReloadTimeout:CaptivePortalBrowserTest.RequestFails:CaptivePortalBrowserTest.ShowCaptivePortalInterstitialOnCertError:CaptivePortalBrowserTest.SSLCertErrorLogin:CaptivePortalBrowserTest.Status511:CaptivePortalBrowserTest.TwoBrokenTabs:ChromeMainTest.SecondLaunchFromIncognitoWithNormalUrl:ChromeRenderProcessHostTest.DevToolsOnSelfInOwnProcess:ChromeRenderProcessHostTest.DevToolsOnSelfInOwnProcessPPT:ChromeRenderViewTest.BackToTranslatablePage:ChromeResourceDispatcherHostDelegateBrowserTest.PolicyHeaderForRedirect:ChromeURLDataManagerTest.200:ClearBrowserDataBrowserTest.CommitButtonDisabledWhenNoDataTypesSelected:ClearBrowserDataBrowserTest.CommitButtonDisabledWhileDeletionInProgress:ContentSettingBubbleModelMixedScriptTest.Iframe:ContentSettingsExceptionsAreaBrowserTest.OpenIncognitoWindow:ContentSettingsTest.RedirectCrossOrigin:ContentSettingsTest.RedirectLoopCookies:ContinueWhereILeftOffTest.Post:ContinueWhereILeftOffTest.PostBrowserClose:ContinueWhereILeftOffTest.PostCloseAllBrowsers:CrashRecoveryBrowserTest.DoubleReloadWithError:CrashRecoveryBrowserTest.LoadInNewTab:DevToolsBeforeUnloadTest.TestDockedDevToolsClose:DevToolsBeforeUnloadTest.TestDockedDevToolsInspectedBrowserClose:DevToolsBeforeUnloadTest.TestDockedDevToolsInspectedTabClose:DevToolsBeforeUnloadTest.TestUndockedDevToolsApplicationClose:DevToolsBeforeUnloadTest.TestUndockedDevToolsClose:DevToolsBeforeUnloadTest.TestUndockedDevToolsInspectedBrowserClose:DevToolsBeforeUnloadTest.TestUndockedDevToolsInspectedTabClose:DevToolsBeforeUnloadTest.TestWorkerWindowClosing:DevToolsExperimentalExtensionTest.TestDevToolsExperimentalExtensionAPI:DevToolsExtensionTest.TestContentScriptIsPresent:DevToolsExtensionTest.TestDevToolsExtensionAPI:DevToolsExtensionTest.TestDevToolsExtensionMessaging:DevToolsPixelOutputTests.TestScreenshotRecording:DevToolsSanityTest.TestConsoleOnNavigateBack:DevToolsSanityTest.TestDevToolsExternalNavigation:DevToolsSanityTest.TestNetworkRawHeadersText:DevToolsSanityTest.TestNetworkSize:DevToolsSanityTest.TestNetworkSyncSize:DevToolsSanityTest.TestNetworkTiming:DevToolsSanityTest.TestNoScriptDuplicatesOnPanelSwitch:DevToolsSanityTest.TestPageWithNoJavaScript:DevToolsSanityTest.TestPauseWhenLoadingDevTools:DevToolsSanityTest.TestPauseWhenScriptIsRunning:DevToolsSanityTest.TestScriptsTabIsPopulatedOnInspectedPageRefresh:DevToolsSanityTest.TestSettings:DevToolsSanityTest.TestShowScriptsTab:DevToolsSanityTest.TestToolboxLoadedUndocked:DevToolsSanityTest.TestToolboxNotLoadedDocked:DevToolsTagTest.DevToolsTaskIsProvided:DevToolsTagTest.TagsManagerRecordsATag:DnsProbeBrowserTest.CorrectionsLoadStopped:DnsProbeBrowserTest.CorrectionsLoadStoppedSlowProbe:DnsProbeBrowserTest.NoInternetProbeResultWithBrokenCorrections:DnsProbeBrowserTest.NoInternetProbeResultWithSlowBrokenCorrections:DnsProbeBrowserTest.NxdomainProbeResultWithWorkingCorrections:DnsProbeBrowserTest.NxdomainProbeResultWithWorkingSlowCorrections:DnsProbeBrowserTest.OtherErrorWithCorrectionsFailure:DnsProbeBrowserTest.OtherErrorWithCorrectionsSuccess:DnsProbeBrowserTest.SyncFailureWithBrokenCorrections:DomDistillerTabUtilsBrowserTest.TestDistillIntoWebContents:DomDistillerTabUtilsBrowserTest.TestSwapWebContents:DomDistillerViewerSourceBrowserTest.EarlyTemplateLoad:DomDistillerViewerSourceBrowserTest.EmptyURLShouldNotCrash:DomDistillerViewerSourceBrowserTest.InvalidURLShouldNotCrash:DomDistillerViewerSourceBrowserTest.MultiPageArticle:DomDistillerViewerSourceBrowserTest.NoWebUIBindingsArticleExists:DomDistillerViewerSourceBrowserTest.NoWebUIBindingsArticleNotFound:DomDistillerViewerSourceBrowserTest.NoWebUIBindingsDisplayCSS:DomDistillerViewerSourceBrowserTest.NoWebUIBindingsViewUrl:DomDistillerViewerSourceBrowserTest.PrefChange:DomDistillerViewerSourceBrowserTest.TestBadUrlErrorPage:DownloadExtensionTest.DownloadExtensionTest_FileIcon_Active:DownloadExtensionTest.DownloadExtensionTest_OnDeterminingFilename_InterruptedResume:DownloadExtensionTest.DownloadExtensionTest_Open:DownloadExtensionTest.DownloadExtensionTest_PauseResumeCancelErase:DownloadExtensionTest.DownloadExtensionTest_SearchEmptyQuery:DownloadExtensionTest.DownloadExtensionTest_SearchId:DownloadExtensionTest.DownloadExtensionTest_SearchIdAndFilename:DownloadExtensionTest.DownloadExtensionTest_SearchLimit:DownloadExtensionTest.DownloadExtensionTest_SearchPauseResumeCancelGetFileIconIncognito:DownloadExtensionTest.DownloadExtensionTest_SearchState:DownloadTest.AutoOpen:DownloadTest.BrowserCloseAfterDownload:DownloadTest.ChromeURLAfterDownload:DownloadTest.CloseNewTab1:DownloadTest.CloseNewTab2:DownloadTest.CloseNewTab3:DownloadTest.CloseShelfOnDownloadsTab:DownloadTest.ContentDisposition:DownloadTest.CrxDenyInstall:DownloadTest.CrxInstallAcceptPermissions:DownloadTest.CrxInstallDenysPermissions:DownloadTest.CrxInvalid:DownloadTest.CrxLargeTheme:DownloadTest.DontCloseNewTab2:DownloadTest.DontCloseNewTab3:DownloadTest.DownloadErrorReadonlyFolder:DownloadTest.DownloadErrorsFile:DownloadTest.DownloadErrorsServer:DownloadTest.DownloadHistoryCheck:DownloadTest.DownloadHistoryDangerCheck:DownloadTest.DownloadMimeType:DownloadTest.DownloadMimeTypeSelect:DownloadTest.DownloadResourceThrottleCancels:DownloadTest.DownloadTest_CrazyFilenames:DownloadTest.DownloadTest_DenyDanger:DownloadTest.DownloadTest_GZipWithNoContent:DownloadTest.DownloadTest_History:DownloadTest.DownloadTest_IncognitoRegular:DownloadTest.DownloadTest_PauseResumeCancel:DownloadTest.DownloadTest_PercentComplete:DownloadTest.DownloadTest_Remove:DownloadTest.DownloadTest_Renaming:DownloadTest.FeedbackService:DownloadTest.IncognitoDownload:DownloadTest.KnownSize:DownloadTest.LoadURLExternallyReferrerPolicy:DownloadTest.NewWindow:DownloadTest.PerWindowShelf:DownloadTest.DownloadTest_History:DownloadTest.Resumption_Automatic:DownloadTest.Resumption_MultipleAttempts:DownloadTest.Resumption_NoPrompt:DownloadTest.Resumption_WithPrompt:DownloadTest.Resumption_WithPromptAlways:DownloadTest.SavePageNonHTMLViaPost:DownloadTest.TestMultipleDownloadsBubble:DownloadTest.TestMultipleDownloadsInfobar:DownloadTest.UnknownSize:EphemeralAppBrowserTest.DisableRetainFileSystemEntries:EphemeralAppBrowserTest.EventDispatchWhenLaunched:EphemeralAppBrowserTest.IncludeRunningEphemeralAppsInNotifiers:EphemeralAppBrowserTest.InstallEventReceivedWhileIdle:EphemeralAppBrowserTest.InstallEventReceivedWhileRunning:EphemeralAppBrowserTest.PromoteAppAndGrantPermissions:EphemeralAppBrowserTest.PromoteAppFromSyncWhileIdle:EphemeralAppBrowserTest.PromoteAppFromSyncWhileRunning:EphemeralAppBrowserTest.PromoteAppWhileIdle:EphemeralAppBrowserTest.PromoteAppWhileRunning:EphemeralAppBrowserTest.PromoteBlacklistedEphemeralApp:EphemeralAppBrowserTest.PromoteDisabledAppFromSyncWhileIdle:EphemeralAppBrowserTest.PromoteDisabledAppFromSyncWhileRunning:EphemeralAppBrowserTest.PromoteUnsupportedEphemeralApp:EphemeralAppBrowserTest.ReleasePowerKeepAwake:EphemeralAppBrowserTest.ReplaceEphemeralAppWithDelayedInstalledApp:EphemeralAppBrowserTest.ReplaceEphemeralAppWithInstalledApp:EphemeralAppBrowserTest.RestartEventReceived:EphemeralAppBrowserTest.StickyNotificationSettings:EphemeralAppBrowserTest.UpdateEphemeralApp:EphemeralAppLauncherTest.LaunchAppWithNoPermissionWarnings:EphemeralAppServiceBrowserTest.ClearCachedApps:EphemeralAppServiceBrowserTest.DisableEphemeralAppsOnStartup:ErrorPageAutoReloadTest.AutoReload:ErrorPageAutoReloadTest.ManualReloadNotSuppressed:ErrorPageTest.DNSError_DoClickLink:ErrorPageTest.DNSError_DoReload:ErrorPageTest.DNSError_DoSearch:ErrorPageTest.StaleCacheStatus:ExperimentalPlatformAppBrowserTest.WindowsApiSetIcon:ExtensionApiNewTabTest.Tabs:ExtensionApiTest.CookiesEventsSpanning:ExtensionApiTest.Events:ExtensionApiTest.Incognito:ExtensionApiTest.JavaScriptURLPermissions:ExtensionApiTest.TabMove:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.XHROnPersistentFileSystem:ExtensionBrowserTest.WindowOpenExtension:ExtensionOverrideTest.OverrideNewTabIncognito:ExtensionPreferenceApiTest.OnChangeSplit:ExtensionResourceRequestPolicyTest.LinkToWebAccessibleResources:ExtensionResourceRequestPolicyTest.WebAccessibleResources:ExtensionStorageMonitorTest.DisableForInstalledExtensions:ExtensionStorageMonitorTest.DoubleInitialThreshold:ExtensionStorageMonitorTest.EphemeralAppLowUsage:ExtensionStorageMonitorTest.EphemeralAppWithHighUsage:ExtensionStorageMonitorTest.ExceedInitialThreshold:ExtensionStorageMonitorTest.ThrottleNotifications:ExtensionStorageMonitorTest.UnderThreshold:ExtensionStorageMonitorTest.UninstallExtension:ExtensionStorageMonitorTest.UserDisabledNotifications:ExtensionTabsTest.DefaultToIncognitoWhenItIsForcedAndNoArgs:ExtensionTabsTest.GetAllWindows:ExtensionTabsTest.QueryAllTabsWithDevTools:ExtensionURLRewriteBrowserTest.NewTabPageURL:ExtensionViewTest.LoadAPICall:ExtensionViewTest.QueuedLoadAPICall:ExtensionViewTest.ShimExtensionAttribute:ExtensionViewTest.ShimSrcAttribute:ExtensionViewTest.TestExtensionViewCreationShouldSucceed:ExtensionWebRequestApiTest.PostData1:ExtensionWebRequestApiTest.PostData2:ExtensionWebRequestApiTest.WebRequestBlocking:ExtensionWebRequestApiTest.WebRequestComplex:ExtensionWebRequestApiTest.WebRequestDeclarative1:ExtensionWebRequestApiTest.WebRequestDeclarative2:ExtensionWebRequestApiTest.WebRequestNewTab:ExtensionWebRequestApiTest.WebRequestSimple:FileSystemApiTest.FileSystemApiGetDisplayPath:FileSystemApiTest.FileSystemApiGetDisplayPathPrettify:FileSystemApiTest.FileSystemApiGetWritableRootEntryTest:FileSystemApiTest.FileSystemApiGetWritableTest:FileSystemApiTest.FileSystemApiGetWritableWithWriteTest:FileSystemApiTest.FileSystemApiInvalidChooseEntryTypeTest:FileSystemApiTest.FileSystemApiIsWritableTest:FileSystemApiTest.FileSystemApiIsWritableWithWritePermissionTest:FileSystemApiTest.FileSystemApiOpenCancelTest:FileSystemApiTest.FileSystemApiOpenDirectoryContainingGraylistTest:FileSystemApiTest.FileSystemApiOpenDirectoryOnGraylistAndAllowTest:FileSystemApiTest.FileSystemApiOpenDirectoryOnGraylistTest:FileSystemApiTest.FileSystemApiOpenDirectorySubdirectoryOfGraylistTest:FileSystemApiTest.FileSystemApiOpenDirectoryTest:FileSystemApiTest.FileSystemApiOpenDirectoryWithOnlyWritePermissionTest:FileSystemApiTest.FileSystemApiOpenDirectoryWithoutPermissionTest:FileSystemApiTest.FileSystemApiOpenDirectoryWithWriteTest:FileSystemApiTest.FileSystemApiOpenExistingFileDefaultPathTest:FileSystemApiTest.FileSystemApiOpenExistingFilePreviousPathDoesNotExistTest:FileSystemApiTest.FileSystemApiOpenExistingFileTest:FileSystemApiTest.FileSystemApiOpenExistingFileUsingPreviousPathTest:FileSystemApiTest.FileSystemApiOpenExistingFileWithWriteTest:FileSystemApiTest.FileSystemApiOpenMultipleExistingFilesTest:FileSystemApiTest.FileSystemApiOpenMultipleSuggested:FileSystemApiTest.FileSystemApiOpenMultipleWritableExistingFilesTest:FileSystemApiTest.FileSystemApiOpenWritableExistingFileTest:FileSystemApiTest.FileSystemApiOpenWritableExistingFileWithWriteTest:FileSystemApiTest.FileSystemApiRestoreDirectoryEntry:FileSystemApiTest.FileSystemApiRestoreEntry:FileSystemApiTest.FileSystemApiRetainDirectoryEntry:FileSystemApiTest.FileSystemApiRetainEntry:FileSystemApiTest.FileSystemApiSaveCancelTest:FileSystemApiTest.FileSystemApiSaveExistingFileTest:FileSystemApiTest.FileSystemApiSaveExistingFileWithWriteTest:FileSystemApiTest.FileSystemApiSaveMultipleFilesTest:FileSystemApiTest.FileSystemApiSaveNewFileTest:FileSystemApiTest.FileSystemApiSaveNewFileWithWriteTest:FileSystemApiTest.RequestFileSystem_NotChromeOS:FindInPageControllerTest.SearchWithinSpecialURL:FirstRunMasterPrefsImportNothing.ImportNothingAndShowNewTabPage:GeolocationBrowserTest.IFramesWithCachedPosition:GeolocationBrowserTest.IFramesWithFreshPosition:GeolocationBrowserTest.NoPromptForSecondTab:HostedAppTest.ShouldUseWebAppFrame:ImageWriterPrivateApiTest.TestWriteFromFile:InlineInstallPrivateApiTestApp.NoGesture:InlineInstallPrivateApiTestApp.SuccessfulInstall:InlineInstallPrivateApiTestExtension.OnlyApps:InlineLoginUISafeIframeBrowserTest.ConfirmationRequiredForNonsecureSignin:IsolatedAppTest.CookieIsolation:IsolatedAppTest.CrossProcessClientRedirect:LaunchWebAuthFlowFunctionTest.InteractionRequired:LaunchWebAuthFlowFunctionTest.InteractiveFirstNavigationSuccess:LaunchWebAuthFlowFunctionTest.LoadFailed:LaunchWebAuthFlowFunctionTest.NonInteractiveSuccess:LaunchWebAuthFlowFunctionTest.UserCloseWindow:LoadTimingBrowserTest.Basic:LoadTimingBrowserTest.EverythingAtOnce:LoadTimingBrowserTest.Integration:LoadTimingBrowserTest.Preconnect:LoadTimingBrowserTest.PreconnectProxySsl:LoadTimingBrowserTest.ReuseSocket:LoadTimingBrowserTest.Ssl:LoginPromptBrowserTest.AllowCrossdomainPromptForSubframes:LoginPromptBrowserTest.CancelRedundantAuths:LoginPromptBrowserTest.NoLoginPromptForFavicon:LoginPromptBrowserTest.ShouldReplaceExistingInterstitialWhenNavigated:LoginPromptBrowserTest.ShowCorrectUrlForCrossOriginMainFrameRedirects:LoginPromptBrowserTest.ShowCorrectUrlForCrossOriginMainFrameRequests:LoginPromptBrowserTest.SupplyRedundantAuths:LoginPromptBrowserTest.SupplyRedundantAuthsMultiProfile:LoginPromptBrowserTest.TestBasicAuth:LoginPromptBrowserTest.TestCancelAuth:LoginPromptBrowserTest.TestDigestAuth:LoginPromptBrowserTest.TestTwoAuths:MaterialPDFExtensionTest.Basic:MaterialPDFExtensionTest.BasicPlugin:MaterialPDFExtensionTest.Bookmark:MaterialPDFExtensionTest.Navigator:MaterialPDFExtensionTest.ParamsParser:MaterialPDFExtensionTest.Viewport:MaterialPDFExtensionTest.ZoomManager:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareIFrame/0:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareIFrame/1:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareIFrame/2:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareImg/0:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareImg/2:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareMainFrame/0:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareMainFrame/1:MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareMainFrame/2:MediaGalleriesPlatformAppPpapiTest.SendFilesystem:MimeHandlerViewTest.Abort:MimeHandlerViewTest.Basic:MimeHandlerViewTest.DataUrl:MimeHandlerViewTest.Iframe:MimeHandlerViewTest.NonAsciiHeaders:MusicManagerPrivateTest.DeviceIdValueReturned:NetInternalsTest.netInternalsPrerenderViewFail:NetInternalsTest.netInternalsPrerenderViewSucceed:NewlibPackagedAppTest.MulticastPermissions:NewlibPackagedAppTest.NoSocketPermissions:NewlibPackagedAppTest.SocketPermissions:NewlibPackagedAppTest.SuccessfulLoad:NewTabUIBrowserTest.ShowIncognito:NonSfiPackagedAppTest.SuccessfulLoad:OptionsUIBrowserTest.LoadOptionsByURL:OptionsWebUIExtendedTest.OverlayBackToChild:OptionsWebUIExtendedTest.OverlayBackToUnrelated:OptionsWebUIExtendedTest.OverlayTabNavigation:PasswordManagerBrowserTest.CrossSiteIframeNotFillTest:PasswordManagerBrowserTest.NoLastLoadGoodLastLoad:PasswordManagerBrowserTest.NoPromptIfLinkClicked:PasswordManagerBrowserTest.PromptAfterSubmitWithSubFrameNavigation:PasswordManagerBrowserTest.SameOriginIframeAutoFillTest:PasswordManagerBrowserTestBase.CrossSiteIframeNotFillTest:PasswordManagerBrowserTestBase.NoLastLoadGoodLastLoad:PasswordManagerBrowserTestBase.NoPromptIfLinkClicked:PasswordManagerBrowserTestBase.PromptAfterSubmitWithSubFrameNavigation:PasswordManagerBrowserTestBase.SameOriginIframeAutoFillTest:PDFExtensionTest.Basic:PDFExtensionTest.BasicPlugin:PDFExtensionTest.Bookmark:PDFExtensionTest.Navigator:PDFExtensionTest.ParamsParser:PDFExtensionTest.Viewport:PDFExtensionTest.ZoomManager:PDFTestFiles/PDFExtensionTest.Load/1:PDFTestFiles/PDFExtensionTest.Load/8:PhishingClassifierDelegateTest.Navigation:PhishingClassifierTest.TestClassification:PhishingDOMFeatureExtractorTest.LinkFeatures:PlatformAppBrowserTest.ActiveAppsAreRecorded:PlatformAppBrowserTest.AppsIgnoreDefaultZoom:PlatformAppBrowserTest.AppWindowAdjustBoundsToBeVisibleOnScreen:PlatformAppBrowserTest.AppWindowRestoreState:PlatformAppBrowserTest.AppWithContextMenu:PlatformAppBrowserTest.AppWithContextMenuClicked:PlatformAppBrowserTest.AppWithContextMenuSelection:PlatformAppBrowserTest.AppWithContextMenuTextField:PlatformAppBrowserTest.ChromeRuntimeGetPackageDirectoryEntryApp:PlatformAppBrowserTest.ComponentAppBackgroundPage:PlatformAppBrowserTest.CreateAndCloseAppWindow:PlatformAppBrowserTest.DisallowNavigation:PlatformAppBrowserTest.EmptyContextMenu:PlatformAppBrowserTest.ExtensionWindowingApis:PlatformAppBrowserTest.FileAccessIsSavedToPrefs:PlatformAppBrowserTest.InstalledAppWithContextMenu:PlatformAppBrowserTest.LaunchWhiteListedExtensionWithFile:PlatformAppBrowserTest.LoadAndLaunchAppChromeRunning:PlatformAppBrowserTest.MutationEventsDisabled:PlatformAppBrowserTest.OpenLink:PlatformAppBrowserTest.ReloadRelaunches:PlatformAppBrowserTest.Restrictions:PlatformAppBrowserTest.WindowsApiAlphaEnabledHasPermissions:PlatformAppBrowserTest.WindowsApiAlwaysOnTopNoPermissions:PlatformAppBrowserTest.WindowsApiAlwaysOnTopWithOldPermissions:PlatformAppBrowserTest.WindowsApiAlwaysOnTopWithPermissions:PlatformAppBrowserTest.WindowsApiGet:PlatformAppBrowserTest.WindowsApiSetShapeHasPerm:PlatformAppBrowserTest.WindowsApiSetShapeNoPerm:PlatformAppDevToolsBrowserTest.ReOpenedWithID:PlatformAppDevToolsBrowserTest.ReOpenedWithURL:PlatformAppUrlRedirectorBrowserTest.BlankClickInAppIntercepted:PlatformAppUrlRedirectorBrowserTest.BlankClickInTabIntercepted:PlatformAppUrlRedirectorBrowserTest.ClickInTabIntercepted:PlatformAppUrlRedirectorBrowserTest.EntryInOmnibarIntercepted:PlatformAppUrlRedirectorBrowserTest.MismatchingBlankClickInAppNotIntercepted:PlatformAppUrlRedirectorBrowserTest.MismatchingWindowOpenInAppNotIntercepted:PlatformAppUrlRedirectorBrowserTest.PrerenderedClickInTabIntercepted:PlatformAppUrlRedirectorBrowserTest.WebviewNavigationNotIntercepted:PlatformAppUrlRedirectorBrowserTest.WindowOpenInAppIntercepted:PlatformAppUrlRedirectorBrowserTest.WindowOpenInTabIntercepted:PolicyTest.DownloadDirectory:PolicyTest.ExtensionInstallSources:PolicyTest.FullscreenAllowedApp:PolicyTest.HomepageLocation:PolicyTest.SafeBrowsingExtendedReportingOptInAllowed:PolicyTest.SSLErrorOverridingAllowed:PolicyTest.SSLErrorOverridingDisallowed:PolicyUITest.ExtensionLoadAndSendPolicy:PPAPINaClPNaClNonSfiTest.FileIO:PPAPINaClPNaClNonSfiTest.FileRef1:PPAPINaClPNaClNonSfiTest.Graphics2D_Replace:PPAPINaClPNaClNonSfiTest.Memory:PPAPINaClPNaClNonSfiTest.NetworkProxy:PPAPINaClPNaClNonSfiTest.PostMessage:PPAPINaClPNaClNonSfiTest.TCPSocket:PPAPINaClPNaClNonSfiTest.URLLoader0:PPAPINaClPNaClNonSfiTest.URLRequest_Stress:PPAPINaClPNaClNonSfiTest.VideoDestination:PrefsFunctionalTest.TestDownloadDirPref:PrerenderBrowserTest.CancelMatchCompleteDummy:PrerenderBrowserTest.MatchCompleteDummy:PrerenderBrowserTest.NavigateToPrerenderedPageWhenDevToolsAttached:PrerenderBrowserTest.OpenTaskManagerAfterPrerender:PrerenderBrowserTest.OpenTaskManagerAfterSwapIn:PrerenderBrowserTest.OpenTaskManagerBeforePrerender:PrerenderBrowserTest.PrerenderAbortPendingOnCancel:PrerenderBrowserTest.PrerenderAlertAfterOnload:PrerenderBrowserTest.PrerenderAlertBeforeOnload:PrerenderBrowserTest.PrerenderAllowAboutBlankSubresource:PrerenderBrowserTest.PrerenderBrowserInitiatedPostNoSwap:PrerenderBrowserTest.PrerenderCancelAll:PrerenderBrowserTest.PrerenderCancelMainFrameRedirectUnsupportedScheme:PrerenderBrowserTest.PrerenderCancelPrerenderWithPrerender:PrerenderBrowserTest.PrerenderCancelReferrer:PrerenderBrowserTest.PrerenderCancelReferrerPolicy:PrerenderBrowserTest.PrerenderCapturedWebContents:PrerenderBrowserTest.PrerenderClearCache:PrerenderBrowserTest.PrerenderClearHistory:PrerenderBrowserTest.PrerenderClickClickGoBack:PrerenderBrowserTest.PrerenderClickNavigateGoBack:PrerenderBrowserTest.PrerenderClickNewForegroundTab:PrerenderBrowserTest.PrerenderClickNewWindow:PrerenderBrowserTest.PrerenderClientRedirectFromFragment:PrerenderBrowserTest.PrerenderClientRedirectInIframe:PrerenderBrowserTest.PrerenderClientRedirectNavigateToFirst:PrerenderBrowserTest.PrerenderClientRedirectNavigateToSecond:PrerenderBrowserTest.PrerenderClientRedirectNavigateToSecondViaClick:PrerenderBrowserTest.PrerenderClientRedirectToFragment:PrerenderBrowserTest.PrerenderContentSettingBlock:PrerenderBrowserTest.PrerenderContentSettingDetect:PrerenderBrowserTest.PrerenderCrossProcessClientRedirect:PrerenderBrowserTest.PrerenderCrossProcessServerRedirect:PrerenderBrowserTest.PrerenderCrossProcessServerRedirectNoHang:PrerenderBrowserTest.PrerenderCrx:PrerenderBrowserTest.PrerenderDeferredImage:PrerenderBrowserTest.PrerenderDeferredImageAfterRedirect:PrerenderBrowserTest.PrerenderDeferredMainFrame:PrerenderBrowserTest.PrerenderDeferredMainFrameAfterRedirect:PrerenderBrowserTest.PrerenderDeferredSynchronousXHR:PrerenderBrowserTest.PrerenderDelayLoadPlugin:PrerenderBrowserTest.PrerenderDownloadClientRedirect:PrerenderBrowserTest.PrerenderDownloadIframe:PrerenderBrowserTest.PrerenderDownloadLocation:PrerenderBrowserTest.PrerenderEvents:PrerenderBrowserTest.PrerenderExcessiveMemory:PrerenderBrowserTest.PrerenderExtraHeadersNoSwap:PrerenderBrowserTest.PrerenderFavicon:PrerenderBrowserTest.PrerenderFragmentNavigateFragment:PrerenderBrowserTest.PrerenderFragmentNavigatePage:PrerenderBrowserTest.PrerenderHangingUnload:PrerenderBrowserTest.PrerenderHTML5Audio:PrerenderBrowserTest.PrerenderHTML5AudioAutoplay:PrerenderBrowserTest.PrerenderHTML5AudioJsplay:PrerenderBrowserTest.PrerenderHTML5MediaSourceVideo:PrerenderBrowserTest.PrerenderHTML5Video:PrerenderBrowserTest.PrerenderHTML5VideoJs:PrerenderBrowserTest.PrerenderHTML5VideoNetwork:PrerenderBrowserTest.PrerenderHttpAuthentication:PrerenderBrowserTest.PrerenderHttps:PrerenderBrowserTest.PrerenderImageJpeg:PrerenderBrowserTest.PrerenderImagePng:PrerenderBrowserTest.PrerenderInfiniteLoop:PrerenderBrowserTest.PrerenderInfiniteLoopMultiple:PrerenderBrowserTest.PrerenderKeepSubresourceExtensionScheme:PrerenderBrowserTest.PrerenderKeepSubresourceRedirectExtensionScheme:PrerenderBrowserTest.PrerenderLocalStorageRead:PrerenderBrowserTest.PrerenderLocalStorageWrite:PrerenderBrowserTest.PrerenderLocationReplaceGWSHistograms:PrerenderBrowserTest.PrerenderLocationReplaceNavigateToFirst:PrerenderBrowserTest.PrerenderLocationReplaceNavigateToSecond:PrerenderBrowserTest.PrerenderNaClPluginDisabled:PrerenderBrowserTest.PrerenderNavigateClickGoBack:PrerenderBrowserTest.PrerenderNavigateNavigateGoBack:PrerenderBrowserTest.PrerenderNewNavigationEntry:PrerenderBrowserTest.PrerenderNoCommitNoSwap2:PrerenderBrowserTest.PrerenderNoSSLReferrer:PrerenderBrowserTest.PrerenderPage:PrerenderBrowserTest.PrerenderPageChangeFragmentLocationHash:PrerenderBrowserTest.PrerenderPageCrossDomain:PrerenderBrowserTest.PrerenderPageNavigateFragment:PrerenderBrowserTest.PrerenderPageNewTab:PrerenderBrowserTest.PrerenderPagePending:PrerenderBrowserTest.PrerenderPageRemovesPending:PrerenderBrowserTest.PrerenderPageRemovingLink:PrerenderBrowserTest.PrerenderPageRemovingLinkWithTwoLinks:PrerenderBrowserTest.PrerenderPageRemovingLinkWithTwoLinksOneLate:PrerenderBrowserTest.PrerenderPageRemovingLinkWithTwoLinksRemovingOne:PrerenderBrowserTest.PrerenderPageWithFragment:PrerenderBrowserTest.PrerenderPageWithRedirectedFragment:PrerenderBrowserTest.PrerenderPing:PrerenderBrowserTest.PrerenderPopup:PrerenderBrowserTest.PrerenderPrint:PrerenderBrowserTest.PrerenderReferrer:PrerenderBrowserTest.PrerenderReferrerPolicy:PrerenderBrowserTest.PrerenderRegisterProtocolHandler:PrerenderBrowserTest.PrerenderRendererCrash:PrerenderBrowserTest.PrerenderReplaceCurrentEntry:PrerenderBrowserTest.PrerenderSafeBrowsingClientRedirect:PrerenderBrowserTest.PrerenderSafeBrowsingIframe:PrerenderBrowserTest.PrerenderSafeBrowsingServerRedirect:PrerenderBrowserTest.PrerenderSafeBrowsingSubresource:PrerenderBrowserTest.PrerenderSafeBrowsingTopLevel:PrerenderBrowserTest.PrerenderServerRedirectInIframe:PrerenderBrowserTest.PrerenderServerRedirectNavigateToFirst:PrerenderBrowserTest.PrerenderServerRedirectNavigateToSecond:PrerenderBrowserTest.PrerenderServerRedirectNavigateToSecondViaClick:PrerenderBrowserTest.PrerenderSessionStorage:PrerenderBrowserTest.PrerenderSSLClientCertIframe:PrerenderBrowserTest.PrerenderSSLClientCertSubresource:PrerenderBrowserTest.PrerenderSSLClientCertTopLevel:PrerenderBrowserTest.PrerenderSSLErrorIframe:PrerenderBrowserTest.PrerenderSSLErrorSubresource:PrerenderBrowserTest.PrerenderSSLErrorTopLevel:PrerenderBrowserTest.PrerenderSSLReferrerPolicy:PrerenderBrowserTest.PrerenderTargetHasPopup:PrerenderBrowserTest.PrerenderUnload:PrerenderBrowserTest.PrerenderVisibility:PrerenderBrowserTest.PrerenderWebAudioDevice:PrerenderBrowserTest.PrerenderWindowClose:PrerenderBrowserTest.PrerenderWindowSize:PrerenderBrowserTest.PrerenderXhrDelete:PrerenderBrowserTest.PrerenderXhrGet:PrerenderBrowserTest.PrerenderXhrHead:PrerenderBrowserTest.PrerenderXhrOptions:PrerenderBrowserTest.PrerenderXhrPost:PrerenderBrowserTest.PrerenderXhrPut:PrerenderBrowserTest.PrerenderXhrTrace:PrerenderBrowserTest.TaskManagementTagsBasic:PrerenderBrowserTest.TaskManagementTasksProvided:PrerenderBrowserTestWithExtensions.StreamsTest:PrerenderBrowserTestWithExtensions.TabsApi:PrerenderBrowserTestWithExtensions.WebNavigation:PrerenderBrowserTestWithNaCl.PrerenderNaClPluginEnabled:PrerenderIncognitoBrowserTest.PrerenderIncognito:PrerenderIncognitoBrowserTest.PrerenderIncognitoClosed:ProcessManagementTest.ProcessOverflow:ProfileManagerBrowserTest.DeletePasswords:ProxyBrowserTest.BasicAuthWSConnect:PushMessagingBrowserTest.AutomaticUnsubscriptionFollowsContentSettingRules:PushMessagingBrowserTest.DenyNotificationsPermissionUnsubscribes:PushMessagingBrowserTest.DenyPushPermissionUnsubscribes:PushMessagingBrowserTest.GlobalResetNotificationsPermissionUnsubscribes:PushMessagingBrowserTest.GlobalResetPushPermissionUnsubscribes:PushMessagingBrowserTest.GrantAlreadyGrantedPermissionDoesNotUnsubscribe:PushMessagingBrowserTest.LocalResetNotificationsPermissionUnsubscribes:PushMessagingBrowserTest.LocalResetPushPermissionUnsubscribes:PushMessagingBrowserTest.PermissionStateSaysDenied:PushMessagingBrowserTest.PermissionStateSaysGranted:PushMessagingBrowserTest.PermissionStateSaysPrompt:PushMessagingBrowserTest.PushEventEnforcesUserVisibleNotification:PushMessagingBrowserTest.PushEventEnforcesUserVisibleNotificationAfterQueue:PushMessagingBrowserTest.PushEventNoServiceWorker:PushMessagingBrowserTest.PushEventNotificationWithoutEventWaitUntil:PushMessagingBrowserTest.PushEventSuccess:PushMessagingBrowserTest.ResetPushPermissionAfterClearingSiteData:PushMessagingBrowserTest.SubscribeFailureNoManifest:PushMessagingBrowserTest.SubscribeFailureNotificationsBlocked:PushMessagingBrowserTest.SubscribePersisted:PushMessagingBrowserTest.SubscribeSuccessNotificationsGranted:PushMessagingBrowserTest.SubscribeSuccessNotificationsPrompt:PushMessagingBrowserTest.UnsubscribeSuccess:PushMessagingBrowserTestEmptySubscriptionOptions.RegisterFailureEmptyPushSubscriptionOptions:PushMessagingIncognitoBrowserTest.IncognitoGetSubscriptionDoesNotHang:RedirectTest.ClientEmptyReferer:RedirectTest.ClientServerServer:RedirectTest.Server:ReferrerPolicyTest.HttpLeftClickRedirectDefaultFlag:ReferrerPolicyTest.HttpLeftClickRedirectToHTTPOriginWhenCrossOrigin:ReferrerPolicyTest.HttpsMiddleClickOrigin:ReferrerPolicyTest.HttpsMiddleClickRedirect:ReferrerPolicyTest.MiddleClickOrigin:ReferrerPolicyTest.MiddleClickRedirect:RepostFormWarningTest.TestDoubleReload:RepostFormWarningTest.TestLoginAfterRepost:RestartTest.Post:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.DontProceed/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.DontProceed/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.DontProceed/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeDontProceed/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeDontProceed/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeDontProceed/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeOptInAndReportMalwareDetails/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeOptInAndReportMalwareDetails/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeOptInAndReportMalwareDetails/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeProceed/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeProceed/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.IframeProceed/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.LearnMore/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.LearnMore/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.LearnMore/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.Proceed/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.Proceed/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.Proceed/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ProceedDisabled/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ProceedDisabled/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ProceedDisabled/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.RedirectCanceled/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.RedirectCanceled/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.RedirectCanceled/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ReportingDisabled/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ReportingDisabled/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ReportingDisabled/2:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ReportingDisabledByPolicy/0:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ReportingDisabledByPolicy/1:SafeBrowsingBlockingPageBrowserTestWithThreatType/SafeBrowsingBlockingPageBrowserTest.ReportingDisabledByPolicy/2:SafeBrowsingBlockingPageIDNTestWithThreatType/SafeBrowsingBlockingPageIDNTest.SafeBrowsingBlockingPageDecodesIDN/0:SafeBrowsingBlockingPageIDNTestWithThreatType/SafeBrowsingBlockingPageIDNTest.SafeBrowsingBlockingPageDecodesIDN/1:SafeBrowsingBlockingPageIDNTestWithThreatType/SafeBrowsingBlockingPageIDNTest.SafeBrowsingBlockingPageDecodesIDN/2:SafeBrowsingServiceTest.Prefetch:SessionRestoreTest.IncognitotoNonIncognito:SSLBlockingPageIDNTest.SSLBlockingPageDecodesIDN:SSLUITest.BadCertFollowedByGoodCert:SSLUITest.InterstitialNotAffectedByHideShow:SSLUITest.TestBadFrameNavigation:SSLUITest.TestBadHTTPSDownload:SSLUITest.TestBrokenHTTPSWithInsecureContent:SSLUITest.TestGoodFrameNavigation:SSLUITest.TestHTTPSErrorWithNoNavEntry:SSLUITest.TestHTTPSExpiredCertAndGoBackViaButton:SSLUITest.TestHTTPSExpiredCertAndGoBackViaMenu:SSLUITest.TestHTTPSExpiredCertAndGoForward:SSLUITest.TestHTTPWithBrokenHTTPSResource:SSLUITest.TestInterstitialJavaScriptGoesBack:SSLUITest.TestRedirectBadToGoodHTTPS:SSLUITest.TestRefNavigation:SSLUITest.TestUnsafeContents:SSLUITest.TestUnsafeContentsInWorkerWithUserException:SSLUITest.TestUnsafeContentsWithUserException:SSLUITest.TestWSSInvalidCertAndGoForward:SSLUITestIgnoreLocalhostCertErrors.TestNoInterstitialOnLocalhost:SSLUITestWithClientCert.TestWSSClientCert:SSLUITestWithExtendedReporting.TestBrokenHTTPSGoBackShowYesCheckNoParamYesReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSGoBackShowYesCheckYesParamNoReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSGoBackWithShowYesCheckYesParamYesReportYes:SSLUITestWithExtendedReporting.TestBrokenHTTPSInIncognitoReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSNoReportingWhenDisallowed:SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedShowNoCheckYesReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedShowYesCheckYesParamNoReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedWithShowYesCheckNoParamYesReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedWithShowYesCheckYesParamInvalidReportNo:SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedWithShowYesCheckYesParamYesReportYes:StreamsPrivateApiTest.Abort:StreamsPrivateApiTest.FileURL:StreamsPrivateApiTest.Headers:StreamsPrivateApiTest.Navigate:StreamsPrivateApiTest.NavigateCrossSite:StreamsPrivateApiTest.NavigateToAnAttachment:SupervisedUserBlockModeTest.HistoryVisitRecorded:SupervisedUserBlockModeTest.OpenBlockedURLInNewTab:SupervisedUserBlockModeTest.SendAccessRequestOnBlockedURL:SupervisedUserBlockModeTest.Unblock:SupervisedUserResourceThrottleTest.NoNavigationObserverBlock:TabCaptureApiTest.ApiTests:TabRestoreTest.RestoreCrossSiteWithExistingSiteInstance:TabRestoreTest.RestoreTabWithSpecialURLOnBack:TaskManagerBrowserTest.DevToolsNewDockedWindow:TaskManagerBrowserTest.DevToolsNewUndockedWindow:TaskManagerBrowserTest.DevToolsOldDockedWindow:TaskManagerBrowserTest.DevToolsOldUnockedWindow:UnloadTest.CrossSiteInfiniteBeforeUnloadAsync:WebNavigationApiTest.CrossProcess:WebNavigationApiTest.CrossProcessAbort:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.CrossProcessHistory:WebNavigationApiTest.Failures:WebNavigationApiTest.IFrame:WebNavigationApiTest.OpenTab:WebNavigationApiTest.RequestOpenTab:WebNavigationApiTest.ServerRedirect:WebNavigationApiTest.ServerRedirectSingleProcess:WebRtcSimulcastBrowserTest.TestVgaReturnsTwoSimulcastStreams:WebSocketBrowserTest.ReuseMainPageBasicAuthCredentialsForWebSocket:WebstoreInlineInstallerTest.ShouldBlockInlineInstallFromPopupWindow:WebUIWebViewBrowserTest.ContentScriptIsInjectedAfterTerminateAndReloadWebView:WebViewCommonTest.BasicPostMessage:WebViewDPITest.Shim_TestAutosizeBeforeNavigation:WebViewDPITest.Shim_TestAutosizeHeight:WebViewDPITest.Shim_TestAutosizeRemoveAttributes:WebViewFocusTest.TouchFocusesEmbedder:WebViewNewWindowTest.OpenURLFromTab_NewWindow_Abort:WebViewNewWindowTest.Shim_TestAddContentScriptsWithNewWindowAPI:WebViewNewWindowTest.Shim_TestNewWindow:WebViewNewWindowTest.Shim_TestNewWindowNoPreventDefault:WebViewNewWindowTest.Shim_TestNewWindowNoReferrerLink:WebViewNewWindowTest.Shim_TestNewWindowTwoListeners:WebViewNewWindowTest.UserAgent_NewWindow:WebViewPluginTest.TestLoadPluginEvent:WebViewPluginTest.TestLoadPluginInternalResource:WebViewSizeTest.AutoSize:WebViewSizeTest.Shim_TestAutosizeBeforeNavigation:WebViewSizeTest.Shim_TestAutosizeHeight:WebViewSizeTest.Shim_TestAutosizeRemoveAttributes:WebViewSizeTest.Shim_TestResizeEvents:WebViewSizeTest.Shim_TestResizeWebviewResizesContent:WebViewSizeTest.Shim_TestResizeWebviewWithDisplayNoneResizesContent:WebViewSpeechAPITest.SpeechRecognitionAPI_HasPermissionAllow:WebViewSpeechAPITest.SpeechRecognitionAPI_HasPermissionDeny:WebViewSpeechAPITest.SpeechRecognitionAPI_NoPermission:WebViewTest.AcceptTouchEvents:WebViewTest.AddRemoveWebView_AddRemoveWebView:WebViewTest.AllowTransparencyAndAllowScalingPropagate:WebViewTest.ClearData:WebViewTest.ClearDataCache:WebViewTest.CloseOnLoadcommit:WebViewTest.ConsoleMessage:WebViewTest.ContextMenuLanguageSettings:WebViewTest.ContextMenusAPI_Basic:WebViewTest.ContextMenusAPI_PreventDefault:WebViewTest.CookieIsolation:WebViewTest.Dialog_TestAlertDialog:WebViewTest.Dialog_TestConfirmDialogCancel:WebViewTest.Dialog_TestConfirmDialogDefaultCancel:WebViewTest.Dialog_TestConfirmDialogDefaultGCCancel:WebViewTest.Dialog_TestPromptDialog:WebViewTest.DisplayNoneSetSrc:WebViewTest.DOMStorageIsolation:WebViewTest.DownloadPermission:WebViewTest.ExecuteScript:WebViewTest.FileSystemAPIRequestFromMainThreadAllow:WebViewTest.FileSystemAPIRequestFromMainThreadDefaultAllow:WebViewTest.FileSystemAPIRequestFromMainThreadDeny:WebViewTest.FileSystemAPIRequestFromSharedWorkerOfMultiWebViewGuestsAllow:WebViewTest.FileSystemAPIRequestFromSharedWorkerOfMultiWebViewGuestsDefaultAllow:WebViewTest.FileSystemAPIRequestFromSharedWorkerOfMultiWebViewGuestsDeny:WebViewTest.FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestAllow:WebViewTest.FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestDefaultAllow:WebViewTest.FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestDeny:WebViewTest.FileSystemAPIRequestFromWorkerAllow:WebViewTest.FileSystemAPIRequestFromWorkerDefaultAllow:WebViewTest.FileSystemAPIRequestFromWorkerDeny:WebViewTest.GeolocationAPICancelGeolocation:WebViewTest.GeolocationAPIEmbedderHasAccessAllow:WebViewTest.GeolocationAPIEmbedderHasAccessDeny:WebViewTest.GeolocationAPIEmbedderHasAccessMultipleBridgeIdAllow:WebViewTest.GeolocationAPIEmbedderHasNoAccessAllow:WebViewTest.GeolocationAPIEmbedderHasNoAccessDeny:WebViewTest.IndexedDBIsolation:WebViewTest.InterstitialTeardown:WebViewTest.InterstitialTeardownOnBrowserShutdown:WebViewTest.MediaAccessAPIAllow_TestAllow:WebViewTest.MediaAccessAPIAllow_TestAllowAndThenDeny:WebViewTest.MediaAccessAPIAllow_TestAllowAsync:WebViewTest.MediaAccessAPIAllow_TestAllowTwice:WebViewTest.MediaAccessAPIAllow_TestCheck:WebViewTest.MediaAccessAPIDeny_TestDeny:WebViewTest.MediaAccessAPIDeny_TestDenyThenAllowThrows:WebViewTest.MediaAccessAPIDeny_TestDenyWithPreventDefault:WebViewTest.MediaAccessAPIDeny_TestNoListenersImplyDeny:WebViewTest.MediaAccessAPIDeny_TestNoPreventDefaultImpliesDeny:WebViewTest.NoContentSettingsAPI:WebViewTest.NoPermission:WebViewTest.NoPrerenderer:WebViewTest.OpenURLFromTab_CurrentTab_Abort:WebViewTest.ReloadEmbedder:WebViewTest.ScreenCoordinates:WebViewTest.SendMessageToComponentExtensionFromGuest:WebViewTest.SendMessageToExtensionFromGuest:WebViewTest.SetPropertyOnDocumentInteractive:WebViewTest.SetPropertyOnDocumentReady:WebViewTest.Shim_TestAddAndRemoveContentScripts:WebViewTest.Shim_TestAddContentScript:WebViewTest.Shim_TestAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView:WebViewTest.Shim_TestAddContentScriptWithCode:WebViewTest.Shim_TestAddContentScriptWithSameNameShouldOverwriteTheExistingOne:WebViewTest.Shim_TestAddMultipleContentScripts:WebViewTest.Shim_TestAllowTransparencyAttribute:WebViewTest.Shim_TestAPIMethodExistence:WebViewTest.Shim_TestAssignSrcAfterCrash:WebViewTest.Shim_TestCannotMutateEventName:WebViewTest.Shim_TestChromeExtensionRelativePath:WebViewTest.Shim_TestChromeExtensionURL:WebViewTest.Shim_TestCloseNewWindowCleanup:WebViewTest.Shim_TestContentLoadEvent:WebViewTest.Shim_TestContentLoadEventWithDisplayNone:WebViewTest.Shim_TestContentScriptExistsAsLongAsWebViewTagExists:WebViewTest.Shim_TestContentScriptIsInjectedAfterTerminateAndReloadWebView:WebViewTest.Shim_TestDeclarativeWebRequestAPI:WebViewTest.Shim_TestDeclarativeWebRequestAPISendMessage:WebViewTest.Shim_TestDestroyOnEventListener:WebViewTest.Shim_TestDisabledZoomMode:WebViewTest.Shim_TestDisplayBlock:WebViewTest.Shim_TestDisplayNoneWebviewLoad:WebViewTest.Shim_TestDisplayNoneWebviewRemoveChild:WebViewTest.Shim_TestEventName:WebViewTest.Shim_TestExecuteScript:WebViewTest.Shim_TestExecuteScriptFail:WebViewTest.Shim_TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged:WebViewTest.Shim_TestFindAPI:WebViewTest.Shim_TestFindAPI_findupdate:WebViewTest.Shim_TestFocusWhileFocused:WebViewTest.Shim_TestGarbageCollect:WebViewTest.Shim_TestGetProcessId:WebViewTest.Shim_TestInlineScriptFromAccessibleResources:WebViewTest.Shim_TestInvalidChromeExtensionURL:WebViewTest.Shim_TestLoadAbortChromeExtensionURLWrongPartition:WebViewTest.Shim_TestLoadAbortEmptyResponse:WebViewTest.Shim_TestLoadAbortIllegalChromeURL:WebViewTest.Shim_TestLoadAbortIllegalFileURL:WebViewTest.Shim_TestLoadAbortIllegalJavaScriptURL:WebViewTest.Shim_TestLoadAbortInvalidNavigation:WebViewTest.Shim_TestLoadAbortNonWebSafeScheme:WebViewTest.Shim_TestLoadDataAPI:WebViewTest.Shim_TestLoadProgressEvent:WebViewTest.Shim_TestLoadStartLoadRedirect:WebViewTest.Shim_TestNavigateAfterResize:WebViewTest.Shim_TestNavigationToExternalProtocol:WebViewTest.Shim_TestNavOnConsecutiveSrcAttributeChanges:WebViewTest.Shim_TestNavOnSrcAttributeChange:WebViewTest.Shim_TestOnEventProperty:WebViewTest.Shim_TestPartitionChangeAfterNavigation:WebViewTest.Shim_TestPartitionRemovalAfterNavigationFails:WebViewTest.Shim_TestPerOriginZoomMode:WebViewTest.Shim_TestPerViewZoomMode:WebViewTest.Shim_TestReassignSrcAttribute:WebViewTest.Shim_TestReload:WebViewTest.Shim_TestReloadAfterTerminate:WebViewTest.Shim_TestRemoveSrcAttribute:WebViewTest.Shim_TestRemoveWebviewAfterNavigation:WebViewTest.Shim_TestRemoveWebviewOnExit:WebViewTest.Shim_TestTerminateAfterExit:WebViewTest.Shim_TestWebRequestAPI:WebViewTest.Shim_TestWebRequestAPIExistence:WebViewTest.Shim_TestWebRequestAPIGoogleProperty:WebViewTest.Shim_TestWebRequestAPIWithHeaders:WebViewTest.Shim_TestWebRequestListenerSurvivesReparenting:WebViewTest.Shim_TestWebViewInsideFrame:WebViewTest.Shim_TestZoomAPI:WebViewTest.Shim_TestZoomBeforeNavigation:WebViewTest.Shim_WebViewWebRequestRegistryHasNoCache:WebViewTest.ShimSrcAttribute:WebViewTest.TaskManagerExistingWebView:WebViewTest.TaskManagerNewWebView:WebViewTest.TearDownTest:WebViewTest.TestConfirmDialog:WebViewTest.TestContextMenu:WebViewTest.TestPlugin:WebViewTest.UserAgent:WebViewTest.WhitelistedContentScript:WebViewVisibilityTest.EmbedderVisibilityChanged:WebViewVisibilityTest.GuestVisibilityChanged:WebViewVisibilityTest.Shim_TestHiddenBeforeNavigation:WebViewTest.StoragePersistence:WindowControlsTest.CloseControlWorks:WorkerDevToolsSanityTest.InspectSharedWorker" ], + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "browser_tests" + }, + { + "args": [ + "--enable-browser-side-navigation", + "--gtest_filter=-CrossSiteRedirectorBrowserTest.VerifyCrossSiteRedirectURL:CrossSiteTransferTest.NoLeakOnCrossSiteCancel:CrossSiteTransferTest.ReplaceEntryCrossProcessThenTransfer:CrossSiteTransferTest.ReplaceEntryCrossProcessTwice:CrossSiteTransferTest.ReplaceEntryInProcessThenTranfers:DevToolsProtocolTest.NavigationPreservesMessages:NavigationControllerBrowserTest.CorrectLengthWithCurrentItemReplacement:NavigationControllerBrowserTest.FrameNavigationEntry_BlankAutoSubframe:NavigationControllerBrowserTest.FrameNavigationEntry_SubframeBackForward:NavigationControllerBrowserTest.NavigationTypeClassification_ClientSideRedirect:NavigationControllerBrowserTest.NavigationTypeClassification_ExistingPage:NavigationControllerBrowserTest.NavigationTypeClassification_InPage:NavigationControllerBrowserTest.NavigationTypeClassification_NewAndAutoSubframe:NavigationControllerBrowserTest.NavigationTypeClassification_NewPage:NavigationControllerBrowserTest.PreventSpoofFromSubframeAndReplace:NavigationControllerBrowserTest.ReloadOriginalRequest:NavigationControllerBrowserTest.StopCausesFailureDespiteJavaScriptURL:RenderViewImplTest.OnNavigationHttpPost:RenderViewImplTest.ReloadWhileSwappedOut:RenderViewImplTest.TestBackForward:SecurityExploitBrowserTest.InterstitialCommandFromUnderlyingContent:ServiceWorkerBrowserTest.CrossSiteTransfer:ServiceWorkerBrowserTest.ImportsBustMemcache:ServiceWorkerBrowserTest.Reload:ServiceWorkerBrowserTest.ResponseFromHTTPServiceWorkerIsNotMarkedAsSecure:ServiceWorkerBrowserTest.ResponseFromHTTPSServiceWorkerIsMarkedAsSecure:SessionHistoryTest.CrossFrameFormBackForward:SessionHistoryTest.FrameBackForward:SessionHistoryTest.FrameFormBackForward:SessionHistoryTest.LocationChangeInSubframe:SitePerProcessBrowserTest.CrashSubframe:SitePerProcessBrowserTest.CrossSiteDidStopLoading:SitePerProcessBrowserTest.OpenPopupWithRemoteParent:WebContentsImplBrowserTest.ClearNonVisiblePendingOnFail:WebContentsViewAuraTest.OverscrollScreenshot:WebUIMojoTest.EndToEndPing" + ], + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_browsertests" }, { "args": [ "--enable-browser-side-navigation", - "--gtest_filter=-NavigationControllerTest.CopyRestoredStateAndNavigate:RenderFrameHostManagerTest.CancelPendingProperlyDeletesOrSwaps:RenderFrameHostManagerTest.PageDoesBackAndReload:RenderViewHostTest.ResetUnloadOnReload:ResourceDispatcherHostTest.TransferNavigationHtml:ResourceDispatcherHostTest.TransferNavigationText:ResourceDispatcherHostTest.TransferNavigationWithProcessCrash:ResourceDispatcherHostTest.TransferNavigationWithTwoRedirects:ResourceDispatcherHostTest.TransferTwoNavigationsHtml:WebContentsImplTest.CrossSiteNavigationBackPreempted:WebContentsImplTest.CrossSiteNotPreemptedDuringBeforeUnload:WebContentsImplTest.NoEarlyStop:WebContentsImplTest.ShowInterstitialCrashRendererThenGoBack:WebContentsImplTest.ShowInterstitialFromBrowserNewNavigationProceed:WebContentsImplTest.ShowInterstitialThenGoBack" + "--gtest_filter=-NavigationControllerTest.CopyRestoredStateAndNavigate:RenderFrameHostManagerTest.CancelPendingProperlyDeletesOrSwaps:RenderFrameHostManagerTest.PageDoesBackAndReload:RenderViewHostTest.ResetUnloadOnReload:ResourceDispatcherHostTest.TransferNavigationHtml:ResourceDispatcherHostTest.TransferNavigationText:ResourceDispatcherHostTest.TransferNavigationWithProcessCrash:ResourceDispatcherHostTest.TransferNavigationWithTwoRedirects:ResourceDispatcherHostTest.TransferTwoNavigationsHtml:WebContentsImplTest.CrossSiteNavigationBackPreempted:WebContentsImplTest.CrossSiteNotPreemptedDuringBeforeUnload:WebContentsImplTest.NoEarlyStop:WebContentsImplTest.ShowInterstitialCrashRendererThenGoBack:WebContentsImplTest.ShowInterstitialFromBrowserNewNavigationProceed" ], + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" + }, + { + "args": [ + "--enable-browser-side-navigation", + "--gtest_filter=-AutofillDialogViewsTest.SignInFocus:BookmarkInstantExtendedTest.DetachedBookmarkBarOnNTP:BookmarkTest.DetachedBookmarkBarOnNTP:BrowserBookmarkBarTest.StateOnActiveTabChanged:BrowserCommandsTest.BackForwardInNewTab:BrowserCommandsTest.BookmarkCurrentPage:BrowserCommandsTest.DuplicateTab:BrowserCommandsTest.OnDefaultZoomLevelChanged:BrowserCommandsTest.OnMaxZoomIn:BrowserCommandsTest.OnMaxZoomOut:BrowserCommandsTest.OnZoomChangedForActiveTab:BrowserCommandsTest.OnZoomLevelChanged:BrowserCommandsTest.OnZoomReset:BrowserCommandsTest.ViewSource:BrowserInstantControllerTest.DefaultSearchProviderChanged:BrowserInstantControllerTest.GoogleBaseURLUpdated:BrowserListTest.TabContentsIteratorVerifyBrowser:BrowserListTest.TabContentsIteratorVerifyCount:BrowserProcessPowerTest.IncognitoDoesntRecordPowerUsage:BrowserProcessPowerTest.MultipleProfilesRecordSeparately:BrowserProcessPowerTest.MultipleSites:BrowserProcessPowerTest.OneSite:BrowserViewTest.BrowserViewLayout:ChromeContentBrowserClientWindowTest.OpenURL:ChromeLauncherControllerTest.AppPanels:ChromeLauncherControllerTest.BrowserMenuGeneration:ChromeLauncherControllerTest.GmailMatching:ChromeLauncherControllerTest.GmailOfflineMatching:ChromeLauncherControllerTest.PersistLauncherItemPositions:ChromeLauncherControllerTest.PersistPinned:ChromeLauncherControllerTest.V1AppMenuDeletionExecution:ChromeLauncherControllerTest.V1AppMenuExecution:ChromeLauncherControllerTest.V1AppMenuGeneration:DeclarativeContentIsBookmarkedConditionTrackerTest.AddAndRemoveBookmark:DeclarativeContentIsBookmarkedConditionTrackerTest.BookmarkedAtStartOfTracking:DeclarativeContentIsBookmarkedConditionTrackerTest.ExtensiveChanges:DeclarativeContentIsBookmarkedConditionTrackerTest.Navigation:DeclarativeContentPageUrlConditionTrackerTest.AddAndRemoveConditionSets:DeclarativeContentPageUrlConditionTrackerTest.NotifyWebContentsNavigation:DeclarativeContentPageUrlConditionTrackerTest.TrackWebContents:InstantNTPURLRewriteTest.UberURLHandler_InstantExtendedNewTabPage:InstantSearchPrerendererTest.CancelPendingPrerenderRequest:InstantSearchPrerendererTest.CancelPrerenderRequest_EmptySearchQueryCommitted:InstantSearchPrerendererTest.CancelPrerenderRequest_UnsupportedDispositions:InstantSearchPrerendererTest.CancelPrerenderRequestOnTabChangeEvent:InstantSearchPrerendererTest.CanCommitQuery:InstantSearchPrerendererTest.CommitQuery:InstantSearchPrerendererTest.DoNotPrefetchSearchResults:InstantSearchPrerendererTest.PrefetchSearchResults:InstantSearchPrerendererTest.PrerenderingAllowed:InstantSearchPrerendererTest.PrerenderRequestCancelled:InstantSearchPrerendererTest.UsePrerenderedPage_SearchQueryMistmatch:InstantSearchPrerendererTest.UsePrerenderPage:ListChangesTaskTest.UnderTrackedFolder:ListChangesTaskTest.UnrelatedChange:MediaRouterDialogControllerTest.CloseDialogFromDialogController:MediaRouterDialogControllerTest.CloseDialogFromWebUI:MediaRouterDialogControllerTest.CloseInitiator:MediaRouterDialogControllerTest.MultipleMediaRouterDialogs:MediaRouterDialogControllerTest.ShowMediaRouterDialog:OneClickSigninSyncObserverTest.NoSyncService_RedirectsImmediately:OneClickSigninSyncObserverTest.OnSyncStateChanged_SyncConfiguredSuccessfully:PinnedTabCodecTest.NoPinnedTabs:PinnedTabCodecTest.PinnedAndNonPinned:PinnedTabServiceTest.Popup:PopupToolbarModelTest.ShouldDisplayURL:PrintPreviewDialogControllerUnitTest.ClearInitiatorDetails:PrintPreviewDialogControllerUnitTest.GetOrCreatePreviewDialog:PrintPreviewDialogControllerUnitTest.MultiplePreviewDialogs:PrintPreviewUIUnitTest.GetCurrentPrintPreviewStatus:PrintPreviewUIUnitTest.PrintPreviewData:PrintPreviewUIUnitTest.PrintPreviewDraftPages:RecentTabsSubMenuModelTest.RecentlyClosedTabsAndWindowsFromLastSession:RecentTabsSubMenuModelTest.RecentlyClosedTabsFromCurrentSession:ReuseInstantSearchBasePageTest.CanCommitQuery:ReuseInstantSearchBasePageTest.CanCommitQuery_InstantSearchBasePageLoadInProgress:SearchDelegateTest.SearchModel:SearchIPCRouterPolicyTest.AppropriateMessagesSentToIncognitoPages:SearchIPCRouterPolicyTest.DoNotProcessChromeIdentityCheck:SearchIPCRouterPolicyTest.DoNotProcessFocusOmnibox:SearchIPCRouterPolicyTest.DoNotProcessHistorySyncCheck:SearchIPCRouterPolicyTest.DoNotProcessLogEvent:SearchIPCRouterPolicyTest.DoNotProcessMessagesForInactiveTab:SearchIPCRouterPolicyTest.DoNotProcessMessagesForIncognitoPage:SearchIPCRouterPolicyTest.DoNotProcessNavigateToURL:SearchIPCRouterPolicyTest.DoNotProcessPasteIntoOmniboxMsg:SearchIPCRouterPolicyTest.DoNotSendMostVisitedItems:SearchIPCRouterPolicyTest.DoNotSendSetMessagesForIncognitoPage:SearchIPCRouterPolicyTest.DoNotSendSetPromoInformation:SearchIPCRouterPolicyTest.DoNotSendThemeBackgroundInfo:SearchIPCRouterPolicyTest.ProcessChromeIdentityCheck:SearchIPCRouterPolicyTest.ProcessDeleteMostVisitedItem:SearchIPCRouterPolicyTest.ProcessFocusOmnibox:SearchIPCRouterPolicyTest.ProcessHistorySyncCheck:SearchIPCRouterPolicyTest.ProcessLogEvent:SearchIPCRouterPolicyTest.ProcessNavigateToURL:SearchIPCRouterPolicyTest.ProcessPasteIntoOmniboxMsg:SearchIPCRouterPolicyTest.ProcessUndoAllMostVisitedDeletions:SearchIPCRouterPolicyTest.ProcessUndoMostVisitedDeletion:SearchIPCRouterPolicyTest.ProcessVoiceSearchSupportMsg:SearchIPCRouterPolicyTest.SendMostVisitedItems:SearchIPCRouterPolicyTest.SendSetDisplayInstantResults:SearchIPCRouterPolicyTest.SendSetOmniboxStartMargin:SearchIPCRouterPolicyTest.SendSetPromoInformation:SearchIPCRouterPolicyTest.SendSetSuggestionToPrefetch:SearchIPCRouterPolicyTest.SendThemeBackgroundInfo:SearchIPCRouterPolicyTest.SendToggleVoiceSearch:SearchIPCRouterPolicyTest.SubmitQuery:SearchIPCRouterTest.DoNotSendMostVisitedItemsMsg:SearchIPCRouterTest.DoNotSendOmniboxFocusChange:SearchIPCRouterTest.DoNotSendSetDisplayInstantResultsMsg:SearchIPCRouterTest.DoNotSendSetInputInProgress:SearchIPCRouterTest.DoNotSendSetOmniboxStartMargin:SearchIPCRouterTest.DoNotSendSetPromoInformationMsg:SearchIPCRouterTest.DoNotSendSetSuggestionToPrefetch:SearchIPCRouterTest.DoNotSendSubmitMsg:SearchIPCRouterTest.DoNotSendThemeBackgroundInfoMsg:SearchIPCRouterTest.DoNotSendToggleVoiceSearch:SearchIPCRouterTest.HandleTabChangedEvents:SearchIPCRouterTest.IgnoreChromeIdentityCheckMsg:SearchIPCRouterTest.IgnoreDeleteMostVisitedItemMsg:SearchIPCRouterTest.IgnoreFocusOmniboxMsg:SearchIPCRouterTest.IgnoreHistorySyncCheckMsg:SearchIPCRouterTest.IgnoreLogEventMsg:SearchIPCRouterTest.IgnoreMessageIfThePageIsNotActive:SearchIPCRouterTest.IgnoreMessagesFromNonInstantRenderers:SearchIPCRouterTest.IgnoreNavigateToURLMsg:SearchIPCRouterTest.IgnorePasteAndOpenDropdownMsg:SearchIPCRouterTest.IgnoreUndoAllMostVisitedDeletionsMsg:SearchIPCRouterTest.IgnoreUndoMostVisitedDeletionMsg:SearchIPCRouterTest.IgnoreVoiceSearchSupportMsg:SearchIPCRouterTest.ProcessChromeIdentityCheckMsg:SearchIPCRouterTest.ProcessDeleteMostVisitedItemMsg:SearchIPCRouterTest.ProcessFocusOmniboxMsg:SearchIPCRouterTest.ProcessHistorySyncCheckMsg:SearchIPCRouterTest.ProcessLogEventMsg:SearchIPCRouterTest.ProcessLogMostVisitedImpressionMsg:SearchIPCRouterTest.ProcessLogMostVisitedNavigationMsg:SearchIPCRouterTest.ProcessNavigateToURLMsg:SearchIPCRouterTest.ProcessPasteAndOpenDropdownMsg:SearchIPCRouterTest.ProcessUndoAllMostVisitedDeletionsMsg:SearchIPCRouterTest.ProcessUndoMostVisitedDeletionMsg:SearchIPCRouterTest.ProcessVoiceSearchSupportMsg:SearchIPCRouterTest.SendMostVisitedItemsMsg:SearchIPCRouterTest.SendOmniboxFocusChange:SearchIPCRouterTest.SendSetDisplayInstantResultsMsg_DisableInstantOnResultsPage:SearchIPCRouterTest.SendSetDisplayInstantResultsMsg_EnableInstantOnResultsPage:SearchIPCRouterTest.SendSetDisplayInstantResultsMsg_EnableInstantOutsideSearchResultsPage:SearchIPCRouterTest.SendSetInputInProgress:SearchIPCRouterTest.SendSetOmniboxStartMargin:SearchIPCRouterTest.SendSetPromoInformationMsg:SearchIPCRouterTest.SendSetSuggestionToPrefetch:SearchIPCRouterTest.SendSubmitMsg:SearchIPCRouterTest.SendThemeBackgroundInfoMsg:SearchIPCRouterTest.SendToggleVoiceSearch:SearchIPCRouterTest.SpuriousMessageTypesIgnored:SearchTabHelperPrerenderTest.OnOmniboxFocusPrerenderInstantURL:SearchTabHelperPrerenderTest.OnTabActivatedNoPrerenderIfOmniboxBlurred:SearchTabHelperPrerenderTest.OnTabActivatedPrerenderInstantURL:SearchTest.InstantCacheableNTPNavigationEntry:SearchTest.InstantCacheableNTPNavigationEntryNewProfile:SearchTest.InstantNTPCustomNavigationEntry:SearchTest.InstantNTPExtendedEnabled:SearchTest.ProcessIsolation:SearchTest.ProcessIsolation_RendererInitiated:SessionCrashedInfoBarDelegateUnitTest.DetachingTabWithCrashedInfoBar:SessionsSyncManagerTest.AssociateWindowsDontReloadTabs:SessionsSyncManagerTest.CheckPrerenderedWebContentsSwap:SessionsSyncManagerTest.MergeLocalSessionExistingTabs:SessionsSyncManagerTest.MergeWithLocalAndForeignTabs:SessionsSyncManagerTest.OnLocalTabModified:SessionsSyncManagerTest.ProcessRemoteDeleteOfLocalSession:SessionsSyncManagerTest.SwappedOutOnRestore:SessionsSyncManagerTest.UpdatesAfterMixedMerge:SiteEngagementServiceTest.ScoreIncrementsOnPageRequest:TabMenuModelTest.Basics:TestUsePrerenderPage.DoNotUsePrerenderPage:TestUsePrerenderPage.ExtractSearchTermsAndUsePrerenderPage:TestUsePrerenderPage.SetEmbeddedSearchRequestParams:ToolbarActionsBarRedesignUnitTest.ExtensionActionWantsToRunAppearance:ToolbarActionsBarUnitTest.ExtensionActionNormalAppearance:ToolbarModelTest.GoogleBaseURL:ToolbarModelTest.SearchTermsWhileLoading:ToolbarModelTest.ShouldDisplayURL_QueryExtraction" + ], + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "unit_tests" + } + ] + }, + "CFI Linux": { + "gtest_tests": [ + { + "test": "base_unittests" } ] }, @@ -151,6 +184,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -161,6 +198,143 @@ } ] }, + "Chromium Win 10": { + "gtest_tests": [ + { + "test": "angle_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "base_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true, + "shards": 10 + }, + "test": "browser_tests" + }, + { + "test": "cacheinvalidation_unittests" + }, + { + "test": "chrome_elf_unittests" + }, + { + "test": "components_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "content_browsertests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "content_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "courgette_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "crypto_unittests" + }, + { + "test": "device_unittests" + }, + { + "test": "extensions_unittests" + }, + { + "test": "gcm_unit_tests" + }, + { + "test": "google_apis_unittests" + }, + { + "test": "gpu_unittests" + }, + { + "test": "installer_util_unittests" + }, + { + "test": "ipc_tests" + }, + { + "test": "jingle_unittests" + }, + { + "test": "media_unittests" + }, + { + "test": "midi_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "net_unittests" + }, + { + "test": "ppapi_unittests" + }, + { + "test": "printing_unittests" + }, + { + "test": "remoting_unittests" + }, + { + "test": "sbox_integration_tests" + }, + { + "test": "sbox_unittests" + }, + { + "test": "sbox_validation_tests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, + { + "test": "skia_unittests" + }, + { + "test": "sql_unittests" + }, + { + "test": "sync_unit_tests" + }, + { + "test": "ui_base_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "unit_tests" + }, + { + "test": "url_unittests" + }, + { + "test": "views_unittests" + } + ] + }, "ClangToTLinux tester": { "gtest_tests": [ { @@ -209,6 +383,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -269,6 +446,9 @@ "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -287,6 +467,9 @@ "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -577,6 +760,9 @@ "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -607,6 +793,9 @@ "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_mac_unittests" }, { @@ -639,6 +828,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -745,6 +938,9 @@ "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -775,6 +971,9 @@ "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_mac_unittests" }, { @@ -807,6 +1006,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -922,6 +1125,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -1053,6 +1262,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -1184,6 +1399,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -1315,6 +1536,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -1446,6 +1673,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -1539,6 +1772,9 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { @@ -1569,14 +1805,29 @@ "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -1615,15 +1866,24 @@ "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { @@ -1633,6 +1893,9 @@ "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { @@ -1654,66 +1917,126 @@ "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "net_unittests" }, { "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { @@ -1733,15 +2056,24 @@ "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { @@ -1751,6 +2083,9 @@ "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { @@ -1772,39 +2107,66 @@ "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { "test": "installer_util_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "net_unittests" }, { "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { @@ -1816,22 +2178,43 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { @@ -1944,6 +2327,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2075,6 +2464,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2206,6 +2601,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2337,6 +2738,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2446,6 +2853,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2574,6 +2987,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2705,6 +3124,12 @@ { "test": "sbox_validation_tests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "setup_unittests" + }, { "test": "skia_unittests" }, @@ -2759,39 +3184,75 @@ "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "crypto_unittests" }, { @@ -2801,18 +3262,30 @@ "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -2822,27 +3295,51 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -2861,48 +3358,84 @@ "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "net_unittests" }, { "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -2911,6 +3444,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -2975,6 +3512,9 @@ "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { @@ -3085,6 +3625,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -3113,39 +3657,75 @@ "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "crypto_unittests" }, { @@ -3158,15 +3738,24 @@ "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -3176,27 +3765,51 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -3215,48 +3828,84 @@ "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "net_unittests" }, { "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -3265,6 +3914,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -3439,6 +4092,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -3454,14 +4111,14 @@ { "args": [ "--site-per-process", - "--gtest_filter=-AppApiTest.*:BlockedAppApiTest.*:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.OtherRedirectsDontForkProcess:BrowserTest.WindowOpenClose:ChromeAppAPITest.*:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExecuteScriptApiTest.ExecuteScriptPermissions:ExtensionApiTest.ActiveTab:ExtensionApiTest.ChromeRuntimeOpenOptionsPage:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.Tabs2:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionBrowserTest.LoadChromeExtensionsWithOptionsParamWhenEmbedded:ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionWebUITest.CanEmbedExtensionOptions:ExtensionWebUITest.ReceivesExtensionOptionsOnClose:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:*.NewAvatarMenuEnabledInGuestMode:OptionsUIBrowserTest.*:*PDFExtensionTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PlatformAppUrlRedirectorBrowserTest.*:PopupBlockerBrowserTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:RedirectTest.*:ReferrerPolicyTest.*:SSLUITest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewCommonTest.*:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest*:WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabs" + "--gtest_filter=-AppApiTest.OpenAppFromIframe:AppApiTest.OpenWebPopupFromWebIframe:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.OtherRedirectsDontForkProcess:BrowserTest.WindowOpenClose:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExtensionApiTest.ActiveTab:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.Tabs2:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionViewTest.*:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:*.NewAvatarMenuEnabledInGuestMode:OptionsUIBrowserTest.*:*PDFExtensionTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PopupBlockerBrowserTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:RedirectTest.*:ReferrerPolicyTest.*:*.RestoreCrossSiteWithExistingSiteInstance:*.RestoreTabWithSpecialURLOnBack:SSLUITest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.AcceptTouchEvents:WebViewTest.ExecuteScript:WebViewTest.GeolocationAPICancelGeolocation:WebViewTest.GeolocationAPIEmbedderHasAccessMultipleBridgeIdAllow:WebViewTest.IndexedDBIsolation:WebViewTest.ScreenCoordinates:WebViewTest.ContextMenusAPI_PreventDefault:WebViewTest.TestContextMenu:WebViewFocusTest.*:WebViewNewWindowTest.*:WebViewSizeTest.*:WebViewSpeechAPITest.*:WebViewVisibilityTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest*:WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabs" ], "test": "browser_tests" }, { "args": [ "--site-per-process", - "--gtest_filter=-*.AllowTargetedNavigationsAfterSwap:*.DisownOpener:*.SupportCrossProcessPostMessageWithMessagePort" + "--gtest_filter=-*.PreventSpoofFromSubframeAndReplace:SessionHistoryTest.CrossFrameFormBackForward:SessionHistoryTest.FrameBackForward:*.SupportCrossProcessPostMessageWithMessagePort:DevToolsProtocolTest.NavigationPreservesMessages:NavigationControllerBrowserTest.ReloadOriginalRequest" ], "test": "content_browsertests" }, @@ -3484,14 +4141,14 @@ { "args": [ "--site-per-process", - "--gtest_filter=-AppApiTest.*:BlockedAppApiTest.*:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.OtherRedirectsDontForkProcess:BrowserTest.WindowOpenClose:ChromeAppAPITest.*:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExecuteScriptApiTest.ExecuteScriptPermissions:ExtensionApiTest.ActiveTab:ExtensionApiTest.ChromeRuntimeOpenOptionsPage:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.Tabs2:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionBrowserTest.LoadChromeExtensionsWithOptionsParamWhenEmbedded:ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionWebUITest.CanEmbedExtensionOptions:ExtensionWebUITest.ReceivesExtensionOptionsOnClose:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:*.NewAvatarMenuEnabledInGuestMode:OptionsUIBrowserTest.*:*PDFExtensionTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PlatformAppUrlRedirectorBrowserTest.*:PopupBlockerBrowserTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:RedirectTest.*:ReferrerPolicyTest.*:SSLUITest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewCommonTest.*:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest*:WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabs" + "--gtest_filter=-AppApiTest.OpenAppFromIframe:AppApiTest.OpenWebPopupFromWebIframe:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.OtherRedirectsDontForkProcess:BrowserTest.WindowOpenClose:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExtensionApiTest.ActiveTab:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.Tabs2:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionViewTest.*:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:*.NewAvatarMenuEnabledInGuestMode:OptionsUIBrowserTest.*:*PDFExtensionTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PopupBlockerBrowserTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:RedirectTest.*:ReferrerPolicyTest.*:*.RestoreCrossSiteWithExistingSiteInstance:*.RestoreTabWithSpecialURLOnBack:SSLUITest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.AcceptTouchEvents:WebViewTest.ExecuteScript:WebViewTest.GeolocationAPICancelGeolocation:WebViewTest.GeolocationAPIEmbedderHasAccessMultipleBridgeIdAllow:WebViewTest.IndexedDBIsolation:WebViewTest.ScreenCoordinates:WebViewTest.ContextMenusAPI_PreventDefault:WebViewTest.TestContextMenu:WebViewFocusTest.*:WebViewNewWindowTest.*:WebViewSizeTest.*:WebViewSpeechAPITest.*:WebViewVisibilityTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest*:WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabs" ], "test": "browser_tests" }, { "args": [ "--site-per-process", - "--gtest_filter=-*.AllowTargetedNavigationsAfterSwap:*.DisownOpener:*.SupportCrossProcessPostMessageWithMessagePort" + "--gtest_filter=-*.PreventSpoofFromSubframeAndReplace:SessionHistoryTest.CrossFrameFormBackForward:SessionHistoryTest.FrameBackForward:*.SupportCrossProcessPostMessageWithMessagePort:DevToolsProtocolTest.NavigationPreservesMessages:NavigationControllerBrowserTest.ReloadOriginalRequest" ], "test": "content_browsertests" }, diff --git a/engine/src/flutter/testing/buildbot/chromium.linux.json b/engine/src/flutter/testing/buildbot/chromium.linux.json index a0d832f16b..4004bcd37f 100644 --- a/engine/src/flutter/testing/buildbot/chromium.linux.json +++ b/engine/src/flutter/testing/buildbot/chromium.linux.json @@ -1,13 +1,81 @@ { "Android GN": { "additional_compile_targets": [ + "chrome_public_apk", + "chrome_public_test_apk", "chrome_shell_apk", + "chrome_shell_test_apk", + "content_shell_apk", "mandoline:all" + ], + "gtest_tests": [ + { + "test": "html_viewer_unittests" + }, + { + "test": "ipc_mojo_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "mojo_common_unittests" + }, + { + "test": "mojo_public_application_unittests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "mojo_public_bindings_unittests" + }, + { + "test": "mojo_public_environment_unittests" + }, + { + "test": "mojo_public_system_unittests" + }, + { + "test": "mojo_public_utility_unittests" + }, + { + "test": "mojo_runner_unittests" + }, + { + "test": "mojo_shell_unittests" + }, + { + "test": "mojo_surfaces_lib_unittests" + }, + { + "test": "mojo_system_unittests" + }, + { + "test": "mojo_view_manager_lib_unittests" + }, + { + "test": "resource_provider_unittests" + }, + { + "test": "view_manager_unittests" + } + ], + "scripts": [ + { + "name": "gn_check", + "script": "gn_check.py" + } ] }, "Android GN (dbg)": { "additional_compile_targets": [ + "chrome_public_apk", + "chrome_public_test_apk", "chrome_shell_apk", + "chrome_shell_test_apk", + "content_shell_apk", + "content_shell_test_apk", "mandoline:all" ] }, @@ -20,6 +88,13 @@ { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" + }, + { + "args": [ + "android_webview_unittests" + ], + "name": "android_webview_unittests", + "script": "android_gtest_test.py" } ] }, @@ -38,14 +113,23 @@ "Cast Linux": { "gtest_tests": [ { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { "test": "cast_base_unittests" }, + { + "test": "cast_crash_unittests" + }, { "test": "cast_media_unittests" }, @@ -53,131 +137,97 @@ "test": "cast_shell_browser_test" }, { - "test": "content_unittests" + "test": "cast_shell_unittests" }, { - "test": "crypto_unittests" + "args": [ + "--gtest_filter=-OutOfProcessPPAPITest.TrueTypeFont:OutOfProcessPPAPITest.BrowserFont" + ], + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "content_browsertests" }, - { - "test": "gpu_unittests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "url_unittests" - } - ] - }, - "Linux Clang (dbg)": { - "gtest_tests": [ { "swarming": { "can_use_on_swarming_builders": true }, - "test": "accessibility_unittests" - }, - { - "test": "app_shell_unittests" - }, - { - "test": "base_unittests" - }, - { - "test": "components_unittests" - }, - { "test": "content_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "crypto_unittests" }, { - "test": "device_unittests" - }, - { - "test": "display_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gn_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "ipc_mojo_unittests" + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { - "test": "mojo_common_unittests" + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "jingle_unittests" }, { - "test": "mojo_public_application_unittests" + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "media_unittests" }, { - "test": "mojo_public_bindings_unittests" + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "midi_unittests" }, { - "test": "mojo_public_environment_unittests" + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "net_unittests" }, { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "test": "mojo_system_unittests" - }, - { - "test": "nacl_loader_unittests" + "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { - "test": "skia_unittests" - }, - { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { - "test": "unit_tests" + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "url_unittests" } ] }, @@ -197,6 +247,9 @@ "test": "aura_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { @@ -376,10 +429,6 @@ ], "name": "gyp_flag_compare", "script": "gyp_flag_compare.py" - }, - { - "name": "mojo_apptest", - "script": "mojo_apptest.py" } ] }, @@ -453,9 +502,15 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -472,6 +527,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -487,6 +545,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -502,6 +563,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -526,9 +590,15 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { @@ -544,9 +614,15 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -559,6 +635,9 @@ "test": "gl_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gn_unittests" }, { @@ -580,9 +659,15 @@ "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -598,9 +683,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -616,6 +707,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -628,18 +722,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -649,6 +758,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -670,12 +782,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -696,6 +814,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -721,9 +843,15 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -740,6 +868,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -755,6 +886,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -764,6 +898,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -788,9 +925,15 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { @@ -806,9 +949,15 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -821,6 +970,9 @@ "test": "gl_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gn_unittests" }, { @@ -843,9 +995,15 @@ "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -861,9 +1019,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -879,6 +1043,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -891,21 +1058,36 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { "args": [ "--test-launcher-print-test-stdio=always" ], + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -915,6 +1097,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -936,12 +1121,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -950,6 +1141,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -975,9 +1170,15 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -994,6 +1195,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -1009,6 +1213,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -1018,6 +1225,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -1042,9 +1252,15 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { @@ -1060,9 +1276,15 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -1075,6 +1297,9 @@ "test": "gl_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gn_unittests" }, { @@ -1096,9 +1321,15 @@ "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -1114,9 +1345,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -1132,6 +1369,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -1144,18 +1384,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -1165,6 +1420,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -1186,12 +1444,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], diff --git a/engine/src/flutter/testing/buildbot/chromium.mac.json b/engine/src/flutter/testing/buildbot/chromium.mac.json index 4a5ffab86d..4003708146 100644 --- a/engine/src/flutter/testing/buildbot/chromium.mac.json +++ b/engine/src/flutter/testing/buildbot/chromium.mac.json @@ -90,6 +90,9 @@ "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -105,6 +108,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -113,6 +119,12 @@ }, "test": "components_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "content_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -120,11 +132,20 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, + { + "test": "gl_unittests" + }, { "test": "google_apis_unittests" }, @@ -135,6 +156,15 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "ipc_tests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -156,9 +186,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -171,6 +207,9 @@ "test": "mojo_public_utility_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -183,18 +222,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -204,6 +258,15 @@ "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "unit_tests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" } ], @@ -212,6 +275,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -250,6 +317,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -265,6 +335,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -298,9 +371,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -328,9 +407,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -352,9 +437,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -370,6 +461,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -382,18 +476,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_mac_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -403,6 +512,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -418,6 +530,9 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" } ], @@ -426,6 +541,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -464,6 +583,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -479,6 +601,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -506,9 +631,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -536,9 +667,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -560,9 +697,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -578,6 +721,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -590,18 +736,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_mac_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -611,6 +772,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -626,6 +790,9 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" } ], @@ -634,6 +801,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -672,6 +843,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -687,6 +861,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -714,9 +891,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -744,9 +927,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -768,9 +957,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -786,6 +981,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -798,18 +996,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_mac_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -819,6 +1032,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -834,6 +1050,9 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" } ], @@ -842,6 +1061,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -880,6 +1103,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -895,6 +1121,9 @@ "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -922,9 +1151,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -953,9 +1188,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -977,9 +1218,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -995,6 +1242,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -1007,18 +1257,33 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_mac_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -1028,6 +1293,9 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { @@ -1043,6 +1311,9 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" } ], @@ -1051,6 +1322,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" diff --git a/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json b/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json index c577790887..bfc7e0f93e 100644 --- a/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json +++ b/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json @@ -14,9 +14,15 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { @@ -27,51 +33,96 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "crypto_unittests" }, { "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -81,6 +132,9 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -94,21 +148,39 @@ "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -124,45 +196,81 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "net_unittests" }, { "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] @@ -182,9 +290,15 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "base_unittests" }, { @@ -195,54 +309,102 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "content_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "crypto_unittests" }, { "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -252,6 +414,9 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -264,21 +429,39 @@ "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -294,48 +477,87 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "net_unittests" }, { "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] @@ -361,6 +583,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -370,15 +595,27 @@ "test": "base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { @@ -394,27 +631,48 @@ "test": "content_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "crypto_unittests" }, { "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -424,24 +682,42 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { @@ -455,27 +731,51 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -486,12 +786,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] diff --git a/engine/src/flutter/testing/buildbot/chromium.memory.json b/engine/src/flutter/testing/buildbot/chromium.memory.json index df3f6ac1ba..7e9b230175 100644 --- a/engine/src/flutter/testing/buildbot/chromium.memory.json +++ b/engine/src/flutter/testing/buildbot/chromium.memory.json @@ -21,15 +21,27 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { @@ -51,21 +63,39 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -75,6 +105,9 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -85,15 +118,27 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { @@ -107,24 +152,45 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { @@ -135,6 +201,9 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" } ] @@ -183,6 +252,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -199,18 +271,33 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cast_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -232,18 +319,33 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -253,6 +355,9 @@ "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -263,21 +368,39 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -291,30 +414,54 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { "test": "ui_chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -325,6 +472,9 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { @@ -334,9 +484,6 @@ }, "Mac ASan 64 Tests (1)": { "gtest_tests": [ - { - "test": "base_unittests" - }, { "swarming": { "can_use_on_swarming_builders": true @@ -351,15 +498,27 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cc_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { @@ -382,9 +541,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -395,15 +560,27 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { @@ -416,21 +593,39 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { @@ -439,105 +634,10 @@ }, "test": "unit_tests" }, - { - "test": "url_unittests" - } - ] - }, - "Mac ASan Tests (1)": { - "gtest_tests": [ { "swarming": { "can_use_on_swarming_builders": true }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "midi_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { "test": "url_unittests" } ] diff --git a/engine/src/flutter/testing/buildbot/chromium.webkit.json b/engine/src/flutter/testing/buildbot/chromium.webkit.json index 80221c99a3..4e8a96cd4e 100644 --- a/engine/src/flutter/testing/buildbot/chromium.webkit.json +++ b/engine/src/flutter/testing/buildbot/chromium.webkit.json @@ -14,6 +14,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -23,6 +26,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -39,18 +45,30 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromeos_unittests" }, { "test": "chromevox_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -65,9 +83,6 @@ }, "test": "content_unittests" }, - { - "test": "content_unittests" - }, { "swarming": { "can_use_on_swarming_builders": true @@ -78,12 +93,21 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -93,15 +117,24 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -111,24 +144,42 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -141,27 +192,51 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -171,12 +246,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] @@ -199,6 +280,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -208,6 +292,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -224,15 +311,27 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromeos_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -258,12 +357,21 @@ "test": "dbus_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "display_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -273,15 +381,24 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { "test": "google_apis_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gpu_unittests" }, { @@ -292,24 +409,42 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "midi_unittests" }, { "test": "nacl_helper_nonsfi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -322,27 +457,51 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sandbox_linux_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -352,12 +511,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ] @@ -671,6 +836,32 @@ } ] }, + "WebKit Linux Trusty": { + "gtest_tests": [ + { + "test": "blink_heap_unittests" + }, + { + "test": "blink_platform_unittests" + }, + { + "test": "webkit_unit_tests" + }, + { + "test": "wtf_unittests" + } + ], + "scripts": [ + { + "name": "webkit_lint", + "script": "webkit_lint.py" + }, + { + "name": "webkit_python_tests", + "script": "webkit_python_tests.py" + } + ] + }, "WebKit Mac Oilpan": { "gtest_tests": [ { @@ -723,6 +914,32 @@ } ] }, + "WebKit Mac10.10": { + "gtest_tests": [ + { + "test": "blink_heap_unittests" + }, + { + "test": "blink_platform_unittests" + }, + { + "test": "webkit_unit_tests" + }, + { + "test": "wtf_unittests" + } + ], + "scripts": [ + { + "name": "webkit_lint", + "script": "webkit_lint.py" + }, + { + "name": "webkit_python_tests", + "script": "webkit_python_tests.py" + } + ] + }, "WebKit Mac10.6": { "gtest_tests": [ { @@ -853,7 +1070,7 @@ } ] }, - "WebKit Mac10.8 (retina)": { + "WebKit Mac10.9": { "gtest_tests": [ { "test": "blink_heap_unittests" @@ -879,7 +1096,7 @@ } ] }, - "WebKit Mac10.9": { + "WebKit Mac10.9 (retina)": { "gtest_tests": [ { "test": "blink_heap_unittests" diff --git a/engine/src/flutter/testing/buildbot/chromium.win.json b/engine/src/flutter/testing/buildbot/chromium.win.json index f1fb87904d..0f760f22f8 100644 --- a/engine/src/flutter/testing/buildbot/chromium.win.json +++ b/engine/src/flutter/testing/buildbot/chromium.win.json @@ -8,9 +8,15 @@ "test": "accessibility_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -27,6 +33,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -45,6 +54,9 @@ "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -54,6 +66,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -81,6 +96,9 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -90,12 +108,21 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -111,6 +138,9 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { @@ -121,9 +151,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -139,9 +175,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -157,6 +199,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -169,24 +214,45 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -196,12 +262,21 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -211,12 +286,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -237,6 +318,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -246,6 +330,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -262,6 +349,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -280,9 +370,15 @@ "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_browsertests" }, { @@ -292,6 +388,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -319,9 +418,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -331,12 +436,21 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -352,6 +466,9 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { @@ -362,9 +479,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -377,6 +500,9 @@ "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { @@ -386,9 +512,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -404,6 +536,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -416,24 +551,45 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -443,12 +599,21 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -458,12 +623,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -472,6 +643,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -603,6 +778,9 @@ "test": "app_list_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -612,6 +790,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -628,6 +809,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -646,9 +830,15 @@ "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "components_browsertests" }, { @@ -658,6 +848,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -685,9 +878,15 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "device_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -697,12 +896,21 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -718,6 +926,9 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { @@ -728,9 +939,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -743,6 +960,9 @@ "test": "media_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "message_center_unittests" }, { @@ -752,9 +972,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -770,6 +996,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -782,24 +1011,45 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -809,12 +1059,21 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -824,12 +1083,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -838,6 +1103,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -848,6 +1117,7 @@ } ] }, + "Win7 Tests (ANGLE)": {}, "Win7 Tests (dbg)(1)": { "gtest_tests": [ { @@ -857,6 +1127,9 @@ "test": "accessibility_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { @@ -866,6 +1139,9 @@ "test": "ash_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -882,6 +1158,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -900,6 +1179,9 @@ "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -909,6 +1191,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -937,6 +1222,9 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -946,9 +1234,15 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { @@ -958,6 +1252,9 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { @@ -968,9 +1265,15 @@ "test": "interactive_ui_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -986,9 +1289,15 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_common_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "mojo_public_bindings_unittests" }, { @@ -1004,6 +1313,9 @@ "test": "mojo_system_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -1016,24 +1328,45 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -1044,12 +1377,21 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -1059,12 +1401,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -1073,6 +1421,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" @@ -1255,9 +1607,15 @@ "test": "accessibility_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "app_shell_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "aura_unittests" }, { @@ -1274,6 +1632,9 @@ "test": "browser_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "cacheinvalidation_unittests" }, { @@ -1292,6 +1653,9 @@ "test": "chrome_elf_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "chromedriver_unittests" }, { @@ -1307,6 +1671,9 @@ "test": "components_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "compositor_unittests" }, { @@ -1334,6 +1701,9 @@ "test": "crypto_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "events_unittests" }, { @@ -1343,12 +1713,21 @@ "test": "extensions_browsertests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "extensions_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gcm_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "gfx_unittests" }, { @@ -1364,6 +1743,9 @@ "test": "gpu_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "installer_util_unittests" }, { @@ -1377,9 +1759,15 @@ "test": "ipc_mojo_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ipc_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "jingle_unittests" }, { @@ -1395,6 +1783,9 @@ "test": "midi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "nacl_loader_unittests" }, { @@ -1407,24 +1798,45 @@ "test": "ppapi_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "printing_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "remoting_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sbox_validation_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "skia_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sql_unittests" }, { @@ -1434,12 +1846,21 @@ "test": "sync_integration_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "sync_unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_base_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "ui_touch_selection_unittests" }, { @@ -1449,12 +1870,18 @@ "test": "unit_tests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "url_unittests" }, { "test": "views_unittests" }, { + "swarming": { + "can_use_on_swarming_builders": true + }, "test": "wm_unittests" } ], @@ -1463,6 +1890,10 @@ "name": "telemetry_unittests", "script": "telemetry_unittests.py" }, + { + "name": "telemetry_gpu_unittests", + "script": "telemetry_gpu_unittests.py" + }, { "name": "telemetry_perf_unittests", "script": "telemetry_perf_unittests.py" diff --git a/engine/src/flutter/testing/buildbot/client.v8.fyi.json b/engine/src/flutter/testing/buildbot/client.v8.fyi.json index 2f43da0412..d214267dfc 100644 --- a/engine/src/flutter/testing/buildbot/client.v8.fyi.json +++ b/engine/src/flutter/testing/buildbot/client.v8.fyi.json @@ -59,6 +59,12 @@ "views_unittests", "wm_unittests" ], - "gtest_tests": [] + "gtest_tests": [], + "scripts": [ + { + "name": "gn_check", + "script": "gn_check.py" + } + ] } } diff --git a/engine/src/flutter/testing/buildbot/manage.py b/engine/src/flutter/testing/buildbot/manage.py index 98de7ef4b0..7a39176649 100755 --- a/engine/src/flutter/testing/buildbot/manage.py +++ b/engine/src/flutter/testing/buildbot/manage.py @@ -10,6 +10,7 @@ formatted. """ import argparse +import ast import collections import glob import json @@ -38,12 +39,17 @@ SKIP = { # http://crbug.com/480053 'Linux GN', + 'Linux GN (dbg)', 'linux_chromium_gn_rel', # Unmaintained builders on chromium.fyi 'ClangToTMac', 'ClangToTMacASan', + # This builder is fine, but win8_chromium_ng uses GN and this configuration, + # which breaks everything. + 'Win8 Aura', + # One off builders. Note that Swarming does support ARM. 'Linux ARM Cross-Compile', 'Site Isolation Linux', @@ -51,6 +57,15 @@ SKIP = { } +# TODO(GYP): These targets have not been ported to GN yet. +SKIP_NINJA_TO_GN_TARGETS = { + 'cast_media_unittests', + 'cast_shell_browser_test', + 'chromevox_tests', + 'nacl_helper_nonsfi_unittests', +} + + class Error(Exception): """Processing error.""" @@ -61,7 +76,7 @@ def get_isolates(): return [os.path.basename(f) for f in files if f.endswith('.isolate')] -def process_builder_convert(data, filename, builder, test_name): +def process_builder_convert(data, test_name): """Converts 'test_name' to run on Swarming in 'data'. Returns True if 'test_name' was found. @@ -72,7 +87,6 @@ def process_builder_convert(data, filename, builder, test_name): continue test.setdefault('swarming', {}) if not test['swarming'].get('can_use_on_swarming_builders'): - print('- %s: %s' % (filename, builder)) test['swarming']['can_use_on_swarming_builders'] = True result = True return result @@ -90,8 +104,9 @@ def process_builder_remaining(data, filename, builder, tests_location): filename, []).append(builder) -def process_file(mode, test_name, tests_location, filepath): - """Processes a file. +def process_file(mode, test_name, tests_location, filepath, ninja_targets, + ninja_targets_seen): + """Processes a json file describing what tests should be run for each recipe. The action depends on mode. Updates tests_location. @@ -120,12 +135,24 @@ def process_file(mode, test_name, tests_location, filepath): raise Error( '%s: %s is broken: %s' % (filename, builder, data['gtest_tests'])) + for d in data['gtest_tests']: + if (d['test'] not in ninja_targets and + d['test'] not in SKIP_NINJA_TO_GN_TARGETS): + raise Error('%s: %s / %s is not listed in ninja_to_gn.pyl.' % + (filename, builder, d['test'])) + elif d['test'] in ninja_targets: + ninja_targets_seen.add(d['test']) + config[builder]['gtest_tests'] = sorted( data['gtest_tests'], key=lambda x: x['test']) - if mode == 'remaining': + + # The trick here is that process_builder_remaining() is called before + # process_builder_convert() so tests_location can be used to know how many + # tests were converted. + if mode in ('convert', 'remaining'): process_builder_remaining(data, filename, builder, tests_location) - elif mode == 'convert': - process_builder_convert(data, filename, builder, test_name) + if mode == 'convert': + process_builder_convert(data, test_name) expected = json.dumps( config, sort_keys=True, indent=2, separators=(',', ': ')) + '\n' @@ -142,7 +169,26 @@ def process_file(mode, test_name, tests_location, filepath): return True -def print_remaining(test_name,tests_location): +def print_convert(test_name, tests_location): + """Prints statistics for a test being converted for use in a CL description. + """ + data = tests_location[test_name] + print('Convert %s to run exclusively on Swarming' % test_name) + print('') + print('%d configs already ran on Swarming' % data['count_run_on_swarming']) + print('%d used to run locally and were converted:' % data['count_run_local']) + for master, builders in sorted(data['local_configs'].iteritems()): + for builder in builders: + print('- %s: %s' % (master, builder)) + print('') + print('Ran:') + print(' ./manage.py --convert %s' % test_name) + print('') + print('R=') + print('BUG=98637') + + +def print_remaining(test_name, tests_location): """Prints a visual summary of what tests are yet to be converted to run on Swarming. """ @@ -222,13 +268,29 @@ def main(): 'count_run_local': 0, 'count_run_on_swarming': 0, 'local_configs': {} }) + with open(os.path.join(THIS_DIR, "ninja_to_gn.pyl")) as fp: + ninja_targets = ast.literal_eval(fp.read()) + try: result = 0 + ninja_targets_seen = set() for filepath in glob.glob(os.path.join(THIS_DIR, '*.json')): - if not process_file(args.mode, args.test_name, tests_location, filepath): + if not process_file(args.mode, args.test_name, tests_location, filepath, + ninja_targets, ninja_targets_seen): result = 1 - if args.mode == 'remaining': + extra_targets = set(ninja_targets) - ninja_targets_seen + if extra_targets: + if len(extra_targets) > 1: + extra_targets_str = ', '.join(extra_targets) + ' are' + else: + extra_targets_str = list(extra_targets)[0] + ' is' + raise Error('%s listed in ninja_to_gn.pyl but not in any .json files' % + extra_targets_str) + + if args.mode == 'convert': + print_convert(args.test_name, tests_location) + elif args.mode == 'remaining': print_remaining(args.test_name, tests_location) return result except Error as e: diff --git a/engine/src/flutter/testing/buildbot/ninja_to_gn.pyl b/engine/src/flutter/testing/buildbot/ninja_to_gn.pyl new file mode 100644 index 0000000000..5e26949eb4 --- /dev/null +++ b/engine/src/flutter/testing/buildbot/ninja_to_gn.pyl @@ -0,0 +1,102 @@ +# Copyright 2015 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. + +# ninja_to_gn - A mapping of Ninja build target names to GN labels for +# the tests run on the bots. +# +# This mapping is used by MB so that we can uniformly refer to test binaries +# by their Ninja target names in the recipes and not need to worry about how +# they are referred to in GN or GYP specifically (the GYP target name is pretty +# much always the same as the Ninja target name, since GYP target names are not +# hierarchical). + +{ + "base_unittests": "//base:base_unittests", + "accessibility_unittests": "//ui/accessibility:accessibility_unittests", + "angle_unittests": "//gpu:angle_unittests", + "app_list_unittests": "//ui/app_list:app_list_unittests", + "app_shell_unittests": "//extensions/shell:app_shell_unittests", + "ash_unittests": "//ash:ash_unittests", + "aura_unittests": "//ui/aura:aura_unittests", + "blink_heap_unittests": "//third_party/WebKit/public:blink_heap_unittests", + "blink_platform_unittests": "//third_party/WebKit/public:blink_platform_unittests", + "browser_tests": "//chrome/test:browser_tests", + "cacheinvalidation_unittests": "//third_party/cacheinvalidation:cacheinvalidation_unittests", + "cast_base_unittests": "//chromecast/base:cast_base_unittests", + "cast_crash_unittests": "//chromecast/crash:cast_crash_unittests", + "cast_media_unittests": "//chromecast/media:cast_media_unittests", + "cast_shell_unittests": "//chromecast/app:cast_shell_unittests", + "cast_unittests": "//media/cast:cast_unittests", + "cc_unittests": "//cc:cc_unittests", + "chromedriver_unittests": "//chrome/test/chromedriver:chromedriver_unittests", + "chrome_elf_unittests": "//chrome_elf:chrome_elf_unittests", + "chromeos_unittests": "//chromeos:chromeos_unittests", + "components_browsertests": "//components:components_browsertests", + "components_unittests": "//components:components_unittests", + "compositor_unittests": "//ui/compositor:compositor_unittests", + "content_browsertests": "//content/test:content_browsertests", + "content_unittests": "//content/test:content_unittests", + "courgette_unittests": "//courgette:courgette_unittests", + "crypto_unittests": "//crypto:crypto_unittests", + "dbus_unittests": "//dbus:dbus_unittests", + "device_unittests": "//device:device_unittests", + "display_unittests": "//ui/display:display_unittests", + "events_unittests": "//ui/events:events_unittests", + "extensions_browsertests": "//extensions:extensions_browsertests", + "extensions_unittests": "//extensions:extensions_unittests", + "gcm_unit_tests": "//google_apis/gcm:gcm_unit_tests", + "gfx_unittests": "//ui/gfx:gfx_unittests", + "gl_unittests": "//ui/gl:gl_unittests", + "gn_unittests": "//tools/gn:gn_unittests", + "google_apis_unittests": "//google_apis:google_apis_unittests", + "gpu_unittests": "//gpu:gpu_unittests", + "html_viewer_unittests": "//components/html_viewer:html_viewer_unittests", + "installer_util_unittests": "//chrome/installer/util:installer_util_unittests", + "interactive_ui_tests": "//chrome/test:interactive_ui_tests", + "ipc_mojo_unittests": "//ipc/mojo:ipc_mojo_unittests", + "ipc_tests": "//ipc:ipc_tests", + "jingle_unittests": "//jingle:jingle_unittests", + "keyboard_unittests": "//ui/keyboard:keyboard_unittests", + "media_unittests": "//media:media_unittests", + "midi_unittests": "//media:midi_unittests", + "mojo_common_unittests": "//mojo/common:mojo_common_unittests", + "mojo_public_application_unittests": "//third_party/mojo/src/mojo/edk/test:mojo_public_applicaiton_unittests", + "mojo_public_bindings_unittests": "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests", + "mojo_public_environment_unittests": "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests", + "mojo_public_system_unittests": "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests", + "mojo_public_utility_unittests": "//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests", + "mojo_runner_unittests": "//mojo/runner:mojo_runner_unittests", + "mojo_shell_unittests": "//mojo/shell:mojo_shell_unittests", + "mojo_surfaces_lib_unittests": "//mojo/converters/surfaces/tests:mojo_surfaces_lib_unittests", + "mojo_system_unittests": "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests", + "mojo_view_manager_lib_unittests": "//components/view_manager/public/cpp/tests:mojo_view_manager_lib_unittests", + "message_center_unittests": "//ui/message_center:message_center_unittests", + "nacl_loader_unittests": "//components/nacl:nacl_loader_unittests", + "net_unittests": "//net:net_unittests", + "ozone_unittests": "//ui/ozone:ozone_unittests", + "ppapi_unittests": "//ppapi:ppapi_unittests", + "printing_unittests": "//printing:printing_unittests", + "remoting_unittests": "//remoting:remoting_unittests", + "resource_provider_unittests": "//components/resource_provider:resource_provider_unittests", + "sandbox_linux_unittests": "//sandbox/linux:sandbox_linux_unittests", + "sandbox_mac_unittests": "//sandbox/mac:sandbox_mac_unittests", + "sbox_integration_tests": "//sandbox/win:sbox_integration_tests", + "sbox_unittests": "//sandbox/win:sbox_unittests", + "sbox_validation_tests": "//sandbox/win:sbox_validation_tests", + "setup_unittests": "//chrome/installer/setup:setup_unittests", + "skia_unittests": "//skia:skia_unittests", + "sql_unittests": "//sql:sql_unittests", + "sync_integration_tests": "//sync:sync_integration_tests", + "sync_unit_tests": "//sync:sync_unit_tests", + "ui_base_unittests": "//ui/base:ui_base_unittests", + "ui_chromeos_unittests": "//ui/chromeos:ui_chromeos_unittests", + "ui_touch_selection_unittests": "//ui/touch_selection:ui_touch_selection_unittests", + "unit_tests": "//chrome/test:unit_tests", + "url_unittests": "//url:url_unittests", + "view_manager_unittests": "//components/view_manager:view_manager_unittests", + "views_unittests": "//ui/views:views_unittests", + "webkit_unit_tests": "//third_party/WebKit/public:webkit_unit_tests", + "wm_unittests": "//ui/wm:wm_unittests", + "wtf_unittests": "//third_party/WebKit/public:wtf_unittests", +} diff --git a/engine/src/flutter/testing/buildbot/trybot_analyze_config.json b/engine/src/flutter/testing/buildbot/trybot_analyze_config.json index 5608ae4b43..da3533ee79 100644 --- a/engine/src/flutter/testing/buildbot/trybot_analyze_config.json +++ b/engine/src/flutter/testing/buildbot/trybot_analyze_config.json @@ -14,8 +14,10 @@ "build/get_landmines.py", "build/gyp_chromium", "build/linux/sysroot_ld_path.sh", + "infra/.*", "DEPS", "testing/buildbot/.*", + "testing/scripts/.*", "testing/test_env.py", "tools/clang/blink_gc_plugin/CMakeLists.txt", "tools/luci-go/.*", diff --git a/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json b/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json index 876d8a50f4..36fa0c3e47 100644 --- a/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json +++ b/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json @@ -1,13 +1,22 @@ { "android_chromium_gn_compile_dbg": { "additional_compile_targets": [ + "chrome_public_apk", + "chrome_public_test_apk", "chrome_shell_apk", + "chrome_shell_test_apk", + "content_shell_apk", "mandoline:all" ] }, "android_chromium_gn_compile_rel": { "additional_compile_targets": [ + "chrome_public_apk", + "chrome_public_test_apk", "chrome_shell_apk", + "chrome_shell_test_apk", + "content_shell_apk", + "content_shell_test_apk", "mandoline:all" ] }, @@ -347,10 +356,6 @@ ], "name": "gyp_flag_compare", "script": "gyp_flag_compare.py" - }, - { - "name": "mojo_apptest", - "script": "mojo_apptest.py" } ] } diff --git a/engine/src/flutter/testing/buildbot/tryserver.v8.json b/engine/src/flutter/testing/buildbot/tryserver.v8.json index a0f9adf9fa..548606135b 100644 --- a/engine/src/flutter/testing/buildbot/tryserver.v8.json +++ b/engine/src/flutter/testing/buildbot/tryserver.v8.json @@ -60,6 +60,12 @@ "views_unittests", "wm_unittests" ], - "gtest_tests": [] + "gtest_tests": [], + "scripts": [ + { + "name": "gn_check", + "script": "gn_check.py" + } + ] } } diff --git a/engine/src/flutter/testing/chromoting/app_remoting_integration_tests.isolate b/engine/src/flutter/testing/chromoting/app_remoting_integration_tests.isolate new file mode 100644 index 0000000000..bc0d8241f9 --- /dev/null +++ b/engine/src/flutter/testing/chromoting/app_remoting_integration_tests.isolate @@ -0,0 +1,38 @@ +# Copyright 2015 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. +{ + 'conditions': [ + ['OS=="linux"', { + 'variables': { + 'command': [ + '../xvfb.py', + '<(PRODUCT_DIR)', + '<(PRODUCT_DIR)/ar_test_driver', + '--username=appremotingtestdriver_chromium_01@lgtestuser.com', + '--environment=staging', + '--refresh-token-file=../../remoting/tools/internal/refresh_tokens.json', + '--show-host-availability', + '--release-hosts-after-tests', + '--verbosity=1', + ], + 'files': [ + '../xvfb.py', + '../test_env.py', + '<(PRODUCT_DIR)/ar_test_driver', + '../../remoting/tools/internal/refresh_tokens.json', + ], + }, + }], + ['OS=="linux" and use_ozone==0', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)', + ], + }, + }], + ], + 'includes': [ + '../../base/base.isolate', + ], +} diff --git a/engine/src/flutter/testing/chromoting/browser_test_commands_linux.txt b/engine/src/flutter/testing/chromoting/browser_test_commands_linux.txt index dbc386c18b..4143ad4a14 100644 --- a/engine/src/flutter/testing/chromoting/browser_test_commands_linux.txt +++ b/engine/src/flutter/testing/chromoting/browser_test_commands_linux.txt @@ -1,15 +1,11 @@ -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Launch:RemoteDesktopBrowserTest.MANUAL_Auth --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Auth --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gafyd -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Auth --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=non-gmail /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Launch:RemoteDesktopBrowserTest.MANUAL_Auth --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_Connect_Local_Host --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_Connect_Local_Host --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_RetryOnHostOffline --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_v2_Alive_OnLostFocus --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_Connect --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_InvalidAccessCode --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_CancelShare --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_VerifyAccessCodeNonReusable --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile +/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_Connect --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile +/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_InvalidAccessCode --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile +/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_CancelShare --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile +/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_VerifyAccessCodeNonReusable --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Cancel_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Update_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Invalid_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123457 --override-user-data-dir=/tmp/chromoting_test_profile diff --git a/engine/src/flutter/testing/chromoting/chromoting_test_files.txt b/engine/src/flutter/testing/chromoting/chromoting_test_files.txt new file mode 100644 index 0000000000..d68d381106 --- /dev/null +++ b/engine/src/flutter/testing/chromoting/chromoting_test_files.txt @@ -0,0 +1 @@ +gs://chrome-chromoting-test-data/integration_tests/input/test_accounts.json \ No newline at end of file diff --git a/engine/src/flutter/testing/chromoting/download_test_files.py b/engine/src/flutter/testing/chromoting/download_test_files.py new file mode 100644 index 0000000000..57fb9a19ed --- /dev/null +++ b/engine/src/flutter/testing/chromoting/download_test_files.py @@ -0,0 +1,57 @@ +# Copyright (c) 2015 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. + +"""A script to download files required for Remoting integration tests from GCS. + + The script expects 2 parameters: + + input_files: a file containing the full path in GCS to each file that is to + be downloaded. + output_folder: the folder to which the specified files should be downloaded. + + This scripts expects that its execution is done on a machine where the + credentials are correctly setup to obtain the required permissions for + downloading files from the specified GCS buckets. +""" + +import argparse +import ntpath +import os +import subprocess +import sys + + +def main(): + + parser = argparse.ArgumentParser() + parser.add_argument('-f', '--files', + help='File specifying files to be downloaded .') + parser.add_argument( + '-o', '--output_folder', + help='Folder where specified files should be downloaded .') + + if len(sys.argv) < 3: + parser.print_help() + sys.exit(1) + + args = parser.parse_args() + if not args.files or not args.output_folder: + parser.print_help() + sys.exit(1) + + # Loop through lines in input file specifying source file locations. + with open(args.files) as f: + for line in f: + # Copy the file to the output folder, with same name as source file. + output_file = os.path.join(args.output_folder, ntpath.basename(line)) + # Download specified file from GCS. + cp_cmd = ['gsutil.py', 'cp', line, output_file] + try: + subprocess.check_call(cp_cmd) + except subprocess.CalledProcessError, e: + print e.output + sys.exit(1) + +if __name__ == '__main__': + main() diff --git a/engine/src/flutter/testing/chromoting/integration_tests.gyp b/engine/src/flutter/testing/chromoting/integration_tests.gyp index c3f7912b48..23a18ea0fd 100644 --- a/engine/src/flutter/testing/chromoting/integration_tests.gyp +++ b/engine/src/flutter/testing/chromoting/integration_tests.gyp @@ -3,8 +3,41 @@ # found in the LICENSE file. { + 'variables': { + 'run_multi_machine_tests%': '0', + }, + 'conditions': [ ['archive_chromoting_tests==1', { + 'conditions': [ + ['OS=="linux"', { + 'targets': [ + { + 'target_name': 'app_remoting_integration_tests_run', + 'includes': [ + './dependencies.gypi', + ], + 'sources': [ + 'app_remoting_integration_tests.isolate', + ], + }, # target_name: 'app_remoting_integration_tests_run' + ], + }], + ['run_multi_machine_tests==1', { + 'targets': [ + { + 'target_name': 'chromoting_multi_machine_example_test', + 'includes': [ + './dependencies.gypi', + ], + 'sources': [ + 'multi_machine_example/example_test_controller.isolate', + 'multi_machine_example/example_task.isolate', + ], + }, # target_name: 'chromoting_multi_machine_example_test' + ], + }], + ], 'targets': [ { 'target_name': 'chromoting_integration_tests_run', @@ -14,17 +47,32 @@ 'sources': [ 'chromoting_integration_tests.isolate', ], + 'actions': [ + { + 'action_name': 'download_test_files', + 'variables': { + 'dl_files_script': './download_test_files.py', + 'files_list': './chromoting_test_files.txt', + 'output_folder': './', + }, + 'inputs': [ + '<(files_list)', + ], + 'outputs': [ + '<(output_folder)', + ], + 'action': [ + 'python', + '<(dl_files_script)', + '--files', + '<(files_list)', + '--output_folder', + '<(output_folder)', + ], + 'message': 'Downloading required Remoting test files.', + }, + ], }, # target_name: 'chromoting_integration_tests_run' - { - 'target_name': 'chromoting_multi_machine_example_test', - 'includes': [ - './dependencies.gypi', - ], - 'sources': [ - 'multi_machine_example/example_test_controller.isolate', - 'multi_machine_example/example_task.isolate', - ], - }, # target_name: 'chromoting_multi_machine_example_test' ], }], ], diff --git a/engine/src/flutter/testing/generate_gmock_mutant.py b/engine/src/flutter/testing/generate_gmock_mutant.py index 9c5678c2f2..45ac4edbbc 100755 --- a/engine/src/flutter/testing/generate_gmock_mutant.py +++ b/engine/src/flutter/testing/generate_gmock_mutant.py @@ -66,7 +66,7 @@ HEADER = """\ // // Will invoke mock.HandleFlowers("orchids", n, request) // // "orchids" is a pre-bound argument, and and are call-time // // arguments - they are not known until the OnRequest mock is invoked. -// EXPECT_CALL(mock, OnRequest(Ge(5), StartsWith("flower")) +// EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower")) // .Times(1) // .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, // string("orchids")))); diff --git a/engine/src/flutter/testing/gmock_mutant.h b/engine/src/flutter/testing/gmock_mutant.h index acc1ae9249..6049d1d292 100644 --- a/engine/src/flutter/testing/gmock_mutant.h +++ b/engine/src/flutter/testing/gmock_mutant.h @@ -57,7 +57,7 @@ // // Will invoke mock.HandleFlowers("orchids", n, request) // // "orchids" is a pre-bound argument, and and are call-time // // arguments - they are not known until the OnRequest mock is invoked. -// EXPECT_CALL(mock, OnRequest(Ge(5), StartsWith("flower")) +// EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower")) // .Times(1) // .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, // string("orchids")))); diff --git a/engine/src/flutter/testing/gtest.gyp b/engine/src/flutter/testing/gtest.gyp index d61772ecbe..79d7e66980 100644 --- a/engine/src/flutter/testing/gtest.gyp +++ b/engine/src/flutter/testing/gtest.gyp @@ -191,6 +191,14 @@ ], 'msvs_disabled_warnings': [4800], }, + 'variables': { + 'clang_warning_flags': [ + # The Mutex constructor initializer list in gtest-port.cc is + # incorrectly ordered. See + # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. + '-Wno-reorder', + ] + }, }, { 'target_name': 'gtest_main', diff --git a/engine/src/flutter/testing/gtest_mac.h b/engine/src/flutter/testing/gtest_mac.h index aa48c94543..0a9af4323a 100644 --- a/engine/src/flutter/testing/gtest_mac.h +++ b/engine/src/flutter/testing/gtest_mac.h @@ -16,19 +16,51 @@ namespace testing { namespace internal { // This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_EQ(). +// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NSEQ(). GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, const char* actual_expression, id expected, id actual); // This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NE(). +// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NSNE(). GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, const char* actual_expression, id expected, id actual); +#if !defined(GTEST_OS_IOS) + +// This overloaded version allows comparison between NSRect objects using +// NSEqualRects. Used to implement {ASSERT|EXPECT}_NSEQ(). +GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, + const char* actual_expression, + const NSRect& expected, + const NSRect& actual); + +// This overloaded version allows comparison between NSRect objects using +// NSEqualRects. Used to implement {ASSERT|EXPECT}_NSNE(). +GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, + const char* actual_expression, + const NSRect& expected, + const NSRect& actual); + +// This overloaded version allows comparison between NSPoint objects using +// NSEqualPoints. Used to implement {ASSERT|EXPECT}_NSEQ(). +GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, + const char* actual_expression, + const NSPoint& expected, + const NSPoint& actual); + +// This overloaded version allows comparison between NSPoint objects using +// NSEqualPoints. Used to implement {ASSERT|EXPECT}_NSNE(). +GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, + const char* actual_expression, + const NSPoint& expected, + const NSPoint& actual); + +#endif // !GTEST_OS_IOS + } // namespace internal } // namespace testing diff --git a/engine/src/flutter/testing/gtest_mac.mm b/engine/src/flutter/testing/gtest_mac.mm index 6aee989013..62b51c5a5a 100644 --- a/engine/src/flutter/testing/gtest_mac.mm +++ b/engine/src/flutter/testing/gtest_mac.mm @@ -55,6 +55,70 @@ GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, return AssertionFailure(msg); } +#if !defined(GTEST_OS_IOS) + +GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, + const char* actual_expression, + const NSRect& expected, + const NSRect& actual) { + if (NSEqualRects(expected, actual)) { + return AssertionSuccess(); + } + return EqFailure(expected_expression, + actual_expression, + [NSStringFromRect(expected) UTF8String], + [NSStringFromRect(actual) UTF8String], + false); + +} + +GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, + const char* actual_expression, + const NSRect& expected, + const NSRect& actual) { + if (!NSEqualRects(expected, actual)) { + return AssertionSuccess(); + } + Message msg; + msg << "Expected: (" << expected_expression << ") != (" << actual_expression + << "), actual: " << [NSStringFromRect(expected) UTF8String] + << " vs " << [NSStringFromRect(actual) UTF8String]; + return AssertionFailure(msg); + +} + +GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, + const char* actual_expression, + const NSPoint& expected, + const NSPoint& actual) { + if (NSEqualPoints(expected, actual)) { + return AssertionSuccess(); + } + return EqFailure(expected_expression, + actual_expression, + [NSStringFromPoint(expected) UTF8String], + [NSStringFromPoint(actual) UTF8String], + false); + +} + +GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, + const char* actual_expression, + const NSPoint& expected, + const NSPoint& actual) { + if (!NSEqualPoints(expected, actual)) { + return AssertionSuccess(); + } + Message msg; + msg << "Expected: (" << expected_expression << ") != (" << actual_expression + << "), actual: " << [NSStringFromPoint(expected) UTF8String] + << " vs " << [NSStringFromPoint(actual) UTF8String]; + return AssertionFailure(msg); + +} + +#endif // !GTEST_OS_IOS + } // namespace internal } // namespace testing diff --git a/engine/src/flutter/testing/gtest_mac_unittest.mm b/engine/src/flutter/testing/gtest_mac_unittest.mm index 01f14979fe..2dfa24e8d8 100644 --- a/engine/src/flutter/testing/gtest_mac_unittest.mm +++ b/engine/src/flutter/testing/gtest_mac_unittest.mm @@ -55,3 +55,55 @@ TEST(GTestMac, ExpectNSNil) { // TODO(shess): Test that EXPECT_NSNE(nil, nil) fails. } + +#if !defined(GTEST_OS_IOS) + +TEST(GTestMac, ExpectNSEQRect) { + base::mac::ScopedNSAutoreleasePool pool; + + EXPECT_NSEQ(NSMakeRect(1, 2, 3, 4), NSMakeRect(1, 2, 3, 4)); +} + +TEST(GTestMac, AssertNSEQRect) { + base::mac::ScopedNSAutoreleasePool pool; + + ASSERT_NSEQ(NSMakeRect(1, 2, 3, 4), NSMakeRect(1, 2, 3, 4)); +} + +TEST(GTestMac, ExpectNSNERect) { + base::mac::ScopedNSAutoreleasePool pool; + + EXPECT_NSNE(NSMakeRect(1, 2, 3, 4), NSMakeRect(5, 6, 7, 8)); +} + +TEST(GTestMac, AssertNSNERect) { + base::mac::ScopedNSAutoreleasePool pool; + + ASSERT_NSNE(NSMakeRect(1, 2, 3, 4), NSMakeRect(5, 6, 7, 8)); +} + +TEST(GTestMac, ExpectNSEQPoint) { + base::mac::ScopedNSAutoreleasePool pool; + + EXPECT_NSEQ(NSMakePoint(1, 2), NSMakePoint(1, 2)); +} + +TEST(GTestMac, AssertNSEQPoint) { + base::mac::ScopedNSAutoreleasePool pool; + + ASSERT_NSEQ(NSMakePoint(1, 2), NSMakePoint(1, 2)); +} + +TEST(GTestMac, ExpectNSNEPoint) { + base::mac::ScopedNSAutoreleasePool pool; + + EXPECT_NSNE(NSMakePoint(1, 2), NSMakePoint(3, 4)); +} + +TEST(GTestMac, AssertNSNEPoint) { + base::mac::ScopedNSAutoreleasePool pool; + + ASSERT_NSNE(NSMakePoint(1, 2), NSMakePoint(3, 4)); +} + +#endif // !GTEST_OS_IOS diff --git a/engine/src/flutter/testing/iossim/iossim.mm b/engine/src/flutter/testing/iossim/iossim.mm index 3910ba5d60..4d557ac8a8 100644 --- a/engine/src/flutter/testing/iossim/iossim.mm +++ b/engine/src/flutter/testing/iossim/iossim.mm @@ -32,6 +32,7 @@ // (crbug.com/385030). #if defined(IOSSIM_USE_XCODE_6) @protocol SimBridge; +@class DVTSimulatorApplication; @class SimDeviceSet; @class SimDeviceType; @class SimRuntime; @@ -631,7 +632,18 @@ DTiPhoneSimulatorApplicationSpecifier* BuildAppSpec(NSString* appPath) { // valid. DTiPhoneSimulatorSystemRoot* BuildSystemRoot(NSString* sdkVersion) { Class systemRootClass = FindClassByName(@"DTiPhoneSimulatorSystemRoot"); +#if defined(IOSSIM_USE_XCODE_6) + Class simRuntimeClass = FindClassByName(@"SimRuntime"); + NSArray* sorted = + [[simRuntimeClass supportedRuntimes] sortedArrayUsingDescriptors:@[ + [NSSortDescriptor sortDescriptorWithKey:@"version" ascending:YES] + ]]; + NSString* versionString = [[sorted lastObject] versionString]; + DTiPhoneSimulatorSystemRoot* systemRoot = + [systemRootClass rootWithSDKVersion:versionString]; +#else DTiPhoneSimulatorSystemRoot* systemRoot = [systemRootClass defaultRoot]; +#endif if (sdkVersion) systemRoot = [systemRootClass rootWithSDKVersion:sdkVersion]; @@ -665,7 +677,7 @@ DTiPhoneSimulatorSessionConfig* BuildSessionConfig( #if defined(IOSSIM_USE_XCODE_6) Class simDeviceTypeClass = FindClassByName(@"SimDeviceType"); id simDeviceType = - [simDeviceTypeClass supportedDeviceTypesByName][deviceName]; + [simDeviceTypeClass supportedDeviceTypesByAlias][deviceName]; Class simRuntimeClass = FindClassByName(@"SimRuntime"); NSString* identifier = systemRoot.runtime.identifier; id simRuntime = [simRuntimeClass supportedRuntimesByIdentifier][identifier]; @@ -955,7 +967,7 @@ int main(int argc, char* const argv[]) { if (IsRunningWithXcode6OrLater()) { #if defined(IOSSIM_USE_XCODE_6) Class simDeviceTypeClass = FindClassByName(@"SimDeviceType"); - if ([simDeviceTypeClass supportedDeviceTypesByName][deviceName] == nil) { + if ([simDeviceTypeClass supportedDeviceTypesByAlias][deviceName] == nil) { LogError(@"Invalid device name: %@.", deviceName); PrintSupportedDevices(); exit(kExitInvalidArguments); diff --git a/engine/src/flutter/testing/legion/SimpleJSONRPCServer.py b/engine/src/flutter/testing/legion/SimpleJSONRPCServer.py new file mode 100644 index 0000000000..4dbfd6e825 --- /dev/null +++ b/engine/src/flutter/testing/legion/SimpleJSONRPCServer.py @@ -0,0 +1,195 @@ +# Copyright 2014 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. + +"""Module to implement the SimpleXMLRPCServer module using JSON-RPC. + +This module uses SimpleXMLRPCServer as the base and only overrides those +portions that implement the XML-RPC protocol. These portions are rewritten +to use the JSON-RPC protocol instead. + +When large portions of code need to be rewritten the original code and +comments are preserved. The intention here is to keep the amount of code +change to a minimum. + +This module only depends on default Python modules, as well as jsonrpclib +which also uses only default modules. No third party code is required to +use this module. +""" +import fcntl +import json +import SimpleXMLRPCServer as _base +import SocketServer +import sys +import traceback +try: + import gzip +except ImportError: + gzip = None #python can be built without zlib/gzip support + +#pylint: disable=relative-import +import jsonrpclib + + +class SimpleJSONRPCRequestHandler(_base.SimpleXMLRPCRequestHandler): + """Request handler class for received requests. + + This class extends the functionality of SimpleXMLRPCRequestHandler and only + overrides the operations needed to change the protocol from XML-RPC to + JSON-RPC. + """ + + def do_POST(self): + """Handles the HTTP POST request. + + Attempts to interpret all HTTP POST requests as JSON-RPC calls, + which are forwarded to the server's _dispatch method for handling. + """ + # Check that the path is legal + if not self.is_rpc_path_valid(): + self.report_404() + return + + try: + # Get arguments by reading body of request. + # We read this in chunks to avoid straining + # socket.read(); around the 10 or 15Mb mark, some platforms + # begin to have problems (bug #792570). + max_chunk_size = 10*1024*1024 + size_remaining = int(self.headers['content-length']) + data = [] + while size_remaining: + chunk_size = min(size_remaining, max_chunk_size) + chunk = self.rfile.read(chunk_size) + if not chunk: + break + data.append(chunk) + size_remaining -= len(data[-1]) + data = ''.join(data) + data = self.decode_request_content(data) + + if data is None: + return # response has been sent + + # In previous versions of SimpleXMLRPCServer, _dispatch + # could be overridden in this class, instead of in + # SimpleXMLRPCDispatcher. To maintain backwards compatibility, + # check to see if a subclass implements _dispatch and dispatch + # using that method if present. + response = self.server._marshaled_dispatch( + data, getattr(self, '_dispatch', None), self.path) + + except Exception, e: # This should only happen if the module is buggy + # internal error, report as HTTP server error + self.send_response(500) + # Send information about the exception if requested + if (hasattr(self.server, '_send_traceback_header') and + self.server._send_traceback_header): + self.send_header('X-exception', str(e)) + self.send_header('X-traceback', traceback.format_exc()) + + self.send_header('Content-length', '0') + self.end_headers() + else: + # got a valid JSON RPC response + self.send_response(200) + self.send_header('Content-type', 'application/json') + + if self.encode_threshold is not None: + if len(response) > self.encode_threshold: + q = self.accept_encodings().get('gzip', 0) + if q: + try: + response = jsonrpclib.gzip_encode(response) + self.send_header('Content-Encoding', 'gzip') + except NotImplementedError: + pass + + self.send_header('Content-length', str(len(response))) + self.end_headers() + self.wfile.write(response) + + +class SimpleJSONRPCDispatcher(_base.SimpleXMLRPCDispatcher): + """Dispatcher for received JSON-RPC requests. + + This class extends the functionality of SimpleXMLRPCDispatcher and only + overrides the operations needed to change the protocol from XML-RPC to + JSON-RPC. + """ + + def _marshaled_dispatch(self, data, dispatch_method=None, path=None): + """Dispatches an JSON-RPC method from marshalled (JSON) data. + + JSON-RPC methods are dispatched from the marshalled (JSON) data + using the _dispatch method and the result is returned as + marshalled data. For backwards compatibility, a dispatch + function can be provided as an argument (see comment in + SimpleJSONRPCRequestHandler.do_POST) but overriding the + existing method through subclassing is the preferred means + of changing method dispatch behavior. + + Returns: + The JSON-RPC string to return. + """ + method = '' + params = [] + ident = '' + try: + request = json.loads(data) + jsonrpclib.ValidateRequest(request) + method = request['method'] + params = request['params'] + ident = request['id'] + + # generate response + if dispatch_method is not None: + response = dispatch_method(method, params) + else: + response = self._dispatch(method, params) + response = jsonrpclib.CreateResponseString(response, ident) + + except jsonrpclib.Fault as fault: + response = jsonrpclib.CreateResponseString(fault, ident) + + # Catch all exceptions here as they should be raised on the caller side. + except: #pylint: disable=bare-except + # report exception back to server + exc_type, exc_value, _ = sys.exc_info() + response = jsonrpclib.CreateResponseString( + jsonrpclib.Fault(1, '%s:%s' % (exc_type, exc_value)), ident) + return response + + +class SimpleJSONRPCServer(SocketServer.TCPServer, + SimpleJSONRPCDispatcher): + """Simple JSON-RPC server. + + This class mimics the functionality of SimpleXMLRPCServer and only + overrides the operations needed to change the protocol from XML-RPC to + JSON-RPC. + """ + + allow_reuse_address = True + + # Warning: this is for debugging purposes only! Never set this to True in + # production code, as will be sending out sensitive information (exception + # and stack trace details) when exceptions are raised inside + # SimpleJSONRPCRequestHandler.do_POST + _send_traceback_header = False + + def __init__(self, addr, requestHandler=SimpleJSONRPCRequestHandler, + logRequests=True, allow_none=False, encoding=None, + bind_and_activate=True): + self.logRequests = logRequests + SimpleJSONRPCDispatcher.__init__(self, allow_none, encoding) + SocketServer.TCPServer.__init__(self, addr, requestHandler, + bind_and_activate) + + # [Bug #1222790] If possible, set close-on-exec flag; if a + # method spawns a subprocess, the subprocess shouldn't have + # the listening socket open. + if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'): + flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD) + flags |= fcntl.FD_CLOEXEC + fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags) diff --git a/engine/src/flutter/testing/legion/common_lib.py b/engine/src/flutter/testing/legion/common_lib.py index 6e7954bbee..863f88730d 100644 --- a/engine/src/flutter/testing/legion/common_lib.py +++ b/engine/src/flutter/testing/legion/common_lib.py @@ -8,7 +8,6 @@ import argparse import logging import os import socket -import xmlrpclib LOGGING_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR'] MY_IP = socket.gethostbyname(socket.gethostname()) @@ -36,8 +35,9 @@ def InitLogging(): datefmt='%H:%M:%S', level=args.verbosity) -def ConnectToServer(server): - """Connect to an RPC server.""" - addr = 'http://%s:%d' % (server, SERVER_PORT) - logging.debug('Connecting to RPC server at %s', addr) - return xmlrpclib.Server(addr, allow_none=True) +def GetOutputDir(): + """Get the isolated output directory specified on the command line.""" + parser = argparse.ArgumentParser() + parser.add_argument('--output-dir') + args, _ = parser.parse_known_args() + return args.output_dir diff --git a/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py b/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py index cea871a405..4b7fb6feec 100755 --- a/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py +++ b/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py @@ -19,6 +19,7 @@ TESTING_DIR = os.path.join( sys.path.append(TESTING_DIR) from legion import legion_test_case +from legion import jsonrpclib class ExampleTestController(legion_test_case.TestCase): @@ -90,6 +91,41 @@ class ExampleTestController(legion_test_case.TestCase): self.assertEqual(ls.GetReturncode(), 0) self.assertIn('task.isolate', ls.ReadStdout()) + def testProcessOutput(self): + """Tests that a process's output gets logged to a file in the output-dir.""" + code = ('import sys\n' + 'sys.stdout.write("Hello stdout")\n' + 'sys.stderr.write("Hello stderr")') + self.task.rpc.WriteFile('test.py', code) + proc = self.task.Process(['python', 'test.py'],) + + self.CheckProcessOutput('stdout', proc.key, 'Hello stdout') + self.CheckProcessOutput('stderr', proc.key, 'Hello stderr') + + def testCustomKey(self): + """Tests that a custom key passed to a process works correctly.""" + code = ('import sys\n' + 'sys.stdout.write("Hello CustomKey stdout")\n' + 'sys.stderr.write("Hello CustomKey stderr")') + self.task.rpc.WriteFile('test.py', code) + self.task.Process(['python', 'test.py'], key='CustomKey') + + self.CheckProcessOutput('stdout', 'CustomKey', 'Hello CustomKey stdout') + self.CheckProcessOutput('stderr', 'CustomKey', 'Hello CustomKey stderr') + + def testKeyReuse(self): + """Tests that a key cannot be reused.""" + self.task.Process(['ls'], key='KeyReuse') + self.assertRaises(jsonrpclib.Fault, self.task.Process, ['ls'], + key='KeyReuse') + + def CheckProcessOutput(self, pipe, key, expected): + """Checks that a process' output files are correct.""" + logging.info('Reading output file') + output_dir = self.task.rpc.GetOutputDir() + path = self.task.rpc.PathJoin(output_dir, '%s.%s' % (key, pipe)) + actual = self.task.rpc.ReadFile(path) + self.assertEqual(expected, actual) if __name__ == '__main__': legion_test_case.main() diff --git a/engine/src/flutter/testing/legion/jsonrpclib.py b/engine/src/flutter/testing/legion/jsonrpclib.py new file mode 100644 index 0000000000..56b30e8dc3 --- /dev/null +++ b/engine/src/flutter/testing/legion/jsonrpclib.py @@ -0,0 +1,370 @@ +# Copyright 2014 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. + +"""Module to implement the JSON-RPC protocol. + +This module uses xmlrpclib as the base and only overrides those +portions that implement the XML-RPC protocol. These portions are rewritten +to use the JSON-RPC protocol instead. + +When large portions of code need to be rewritten the original code and +comments are preserved. The intention here is to keep the amount of code +change to a minimum. + +This module only depends on default Python modules. No third party code is +required to use this module. +""" +import json +import urllib +import xmlrpclib as _base + +__version__ = '1.0.0' +gzip_encode = _base.gzip_encode +gzip = _base.gzip + + +class Error(Exception): + + def __str__(self): + return repr(self) + + +class ProtocolError(Error): + """Indicates a JSON protocol error.""" + + def __init__(self, url, errcode, errmsg, headers): + Error.__init__(self) + self.url = url + self.errcode = errcode + self.errmsg = errmsg + self.headers = headers + + def __repr__(self): + return ( + '' % + (self.url, self.errcode, self.errmsg)) + + +class ResponseError(Error): + """Indicates a broken response package.""" + pass + + +class Fault(Error): + """Indicates a JSON-RPC fault package.""" + + def __init__(self, code, message): + Error.__init__(self) + if not isinstance(code, int): + raise ProtocolError('Fault code must be an integer.') + self.code = code + self.message = message + + def __repr__(self): + return ( + '' % + (self.code, repr(self.message)) + ) + + +def CreateRequest(methodname, params, ident=''): + """Create a valid JSON-RPC request. + + Args: + methodname: The name of the remote method to invoke. + params: The parameters to pass to the remote method. This should be a + list or tuple and able to be encoded by the default JSON parser. + + Returns: + A valid JSON-RPC request object. + """ + request = { + 'jsonrpc': '2.0', + 'method': methodname, + 'params': params, + 'id': ident + } + + return request + + +def CreateRequestString(methodname, params, ident=''): + """Create a valid JSON-RPC request string. + + Args: + methodname: The name of the remote method to invoke. + params: The parameters to pass to the remote method. + These parameters need to be encode-able by the default JSON parser. + ident: The request identifier. + + Returns: + A valid JSON-RPC request string. + """ + return json.dumps(CreateRequest(methodname, params, ident)) + + +def CreateResponse(data, ident): + """Create a JSON-RPC response. + + Args: + data: The data to return. + ident: The response identifier. + + Returns: + A valid JSON-RPC response object. + """ + if isinstance(data, Fault): + response = { + 'jsonrpc': '2.0', + 'error': { + 'code': data.code, + 'message': data.message}, + 'id': ident + } + else: + response = { + 'jsonrpc': '2.0', + 'response': data, + 'id': ident + } + + return response + + +def CreateResponseString(data, ident): + """Create a JSON-RPC response string. + + Args: + data: The data to return. + ident: The response identifier. + + Returns: + A valid JSON-RPC response object. + """ + return json.dumps(CreateResponse(data, ident)) + + +def ParseHTTPResponse(response): + """Parse an HTTP response object and return the JSON object. + + Args: + response: An HTTP response object. + + Returns: + The returned JSON-RPC object. + + Raises: + ProtocolError: if the object format is not correct. + Fault: If a Fault error is returned from the server. + """ + # Check for new http response object, else it is a file object + if hasattr(response, 'getheader'): + if response.getheader('Content-Encoding', '') == 'gzip': + stream = _base.GzipDecodedResponse(response) + else: + stream = response + else: + stream = response + + data = '' + while 1: + chunk = stream.read(1024) + if not chunk: + break + data += chunk + + response = json.loads(data) + ValidateBasicJSONRPCData(response) + + if 'response' in response: + ValidateResponse(response) + return response['response'] + elif 'error' in response: + ValidateError(response) + code = response['error']['code'] + message = response['error']['message'] + raise Fault(code, message) + else: + raise ProtocolError('No valid JSON returned') + + +def ValidateRequest(data): + """Validate a JSON-RPC request object. + + Args: + data: The JSON-RPC object (dict). + + Raises: + ProtocolError: if the object format is not correct. + """ + ValidateBasicJSONRPCData(data) + if 'method' not in data or 'params' not in data: + raise ProtocolError('JSON is not a valid request') + + +def ValidateResponse(data): + """Validate a JSON-RPC response object. + + Args: + data: The JSON-RPC object (dict). + + Raises: + ProtocolError: if the object format is not correct. + """ + ValidateBasicJSONRPCData(data) + if 'response' not in data: + raise ProtocolError('JSON is not a valid response') + + +def ValidateError(data): + """Validate a JSON-RPC error object. + + Args: + data: The JSON-RPC object (dict). + + Raises: + ProtocolError: if the object format is not correct. + """ + ValidateBasicJSONRPCData(data) + if ('error' not in data or + 'code' not in data['error'] or + 'message' not in data['error']): + raise ProtocolError('JSON is not a valid error response') + + +def ValidateBasicJSONRPCData(data): + """Validate a basic JSON-RPC object. + + Args: + data: The JSON-RPC object (dict). + + Raises: + ProtocolError: if the object format is not correct. + """ + error = None + if not isinstance(data, dict): + error = 'JSON data is not a dictionary' + elif 'jsonrpc' not in data or data['jsonrpc'] != '2.0': + error = 'JSON is not a valid JSON RPC 2.0 message' + elif 'id' not in data: + error = 'JSON data missing required id entry' + if error: + raise ProtocolError(error) + + +class Transport(_base.Transport): + """RPC transport class. + + This class extends the functionality of xmlrpclib.Transport and only + overrides the operations needed to change the protocol from XML-RPC to + JSON-RPC. + """ + + user_agent = 'jsonrpclib.py/' + __version__ + + def send_content(self, connection, request_body): + """Send the request.""" + connection.putheader('Content-Type','application/json') + + #optionally encode the request + if (self.encode_threshold is not None and + self.encode_threshold < len(request_body) and + gzip): + connection.putheader('Content-Encoding', 'gzip') + request_body = gzip_encode(request_body) + + connection.putheader('Content-Length', str(len(request_body))) + connection.endheaders(request_body) + + def single_request(self, host, handler, request_body, verbose=0): + """Issue a single JSON-RPC request.""" + + h = self.make_connection(host) + if verbose: + h.set_debuglevel(1) + try: + self.send_request(h, handler, request_body) + self.send_host(h, host) + self.send_user_agent(h) + self.send_content(h, request_body) + + response = h.getresponse(buffering=True) + if response.status == 200: + self.verbose = verbose #pylint: disable=attribute-defined-outside-init + + return self.parse_response(response) + + except Fault: + raise + except Exception: + # All unexpected errors leave connection in + # a strange state, so we clear it. + self.close() + raise + + # discard any response data and raise exception + if response.getheader('content-length', 0): + response.read() + raise ProtocolError( + host + handler, + response.status, response.reason, + response.msg, + ) + + def parse_response(self, response): + """Parse the HTTP resoponse from the server.""" + return ParseHTTPResponse(response) + + +class SafeTransport(_base.SafeTransport): + """Transport class for HTTPS servers. + + This class extends the functionality of xmlrpclib.SafeTransport and only + overrides the operations needed to change the protocol from XML-RPC to + JSON-RPC. + """ + + def parse_response(self, response): + return ParseHTTPResponse(response) + + +class ServerProxy(_base.ServerProxy): + """Proxy class to the RPC server. + + This class extends the functionality of xmlrpclib.ServerProxy and only + overrides the operations needed to change the protocol from XML-RPC to + JSON-RPC. + """ + + def __init__(self, uri, transport=None, encoding=None, verbose=0, + allow_none=0, use_datetime=0): + urltype, _ = urllib.splittype(uri) + if urltype not in ('http', 'https'): + raise IOError('unsupported JSON-RPC protocol') + + _base.ServerProxy.__init__(self, uri, transport, encoding, verbose, + allow_none, use_datetime) + transport_type, uri = urllib.splittype(uri) + if transport is None: + if transport_type == 'https': + transport = SafeTransport(use_datetime=use_datetime) + else: + transport = Transport(use_datetime=use_datetime) + self.__transport = transport + + def __request(self, methodname, params): + """Call a method on the remote server.""" + request = CreateRequestString(methodname, params) + + response = self.__transport.request( + self.__host, + self.__handler, + request, + verbose=self.__verbose + ) + + return response + + +Server = ServerProxy diff --git a/engine/src/flutter/testing/legion/legion.isolate b/engine/src/flutter/testing/legion/legion.isolate index 18e0b3b092..63e3fc88d3 100644 --- a/engine/src/flutter/testing/legion/legion.isolate +++ b/engine/src/flutter/testing/legion/legion.isolate @@ -7,15 +7,18 @@ 'files': [ '__init__.py', 'common_lib.py', + 'jsonrpclib.py', 'legion_test_case.py', 'legion.isolate', 'process.py', 'rpc_methods.py', 'rpc_server.py', 'run_task.py', + 'ssl_util.py', 'task_controller.py', 'task_registration_server.py', 'test_controller.py', + 'SimpleJSONRPCServer.py', '../../tools/swarming_client/', ], }, diff --git a/engine/src/flutter/testing/legion/legion_test_case.py b/engine/src/flutter/testing/legion/legion_test_case.py index 9514e8e19b..c70d154919 100644 --- a/engine/src/flutter/testing/legion/legion_test_case.py +++ b/engine/src/flutter/testing/legion/legion_test_case.py @@ -36,6 +36,13 @@ class TestCase(unittest.TestCase): # Install the _RunTest method self._TestMethod = method setattr(self, test_name, self._RunTest) + self._output_dir = None + + @property + def output_dir(self): + if not self._output_dir: + self._output_dir = self.rpc.GetOutputDir() + return self._output_dir def _RunTest(self): """Runs the test method and provides banner info and error reporting.""" diff --git a/engine/src/flutter/testing/legion/process.py b/engine/src/flutter/testing/legion/process.py index 356db6131b..f3cabb5d94 100644 --- a/engine/src/flutter/testing/legion/process.py +++ b/engine/src/flutter/testing/legion/process.py @@ -9,6 +9,7 @@ process wrapper for easier access and usage of the task-side process. """ import logging +import os import subprocess import sys import threading @@ -29,30 +30,37 @@ class ControllerProcessWrapper(object): than calling the methods directly using the RPC object. """ - def __init__(self, rpc, cmd, verbose=False, detached=False, cwd=None): + def __init__(self, rpc, cmd, verbose=False, detached=False, cwd=None, + key=None): + logging.info('Creating a process with cmd=%s', cmd) self._rpc = rpc - self._id = rpc.subprocess.Process(cmd) + self._key = rpc.subprocess.Process(cmd, key) + logging.info('Process created with key=%s', self._key) if verbose: - self._rpc.subprocess.SetVerbose(self._id) + self._rpc.subprocess.SetVerbose(self._key) if detached: - self._rpc.subprocess.SetDetached(self._id) + self._rpc.subprocess.SetDetached(self._key) if cwd: self._rpc.subprocess.SetCwd(self._rpc, cwd) - self._rpc.subprocess.Start(self._id) + self._rpc.subprocess.Start(self._key) + + @property + def key(self): + return self._key def Terminate(self): - logging.debug('Terminating process %s', self._id) - return self._rpc.subprocess.Terminate(self._id) + logging.debug('Terminating process %s', self._key) + return self._rpc.subprocess.Terminate(self._key) def Kill(self): - logging.debug('Killing process %s', self._id) - self._rpc.subprocess.Kill(self._id) + logging.debug('Killing process %s', self._key) + self._rpc.subprocess.Kill(self._key) def Delete(self): - return self._rpc.subprocess.Delete(self._id) + return self._rpc.subprocess.Delete(self._key) def GetReturncode(self): - return self._rpc.subprocess.GetReturncode(self._id) + return self._rpc.subprocess.GetReturncode(self._key) def ReadStdout(self): """Returns all stdout since the last call to ReadStdout. @@ -62,30 +70,30 @@ class ControllerProcessWrapper(object): multiple calls to ReadStdout and to retain the entire output the results of this call will need to be buffered in the calling code. """ - return self._rpc.subprocess.ReadStdout(self._id) + return self._rpc.subprocess.ReadStdout(self._key) def ReadStderr(self): """Returns all stderr read since the last call to ReadStderr. See ReadStdout for additional details. """ - return self._rpc.subprocess.ReadStderr(self._id) + return self._rpc.subprocess.ReadStderr(self._key) def ReadOutput(self): """Returns the (stdout, stderr) since the last Read* call. See ReadStdout for additional details. """ - return self._rpc.subprocess.ReadOutput(self._id) + return self._rpc.subprocess.ReadOutput(self._key) def Wait(self): - return self._rpc.subprocess.Wait(self._id) + return self._rpc.subprocess.Wait(self._key) def Poll(self): - return self._rpc.subprocess.Poll(self._id) + return self._rpc.subprocess.Poll(self._key) def GetPid(self): - return self._rpc.subprocess.GetPid(self._id) + return self._rpc.subprocess.GetPid(self._key) @@ -105,15 +113,21 @@ class Process(object): _process_next_id = 0 _creation_lock = threading.Lock() - def __init__(self, cmd): + def __init__(self, cmd, key): self.stdout = '' self.stderr = '' + self.key = key self.cmd = cmd self.proc = None self.cwd = None self.verbose = False self.detached = False self.data_lock = threading.Lock() + self.stdout_file = open(self._CreateOutputFilename('stdout'), 'wb+') + self.stderr_file = open(self._CreateOutputFilename('stderr'), 'wb+') + + def _CreateOutputFilename(self, fname): + return os.path.join(common_lib.GetOutputDir(), '%s.%s' % (self.key, fname)) def __str__(self): return '%r, cwd=%r, verbose=%r, detached=%r' % ( @@ -124,10 +138,14 @@ class Process(object): with self.data_lock: if pipe == 'stdout': self.stdout += data + self.stdout_file.write(data) + self.stdout_file.flush() if self.verbose: sys.stdout.write(data) else: self.stderr += data + self.stderr_file.write(data) + self.stderr_file.flush() if self.verbose: sys.stderr.write(data) @@ -137,13 +155,15 @@ class Process(object): cls.Kill(key) @classmethod - def Process(cls, cmd): + def Process(cls, cmd, key=None): with cls._creation_lock: - key = 'Process%d' % cls._process_next_id - cls._process_next_id += 1 - logging.debug('Creating process %s with cmd %r', key, cmd) - process = cls(cmd) - cls._processes[key] = process + if not key: + key = 'Process%d' % cls._process_next_id + cls._process_next_id += 1 + if key in cls._processes: + raise KeyError('Key %s already in use' % key) + logging.debug('Creating process %s with cmd %r', key, cmd) + cls._processes[key] = cls(cmd, key) return key def _Start(self): diff --git a/engine/src/flutter/testing/legion/rpc_methods.py b/engine/src/flutter/testing/legion/rpc_methods.py index 24d0312c25..aaab7e018e 100644 --- a/engine/src/flutter/testing/legion/rpc_methods.py +++ b/engine/src/flutter/testing/legion/rpc_methods.py @@ -10,6 +10,7 @@ import sys import threading #pylint: disable=relative-import +import common_lib import process @@ -49,3 +50,30 @@ class RPCMethods(object): """ t = threading.Thread(target=self._server.shutdown) t.start() + + def GetOutputDir(self): + """Returns the isolated output directory on the task machine.""" + return common_lib.GetOutputDir() + + def WriteFile(self, path, text, mode='wb+'): + """Writes a file on the task machine.""" + with open(path, mode) as fh: + fh.write(text) + + def ReadFile(self, path, mode='rb'): + """Reads a file from the local task machine.""" + with open(path, mode) as fh: + return fh.read() + + def PathJoin(self, *parts): + """Performs an os.path.join on the task machine. + + This is needed due to the fact that there is no guarantee that os.sep will + be the same across all machines in a particular test. This method will + join the path parts locally to ensure the correct separator is used. + """ + return os.path.join(*parts) + + def ListDir(self, path): + """Returns the results of os.listdir.""" + return os.listdir(path) diff --git a/engine/src/flutter/testing/legion/rpc_server.py b/engine/src/flutter/testing/legion/rpc_server.py index 43b431707e..24ebe250d6 100644 --- a/engine/src/flutter/testing/legion/rpc_server.py +++ b/engine/src/flutter/testing/legion/rpc_server.py @@ -17,16 +17,16 @@ be achieved in 2 ways: import logging import threading import time -import xmlrpclib -import SimpleXMLRPCServer import SocketServer #pylint: disable=relative-import import common_lib import rpc_methods +import ssl_util +import SimpleJSONRPCServer -class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): +class RequestHandler(SimpleJSONRPCServer.SimpleJSONRPCRequestHandler): """Restricts access to only specified IP address. This call assumes the server is RPCServer. @@ -44,20 +44,19 @@ class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): self.end_headers() self.wfile.write(response) else: - return SimpleXMLRPCServer.SimpleXMLRPCRequestHandler.do_POST(self) + return SimpleJSONRPCServer.SimpleJSONRPCRequestHandler.do_POST(self) -class RPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer, +class RpcServer(ssl_util.SslRpcServer, SocketServer.ThreadingMixIn): """Restricts all endpoints to only specified IP addresses.""" def __init__(self, authorized_address, idle_timeout_secs=common_lib.DEFAULT_TIMEOUT_SECS): - SimpleXMLRPCServer.SimpleXMLRPCServer.__init__( + ssl_util.SslRpcServer.__init__( self, (common_lib.SERVER_ADDRESS, common_lib.SERVER_PORT), allow_none=True, logRequests=False, requestHandler=RequestHandler) - self.authorized_address = authorized_address self.idle_timeout_secs = idle_timeout_secs self.register_instance(rpc_methods.RPCMethods(self)) @@ -73,7 +72,7 @@ class RPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer, idle timeout thread to quit. """ self._shutdown_requested_event.set() - SimpleXMLRPCServer.SimpleXMLRPCServer.shutdown(self) + SimpleJSONRPCServer.SimpleJSONRPCServer.shutdown(self) logging.info('Server shutdown complete') def serve_forever(self, poll_interval=0.5): @@ -88,7 +87,7 @@ class RPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer, """ logging.info('RPC server starting') self._idle_thread.start() - SimpleXMLRPCServer.SimpleXMLRPCServer.serve_forever(self, poll_interval) + SimpleJSONRPCServer.SimpleJSONRPCServer.serve_forever(self, poll_interval) def _dispatch(self, method, params): """Dispatch the call to the correct method with the provided params. @@ -105,7 +104,8 @@ class RPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer, """ logging.debug('Calling %s%s', method, params) self._rpc_received_event.set() - return SimpleXMLRPCServer.SimpleXMLRPCServer._dispatch(self, method, params) + return SimpleJSONRPCServer.SimpleJSONRPCServer._dispatch( + self, method, params) def _CheckForIdleQuit(self): """Check for, and exit, if the server is idle for too long. diff --git a/engine/src/flutter/testing/legion/run_task.py b/engine/src/flutter/testing/legion/run_task.py index 26c6e5c877..cb0b90fefd 100755 --- a/engine/src/flutter/testing/legion/run_task.py +++ b/engine/src/flutter/testing/legion/run_task.py @@ -14,6 +14,7 @@ import time #pylint: disable=relative-import import common_lib import rpc_server +import ssl_util def main(): @@ -34,10 +35,10 @@ def main(): logging.info( 'Registering with registration server at %s using OTP "%s"', args.controller, args.otp) - common_lib.ConnectToServer(args.controller).RegisterTask( + ssl_util.SslRpcServer.Connect(args.controller).RegisterTask( args.otp, common_lib.MY_IP) - server = rpc_server.RPCServer(args.controller, args.idle_timeout) + server = rpc_server.RpcServer(args.controller, args.idle_timeout) server.serve_forever() logging.info('Server shutdown complete') diff --git a/engine/src/flutter/testing/legion/ssl_util.py b/engine/src/flutter/testing/legion/ssl_util.py new file mode 100644 index 0000000000..41e1e75b2d --- /dev/null +++ b/engine/src/flutter/testing/legion/ssl_util.py @@ -0,0 +1,103 @@ +# Copyright 2015 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. + +"""Utility library to add SSL support to the RPC server.""" + +import logging +import ssl +import subprocess +import tempfile + +#pylint: disable=relative-import +import common_lib +import jsonrpclib +import SimpleJSONRPCServer + + +class Error(Exception): + pass + + +def CreateKeyFile(): + """Creates an SSL keyfile and returns the path.""" + keyfile = tempfile.mkstemp()[1] + cmd = [ + 'openssl', + 'genrsa', + '-out', keyfile, + '2048' + ] + _RunCommand(cmd) + return keyfile + + +def CreateCsrFile(keyfile): + """Creates an SSL CSR file and returns the path.""" + csrfile = tempfile.mkstemp()[1] + cmd = [ + 'openssl', + 'req', + '-new', + '-key', keyfile, + '-out', csrfile, + '-subj', '/C=NA/ST=NA/L=NA/O=Chromium/OU=Test/CN=chromium.org' + ] + _RunCommand(cmd) + return csrfile + + +def CreateCrtFile(keyfile, csrfile): + """Creates an SSL CRT file and returns the path.""" + crtfile = tempfile.mkstemp()[1] + cmd = [ + 'openssl', + 'x509', + '-req', + '-days', '1', + '-in', csrfile, + '-signkey', keyfile, + '-out', crtfile + ] + _RunCommand(cmd) + return crtfile + + +def CreatePemFile(): + """Creates an SSL PEM file and returns the path.""" + keyfile = CreateKeyFile() + csrfile = CreateCsrFile(keyfile) + crtfile = CreateCrtFile(keyfile, csrfile) + pemfile = tempfile.mkstemp()[1] + with open(keyfile) as k: + with open(crtfile) as c: + with open(pemfile, 'wb') as p: + p.write('%s\n%s' % (k.read(), c.read())) + return pemfile + + +def _RunCommand(cmd): + try: + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + except OSError as e: + raise Error('Failed to run %s: %s' % (' '.join(cmd), e)) + out, err = p.communicate() + if p.returncode != 0: + raise Error(err) + return out + + +class SslRpcServer(SimpleJSONRPCServer.SimpleJSONRPCServer): + """Class to add SSL support to the RPC server.""" + + def __init__(self, *args, **kwargs): + SimpleJSONRPCServer.SimpleJSONRPCServer.__init__(self, *args, **kwargs) + self.socket = ssl.wrap_socket(self.socket, certfile=CreatePemFile(), + server_side=True) + + @staticmethod + def Connect(server, port=common_lib.SERVER_PORT): + """Creates and returns a connection to an SSL RPC server.""" + addr = 'https://%s:%d' % (server, port) + logging.debug('Connecting to RPC server at %s', addr) + return jsonrpclib.ServerProxy(addr, allow_none=True) diff --git a/engine/src/flutter/testing/legion/task_controller.py b/engine/src/flutter/testing/legion/task_controller.py index 9514f44fdd..7e0aa99bba 100644 --- a/engine/src/flutter/testing/legion/task_controller.py +++ b/engine/src/flutter/testing/legion/task_controller.py @@ -13,11 +13,12 @@ import subprocess import sys import tempfile import threading -import xmlrpclib #pylint: disable=relative-import import common_lib import process +import ssl_util +import jsonrpclib ISOLATE_PY = os.path.join(common_lib.SWARMING_DIR, 'isolate.py') SWARMING_PY = os.path.join(common_lib.SWARMING_DIR, 'swarming.py') @@ -68,6 +69,7 @@ class TaskController(object): self._ip_address = None self._otp = self._CreateOTP() self._rpc = None + self._output_dir = None run_id = run_id or datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S') self._task_name = '%s/%s/%s' % ( @@ -121,14 +123,19 @@ class TaskController(object): level = logging.getLevelName(level) self._verbosity = level #pylint: disable=attribute-defined-outside-init + @property + def output_dir(self): + if not self._output_dir: + self._output_dir = self.rpc.GetOutputDir() + return self._output_dir + @classmethod def ReleaseAllTasks(cls): for task in cls._tasks: task.Release() - def Process(self, cmd, verbose=False, detached=False, cwd=None): - return process.ControllerProcessWrapper( - self.rpc, cmd, verbose, detached, cwd) + def Process(self, cmd, *args, **kwargs): + return process.ControllerProcessWrapper(self.rpc, cmd, *args, **kwargs) def _CreateOTP(self): """Creates the OTP.""" @@ -160,10 +167,12 @@ class TaskController(object): def Release(self): """Quits the task's RPC server so it can release the machine.""" if self._rpc is not None and self._connected: + logging.info('Copying output-dir files to controller') + self.RetrieveOutputFiles() logging.info('Releasing %s', self._name) try: self._rpc.Quit() - except (socket.error, xmlrpclib.Fault): + except (socket.error, jsonrpclib.Fault): logging.error('Unable to connect to %s to call Quit', self.name) self._rpc = None self._connected = False @@ -192,6 +201,7 @@ class TaskController(object): '--otp', self._otp, '--verbosity', self._verbosity, '--idle-timeout', str(self._idle_timeout_secs), + '--output-dir', '${ISOLATED_OUTDIR}' ]) self._ExecuteProcess(cmd) @@ -208,6 +218,17 @@ class TaskController(object): """Receives task ip address on connection.""" self._ip_address = ip_address self._connected = True - self._rpc = common_lib.ConnectToServer(self._ip_address) + self._rpc = ssl_util.SslRpcServer.Connect(self._ip_address) logging.info('%s connected from %s', self._name, ip_address) self._connect_event.set() + + def RetrieveOutputFiles(self): + """Retrieves all files in the output-dir.""" + files = self.rpc.ListDir(self.output_dir) + for fname in files: + remote_path = self.rpc.PathJoin(self.output_dir, fname) + local_name = os.path.join(common_lib.GetOutputDir(), + '%s.%s' % (self.name, fname)) + contents = self.rpc.ReadFile(remote_path) + with open(local_name, 'wb+') as fh: + fh.write(contents) diff --git a/engine/src/flutter/testing/legion/task_registration_server.py b/engine/src/flutter/testing/legion/task_registration_server.py index fe92dcd5fc..1b15952249 100644 --- a/engine/src/flutter/testing/legion/task_registration_server.py +++ b/engine/src/flutter/testing/legion/task_registration_server.py @@ -11,11 +11,10 @@ is based on an OTP passed to the run_task binary on startup. import logging import threading -import xmlrpclib -import SimpleXMLRPCServer #pylint: disable=relative-import import common_lib +import ssl_util class TaskRegistrationServer(object): @@ -40,7 +39,7 @@ class TaskRegistrationServer(object): def Start(self): """Starts the registration server.""" logging.info('Starting task registration server') - self._rpc_server = SimpleXMLRPCServer.SimpleXMLRPCServer( + self._rpc_server = ssl_util.SslRpcServer( (common_lib.SERVER_ADDRESS, common_lib.SERVER_PORT), allow_none=True, logRequests=False) self._rpc_server.register_function( diff --git a/engine/src/flutter/testing/legion/tools/legion.py b/engine/src/flutter/testing/legion/tools/legion.py index 7b671335ee..4ddfc5e44a 100755 --- a/engine/src/flutter/testing/legion/tools/legion.py +++ b/engine/src/flutter/testing/legion/tools/legion.py @@ -133,6 +133,8 @@ def GetSwarmingCommandLine(args): cmd.append('--') + # Specify the output dir + cmd.extend(['--output-dir', '${ISOLATED_OUTDIR}']) # Task name/hash values for name, isolated in args.tasks: cmd.extend(['--' + name, Archive(isolated, args.isolate_server)]) diff --git a/engine/src/flutter/testing/scripts/android_gtest_test.py b/engine/src/flutter/testing/scripts/android_gtest_test.py new file mode 100755 index 0000000000..998a354135 --- /dev/null +++ b/engine/src/flutter/testing/scripts/android_gtest_test.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +# Copyright 2015 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 json +import os +import sys + + +import common + + +def main_run(args): + filter_tests = [] + if args.filter_file: + filter_tests = json.load(args.filter_file) + + script_args = args.args + test_suite = script_args[0] + + with common.temporary_file() as tempfile_path: + cmd = [ + os.path.join( + args.paths['checkout'], 'build', 'android', 'test_runner.py'), + 'gtest', + '--release' if 'release' in args.build_config_fs.lower() else '--debug', + '--suite', test_suite, + '--verbose', + '--flakiness-dashboard-server=http://test-results.appspot.com', + '--json-results-file', tempfile_path, + ] + if filter_tests: + cmd.extend(['--gtest-filter', ':'.join(filter_tests)]) + + rc = common.run_command(cmd) + + with open(tempfile_path) as f: + results = json.load(f) + + parsed_results = common.parse_gtest_test_results(results) + + json.dump({ + 'valid': True, + 'failures': parsed_results['failures'], + }, args.output) + + return rc + + +def main_compile_targets(args): + json.dump(['${name}_apk'], args.output) + + +if __name__ == '__main__': + funcs = { + 'run': main_run, + 'compile_targets': main_compile_targets, + } + sys.exit(common.run_script(sys.argv[1:], funcs)) diff --git a/engine/src/flutter/testing/scripts/common.py b/engine/src/flutter/testing/scripts/common.py index 1aefcd5b79..3697c4b737 100644 --- a/engine/src/flutter/testing/scripts/common.py +++ b/engine/src/flutter/testing/scripts/common.py @@ -37,6 +37,11 @@ def run_script(argv, funcs): # behavior of the script. parser.add_argument('--args', type=parse_json, default=[]) + parser.add_argument( + '--use-src-side-runtest-py', action='store_true', + help='Use the src-side copy of runtest.py, as opposed to the build-side ' + 'one') + subparsers = parser.add_subparsers() run_parser = subparsers.add_parser('run') @@ -62,12 +67,23 @@ def run_command(argv): def run_runtest(cmd_args, runtest_args): - return run_command([ + if cmd_args.use_src_side_runtest_py: + cmd = [ + sys.executable, + os.path.join( + cmd_args.paths['checkout'], 'infra', 'scripts', 'runtest_wrapper.py'), + '--path-build', cmd_args.paths['build'], + '--', + ] + else: + cmd = [ sys.executable, os.path.join(cmd_args.paths['build'], 'scripts', 'tools', 'runit.py'), '--show-path', sys.executable, os.path.join(cmd_args.paths['build'], 'scripts', 'slave', 'runtest.py'), + ] + return run_command(cmd + [ '--target', cmd_args.build_config_fs, '--xvfb', '--builder-name', cmd_args.properties['buildername'], @@ -137,3 +153,19 @@ def parse_common_test_results(json_results, test_separator='/'): results[key][test] = data return results + + +def parse_gtest_test_results(json_results): + failures = set() + for cur_iteration_data in json_results.get('per_iteration_data', []): + for test_fullname, results in cur_iteration_data.iteritems(): + # Results is a list with one entry per test try. Last one is the final + # result, the only we care about here. + last_result = results[-1] + + if last_result['status'] != 'SUCCESS': + failures.add(test_fullname) + + return { + 'failures': sorted(failures), + } diff --git a/engine/src/flutter/testing/scripts/mojo_apptest.py b/engine/src/flutter/testing/scripts/mojo_apptests.py similarity index 88% rename from engine/src/flutter/testing/scripts/mojo_apptest.py rename to engine/src/flutter/testing/scripts/mojo_apptests.py index 09e3f234fd..49b855da2f 100755 --- a/engine/src/flutter/testing/scripts/mojo_apptest.py +++ b/engine/src/flutter/testing/scripts/mojo_apptests.py @@ -13,11 +13,10 @@ import common def main_run(args): runner = os.path.join(common.SRC_DIR, 'mojo', 'tools', 'apptest_runner.py') - tests = os.path.join(common.SRC_DIR, 'mojo', 'tools', 'data', 'apptests') build_dir = os.path.join(common.SRC_DIR, 'out', args.build_config_fs) with common.temporary_file() as tempfile_path: - rc = common.run_command([runner, tests, build_dir, '--verbose', + rc = common.run_command([runner, build_dir, '--verbose', '--write-full-results-to', tempfile_path]) with open(tempfile_path) as f: results = json.load(f) diff --git a/engine/src/flutter/testing/scripts/telemetry_gpu_unittests.py b/engine/src/flutter/testing/scripts/telemetry_gpu_unittests.py new file mode 100755 index 0000000000..cf9862e3e2 --- /dev/null +++ b/engine/src/flutter/testing/scripts/telemetry_gpu_unittests.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python +# Copyright 2015 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 json +import os +import sys + + +import common + + +def main_run(args): + filter_tests = [] + if args.filter_file: + filter_tests = json.load(args.filter_file) + + with common.temporary_file() as tempfile_path: + rc = common.run_runtest(args, [ + '--test-type', 'telemetry_gpu_unittests', + '--run-python-script', + os.path.join(common.SRC_DIR, + 'content', 'test', 'gpu', 'run_unittests.py'), + '--retry-limit', '3', + '--write-full-results-to', tempfile_path, + ] + filter_tests) + + with open(tempfile_path) as f: + results = json.load(f) + + parsed_results = common.parse_common_test_results(results, test_separator='.') + failures = parsed_results['unexpected_failures'] + + json.dump({ + 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and + ((rc == 0) or failures)), + 'failures': failures.keys(), + }, args.output) + + return rc + + +def main_compile_targets(args): + json.dump([], args.output) + + +if __name__ == '__main__': + funcs = { + 'run': main_run, + 'compile_targets': main_compile_targets, + } + sys.exit(common.run_script(sys.argv[1:], funcs)) diff --git a/engine/src/flutter/testing/scripts/telemetry_perf_unittests.py b/engine/src/flutter/testing/scripts/telemetry_perf_unittests.py index 06e018136c..0c6f08981e 100755 --- a/engine/src/flutter/testing/scripts/telemetry_perf_unittests.py +++ b/engine/src/flutter/testing/scripts/telemetry_perf_unittests.py @@ -25,7 +25,6 @@ def main_run(args): with common.temporary_file() as tempfile_path: test_args += ['--write-full-results-to', tempfile_path] rc = common.run_runtest(args, [ - '--annotate', 'gtest', '--test-type', 'telemetry_perf_unittests', '--run-python-script', os.path.join(common.SRC_DIR, 'tools', 'perf', 'run_tests') diff --git a/engine/src/flutter/testing/scripts/telemetry_unittests.py b/engine/src/flutter/testing/scripts/telemetry_unittests.py index 50af0c08bf..ad7e66f1bf 100755 --- a/engine/src/flutter/testing/scripts/telemetry_unittests.py +++ b/engine/src/flutter/testing/scripts/telemetry_unittests.py @@ -18,7 +18,6 @@ def main_run(args): with common.temporary_file() as tempfile_path: rc = common.run_runtest(args, [ - '--annotate', 'gtest', '--test-type', 'telemetry_unittests', '--run-python-script', os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'), diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config.json deleted file mode 100644 index 9e26dfeeb6..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json new file mode 100644 index 0000000000..cdfc62c587 --- /dev/null +++ b/engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json @@ -0,0 +1,62 @@ +{ + "EnhancedBookmarks": [ + { + "group_name": "EnableEnhancedBookmarks", + "params": { + "id": "Fake_id_to_trigger_experiment_code" + } + }, + { + "group_name": "EnableEnhancedBookmarksGrid", + "params": { + "DefaultViewMode": "Grid", + "id": "Fake_id_to_trigger_experiment_code" + } + }, + { + "group_name": "EnableEnhancedBookmarksList", + "params": { + "DefaultViewMode": "List", + "id": "Fake_id_to_trigger_experiment_code" + } + } + ], + "CustomTabs": [ + { + "group_name": "Enabled" + }, + { + "group_name": "DisablePrerender" + }, + { + "group_name": "Disabled" + } + ], + "DataReductionProxyUseQuic": [ + { + "group_name": "Enabled" + } + ], + "LimitSyncPassphrasePrompt": [ + { + "group_name": "Enabled" + } + ], + "ReaderModeUIFeedback": [ + { + "group_name": "Show" + }, + { + "group_name": "DoNotShow" + } + ], + "ContextualSearch": [ + { + "group_name": "OptOut", + "params": { + "enabled": "true", + "promo_opt_out": "true" + } + } + ] +} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_chromeos.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_chromeos.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/engine/src/flutter/testing/variations/fieldtrial_testing_config_chromeos.json @@ -0,0 +1 @@ +{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json @@ -0,0 +1 @@ +{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json @@ -0,0 +1 @@ +{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json @@ -0,0 +1 @@ +{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json index c80a14e1e2..adb7a40766 100644 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json +++ b/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json @@ -4,11 +4,6 @@ "group_name": "Enabled" } ], - "CTRequiredForEVTrial": [ - { - "group_name": "RequirementEnforced" - } - ], "ChildAccountDetection": [ { "group_name": "Disabled" @@ -19,6 +14,11 @@ "group_name": "Default" } ], + "EnableSessionCrashedBubbleUI": [ + { + "group_name": "Enabled" + } + ], "ExtensionContentVerification": [ { "group_name": "Enforce" @@ -54,21 +54,6 @@ "group_name": "Enabled" } ], - "SHA1IdentityUIWarning": [ - { - "group_name": "Enabled" - } - ], - "SHA1ToolbarUIJanuary2016": [ - { - "group_name": "Warning" - } - ], - "SHA1ToolbarUIJanuary2017": [ - { - "group_name": "Error" - } - ], "SRTPromptFieldTrial": [ { "group_name": "Default" @@ -78,20 +63,5 @@ { "group_name": "enforce_always_with_extensions_and_dse" } - ], - "ShowAppLauncherPromo": [ - { - "group_name": "ShowPromoUntilDismissed" - } - ], - "UwSInterstitialStatus": [ - { - "group_name": "On" - } - ], - "VoiceTrigger": [ - { - "group_name": "Install" - } ] } diff --git a/engine/src/flutter/testing/xvfb.py b/engine/src/flutter/testing/xvfb.py index e7280f4d31..67ef729fb7 100755 --- a/engine/src/flutter/testing/xvfb.py +++ b/engine/src/flutter/testing/xvfb.py @@ -3,11 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Runs the test with xvfb on linux. Runs the test normally on other platforms. - -For simplicity in gyp targets, this script just runs the test normal on -non-linux platforms. -""" +"""Runs tests with Xvfb and Openbox on Linux and normally on other platforms.""" import os import platform @@ -18,120 +14,101 @@ import sys import test_env -def kill(pid): - """Kills a process and traps exception if the process doesn't exist anymore. - """ - # If the process doesn't exist, it raises an exception that we can ignore. +def kill(proc): + """Kills |proc| and ignores exceptions thrown for non-existent processes.""" try: - os.kill(pid, signal.SIGKILL) + if proc and proc.pid: + os.kill(proc.pid, signal.SIGKILL) except OSError: pass -def get_xvfb_path(server_dir): - """Figures out which X server to use.""" - xvfb_path = os.path.join(server_dir, 'Xvfb.' + platform.architecture()[0]) - if not os.path.exists(xvfb_path): - xvfb_path = os.path.join(server_dir, 'Xvfb') - if not os.path.exists(xvfb_path): - print >> sys.stderr, ( - 'No Xvfb found in designated server path: %s' % server_dir) - raise Exception('No virtual server') - return xvfb_path - - -def start_xvfb(xvfb_path, display): - """Starts a virtual X server that we run the tests in. - - This makes it so we can run the tests even if we didn't start the tests from - an X session. - - Args: - xvfb_path: Path to Xvfb. - """ - cmd = [xvfb_path, display, '-screen', '0', '1024x768x24', '-ac', - '-nolisten', 'tcp', '-dpi', '96'] - try: - proc = subprocess.Popen( - cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - except OSError: - print >> sys.stderr, 'Failed to run %s' % ' '.join(cmd) - return - return proc - - def wait_for_xvfb(xdisplaycheck, env): """Waits for xvfb to be fully initialized by using xdisplaycheck.""" try: - _logs = subprocess.check_output( - [xdisplaycheck], - stderr=subprocess.STDOUT, - env=env) + subprocess.check_output([xdisplaycheck], stderr=subprocess.STDOUT, env=env) except OSError: print >> sys.stderr, 'Failed to load %s with cwd=%s' % ( xdisplaycheck, os.getcwd()) return False except subprocess.CalledProcessError as e: - print >> sys.stderr, ( - 'Xvfb failed to load properly (code %d) according to %s' % - (e.returncode, xdisplaycheck)) + print >> sys.stderr, ('Xvfb failed to load (code %d) according to %s' % + (e.returncode, xdisplaycheck)) return False return True -def run_executable(cmd, build_dir, env): - """Runs an executable within a xvfb buffer on linux or normally on other - platforms. +def should_start_xvfb(env): + """Xvfb is only used on Linux and shouldn't be invoked recursively.""" + return sys.platform == 'linux2' and env.get('_CHROMIUM_INSIDE_XVFB') != '1' - Requires that both xvfb and openbox are installed on linux. - Detects recursion with an environment variable and do not create a recursive X - buffer if present. +def start_xvfb(env, build_dir, xvfb_path='Xvfb', display=':9'): + """Start a virtual X server that can run tests without an existing X session. + + Returns the Xvfb and Openbox process Popen objects, or None on failure. + The |env| dictionary is modified to set the DISPLAY and prevent re-entry. + + Args: + env: The os.environ dictionary [copy] to check for re-entry. + build_dir: The path of the build directory, used for xdisplaycheck. + xvfb_path: The path to Xvfb. + display: The X display number to use. """ - # First look if we are inside a display. - if env.get('_CHROMIUM_INSIDE_XVFB') == '1': - # No need to recurse. - return test_env.run_executable(cmd, env) + assert should_start_xvfb(env) + assert env.get('_CHROMIUM_INSIDE_XVFB') != '1' + env['_CHROMIUM_INSIDE_XVFB'] = '1' + env['DISPLAY'] = display + xvfb_proc = None + openbox_proc = None - pid = None - xvfb = 'Xvfb' try: - if sys.platform == 'linux2': - # Defaults to X display 9. - display = ':9' - xvfb_proc = start_xvfb(xvfb, display) - if not xvfb_proc or not xvfb_proc.pid: - return 1 - env['DISPLAY'] = display - if not wait_for_xvfb(os.path.join(build_dir, 'xdisplaycheck'), env): - rc = xvfb_proc.poll() - if rc is None: - print 'Xvfb still running, stopping.' - xvfb_proc.terminate() - else: - print 'Xvfb exited, code %d' % rc + xvfb_cmd = [xvfb_path, display, '-screen', '0', '1024x768x24', '-ac', + '-nolisten', 'tcp', '-dpi', '96'] + xvfb_proc = subprocess.Popen(xvfb_cmd, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) - print 'Xvfb output:' - for l in xvfb_proc.communicate()[0].splitlines(): - print '> %s' % l + if not wait_for_xvfb(os.path.join(build_dir, 'xdisplaycheck'), env): + rc = xvfb_proc.poll() + if rc is None: + print 'Xvfb still running after xdisplaycheck failure, stopping.' + kill(xvfb_proc) + else: + print 'Xvfb exited (code %d) after xdisplaycheck failure.' % rc + print 'Xvfb output:' + for l in xvfb_proc.communicate()[0].splitlines(): + print '> %s' % l + return (None, None) - return 3 - # Inhibit recursion. - env['_CHROMIUM_INSIDE_XVFB'] = '1' - # Some ChromeOS tests need a window manager. Technically, it could be - # another script but that would be overkill. - try: - wm_cmd = ['openbox'] - subprocess.Popen( - wm_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) - except OSError: - print >> sys.stderr, 'Failed to run %s' % ' '.join(wm_cmd) - return 1 + # Some ChromeOS tests need a window manager. + openbox_proc = subprocess.Popen('openbox', stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, env=env) + except OSError as e: + print >> sys.stderr, 'Failed to start Xvfb or Openbox: %s' % str(e) + kill(xvfb_proc) + kill(openbox_proc) + return (None, None) + + return (xvfb_proc, openbox_proc) + + +def run_executable(cmd, build_dir, env): + """Runs an executable within Xvfb on Linux or normally on other platforms. + + Returns the exit code of the specified commandline, or 1 on failure. + """ + xvfb = None + openbox = None + if should_start_xvfb(env): + (xvfb, openbox) = start_xvfb(env, build_dir) + if not xvfb or not xvfb.pid or not openbox or not openbox.pid: + return 1 + try: return test_env.run_executable(cmd, env) finally: - if pid: - kill(pid) + kill(xvfb) + kill(openbox) def main(): diff --git a/engine/src/flutter/third_party/freetype-android/BUILD.gn b/engine/src/flutter/third_party/freetype-android/BUILD.gn index 67f6fe8da7..e8b3aa8095 100644 --- a/engine/src/flutter/third_party/freetype-android/BUILD.gn +++ b/engine/src/flutter/third_party/freetype-android/BUILD.gn @@ -5,7 +5,10 @@ assert(is_android, "This library is only used on Android") config("freetype_config") { - include_dirs = [ "src/include" ] + include_dirs = [ + "include", + "src/include", + ] } source_set("freetype") { @@ -14,12 +17,12 @@ source_set("freetype") { # same order as in Android.mk to ease maintenance. "src/src/base/ftbbox.c", "src/src/base/ftbitmap.c", + "src/src/base/ftfntfmt.c", "src/src/base/ftfstype.c", "src/src/base/ftglyph.c", "src/src/base/ftlcdfil.c", "src/src/base/ftstroke.c", "src/src/base/fttype1.c", - "src/src/base/ftxf86.c", "src/src/base/ftbase.c", "src/src/base/ftsystem.c", "src/src/base/ftinit.c", @@ -39,6 +42,9 @@ source_set("freetype") { defines = [ "FT2_BUILD_LIBRARY", "DARWIN_NO_CARBON", + # Long directory name to avoid accidentally using wrong headers. + "FT_CONFIG_MODULES_H=", + "FT_CONFIG_OPTIONS_H=", ] public_configs = [ ":freetype_config" ] diff --git a/engine/src/flutter/third_party/freetype-android/OWNERS b/engine/src/flutter/third_party/freetype-android/OWNERS new file mode 100644 index 0000000000..a5ce419f26 --- /dev/null +++ b/engine/src/flutter/third_party/freetype-android/OWNERS @@ -0,0 +1,3 @@ +wangxianzhu@chromium.org +michaelbai@chromium.org +bungeman@chromium.org diff --git a/engine/src/flutter/third_party/freetype-android/README.chromium b/engine/src/flutter/third_party/freetype-android/README.chromium index 45032d2778..72d405af41 100644 --- a/engine/src/flutter/third_party/freetype-android/README.chromium +++ b/engine/src/flutter/third_party/freetype-android/README.chromium @@ -1,18 +1,26 @@ -Name: Freetype -URL: https://android.googlesource.com/platform/external/freetype/ -Version: 9c745321260bb728ab1cd1c8fd5f075854b2ad49 +Name: FreeType +URL: http://www.freetype.org/ +Version: VER-2-6 +Revision: e186230678ee8e4ea4ac4797ece8125761e3225a License: Custom license "inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses" -License File: src/NOTICE +License File: src/docs/FTL.TXT Security Critical: yes License Android Compatible: yes Description: -This package was copied from Android source tree and just used for Android. -For other platforms, the freetype is normally found outside the Chromium tree; -e.g. on Mac it's in /usr/include +This package tracks upstream FreeType, but the build files and configuration +are based on the Android source tree. This package is only used for Android. +For other platforms the system FreeType library is used. How to update: -1. Follow the directions in src/README.chromium to update the source. -2. Update freetype.gyp and BUILD.gn to reflect any changes in src/Android.mk. -3. Commit build changes while rolling Chromium DEPS to new commit. +1. Find the desired commit in + https://chromium.googlesource.com/chromium/src/third_party/freetype2/ . + If such a commit does not yet exist, branch from the appropriate point with + a branch name like "chromium/android/VER-X-X-X-updates" depending on the + FreeType tag being branched and commit changes there. +2. Update freetype.gyp and BUILD.gn to reflect any changes. These should be kept + in sync with the Android.mk for FreeType in Android as possible. +3. Update this file. +4. Commit build changes while rolling Chromium's freetype-android DEPS to the + new commit. diff --git a/engine/src/flutter/third_party/freetype-android/freetype.gyp b/engine/src/flutter/third_party/freetype-android/freetype.gyp new file mode 100644 index 0000000000..169f132f1f --- /dev/null +++ b/engine/src/flutter/third_party/freetype-android/freetype.gyp @@ -0,0 +1,67 @@ +# Copyright (c) 2011 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. + +{ + 'variables': { + 'ft2_dir': 'src', + }, + 'conditions': [ + [ 'OS == "android"', { + 'targets': [ + { + 'target_name': 'ft2', + 'type': 'static_library', + 'toolsets': ['target'], + 'sources': [ + # The following files are not sorted alphabetically, but in the + # same order as in Android.mk to ease maintenance. + '<(ft2_dir)/src/base/ftbbox.c', + '<(ft2_dir)/src/base/ftbitmap.c', + '<(ft2_dir)/src/base/ftfntfmt.c', + '<(ft2_dir)/src/base/ftfstype.c', + '<(ft2_dir)/src/base/ftglyph.c', + '<(ft2_dir)/src/base/ftlcdfil.c', + '<(ft2_dir)/src/base/ftstroke.c', + '<(ft2_dir)/src/base/fttype1.c', + '<(ft2_dir)/src/base/ftbase.c', + '<(ft2_dir)/src/base/ftsystem.c', + '<(ft2_dir)/src/base/ftinit.c', + '<(ft2_dir)/src/base/ftgasp.c', + '<(ft2_dir)/src/base/ftmm.c', + '<(ft2_dir)/src/gzip/ftgzip.c', + '<(ft2_dir)/src/raster/raster.c', + '<(ft2_dir)/src/sfnt/sfnt.c', + '<(ft2_dir)/src/smooth/smooth.c', + '<(ft2_dir)/src/autofit/autofit.c', + '<(ft2_dir)/src/truetype/truetype.c', + '<(ft2_dir)/src/cff/cff.c', + '<(ft2_dir)/src/psnames/psnames.c', + '<(ft2_dir)/src/pshinter/pshinter.c', + ], + 'dependencies': [ + '../libpng/libpng.gyp:libpng', + '../zlib/zlib.gyp:zlib', + ], + 'include_dirs': [ + 'include', + '<(ft2_dir)/include', + ], + 'defines': [ + 'FT2_BUILD_LIBRARY', + 'DARWIN_NO_CARBON', + # Long directory name to avoid accidentally using wrong headers. + 'FT_CONFIG_MODULES_H=', + 'FT_CONFIG_OPTIONS_H=', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + 'include', + '<(ft2_dir)/include', + ], + }, + }, + ], + }], + ], +} diff --git a/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftmodule.h b/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftmodule.h new file mode 100644 index 0000000000..8ec70b8082 --- /dev/null +++ b/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftmodule.h @@ -0,0 +1,38 @@ +/***************************************************************************/ +/* */ +/* ftmodule.h */ +/* */ +/* User-selectable module macros. */ +/* */ +/* Copyright 1996-2015 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +FT_USE_MODULE( FT_Module_Class, autofit_module_class ) +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) + +/* +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +*/ diff --git a/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftoption.h b/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftoption.h new file mode 100644 index 0000000000..24991961cc --- /dev/null +++ b/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftoption.h @@ -0,0 +1,886 @@ +/***************************************************************************/ +/* */ +/* ftoption.h */ +/* */ +/* User-selectable configuration macros (specification only). */ +/* */ +/* Copyright 1996-2015 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOPTION_H__ +#define __FTOPTION_H__ + + +#include + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */ + /* name of a directory that is included _before_ the FreeType include */ + /* path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory `builds/' by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file to `$BUILD/ft2build.h' and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H */ + /* #include */ + /* */ + /* will use `$BUILD/myftoptions.h' instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is . */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Uncomment the line below if you want to activate sub-pixel rendering */ + /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ + /* */ + /* Note that this feature is covered by several Microsoft patents */ + /* and should not be activated in any default build of the library. */ + /* */ + /* This macro has no impact on the FreeType API, only on its */ + /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ + /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ + /* the original size in case this macro isn't defined; however, each */ + /* triplet of subpixels has R=G=B. */ + /* */ + /* This is done to allow FreeType clients to run unmodified, forcing */ + /* them to display normal gray-level anti-aliased glyphs. */ + /* */ +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* For most compilers, this will only create compilation warnings when */ + /* building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file `ftconfig.h' either statically or through the */ + /* `configure' script on supported platforms. */ + /* */ +#undef FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* If this macro is defined, do not try to use an assembler version of */ + /* performance-critical functions (e.g. FT_MulFix). You should only do */ + /* that to verify that the assembler function works properly, or to */ + /* execute benchmark tests of the various implementations. */ +/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ + + + /*************************************************************************/ + /* */ + /* If this macro is defined, try to use an inlined assembler version of */ + /* the `FT_MulFix' function, which is a `hotspot' when loading and */ + /* hinting glyphs, and which should be executed as fast as possible. */ + /* */ + /* Note that if your compiler or CPU is not supported, this will default */ + /* to the standard and portable implementation found in `ftcalc.c'. */ + /* */ +#define FT_CONFIG_OPTION_INLINE_MULFIX + + + /*************************************************************************/ + /* */ + /* LZW-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `compress' program. This is mostly used to parse many of the PCF */ + /* files that come with various X11 distributions. The implementation */ + /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ + /* (see src/lzw/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_LZW + + + /*************************************************************************/ + /* */ + /* Gzip-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `gzip' program. This is mostly used to parse many of the PCF files */ + /* that come with XFree86. The implementation uses `zlib' to */ + /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. See also */ + /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ + /* */ +#define FT_CONFIG_OPTION_USE_ZLIB + + + /*************************************************************************/ + /* */ + /* ZLib library selection */ + /* */ + /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ + /* It allows FreeType's `ftgzip' component to link to the system's */ + /* installation of the ZLib library. This is useful on systems like */ + /* Unix or VMS where it generally is already available. */ + /* */ + /* If you let it undefined, the component will use its own copy */ + /* of the zlib sources instead. These have been modified to be */ + /* included directly within the component and *not* export external */ + /* function names. This allows you to link any program with FreeType */ + /* _and_ ZLib without linking conflicts. */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ + + + /*************************************************************************/ + /* */ + /* Bzip2-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `bzip2' program. This is mostly used to parse many of the PCF */ + /* files that come with XFree86. The implementation uses `libbz2' to */ + /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */ + /* Contrary to gzip, bzip2 currently is not included and need to use */ + /* the system available bzip2 implementation. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_BZIP2 */ + + + /*************************************************************************/ + /* */ + /* Define to disable the use of file stream functions and types, FILE, */ + /* fopen() etc. Enables the use of smaller system libraries on embedded */ + /* systems that have multiple system libraries, some with or without */ + /* file stream support, in the cases where file stream support is not */ + /* necessary such as memory loading of font files. */ + /* */ +/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ + + + /*************************************************************************/ + /* */ + /* PNG bitmap support. */ + /* */ + /* FreeType now handles loading color bitmap glyphs in the PNG format. */ + /* This requires help from the external libpng library. Uncompressed */ + /* color bitmaps do not need any external libraries and will be */ + /* supported regardless of this configuration. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_PNG + + + /*************************************************************************/ + /* */ + /* HarfBuzz support. */ + /* */ + /* FreeType uses the HarfBuzz library to improve auto-hinting of */ + /* OpenType fonts. If available, many glyphs not directly addressable */ + /* by a font's character map will be hinted also. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* will be later automatically defined as `extern return_type' to */ + /* allow normal compilation. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_EXPORT(x) extern x */ +/* #define FT_EXPORT_DEF(x) x */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `psnames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `psnames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthesize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthesize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Support for Mac fonts */ + /* */ + /* Define this macro if you want support for outline fonts in Mac */ + /* format (mac dfont, mac resource, macbinary containing a mac */ + /* resource) on non-Mac platforms. */ + /* */ + /* Note that the `FOND' resource isn't checked. */ + /* */ +#define FT_CONFIG_OPTION_MAC_FONTS + + + /*************************************************************************/ + /* */ + /* Guessing methods to access embedded resource forks */ + /* */ + /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ + /* GNU/Linux). */ + /* */ + /* Resource forks which include fonts data are stored sometimes in */ + /* locations which users or developers don't expected. In some cases, */ + /* resource forks start with some offset from the head of a file. In */ + /* other cases, the actual resource fork is stored in file different */ + /* from what the user specifies. If this option is activated, */ + /* FreeType tries to guess whether such offsets or different file */ + /* names must be used. */ + /* */ + /* Note that normal, direct access of resource forks is controlled via */ + /* the FT_CONFIG_OPTION_MAC_FONTS option. */ + /* */ +#ifdef FT_CONFIG_OPTION_MAC_FONTS +#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK +#endif + + + /*************************************************************************/ + /* */ + /* Allow the use of FT_Incremental_Interface to load typefaces that */ + /* contain no glyph data, but supply it via a callback function. */ + /* This is required by clients supporting document formats which */ + /* supply font data incrementally as the document is parsed, such */ + /* as the Ghostscript interpreter for the PostScript language. */ + /* */ +/* #define FT_CONFIG_OPTION_INCREMENTAL */ + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ +#define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_LEVEL_ERROR */ +/* #define FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Autofitter debugging */ + /* */ + /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */ + /* control the autofitter behaviour for debugging purposes with global */ + /* boolean variables (consequently, you should *never* enable this */ + /* while compiling in `release' mode): */ + /* */ + /* _af_debug_disable_horz_hints */ + /* _af_debug_disable_vert_hints */ + /* _af_debug_disable_blue_hints */ + /* */ + /* Additionally, the following functions provide dumps of various */ + /* internal autofit structures to stdout (using `printf'): */ + /* */ + /* af_glyph_hints_dump_points */ + /* af_glyph_hints_dump_segments */ + /* af_glyph_hints_dump_edges */ + /* af_glyph_hints_get_num_segments */ + /* af_glyph_hints_get_segment_offset */ + /* */ + /* As an argument, they use another global variable: */ + /* */ + /* _af_debug_hints */ + /* */ + /* Please have a look at the `ftgrid' demo program to see how those */ + /* variables and macros should be used. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_AUTOFIT */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + /*************************************************************************/ + /* */ + /* Position Independent Code */ + /* */ + /* If this macro is set (which is _not_ the default), FreeType2 will */ + /* avoid creating constants that require address fixups. Instead the */ + /* constants will be moved into a struct and additional intialization */ + /* code will be used. */ + /* */ + /* Setting this macro is needed for systems that prohibit address */ + /* fixups, such as BREW. */ + /* */ +/* #define FT_CONFIG_OPTION_PIC */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `ftsnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 +#define TT_CONFIG_CMAP_FORMAT_13 +#define TT_CONFIG_CMAP_FORMAT_14 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ + /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ + /* replaces the native TrueType hinting mechanism when anything but */ + /* FT_RENDER_MODE_MONO is requested. */ + /* */ + /* Enabling this causes the TrueType driver to ignore instructions under */ + /* certain conditions. This is done in accordance with the guide here, */ + /* with some minor differences: */ + /* */ + /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ + /* By undefining this, you only compile the code necessary to hint */ + /* TrueType glyphs with native TT hinting. */ + /* */ + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + + /*************************************************************************/ + /* */ + /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ + /* of the TrueType bytecode interpreter is used that doesn't implement */ + /* any of the patented opcodes and algorithms. The patents related to */ + /* TrueType hinting have expired worldwide since May 2010; this option */ + /* is now deprecated. */ + /* */ + /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ + /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ + /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ + /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ + /* */ + /* This macro is only useful for a small number of font files (mostly */ + /* for Asian scripts) that require bytecode interpretation to properly */ + /* load glyphs. For all other fonts, this produces unpleasant results, */ + /* thus the unpatented interpreter is never used to load glyphs from */ + /* TrueType fonts unless one of the following two options is used. */ + /* */ + /* - The unpatented interpreter is explicitly activated by the user */ + /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ + /* when opening the FT_Face. */ + /* */ + /* - FreeType detects that the FT_Face corresponds to one of the */ + /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */ + /* contains a hard-coded list of font names and other matching */ + /* parameters (see function `tt_face_init' in file */ + /* `src/truetype/ttobjs.c'). */ + /* */ + /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */ + /* */ + /* { */ + /* FT_Parameter parameter; */ + /* FT_Open_Args open_args; */ + /* */ + /* */ + /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */ + /* */ + /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ + /* open_args.pathname = my_font_pathname; */ + /* open_args.num_params = 1; */ + /* open_args.params = ¶meter; */ + /* */ + /* error = FT_Open_Face( library, &open_args, index, &face ); */ + /* ... */ + /* } */ + /* */ +/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scaling */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* http://www.microsoft.com/typography/otspec/glyf.htm */ + /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ + /* */ +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ + /* support for Apple's distortable font technology (fvar, gvar, cvar, */ + /* and avar tables). This has many similarities to Type 1 Multiple */ + /* Masters support. */ + /* */ +#define TT_CONFIG_OPTION_GX_VAR_SUPPORT + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ + /* an embedded `BDF ' table within SFNT-based bitmap formats. */ + /* */ +#define TT_CONFIG_OPTION_BDF + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** C F F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */ + /* possible to set up the default values of the four control points that */ + /* define the stem darkening behaviour of the (new) CFF engine. For */ + /* more details please read the documentation of the */ + /* `darkening-parameters' property of the cff driver module (file */ + /* `ftcffdrv.h'), which allows the control at run-time. */ + /* */ + /* Do *not* undefine these macros! */ + /* */ +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 + + + /*************************************************************************/ + /* */ + /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the cff driver module. */ + /* */ +/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ + /* support. */ + /* */ +#define AF_CONFIG_OPTION_CJK + + /*************************************************************************/ + /* */ + /* Compile autofit module with Indic script support. */ + /* */ +#define AF_CONFIG_OPTION_INDIC + + /*************************************************************************/ + /* */ + /* Compile autofit module with warp hinting. The idea of the warping */ + /* code is to slightly scale and shift a glyph within a single dimension */ + /* so that as much of its segments are aligned (more or less) on the */ + /* grid. To find out the optimal scaling and shifting value, various */ + /* parameter combinations are tried and scored. */ + /* */ + /* This experimental option is active only if the rendering mode is */ + /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */ + /* `warping' property of the auto-hinter (see file `ftautoh.h' for more */ + /* information; by default it is switched off). */ + /* */ +/*#define AF_CONFIG_OPTION_USE_WARPER*/ + + /* */ + + + /* + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. + */ +/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /* + * This macro is defined if either unpatented or native TrueType + * hinting is requested by the definitions above. + */ +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER +#define TT_USE_BYTECODE_INTERPRETER +#undef TT_CONFIG_OPTION_UNPATENTED_HINTING +#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING +#define TT_USE_BYTECODE_INTERPRETER +#endif + + + /* + * Check CFF darkening parameters. The checks are the same as in function + * `cff_property_set' in file `cffdrivr.c'. + */ +#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 +#error "Invalid CFF darkening parameters!" +#endif + +FT_END_HEADER + + +#endif /* __FTOPTION_H__ */ + + +/* END */ diff --git a/engine/src/flutter/third_party/instrumented_libraries/BUILD.gn b/engine/src/flutter/third_party/instrumented_libraries/BUILD.gn new file mode 100644 index 0000000000..8d113ef091 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/BUILD.gn @@ -0,0 +1,67 @@ +# Copyright 2015 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/config/sanitizers/sanitizers.gni") + +prebuilt_available = + is_msan && (msan_track_origins == 0 || msan_track_origins == 2) + +group("deps") { + if (use_prebuilt_instrumented_libraries) { + assert(prebuilt_available, + "Prebuilt instrumented libraries are only available when " + + "is_msan = true and msan_track_origins = {0, 2}") + deps = [ + ":prebuilt", + ] + } +} + +if (prebuilt_available) { + group("prebuilt") { + visibility = [ ":deps" ] + public_configs = [ ":prebuilt_link_helper" ] + deps = [ + ":extract_prebuilt_instrumented_libraries", + ] + } + + if (is_msan) { + sanitizer_type = "msan" + if (msan_track_origins == 0) { + archive_prefix = "msan-no-origins" + } else if (msan_track_origins == 2) { + archive_prefix = "msan-chained-origins" + } + } + + # TODO(GYP): scripts/download_binaries.py uses GYP_DEFINES to decide whether + # to download the archives extracted here. + # Note: This requires a clobber whenever Ubuntu version changes. + action("extract_prebuilt_instrumented_libraries") { + visibility = [ ":prebuilt" ] + script = "scripts/unpack_binaries.py" + depfile = "$target_out_dir/$archive_prefix.d" + args = [ + archive_prefix, + rebase_path("binaries"), + rebase_path(root_build_dir + "/instrumented_libraries_prebuilt"), + rebase_path(target_out_dir, root_build_dir), + ] + outputs = [ + "$target_out_dir/$archive_prefix.txt", + ] + } + + config("prebuilt_link_helper") { + visibility = [ ":prebuilt" ] + ldflags = [ + # Add a relative RPATH entry to Chromium binaries. This puts instrumented + # DSOs before system-installed versions in library search path. + "-Wl,-R,\$ORIGIN/instrumented_libraries_prebuilt/$sanitizer_type/lib", + "-Wl,-z,origin", + ] + } +} +# TODO(GYP): Support building instrumented libraries from source. diff --git a/engine/src/flutter/third_party/instrumented_libraries/OWNERS b/engine/src/flutter/third_party/instrumented_libraries/OWNERS new file mode 100644 index 0000000000..4ec7dc6d01 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/OWNERS @@ -0,0 +1 @@ +glider@chromium.org diff --git a/engine/src/flutter/third_party/instrumented_libraries/README.chromium b/engine/src/flutter/third_party/instrumented_libraries/README.chromium new file mode 100644 index 0000000000..222a25c929 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/README.chromium @@ -0,0 +1,14 @@ +Name: instrumented_libbraries +URL: n/a +Version: 0 +Security Critical: no +License: n/a +License File: NOT_SHIPPED + +Description: +Scripts which can download and build several third party libraries +using different instrumentation tools (AddressSanitizer, etc.). + +Flag "use_instrumented_libraries=1" in GYP_DEFINES enables usage of +instrumented libraries and final binary will use them instead of standard +system shared libraries. diff --git a/engine/src/flutter/third_party/instrumented_libraries/binaries/.gitignore b/engine/src/flutter/third_party/instrumented_libraries/binaries/.gitignore new file mode 100644 index 0000000000..d177d9a553 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/binaries/.gitignore @@ -0,0 +1,2 @@ +# Ignore downloaded binaries. +*.tgz diff --git a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-precise.tgz.sha1 b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-precise.tgz.sha1 new file mode 100644 index 0000000000..71e2def757 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-precise.tgz.sha1 @@ -0,0 +1 @@ +60669b8a67026d92b365c1a2cab756bfe2fdd90f \ No newline at end of file diff --git a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1 b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1 new file mode 100644 index 0000000000..193be3422d --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1 @@ -0,0 +1 @@ +348b21c99365227beb378e6f068984b0f6ea9f9f \ No newline at end of file diff --git a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-precise.tgz.sha1 b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-precise.tgz.sha1 new file mode 100644 index 0000000000..9f17c0d636 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-precise.tgz.sha1 @@ -0,0 +1 @@ +2a66a901c3b0acd3e5c5cbf49ddfa442f77bb38e \ No newline at end of file diff --git a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1 b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1 new file mode 100644 index 0000000000..bbe6657162 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1 @@ -0,0 +1 @@ +098097aa3f25d94b73014c9249a41bfe37f3242b \ No newline at end of file diff --git a/engine/src/flutter/third_party/instrumented_libraries/blacklists/asan/libglib2.0-0.txt b/engine/src/flutter/third_party/instrumented_libraries/blacklists/asan/libglib2.0-0.txt new file mode 100644 index 0000000000..8989568893 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/blacklists/asan/libglib2.0-0.txt @@ -0,0 +1,2 @@ +# http://crbug.com/367509 +fun:g_utf8_to_ucs4_fast diff --git a/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libglib2.0-0.txt b/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libglib2.0-0.txt new file mode 100644 index 0000000000..45c66832ee --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libglib2.0-0.txt @@ -0,0 +1,2 @@ +# MSan needs an interceptor for wcsxfrm(). http://crbug.com/423410 +fun:g_utf8_collate_key diff --git a/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libx11-6.txt b/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libx11-6.txt new file mode 100644 index 0000000000..a72a39d1a4 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libx11-6.txt @@ -0,0 +1,2 @@ +# https://bugs.freedesktop.org/show_bug.cgi?id=81236 +fun:XIconifyWindow diff --git a/engine/src/flutter/third_party/instrumented_libraries/instrumented_libraries.gyp b/engine/src/flutter/third_party/instrumented_libraries/instrumented_libraries.gyp new file mode 100644 index 0000000000..307aed1940 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/instrumented_libraries.gyp @@ -0,0 +1,860 @@ +# Copyright 2013 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. + +{ + 'variables': { + 'verbose_libraries_build%': 0, + 'instrumented_libraries_jobs%': 1, + 'instrumented_libraries_cc%': 'num = 0; + p->size = 0; diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/libfontconfig.trusty.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/libfontconfig.trusty.diff new file mode 100644 index 0000000000..7cfeba5e70 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/libfontconfig.trusty.diff @@ -0,0 +1,13 @@ +diff -rupN ./src/fcpat.c ../fontconfig-2.11.0-patched/src/fcpat.c +--- ./src/fcpat.c 2013-10-11 07:10:18.000000000 +0400 ++++ ../fontconfig-2.11.0-patched/src/fcpat.c 2014-09-30 22:14:55.818360071 +0400 +@@ -33,6 +33,9 @@ FcPatternCreate (void) + p = (FcPattern *) malloc (sizeof (FcPattern)); + if (!p) + return 0; ++ // Silence Valgrind/MemorySanitizer. There is uninitialized padding at the ++ // end of this structure. When serialized to file, this will cause a report. ++ memset(p, 0, sizeof(*p)); + p->num = 0; + p->size = 0; + p->elts_offset = FcPtrToOffset (p, NULL); diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.precise.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.precise.diff new file mode 100644 index 0000000000..75f4f64206 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.precise.diff @@ -0,0 +1,28 @@ +diff -rupN ./gtk/gtkmain.c ../gtk+2.0-2.24.10-patched/gtk/gtkmain.c +--- ./gtk/gtkmain.c 2014-05-29 19:39:07.000000000 +0400 ++++ ../gtk+2.0-2.24.10-patched/gtk/gtkmain.c 2015-02-09 21:52:59.213636172 +0300 +@@ -751,6 +751,10 @@ _overlay_scrollbar_init (void) + GModule *module = NULL; + gpointer symbol = NULL; + ++ /* Chrome doesn't use overlay-scrollbar anyway. By disabling it here, we avoid ++ * having to build it. */ ++ return; ++ + gchar *flag = (gchar*) g_getenv ("LIBOVERLAY_SCROLLBAR"); + + /* check if LIBOVERLAY_SCROLLBAR is set to 0 or an empty value +diff -rupN ./gtk/gtkmenushell.h ../gtk+2.0-2.24.10-patched/gtk/gtkmenushell.h +--- ./gtk/gtkmenushell.h 2011-08-16 06:30:52.000000000 +0400 ++++ ../gtk+2.0-2.24.10-patched/gtk/gtkmenushell.h 2015-02-09 21:49:49.052032041 +0300 +@@ -135,7 +135,9 @@ void _gtk_menu_shell_update_mnemonic + void _gtk_menu_shell_set_keyboard_mode (GtkMenuShell *menu_shell, + gboolean keyboard_mode); + gboolean _gtk_menu_shell_get_keyboard_mode (GtkMenuShell *menu_shell); +- ++// https://bugs.launchpad.net/bugs/945135 ++gboolean ubuntu_gtk_menu_shell_activate_mnemonic (GtkMenuShell *shell, GtkWidget *item); ++gboolean ubuntu_gtk_menu_shell_activate_first (GtkMenuShell *menu_shell, gboolean search_sensitive); + G_END_DECLS + + #endif /* __GTK_MENU_SHELL_H__ */ diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.trusty.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.trusty.diff new file mode 100644 index 0000000000..2a8295b8b1 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.trusty.diff @@ -0,0 +1,15 @@ +diff -rupN ./gtk/gtkmenushell.h ../gtk+2.0-2.24.23-patched/gtk/gtkmenushell.h +--- ./gtk/gtkmenushell.h 2014-03-06 08:56:42.000000000 +0400 ++++ ../gtk+2.0-2.24.23-patched/gtk/gtkmenushell.h 2014-09-30 23:37:46.908364552 +0400 +@@ -136,6 +136,11 @@ void _gtk_menu_shell_set_keyboard_mo + gboolean keyboard_mode); + gboolean _gtk_menu_shell_get_keyboard_mode (GtkMenuShell *menu_shell); + ++// https://bugs.launchpad.net/bugs/945135 ++gboolean ubuntu_gtk_menu_shell_activate_mnemonic (GtkMenuShell *shell, ++ GtkWidget *item); ++gboolean ubuntu_gtk_menu_shell_activate_first (GtkMenuShell *menu_shell, ++ gboolean search_sensitive); + G_END_DECLS + + #endif /* __GTK_MENU_SHELL_H__ */ diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/libpixman-1-0.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/libpixman-1-0.diff new file mode 100644 index 0000000000..a5599a4a42 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/libpixman-1-0.diff @@ -0,0 +1,23 @@ +--- pixman-0.30.2/configure.ac.orig 2014-08-19 15:53:39.376032738 +0400 ++++ pixman-0.30.2/configure.ac 2014-08-19 15:53:55.264181469 +0400 +@@ -844,12 +844,13 @@ if test x$have_gettimeofday = xyes && te + AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Whether we have gettimeofday()]) + fi + +-dnl ===================================== +-dnl Check for missing sqrtf() as, e.g., for Solaris 9 +- +-AC_SEARCH_LIBS([sqrtf], [m], [], +- [AC_DEFINE([sqrtf], [sqrt], +- [Define to sqrt if you do not have the `sqrtf' function.])]) ++# Not needed for Clang Linux builds. Fixes http://crbug.com/404526. ++#dnl ===================================== ++#dnl Check for missing sqrtf() as, e.g., for Solaris 9 ++# ++#AC_SEARCH_LIBS([sqrtf], [m], [], ++# [AC_DEFINE([sqrtf], [sqrt], ++# [Define to sqrt if you do not have the `sqrtf' function.])]) + + dnl ===================================== + dnl Thread local storage + diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/libva1.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/libva1.diff new file mode 100644 index 0000000000..2e4ca7358e --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/libva1.diff @@ -0,0 +1,22 @@ +diff --git a/va/va.c b/va/va.c +index 6cb17ef..0ba595b 100644 +--- a/va/va.c ++++ b/va/va.c +@@ -515,15 +515,15 @@ VAStatus vaTerminate ( + free(old_ctx->vtable_vpp); + old_ctx->vtable_vpp = NULL; + +- if (VA_STATUS_SUCCESS == vaStatus) +- pDisplayContext->vaDestroy(pDisplayContext); +- + VA_TRACE_LOG(va_TraceTerminate, dpy); + + va_TraceEnd(dpy); + + va_FoolEnd(dpy); + ++ if (VA_STATUS_SUCCESS == vaStatus) ++ pDisplayContext->vaDestroy(pDisplayContext); ++ + return vaStatus; + } diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/libxcb1.precise.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/libxcb1.precise.diff new file mode 100644 index 0000000000..aeb486ebf6 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/libxcb1.precise.diff @@ -0,0 +1,26 @@ +diff -rupN ./src/xcb_conn.c ../libxcb-1.8.1-patched/src/xcb_conn.c +--- ./src/xcb_conn.c 2012-01-11 21:05:41.000000000 +0400 ++++ ../libxcb-1.8.1-patched/src/xcb_conn.c 2014-12-10 23:37:44.432834622 +0300 +@@ -418,10 +418,20 @@ int _xcb_conn_wait(xcb_connection_t *c, + + if(ret) + { ++ /* The code allows two threads to call select()/poll() at the same time. ++ * First thread just wants to read, a second thread wants to write, too. ++ * We have to make sure that we don't steal the reading thread's reply ++ * and let it get stuck in select()/poll(). ++ * So a thread may read if either: ++ * - There is no other thread that wants to read (the above situation ++ * did not occur). ++ * - It is the reading thread (above situation occurred). ++ */ ++ int may_read = c->in.reading == 1 || !count; + #if USE_POLL +- if((fd.revents & POLLIN) == POLLIN) ++ if(may_read && (fd.revents & POLLIN) == POLLIN) + #else +- if(FD_ISSET(c->fd, &rfds)) ++ if(may_read && FD_ISSET(c->fd, &rfds)) + #endif + ret = ret && _xcb_in_read(c); + diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/nss.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/nss.diff new file mode 100644 index 0000000000..1275e5afb7 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/nss.diff @@ -0,0 +1,30 @@ +diff -rupN ./nss/lib/freebl/Makefile ../nss-3.17.1-patched/nss/lib/freebl/Makefile +--- ./nss/lib/freebl/Makefile 2014-09-23 23:09:22.000000000 +0400 ++++ ../nss-3.17.1-patched/nss/lib/freebl/Makefile 2014-09-26 20:36:05.639317008 +0400 +@@ -196,18 +196,20 @@ endif # Darwin + + ifeq ($(OS_TARGET),Linux) + ifeq ($(CPU_ARCH),x86_64) +- ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s ++# Disable inline asm in instrumented builds. ++# ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s + ASFLAGS += -fPIC -Wa,--noexecstack +- DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY +- DEFINES += -DNSS_USE_COMBA ++# DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY ++# DEFINES += -DNSS_USE_COMBA + DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN + # DEFINES += -DMPI_AMD64_ADD + # comment the next four lines to turn off Intel HW acceleration. +- DEFINES += -DUSE_HW_AES -DINTEL_GCM +- ASFILES += intel-aes.s intel-gcm.s ++# DEFINES += -DUSE_HW_AES -DINTEL_GCM ++# ASFILES += intel-aes.s intel-gcm.s ++# This is just intrinsics and should be fine. + EXTRA_SRCS += intel-gcm-wrap.c + INTEL_GCM = 1 +- MPI_SRCS += mpi_amd64.c mp_comba.c ++# MPI_SRCS += mpi_amd64.c mp_comba.c + endif + ifeq ($(CPU_ARCH),x86) + ASFILES = mpi_x86.s diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/pulseaudio.precise.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/pulseaudio.precise.diff new file mode 100644 index 0000000000..fc2ca0d297 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/pulseaudio.precise.diff @@ -0,0 +1,16 @@ +diff -rupN ./src/modules/bluetooth/sbc/sbc_primitives_mmx.h ../pulseaudio-1.1-patched/src/modules/bluetooth/sbc/sbc_primitives_mmx.h +--- ./src/modules/bluetooth/sbc/sbc_primitives_mmx.h 2011-10-20 16:54:16.000000000 +0400 ++++ ../pulseaudio-1.1-patched/src/modules/bluetooth/sbc/sbc_primitives_mmx.h 2014-01-30 16:57:43.113946495 +0400 +@@ -29,8 +29,11 @@ + + #include "sbc_primitives.h" + ++// The inline asm causes errors in clang builds. We don't want inline asm in ++// instrumented builds anyway. + #if defined(__GNUC__) && (defined(__i386__) || defined(__amd64__)) && \ +- !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15) ++ !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15) && \ ++ !defined(__clang__) + + #define SBC_BUILD_WITH_MMX_SUPPORT + diff --git a/engine/src/flutter/third_party/instrumented_libraries/patches/zlib1g.diff b/engine/src/flutter/third_party/instrumented_libraries/patches/zlib1g.diff new file mode 100644 index 0000000000..18a6a3319b --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/patches/zlib1g.diff @@ -0,0 +1,12 @@ +diff -rupN ./configure ../zlib-1.2.3.4.dfsg-patched/configure +--- ./configure 2009-12-24 18:09:43.000000000 +0300 ++++ ../zlib-1.2.3.4.dfsg-patched/configure 2014-06-03 17:53:45.082074669 +0400 +@@ -72,6 +72,8 @@ cflags=${CFLAGS-"-O3"} + # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure + case "$cc" in + *gcc*) gcc=1 ;; ++ # Use the version script for clang builds as well. ++ *clang*) gcc=1 ;; + esac + + if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/build_and_package.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/build_and_package.sh new file mode 100755 index 0000000000..0de0c914df --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/build_and_package.sh @@ -0,0 +1,87 @@ +#!/bin/bash +# Copyright 2015 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. + +set -eu + +supported_build_types="msan-no-origins msan-chained-origins" +supported_releases="precise trusty" +ubuntu_release=$(lsb_release -cs) + +function show_help { + echo "Usage: build_and_package.sh " + echo "Supported build types: all ${supported_build_types}" +} + +function build_libraries { + local build_type=$1 + case ${build_type} in + "msan-chained-origins") + local gyp_defines="msan=1 msan_track_origins=2" + ;; + "msan-no-origins") + local gyp_defines="msan=1 msan_track_origins=0" + ;; + *) + show_help + exit 1 + ;; + esac + + local archive_name=${build_type}-${ubuntu_release} + local out_dir=out-${archive_name} + + echo "Building instrumented libraries in ${out_dir}..." + + rm -rf $out_dir + mkdir $out_dir + + GYP_DEFINES="${gyp_defines} \ + use_instrumented_libraries=1 instrumented_libraries_jobs=8" \ + GYP_GENERATOR_FLAGS="output_dir=${out_dir}" \ + gclient runhooks + + ninja -j4 -C ${out_dir}/Release instrumented_libraries + + echo "Creating archive ${archive_name}.tgz..." + + files=$(ls -1 ${out_dir}/Release/instrumented_libraries) + + tar zcf ${archive_name}.tgz -C ${out_dir}/Release/instrumented_libraries \ + --exclude="?san/*.txt" ${files} + + echo To upload, run: + echo upload_to_google_storage.py -b \ + chromium-instrumented-libraries ${archive_name}.tgz + echo You should then commit the resulting .sha1 file. +} + +if ! [[ "${supported_releases}" =~ ${ubuntu_release} ]] +then + echo "Unsupported Ubuntu release: ${ubuntu_release}" + echo "Supported releases: ${supported_releases}" + exit 1 +fi + +if [ -z "${1-}" ] +then + show_help + exit 0 +fi + +if ! [[ "all ${supported_build_types}" =~ $1 ]] +then + show_help + exit 1 +fi +if [ "$1" == "all" ] +then + for build_type in ${supported_build_types} + do + build_libraries ${build_type} + done +else + build_libraries $1 +fi + diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/download_binaries.py b/engine/src/flutter/third_party/instrumented_libraries/scripts/download_binaries.py new file mode 100755 index 0000000000..83ec7b6aa8 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/download_binaries.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# Copyright (c) 2015 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. + +"""Downloads pre-built sanitizer-instrumented third-party libraries from GCS.""" + +import os +import re +import subprocess +import sys + +def get_ubuntu_release(): + supported_releases = ['precise', 'trusty'] + release = subprocess.check_output(['lsb_release', '-cs']).strip() + if release not in supported_releases: + raise Exception("Supported Ubuntu versions: %s", str(supported_releases)) + return release + + +def get_configuration(gyp_defines): + if re.search(r'\b(msan)=1', gyp_defines): + if 'msan_track_origins=0' in gyp_defines: + return 'msan-no-origins' + if 'msan_track_origins=2' in gyp_defines: + return 'msan-chained-origins' + if 'msan_track_origins=' not in gyp_defines: + # NB: must be the same as the default value in common.gypi + return 'msan-chained-origins' + raise Exception( + "Prebuilt instrumented libraries not available for your configuration.") + + +def get_archive_name(gyp_defines): + return "%s-%s.tgz" % (get_configuration(gyp_defines), get_ubuntu_release()) + + +def main(args): + gyp_defines = os.environ.get('GYP_DEFINES', '') + if not 'use_prebuilt_instrumented_libraries=1' in gyp_defines: + return 0 + + if not sys.platform.startswith('linux'): + raise Exception("'use_prebuilt_instrumented_libraries=1' requires Linux.") + + archive_name = get_archive_name(gyp_defines) + sha1file = '%s.sha1' % archive_name + target_directory = 'src/third_party/instrumented_libraries/binaries/' + + subprocess.check_call([ + 'download_from_google_storage', + '--no_resume', + '--no_auth', + '--bucket', 'chromium-instrumented-libraries', + '-s', sha1file], cwd=target_directory) + + return 0 + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/download_build_install.py b/engine/src/flutter/third_party/instrumented_libraries/scripts/download_build_install.py new file mode 100755 index 0000000000..56c4014914 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/download_build_install.py @@ -0,0 +1,436 @@ +#!/usr/bin/python +# Copyright 2013 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. + +"""Downloads, builds (with instrumentation) and installs shared libraries.""" + +import argparse +import os +import platform +import re +import shlex +import shutil +import subprocess +import sys + +SCRIPT_ABSOLUTE_PATH = os.path.dirname(os.path.abspath(__file__)) + +def unescape_flags(s): + """Un-escapes build flags received from GYP. + + GYP escapes build flags as if they are to be inserted directly into a command + line, wrapping each flag in double quotes. When flags are passed via + CFLAGS/LDFLAGS instead, double quotes must be dropped. + """ + return ' '.join(shlex.split(s)) + + +def real_path(path_relative_to_gyp): + """Returns the absolute path to a file. + + GYP generates paths relative to the location of the .gyp file, which is one + level above the location of this script. This function converts them to + absolute paths. + """ + return os.path.realpath(os.path.join(SCRIPT_ABSOLUTE_PATH, '..', + path_relative_to_gyp)) + + +class InstrumentedPackageBuilder(object): + """Checks out and builds a single instrumented package.""" + def __init__(self, args, clobber): + self._cc = args.cc + self._cxx = args.cxx + self._extra_configure_flags = args.extra_configure_flags + self._jobs = args.jobs + self._libdir = args.libdir + self._package = args.package + self._patch = real_path(args.patch) if args.patch else None + self._pre_build = \ + real_path(args.pre_build) if args.pre_build else None + self._sanitizer = args.sanitizer + self._verbose = args.verbose + self._clobber = clobber + self._working_dir = os.path.join( + real_path(args.intermediate_dir), self._package, '') + + product_dir = real_path(args.product_dir) + self._destdir = os.path.join( + product_dir, 'instrumented_libraries', self._sanitizer) + self._source_archives_dir = os.path.join( + product_dir, 'instrumented_libraries', 'sources', self._package) + + self._cflags = unescape_flags(args.cflags) + if args.sanitizer_blacklist: + blacklist_file = real_path(args.sanitizer_blacklist) + self._cflags += ' -fsanitize-blacklist=%s' % blacklist_file + + self._ldflags = unescape_flags(args.ldflags) + + self.init_build_env() + + # Initialized later. + self._source_dir = None + self._source_archives = None + + def init_build_env(self): + self._build_env = os.environ.copy() + + self._build_env['CC'] = self._cc + self._build_env['CXX'] = self._cxx + + self._build_env['CFLAGS'] = self._cflags + self._build_env['CXXFLAGS'] = self._cflags + self._build_env['LDFLAGS'] = self._ldflags + + if self._sanitizer == 'asan': + # Do not report leaks during the build process. + self._build_env['ASAN_OPTIONS'] = \ + '%s:detect_leaks=0' % self._build_env.get('ASAN_OPTIONS', '') + + # libappindicator1 needs this. + self._build_env['CSC'] = '/usr/bin/mono-csc' + + def shell_call(self, command, env=None, cwd=None): + """Wrapper around subprocess.Popen(). + + Calls command with specific environment and verbosity using + subprocess.Popen(). + """ + child = subprocess.Popen( + command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + env=env, shell=True, cwd=cwd) + stdout, stderr = child.communicate() + if self._verbose or child.returncode: + print stdout + if child.returncode: + raise Exception('Failed to run: %s' % command) + + def maybe_download_source(self): + """Checks out the source code (if needed). + + Checks out the source code for the package, if required (i.e. unless running + in no-clobber mode). Initializes self._source_dir and self._source_archives. + """ + get_fresh_source = self._clobber or not os.path.exists(self._working_dir) + if get_fresh_source: + self.shell_call('rm -rf %s' % self._working_dir) + os.makedirs(self._working_dir) + self.shell_call('apt-get source %s' % self._package, + cwd=self._working_dir) + + (dirpath, dirnames, filenames) = os.walk(self._working_dir).next() + + if len(dirnames) != 1: + raise Exception( + '`apt-get source %s\' must create exactly one subdirectory.' + % self._package) + self._source_dir = os.path.join(dirpath, dirnames[0], '') + + if len(filenames) == 0: + raise Exception('Can\'t find source archives after `apt-get source %s\'.' + % self._package) + self._source_archives = \ + [os.path.join(dirpath, filename) for filename in filenames] + + return get_fresh_source + + def patch_source(self): + if self._patch: + self.shell_call('patch -p1 -i %s' % self._patch, cwd=self._source_dir) + if self._pre_build: + self.shell_call(self._pre_build, cwd=self._source_dir) + + def copy_source_archives(self): + """Copies the downloaded source archives to the output dir. + + For license compliance purposes, every Chromium build that includes + instrumented libraries must include their full source code. + """ + self.shell_call('rm -rf %s' % self._source_archives_dir) + os.makedirs(self._source_archives_dir) + for filename in self._source_archives: + shutil.copy(filename, self._source_archives_dir) + if self._patch: + shutil.copy(self._patch, self._source_archives_dir) + + def download_build_install(self): + got_fresh_source = self.maybe_download_source() + if got_fresh_source: + self.patch_source() + self.copy_source_archives() + + self.shell_call('mkdir -p %s' % self.dest_libdir()) + + try: + self.build_and_install() + except Exception as exception: + print 'ERROR: Failed to build package %s. Have you run ' \ + 'src/third_party/instrumented_libraries/scripts/' \ + 'install-build-deps.sh?' % \ + self._package + print + raise + + # Touch a text file to indicate package is installed. + stamp_file = os.path.join(self._destdir, '%s.txt' % self._package) + open(stamp_file, 'w').close() + + # Remove downloaded package and generated temporary build files. Failed + # builds intentionally skip this step to help debug build failures. + if self._clobber: + self.shell_call('rm -rf %s' % self._working_dir) + + def fix_rpaths(self, directory): + # TODO(earthdok): reimplement fix_rpaths.sh in Python. + script = real_path('scripts/fix_rpaths.sh') + self.shell_call("%s %s" % (script, directory)) + + def temp_dir(self): + """Returns the directory which will be passed to `make install'.""" + return os.path.join(self._source_dir, 'debian', 'instrumented_build') + + def temp_libdir(self): + """Returns the directory under temp_dir() containing the DSOs.""" + return os.path.join(self.temp_dir(), self._libdir) + + def dest_libdir(self): + """Returns the final location of the DSOs.""" + return os.path.join(self._destdir, self._libdir) + + def cleanup_after_install(self): + """Removes unneeded files in self.temp_libdir().""" + # .la files are not needed, nuke them. + # In case --no-static is not supported, nuke any static libraries we built. + self.shell_call( + 'find %s -name *.la -or -name *.a | xargs rm -f' % self.temp_libdir()) + # .pc files are not needed. + self.shell_call('rm %s/pkgconfig -rf' % self.temp_libdir()) + + def make(self, args, jobs=None, env=None, cwd=None): + """Invokes `make'. + + Invokes `make' with the specified args, using self._build_env and + self._source_dir by default. + """ + if jobs is None: + jobs = self._jobs + if cwd is None: + cwd = self._source_dir + if env is None: + env = self._build_env + cmd = ['make', '-j%s' % jobs] + args + self.shell_call(' '.join(cmd), env=env, cwd=cwd) + + def make_install(self, args, **kwargs): + """Invokes `make install'.""" + self.make(['install'] + args, **kwargs) + + def build_and_install(self): + """Builds and installs the DSOs. + + Builds the package with ./configure + make, installs it to a temporary + location, then moves the relevant files to their permanent location. + """ + configure_cmd = './configure --libdir=/%s/ %s' % ( + self._libdir, self._extra_configure_flags) + self.shell_call(configure_cmd, env=self._build_env, cwd=self._source_dir) + + # Some makefiles use BUILDROOT or INSTALL_ROOT instead of DESTDIR. + args = ['DESTDIR', 'BUILDROOT', 'INSTALL_ROOT'] + make_args = ['%s=%s' % (name, self.temp_dir()) for name in args] + self.make(make_args) + + # Some packages don't support parallel install. Use -j1 always. + self.make_install(make_args, jobs=1) + + self.cleanup_after_install() + + self.fix_rpaths(self.temp_libdir()) + + # Now move the contents of the temporary destdir to their final place. + # We only care for the contents of LIBDIR. + self.shell_call('cp %s/* %s/ -rdf' % (self.temp_libdir(), + self.dest_libdir())) + + +class LibcapBuilder(InstrumentedPackageBuilder): + def build_and_install(self): + # libcap2 doesn't have a configure script + build_args = ['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'] + make_args = [ + '%s="%s"' % (name, self._build_env[name]) for name in build_args + ] + self.make(make_args) + + install_args = [ + 'DESTDIR=%s' % self.temp_dir(), + 'lib=%s' % self._libdir, + # Skip a step that requires sudo. + 'RAISE_SETFCAP=no' + ] + self.make_install(install_args) + + self.cleanup_after_install() + + self.fix_rpaths(self.temp_libdir()) + + # Now move the contents of the temporary destdir to their final place. + # We only care for the contents of LIBDIR. + self.shell_call('cp %s/* %s/ -rdf' % (self.temp_libdir(), + self.dest_libdir())) + + +class Libpci3Builder(InstrumentedPackageBuilder): + def package_version(self): + """Guesses libpci3 version from source directory name.""" + dir_name = os.path.split(os.path.normpath(self._source_dir))[-1] + match = re.match('pciutils-(\d+\.\d+\.\d+)', dir_name) + if match is None: + raise Exception( + 'Unable to guess libpci3 version from directory name: %s' % dir_name) + return match.group(1) + + def temp_libdir(self): + # DSOs have to be picked up from /lib, since `make install' + # doesn't actualy install them anywhere. + return os.path.join(self._source_dir, 'lib') + + def build_and_install(self): + # pciutils doesn't have a configure script + # This build process follows debian/rules. + self.shell_call('mkdir -p %s-udeb/usr/bin' % self.temp_dir()) + + build_args = ['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'] + make_args = [ + '%s="%s"' % (name, self._build_env[name]) for name in build_args + ] + make_args += [ + 'LIBDIR=/%s/' % self._libdir, + 'PREFIX=/usr', + 'SBINDIR=/usr/bin', + 'IDSDIR=/usr/share/misc', + 'SHARED=yes', + # pciutils-3.2.1 (Trusty) fails to build due to unresolved libkmod + # symbols. The binary package has no dependencies on libkmod, so it + # looks like it was actually built without libkmod support. + 'LIBKMOD=no', + ] + self.make(make_args) + + # `make install' is not needed. + self.fix_rpaths(self.temp_libdir()) + + # Now install the DSOs to their final place. + self.shell_call( + 'install -m 644 %s/libpci.so* %s' % (self.temp_libdir(), + self.dest_libdir())) + self.shell_call( + 'ln -sf libpci.so.%s %s/libpci.so.3' % (self.package_version(), + self.dest_libdir())) + + +class NSSBuilder(InstrumentedPackageBuilder): + def build_and_install(self): + # NSS uses a build system that's different from configure/make/install. All + # flags must be passed as arguments to make. + make_args = [ + # Do an optimized build. + 'BUILD_OPT=1', + # CFLAGS/CXXFLAGS should not be used, as doing so overrides the flags in + # the makefile completely. The only way to append our flags is to tack + # them onto CC/CXX. + 'CC="%s %s"' % (self._build_env['CC'], self._build_env['CFLAGS']), + 'CXX="%s %s"' % (self._build_env['CXX'], self._build_env['CXXFLAGS']), + # We need to override ZDEFS_FLAG at least to avoid -Wl,-z,defs, which + # is not compatible with sanitizers. We also need some way to pass + # LDFLAGS without overriding the defaults. Conveniently, ZDEF_FLAG is + # always appended to link flags when building NSS on Linux, so we can + # just add our LDFLAGS here. + 'ZDEFS_FLAG="-Wl,-z,nodefs %s"' % self._build_env['LDFLAGS'], + 'NSPR_INCLUDE_DIR=/usr/include/nspr', + 'NSPR_LIB_DIR=%s' % self.dest_libdir(), + 'NSS_ENABLE_ECC=1' + ] + if platform.architecture()[0] == '64bit': + make_args.append('USE_64=1') + + # Make sure we don't override the default flags in the makefile. + for variable in ['CFLAGS', 'CXXFLAGS', 'LDFLAGS']: + del self._build_env[variable] + + # Hardcoded paths. + temp_dir = os.path.join(self._source_dir, 'nss') + temp_libdir = os.path.join(temp_dir, 'lib') + + # Parallel build is not supported. Also, the build happens in + # /nss. + self.make(make_args, jobs=1, cwd=temp_dir) + + self.fix_rpaths(temp_libdir) + + # 'make install' is not supported. Copy the DSOs manually. + for (dirpath, dirnames, filenames) in os.walk(temp_libdir): + for filename in filenames: + if filename.endswith('.so'): + full_path = os.path.join(dirpath, filename) + if self._verbose: + print 'download_build_install.py: installing %s' % full_path + shutil.copy(full_path, self.dest_libdir()) + + +def main(): + parser = argparse.ArgumentParser( + description='Download, build and install an instrumented package.') + + parser.add_argument('-j', '--jobs', type=int, default=1) + parser.add_argument('-p', '--package', required=True) + parser.add_argument( + '-i', '--product-dir', default='.', + help='Relative path to the directory with chrome binaries') + parser.add_argument( + '-m', '--intermediate-dir', default='.', + help='Relative path to the directory for temporary build files') + parser.add_argument('--extra-configure-flags', default='') + parser.add_argument('--cflags', default='') + parser.add_argument('--ldflags', default='') + parser.add_argument('-s', '--sanitizer', required=True, + choices=['asan', 'msan', 'tsan']) + parser.add_argument('-v', '--verbose', action='store_true') + parser.add_argument('--cc') + parser.add_argument('--cxx') + parser.add_argument('--patch', default='') + # This should be a shell script to run before building specific libraries. + # This will be run after applying the patch above. + parser.add_argument('--pre-build', default='') + parser.add_argument('--build-method', default='destdir') + parser.add_argument('--sanitizer-blacklist', default='') + # The LIBDIR argument to configure/make. + parser.add_argument('--libdir', default='lib') + + # Ignore all empty arguments because in several cases gyp passes them to the + # script, but ArgumentParser treats them as positional arguments instead of + # ignoring (and doesn't have such options). + args = parser.parse_args([arg for arg in sys.argv[1:] if len(arg) != 0]) + + # Clobber by default, unless the developer wants to hack on the package's + # source code. + clobber = \ + (os.environ.get('INSTRUMENTED_LIBRARIES_NO_CLOBBER', '') != '1') + + if args.build_method == 'destdir': + builder = InstrumentedPackageBuilder(args, clobber) + elif args.build_method == 'custom_nss': + builder = NSSBuilder(args, clobber) + elif args.build_method == 'custom_libcap': + builder = LibcapBuilder(args, clobber) + elif args.build_method == 'custom_libpci3': + builder = Libpci3Builder(args, clobber) + else: + raise Exception('Unrecognized build method: %s' % args.build_method) + + builder.download_build_install() + +if __name__ == '__main__': + main() diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/fix_rpaths.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/fix_rpaths.sh new file mode 100755 index 0000000000..578243f430 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/fix_rpaths.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright 2013 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. + +# Changes all RPATHs in a given directory from XORIGIN to $ORIGIN +# See the comment about XORIGIN in instrumented_libraries.gyp + +# Fixes rpath from XORIGIN to $ORIGIN in a single file $1. +function fix_rpath { + if [ -w "$1" ] + then + # Only attempt to fix RPATH if the entry actually exists. + # FIXME(earthdok): find out why zlib1g on Precise doesn't get RPATH set. + if chrpath -l $1 + then + echo "fix_rpaths.sh: fixing $1" + chrpath -r $(chrpath $1 | cut -d " " -f 2 | sed s/XORIGIN/\$ORIGIN/g \ + | sed s/RPATH=//g) $1 + fi + else + # FIXME(earthdok): libcups2 DSOs are created non-writable, causing this + # script to fail. As a temporary measure, ignore non-writable files. + echo "fix_rpaths.sh: skipping non-writable file $1" + fi +} + +for i in $(find $1 | grep -P "\.so(.\d+)*$"); do + fix_rpath $i +done diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/install-build-deps.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/install-build-deps.sh new file mode 100755 index 0000000000..7b8c3cbddd --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/install-build-deps.sh @@ -0,0 +1,98 @@ +#!/bin/bash -e + +# Copyright 2014 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. + +# Script to install build dependencies of packages which we instrument. + +# Enable source repositories in Goobuntu. +if hash goobuntu-config 2> /dev/null +then + sudo goobuntu-config set include_deb_src true +fi + +# TODO(earthdok): find a way to pull the list from the build config. +common_packages="\ +atk1.0 \ +dee \ +freetype \ +libappindicator1 \ +libasound2 \ +libcairo2 \ +libcap2 \ +libcups2 \ +libdbus-1-3 \ +libdbus-glib-1-2 \ +libdbusmenu \ +libdbusmenu-glib4 \ +libexpat1 \ +libffi6 \ +libfontconfig1 \ +libgconf-2-4 \ +libgcrypt11 \ +libgdk-pixbuf2.0-0 \ +libglib2.0-0 \ +libgnome-keyring0 \ +libgpg-error0 \ +libgtk2.0-0 \ +libnspr4 \ +libp11-kit0 \ +libpci3 \ +libpcre3 \ +libpixman-1-0 \ +libpng12-0 \ +libunity9 \ +libx11-6 \ +libxau6 \ +libxcb1 \ +libxcomposite1 \ +libxcursor1 \ +libxdamage1 \ +libxdmcp6 \ +libxext6 \ +libxfixes3 \ +libxi6 \ +libxinerama1 \ +libxrandr2 \ +libxrender1 \ +libxss1 \ +libxtst6 \ +nss \ +pango1.0 \ +pulseaudio \ +udev \ +zlib1g \ +brltty" + +precise_specific_packages="libtasn1-3" +trusty_specific_packages="\ +libtasn1-6 \ +harfbuzz +libsecret" + +ubuntu_release=$(lsb_release -cs) + +if test "$ubuntu_release" = "precise" ; then + packages="$common_packages $precise_specific_packages" +else + packages="$common_packages $trusty_specific_packages" +fi + +# Extra build deps for pulseaudio, which apt-get build-dep may fail to install +# for reasons which are not entirely clear. +sudo apt-get install libltdl3-dev libjson0-dev \ + libsndfile1-dev libspeexdsp-dev libjack0 \ + chrpath -y # Chrpath is required by fix_rpaths.sh. + +sudo apt-get build-dep -y $packages + +if test "$ubuntu_release" = "trusty" ; then + # On Trusty, build deps for some of the instrumented packages above conflict + # with Chromium's build deps. In particular: + # zlib1g and libffi remove gcc-4.8 in favor of gcc-multilib, + # libglib2.0-0 removes libelf in favor of libelfg0. + # We let Chromium's build deps take priority. So, run Chromium's + # install-build-deps.sh to reinstall those that have been removed. + $(dirname ${BASH_SOURCE[0]})/../../../build/install-build-deps.sh --no-prompt +fi diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autogen.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autogen.sh new file mode 100755 index 0000000000..7b3b39035d --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autogen.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2014 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. + +# Sometimes there isn't a pre-generated configure script, and we must first run +# autogen.sh to generate it. Even if there is one, sometimes we need to +# re-generate it (in particular, the autoconf version on Trusty is newer than +# what is expected by pre-generated configure scripts in some packages). + +# Unfortunately, we can't run autogen.sh unconditionally whenever it's present, +# as that sometimes breaks build. Which is why we have this file. + +# Also, some packages may or may not have an autogen script, depending on +# version. Rather than clutter the GYP file with conditionals, we simply do +# nothing if the file is not present. + +if [ -x ./autogen.sh ] +then + NOCONFIGURE=1 ./autogen.sh +fi diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh new file mode 100755 index 0000000000..138fabec33 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Copyright 2014 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. + +autoreconf --force diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/freetype.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/freetype.sh new file mode 100755 index 0000000000..2a3ac3fca2 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/freetype.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented freetype. + +mkdir temp +mv * temp/ +cd temp +./debian/rules patch +mv freetype-*/* ../ +cd .. diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh new file mode 100755 index 0000000000..d7c59a4df4 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented libasound2. + +# Instructions from the INSTALL file. +libtoolize --force --copy --automake +aclocal +autoheader +autoconf +automake --foreign --copy --add-missing + +# Do not warn about undefined sanitizer symbols in object files. +sed -i "s/\(-Wl,--no-undefined\|-Wl,-z,defs\)//g" ./configure diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh new file mode 100755 index 0000000000..254804ab81 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented libgdk-pixbuf2.0-0. + +# Use the system-installed gdk-pixbuf-query-loaders during building. Normally a +# just-built one is used, however in MSan builds it will crash due to +# uninstrumented dependencies. + +sed -i "s|\$(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders|/usr/bin/gdk-pixbuf-query-loaders|g" gdk-pixbuf/Makefile.am +autoreconf diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh new file mode 100755 index 0000000000..adaf38f56e --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented libgtk2.0-0. + +# Use the system-installed gtk-update-icon-cache during building. Normally a +# just-built one is used, however in MSan builds it will crash due to +# uninstrumented dependencies. + +sed -i "s|./gtk-update-icon-cache|/usr/bin/gtk-update-icon-cache|g" gtk/Makefile.am +autoreconf diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh new file mode 100755 index 0000000000..07b790800c --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented libnspr4. + +if [ -d nspr ] +then + mv nspr/* . +elif [ -d mozilla/nsprpub ] +then + mv mozilla/nsprpub/* . +else + echo "libnspr4.sh: package has unexpected directory structure. Please update this script." + return 1 +fi diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libva1.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libva1.sh new file mode 100755 index 0000000000..d28002ac5b --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libva1.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented libva1. + +# autogen is only required on Precise. +NOCONFIGURE=1 ./autogen.sh + +sed -i "s|-no-undefined -Wl,--no-undefined||g" dummy_drv_video/Makefile.in diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh new file mode 100755 index 0000000000..a74f1a7ad8 --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented pulseaudio. + +automake --add-missing +autoreconf + +# Do not warn about undefined sanitizer symbols in object files. +sed -i "s/\(-Wl,--no-undefined\|-Wl,-z,defs\)//g" ./configure +# The configure script enforces FORTIFY_SOURCE=2, but we can't live with that. +sed -i "s/-D_FORTIFY_SOURCE=2/-U_FORTIFY_SOURCE/g" ./configure diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/udev.sh b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/udev.sh new file mode 100755 index 0000000000..921b59068e --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/udev.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright 2014 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. + +# This script does some preparations before build of instrumented udev. + +# Required on Trusty due to autoconf version mismatch. +autoreconf --force + +# Do not warn about undefined sanitizer symbols in object files. +sed -i "s/\(-Wl,--no-undefined\|-Wl,-z,defs\)//g" ./configure + +# Do not fortify source (doesn't work with MSan). +sed -i "s/-D_FORTIFY_SOURCE=2/-U_FORTIFY_SOURCE/g" ./configure diff --git a/engine/src/flutter/third_party/instrumented_libraries/scripts/unpack_binaries.py b/engine/src/flutter/third_party/instrumented_libraries/scripts/unpack_binaries.py new file mode 100755 index 0000000000..3e1779069d --- /dev/null +++ b/engine/src/flutter/third_party/instrumented_libraries/scripts/unpack_binaries.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# Copyright 2015 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. + +"""Unpacks pre-built sanitizer-instrumented third-party libraries.""" + +import os +import subprocess +import shutil +import sys + +import download_binaries + + +def get_archive_name(archive_prefix): + return '%s-%s.tgz' % (archive_prefix, download_binaries.get_ubuntu_release()) + + +def main(archive_prefix, archive_dir, target_dir, stamp_dir=None): + shutil.rmtree(target_dir, ignore_errors=True) + + os.mkdir(target_dir) + subprocess.check_call([ + 'tar', + '-zxf', + os.path.join(archive_dir, get_archive_name(archive_prefix)), + '-C', + target_dir]) + stamp_file = os.path.join(stamp_dir or target_dir, '%s.txt' % archive_prefix) + open(stamp_file, 'w').close() + + if stamp_dir: + with open(os.path.join(stamp_dir, '%s.d' % archive_prefix), 'w') as f: + f.write('%s: %s' % ( + stamp_file, os.path.join(archive_dir, + get_archive_name(archive_prefix)))) + return 0 + + +if __name__ == '__main__': + sys.exit(main(*sys.argv[1:])) diff --git a/engine/src/flutter/third_party/jsr-305/BUILD.gn b/engine/src/flutter/third_party/jsr-305/BUILD.gn index 3e24063c2f..fdea260639 100644 --- a/engine/src/flutter/third_party/jsr-305/BUILD.gn +++ b/engine/src/flutter/third_party/jsr-305/BUILD.gn @@ -1,6 +1,7 @@ import("//build/config/android/rules.gni") -android_library("jsr_305_javalib") { +java_library("jsr_305_javalib") { + supports_android = true java_files = [ "src/ri/src/main/java/javax/annotation/PropertyKey.java", "src/ri/src/main/java/javax/annotation/CheckForSigned.java", diff --git a/engine/src/flutter/third_party/junit/junit.gyp b/engine/src/flutter/third_party/junit/junit.gyp index c797e06a5e..9fa92b8286 100644 --- a/engine/src/flutter/third_party/junit/junit.gyp +++ b/engine/src/flutter/third_party/junit/junit.gyp @@ -10,6 +10,7 @@ 'type': 'none', 'variables': { 'jar_path': 'src/lib/hamcrest-core-1.1.jar', + 'enable_errorprone': '0', }, 'includes': [ '../../build/host_prebuilt_jar.gypi', @@ -24,6 +25,7 @@ ], 'variables': { 'src_paths': [ 'src/src/main/java' ], + 'enable_errorprone': '0', }, 'includes': [ '../../build/host_jar.gypi', diff --git a/engine/src/flutter/third_party/mesa/BUILD.gn b/engine/src/flutter/third_party/mesa/BUILD.gn index acdca86162..60caeb6d8d 100644 --- a/engine/src/flutter/third_party/mesa/BUILD.gn +++ b/engine/src/flutter/third_party/mesa/BUILD.gn @@ -78,10 +78,6 @@ config("mesa_internal_config") { "$generated_src_dir/mesa/glapi", ] - if (is_clang) { - cflags += [ "-Wno-tautological-constant-out-of-range-compare" ] - } - if (is_android) { defines += [ "__GLIBC__", @@ -93,6 +89,15 @@ config("mesa_internal_config") { defines += [ "_GNU_SOURCE" ] } + if (is_win) { + defines += [ + # Generated files use const only if __cplusplus or __STDC__ is defined. + # On Windows, neither is defined, so define YY_USE_CONST to explicitly + # enable const. + "YY_USE_CONST", + ] + } + if (is_posix) { defines += [ "HAVE_DLOPEN", @@ -108,7 +113,20 @@ config("mesa_internal_config") { cflags += [ "-fPIC" ] } } +} +# mesa_internal_config is prepended to the config lists. Flags that +# disable warnings need to be appended instead so that they show up +# after flags like -Wall. (gn orders flags on a target before flags from +# configs.) +config("mesa_internal_warnings") { + cflags = [] + if (is_clang) { + cflags += [ + "-Wno-tautological-constant-out-of-range-compare", + "-Wno-mismatched-tags", # Fixed upstream. + ] + } if (is_win) { # TODO(scottmg): http://crbug.com/143877 These should be removed if # Mesa is ever rolled and the warnings are fixed. @@ -117,7 +135,6 @@ config("mesa_internal_config") { "/wd4065", # Switch statement contains 'default' but no 'case' labels. "/wd4090", # 'Operation' : different 'modifier' qualifiers "/wd4099", # Type name struct-vs-class doesn't match. - "/wd4267", # size_t to type. "/wd4273", # Inconsistent DLL linkage. "/wd4291", # No matching operator delete found for placement new. "/wd4305", # Truncation from int to float. @@ -235,7 +252,8 @@ static_library("mesa_libglslcommon") { configs += [ "//build/config/compiler:no_chromium_code" ] previous_configs = configs configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + configs = [ ":mesa_internal_config" ] + previous_configs + + [ ":mesa_internal_warnings" ] if (is_clang) { # Mesa triggers some of these Clang warnings. @@ -617,7 +635,8 @@ static_library("mesa") { configs += [ "//build/config/compiler:no_chromium_code" ] previous_configs = configs configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + configs = [ ":mesa_internal_config" ] + previous_configs + + [ ":mesa_internal_warnings" ] if (is_clang) { # Mesa triggers some of these Clang warnings. @@ -634,8 +653,10 @@ static_library("mesa") { } if (is_win) { - # Because we're building as a static library - defines = [ "_GLAPI_NO_EXPORTS" ] + defines = [ + # Because we're building as a static library + "_GLAPI_NO_EXPORTS", + ] } deps = [ @@ -655,7 +676,6 @@ if (!is_android) { # TODO(GYP) enable for Android. "src/src/mesa/drivers/common/meta.c", "src/src/mesa/drivers/common/meta.h", "src/src/mesa/drivers/osmesa/osmesa.c", - "src/src/mesa/drivers/osmesa/osmesa.def", ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -665,7 +685,8 @@ if (!is_android) { # TODO(GYP) enable for Android. ] previous_configs = configs configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + configs = [ ":mesa_internal_config" ] + previous_configs + + [ ":mesa_internal_warnings" ] include_dirs = [ "src/src/mesa/drivers" ] @@ -674,6 +695,12 @@ if (!is_android) { # TODO(GYP) enable for Android. configs -= [ "//build/config/clang:extra_warnings" ] } + if (is_win) { + ldflags = + [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def", + root_build_dir) ] + } + deps = [ ":mesa_headers", ":mesa", diff --git a/engine/src/flutter/third_party/mesa/mesa.gyp b/engine/src/flutter/third_party/mesa/mesa.gyp index 82027b35e7..4cb1012c38 100644 --- a/engine/src/flutter/third_party/mesa/mesa.gyp +++ b/engine/src/flutter/third_party/mesa/mesa.gyp @@ -46,15 +46,17 @@ "_GLAPI_NO_EXPORTS", ], 'conditions': [ - ['OS=="android"', { + ['OS=="android" or OS=="linux"', { 'defines': [ - '__GLIBC__', '_GNU_SOURCE', ], }], - ['OS=="linux"', { + ['OS=="win"', { 'defines': [ - '_GNU_SOURCE', + # Generated files use const only if __cplusplus or __STDC__ is + # defined. On Windows, neither is defined, so define YY_USE_CONST + # to explicitly enable const. + 'YY_USE_CONST', ], }], ['os_posix == 1', { diff --git a/engine/src/flutter/third_party/mockito/OWNERS b/engine/src/flutter/third_party/mockito/OWNERS index bd675fb8c4..64c090fa89 100644 --- a/engine/src/flutter/third_party/mockito/OWNERS +++ b/engine/src/flutter/third_party/mockito/OWNERS @@ -1,2 +1,2 @@ jbudorick@chromium.org -klundberg@chromium.org +mikecase@chromium.org diff --git a/engine/src/flutter/third_party/mockito/mockito.gyp b/engine/src/flutter/third_party/mockito/mockito.gyp index d9a9db2032..03adb06e70 100644 --- a/engine/src/flutter/third_party/mockito/mockito.gyp +++ b/engine/src/flutter/third_party/mockito/mockito.gyp @@ -10,6 +10,7 @@ 'type': 'none', 'variables': { 'jar_path': 'src/lib/repackaged/cglib-and-asm-1.0.jar', + 'enable_errorprone': '0', }, 'includes': [ '../../build/host_prebuilt_jar.gypi', @@ -21,6 +22,7 @@ 'type': 'none', 'variables': { 'jar_path': 'src/lib/run/objenesis-2.1.jar', + 'enable_errorprone': '0', }, 'includes': [ '../../build/host_prebuilt_jar.gypi', @@ -37,6 +39,7 @@ ], 'variables': { 'src_paths': [ 'src/src' ], + 'enable_errorprone': '0', }, 'includes': [ '../../build/host_jar.gypi', diff --git a/engine/src/flutter/third_party/robolectric/OWNERS b/engine/src/flutter/third_party/robolectric/OWNERS index bd675fb8c4..64c090fa89 100644 --- a/engine/src/flutter/third_party/robolectric/OWNERS +++ b/engine/src/flutter/third_party/robolectric/OWNERS @@ -1,2 +1,2 @@ jbudorick@chromium.org -klundberg@chromium.org +mikecase@chromium.org diff --git a/engine/src/flutter/tools/gritsettings/resource_ids b/engine/src/flutter/tools/gritsettings/resource_ids index 79f7601eec..49973d10c0 100644 --- a/engine/src/flutter/tools/gritsettings/resource_ids +++ b/engine/src/flutter/tools/gritsettings/resource_ids @@ -51,16 +51,13 @@ "ui/resources/ui_resources.grd": { "structures": [5500], }, + "ui/views/resources/views_resources.grd": { + "structures": [5800], + }, "ash/resources/ash_resources.grd": { "includes": [6100], "structures": [6150], }, - "athena/resources/athena_resources.grd": { - "structures": [6400], - }, - "athena/strings/athena_strings.grd": { - "messages": [6500], - }, "chrome/app/theme/theme_resources.grd": { "structures": [7000], }, @@ -224,9 +221,6 @@ "ui/login/login_resources.grd": { "includes": [28310], }, - "ui/oobe/oobe_resources.grd": { - "includes": [28320], - }, "chrome/browser/resources/translate_internals_resources.grd": { "includes": [28510], }, @@ -248,9 +242,6 @@ "components/resources/components_scaled_resources.grd": { "structures": [30310], }, - "components/resources/enhanced_bookmarks/enhanced_bookmarks_resources.grd": { - "includes": [30340], - }, "third_party/WebKit/public/blink_resources.grd": { "includes": [30350], "structures": [30650],