From 2dad1017d30449df71850f3aa6708163f5257c1e Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 9 Aug 2016 12:34:42 -0700 Subject: [PATCH] Remove files that moved to buildroot --- engine/src/flutter/.gitignore | 54 - engine/src/flutter/.gn | 22 - engine/src/flutter/build/OWNERS | 5 - engine/src/flutter/build/PRESUBMIT.py | 16 - engine/src/flutter/build/README.chromium | 15 - engine/src/flutter/build/all.gyp | 1442 ----- .../flutter/build/android/AndroidManifest.xml | 20 - engine/src/flutter/build/android/BUILD.gn | 56 - .../build/android/CheckInstallApk-debug.apk | Bin 37106 -> 0 bytes engine/src/flutter/build/android/OWNERS | 3 - engine/src/flutter/build/android/PRESUBMIT.py | 64 - .../android/adb_android_webview_command_line | 20 - .../android/adb_chrome_public_command_line | 19 - .../android/adb_chrome_shell_command_line | 20 - .../android/adb_command_line_functions.sh | 40 - .../android/adb_content_shell_command_line | 20 - .../build/android/adb_device_functions.sh | 139 - engine/src/flutter/build/android/adb_gdb | 1047 ---- .../android/adb_gdb_android_webview_shell | 16 - .../build/android/adb_gdb_chrome_public | 16 - .../build/android/adb_gdb_chrome_shell | 16 - .../build/android/adb_gdb_content_shell | 16 - .../build/android/adb_gdb_cronet_sample | 16 - .../flutter/build/android/adb_gdb_mojo_shell | 16 - .../flutter/build/android/adb_install_apk.py | 114 - .../android/adb_kill_android_webview_shell | 24 - .../build/android/adb_kill_chrome_public | 24 - .../build/android/adb_kill_chrome_shell | 24 - .../build/android/adb_kill_content_shell | 24 - .../build/android/adb_logcat_monitor.py | 156 - .../build/android/adb_logcat_printer.py | 213 - .../flutter/build/android/adb_profile_chrome | 8 - .../build/android/adb_reverse_forwarder.py | 80 - .../android/adb_run_android_webview_shell | 12 - .../build/android/adb_run_chrome_public | 12 - .../build/android/adb_run_chrome_shell | 12 - .../build/android/adb_run_content_shell | 12 - .../flutter/build/android/adb_run_mojo_shell | 16 - .../build/android/android_no_jni_exports.lst | 17 - engine/src/flutter/build/android/ant/BUILD.gn | 13 - .../flutter/build/android/ant/apk-package.xml | 96 - .../build/android/ant/chromium-debug.keystore | Bin 2223 -> 0 bytes .../flutter/build/android/ant/empty/res/.keep | 2 - .../flutter/build/android/asan_symbolize.py | 103 - engine/src/flutter/build/android/avd.py | 96 - .../build/android/bb_run_sharded_steps.py | 41 - .../src/flutter/build/android/buildbot/OWNERS | 6 - .../build/android/buildbot/bb_annotations.py | 46 - .../buildbot/bb_device_status_check.py | 404 -- .../build/android/buildbot/bb_device_steps.py | 796 --- .../build/android/buildbot/bb_host_steps.py | 133 - .../build/android/buildbot/bb_run_bot.py | 320 - .../build/android/buildbot/bb_utils.py | 100 - .../build/android/buildbot/env_to_json.py | 11 - .../android/buildbot/tests/bb_run_bot_test.py | 35 - .../build/android/chrome_with_libs.gyp | 82 - .../src/flutter/build/android/empty/src/.keep | 6 - .../build/android/empty_proguard.flags | 1 - .../flutter/build/android/enable_asserts.py | 42 - engine/src/flutter/build/android/envsetup.sh | 62 - .../flutter/build/android/findbugs_diff.py | 110 - .../findbugs_filter/findbugs_exclude.xml | 23 - .../build/android/generate_emma_html.py | 90 - engine/src/flutter/build/android/gn/zip.py | 49 - engine/src/flutter/build/android/gyp/aidl.py | 54 - engine/src/flutter/build/android/gyp/ant.py | 65 - .../flutter/build/android/gyp/apk_install.py | 118 - .../build/android/gyp/apk_obfuscate.py | 147 - .../src/flutter/build/android/gyp/copy_ex.py | 77 - .../gyp/create_device_library_links.py | 114 - .../build/android/gyp/create_dist_jar.py | 36 - .../build/android/gyp/create_flutter_jar.py | 56 - .../android/gyp/create_java_binary_script.py | 77 - .../android/gyp/create_placeholder_files.py | 35 - .../android/gyp/create_standalone_apk.py | 60 - .../android/gyp/create_test_runner_script.py | 96 - engine/src/flutter/build/android/gyp/dex.py | 89 - .../flutter/build/android/gyp/emma_instr.py | 207 - .../flutter/build/android/gyp/finalize_apk.py | 132 - .../build/android/gyp/finalize_splits.py | 52 - engine/src/flutter/build/android/gyp/find.py | 30 - .../build/android/gyp/find_sun_tools_jar.py | 56 - .../build/android/gyp/gcc_preprocess.py | 58 - .../android/gyp/generate_split_manifest.py | 97 - .../gyp/generate_v14_compatible_resources.py | 319 - .../android/gyp/get_device_configuration.py | 67 - .../android/gyp/insert_chromium_version.py | 66 - engine/src/flutter/build/android/gyp/jar.py | 79 - .../src/flutter/build/android/gyp/jar_toc.py | 127 - .../build/android/gyp/java_cpp_enum.py | 340 -- .../build/android/gyp/java_cpp_enum_tests.py | 436 -- engine/src/flutter/build/android/gyp/javac.py | 321 - .../build/android/gyp/jinja_template.py | 121 - engine/src/flutter/build/android/gyp/lint.py | 214 - .../build/android/gyp/locale_pak_resources.py | 126 - .../build/android/gyp/pack_relocations.py | 107 - .../build/android/gyp/package_resources.py | 270 - .../build/android/gyp/process_resources.py | 420 -- .../src/flutter/build/android/gyp/proguard.py | 69 - .../build/android/gyp/push_libraries.py | 80 - .../android/gyp/strip_library_for_device.py | 61 - .../flutter/build/android/gyp/test/BUILD.gn | 13 - .../chromium/helloworld/HelloWorldMain.java | 15 - .../helloworld/HelloWorldPrinter.java | 12 - engine/src/flutter/build/android/gyp/touch.py | 16 - .../build/android/gyp/util/__init__.py | 4 - .../build/android/gyp/util/build_device.py | 108 - .../build/android/gyp/util/build_utils.py | 376 -- .../build/android/gyp/util/md5_check.py | 86 - .../build/android/gyp/util/md5_check_test.py | 72 - .../build/android/gyp/util/proguard_util.py | 128 - .../build/android/gyp/write_build_config.py | 357 -- .../android/gyp/write_ordered_libraries.py | 144 - engine/src/flutter/build/android/gyp/zip.py | 26 - .../flutter/build/android/host_heartbeat.py | 33 - .../build/android/install_emulator_deps.py | 277 - .../flutter/build/android/lighttpd_server.py | 256 - engine/src/flutter/build/android/lint/OWNERS | 2 - .../flutter/build/android/lint/suppress.py | 115 - .../build/android/lint/suppressions.xml | 111 - .../src/flutter/build/android/method_count.py | 55 - engine/src/flutter/build/android/ndk.gyp | 20 - ...reprocess_google_play_services.config.json | 90 - .../preprocess_google_play_services.py | 238 - .../build/android/provision_devices.py | 349 -- engine/src/flutter/build/android/pylib/OWNERS | 4 - .../flutter/build/android/pylib/__init__.py | 3 - .../build/android/pylib/android_commands.py | 1976 ------- .../pylib/android_commands_unittest.py | 191 - .../build/android/pylib/base/__init__.py | 4 - .../build/android/pylib/base/base_setup.py | 63 - .../android/pylib/base/base_test_result.py | 216 - .../pylib/base/base_test_result_unittest.py | 82 - .../android/pylib/base/base_test_runner.py | 138 - .../build/android/pylib/base/environment.py | 34 - .../android/pylib/base/environment_factory.py | 18 - .../android/pylib/base/test_collection.py | 80 - .../android/pylib/base/test_dispatcher.py | 332 -- .../pylib/base/test_dispatcher_unittest.py | 241 - .../build/android/pylib/base/test_instance.py | 35 - .../pylib/base/test_instance_factory.py | 24 - .../build/android/pylib/base/test_run.py | 39 - .../android/pylib/base/test_run_factory.py | 41 - .../build/android/pylib/base/test_server.py | 19 - .../pylib/chrome_test_server_spawner.py | 422 -- .../flutter/build/android/pylib/cmd_helper.py | 261 - .../build/android/pylib/cmd_helper_test.py | 83 - .../build/android/pylib/constants/__init__.py | 308 - .../build/android/pylib/constants/keyevent.py | 14 - .../build/android/pylib/content_settings.py | 82 - .../flutter/build/android/pylib/device/OWNERS | 2 - .../build/android/pylib/device/__init__.py | 0 .../build/android/pylib/device/adb_wrapper.py | 608 -- .../android/pylib/device/adb_wrapper_test.py | 96 - .../android/pylib/device/battery_utils.py | 593 -- .../pylib/device/battery_utils_test.py | 574 -- .../android/pylib/device/commands/BUILD.gn | 17 - .../android/pylib/device/commands/__init__.py | 3 - .../pylib/device/commands/commands.gyp | 20 - .../pylib/device/commands/install_commands.py | 51 - .../android/commands/unzip/Unzip.java | 95 - .../build/android/pylib/device/decorators.py | 157 - .../android/pylib/device/decorators_test.py | 365 -- .../android/pylib/device/device_blacklist.py | 61 - .../android/pylib/device/device_errors.py | 89 - .../build/android/pylib/device/device_list.py | 30 - .../android/pylib/device/device_utils.py | 1754 ------ .../pylib/device/device_utils_device_test.py | 211 - .../android/pylib/device/device_utils_test.py | 1845 ------ .../build/android/pylib/device/intent.py | 113 - .../android/pylib/device/logcat_monitor.py | 139 - .../pylib/device/logcat_monitor_test.py | 164 - .../android/pylib/device/shared_prefs.py | 391 -- .../android/pylib/device/shared_prefs_test.py | 169 - .../build/android/pylib/device_settings.py | 198 - .../build/android/pylib/device_signal.py | 41 - .../pylib/efficient_android_directory_copy.sh | 78 - .../build/android/pylib/flag_changer.py | 166 - .../flutter/build/android/pylib/forwarder.py | 331 -- .../build/android/pylib/gtest/__init__.py | 4 - .../build/android/pylib/gtest/filter/OWNERS | 1 - .../gtest/filter/base_unittests_disabled | 28 - ...ase_unittests_emulator_additional_disabled | 10 - .../filter/blink_heap_unittests_disabled | 2 - .../gtest/filter/breakpad_unittests_disabled | 9 - .../pylib/gtest/filter/cc_unittests_disabled | 5 - .../filter/content_browsertests_disabled | 62 - .../gtest/filter/content_unittests_disabled | 13 - .../pylib/gtest/filter/gfx_unittests_disabled | 10 - .../pylib/gtest/filter/ipc_tests_disabled | 18 - .../gtest/filter/media_unittests_disabled | 8 - .../pylib/gtest/filter/net_unittests_disabled | 41 - .../gtest/filter/sync_unit_tests_disabled | 4 - .../pylib/gtest/filter/unit_tests_disabled | 119 - .../gtest/filter/webkit_unit_tests_disabled | 25 - .../build/android/pylib/gtest/gtest_config.py | 54 - .../pylib/gtest/gtest_test_instance.py | 329 -- .../pylib/gtest/gtest_test_instance_test.py | 86 - .../pylib/gtest/local_device_gtest_run.py | 241 - .../build/android/pylib/gtest/setup.py | 230 - .../build/android/pylib/gtest/test_options.py | 19 - .../build/android/pylib/gtest/test_package.py | 76 - .../android/pylib/gtest/test_package_apk.py | 157 - .../android/pylib/gtest/test_package_exe.py | 163 - .../build/android/pylib/gtest/test_runner.py | 217 - .../android/pylib/host_driven/__init__.py | 4 - .../build/android/pylib/host_driven/setup.py | 200 - .../android/pylib/host_driven/test_case.py | 189 - .../pylib/host_driven/test_info_collection.py | 144 - .../android/pylib/host_driven/test_runner.py | 133 - .../android/pylib/host_driven/test_server.py | 130 - .../pylib/host_driven/tests_annotations.py | 94 - .../android/pylib/instrumentation/__init__.py | 4 - .../instrumentation/instrumentation_parser.py | 96 - .../instrumentation_parser_test.py | 134 - .../instrumentation_test_instance.py | 525 -- .../instrumentation_test_instance_test.py | 109 - .../pylib/instrumentation/json_perf_parser.py | 161 - .../android/pylib/instrumentation/setup.py | 113 - .../android/pylib/instrumentation/test_jar.py | 230 - .../pylib/instrumentation/test_options.py | 27 - .../pylib/instrumentation/test_package.py | 44 - .../pylib/instrumentation/test_result.py | 30 - .../pylib/instrumentation/test_runner.py | 374 -- .../build/android/pylib/junit/__init__.py | 4 - .../build/android/pylib/junit/setup.py | 20 - .../android/pylib/junit/test_dispatcher.py | 28 - .../build/android/pylib/junit/test_runner.py | 50 - .../build/android/pylib/linker/__init__.py | 4 - .../build/android/pylib/linker/setup.py | 45 - .../build/android/pylib/linker/test_case.py | 496 -- .../build/android/pylib/linker/test_runner.py | 98 - .../build/android/pylib/local/__init__.py | 3 - .../android/pylib/local/device/__init__.py | 3 - .../local/device/local_device_environment.py | 54 - .../local_device_instrumentation_test_run.py | 207 - .../local/device/local_device_test_run.py | 99 - .../pylib/local/local_test_server_spawner.py | 45 - .../build/android/pylib/monkey/__init__.py | 0 .../build/android/pylib/monkey/setup.py | 27 - .../android/pylib/monkey/test_options.py | 16 - .../build/android/pylib/monkey/test_runner.py | 106 - .../build/android/pylib/perf/__init__.py | 3 - .../build/android/pylib/perf/cache_control.py | 21 - .../build/android/pylib/perf/perf_control.py | 161 - .../pylib/perf/perf_control_unittest.py | 37 - .../flutter/build/android/pylib/perf/setup.py | 97 - .../pylib/perf/surface_stats_collector.py | 191 - .../perf/surface_stats_collector_unittest.py | 64 - .../build/android/pylib/perf/test_options.py | 22 - .../build/android/pylib/perf/test_runner.py | 374 -- .../android/pylib/perf/thermal_throttle.py | 137 - .../flutter/build/android/pylib/pexpect.py | 21 - .../src/flutter/build/android/pylib/ports.py | 172 - .../build/android/pylib/remote/__init__.py | 3 - .../android/pylib/remote/device/__init__.py | 3 - .../pylib/remote/device/appurify_constants.py | 57 - .../pylib/remote/device/appurify_sanitized.py | 40 - .../pylib/remote/device/dummy/BUILD.gn | 14 - .../pylib/remote/device/dummy/dummy.gyp | 25 - .../dummy/src/org/chromium/dummy/Dummy.java | 9 - .../device/remote_device_environment.py | 368 -- .../remote/device/remote_device_gtest_run.py | 81 - .../remote/device/remote_device_helper.py | 24 - .../remote_device_instrumentation_test_run.py | 74 - .../remote/device/remote_device_test_run.py | 308 - .../device/remote_device_uirobot_test_run.py | 88 - .../build/android/pylib/restart_adbd.sh | 20 - .../build/android/pylib/results/__init__.py | 3 - .../results/flakiness_dashboard/__init__.py | 3 - .../json_results_generator.py | 697 --- .../flakiness_dashboard/results_uploader.py | 181 - .../android/pylib/results/json_results.py | 139 - .../pylib/results/json_results_test.py | 133 - .../android/pylib/results/report_results.py | 114 - .../flutter/build/android/pylib/screenshot.py | 99 - .../build/android/pylib/sdk/__init__.py | 3 - .../flutter/build/android/pylib/sdk/aapt.py | 42 - .../build/android/pylib/sdk/dexdump.py | 30 - .../build/android/pylib/sdk/split_select.py | 58 - .../build/android/pylib/symbols/PRESUBMIT.py | 21 - .../build/android/pylib/symbols/__init__.py | 0 .../android/pylib/symbols/elf_symbolizer.py | 467 -- .../pylib/symbols/elf_symbolizer_unittest.py | 173 - .../pylib/symbols/mock_addr2line/__init__.py | 0 .../symbols/mock_addr2line/mock_addr2line | 79 - .../build/android/pylib/system_properties.py | 40 - .../android/pylib/uiautomator/__init__.py | 4 - .../build/android/pylib/uiautomator/setup.py | 35 - .../android/pylib/uiautomator/test_options.py | 20 - .../android/pylib/uiautomator/test_package.py | 33 - .../android/pylib/uiautomator/test_runner.py | 89 - .../build/android/pylib/uirobot/__init__.py | 4 - .../pylib/uirobot/uirobot_test_instance.py | 79 - .../build/android/pylib/utils/__init__.py | 0 .../build/android/pylib/utils/apk_helper.py | 131 - .../build/android/pylib/utils/base_error.py | 16 - .../pylib/utils/command_option_parser.py | 75 - .../android/pylib/utils/device_temp_file.py | 57 - .../pylib/utils/device_temp_file_test.py | 91 - .../build/android/pylib/utils/emulator.py | 444 -- .../build/android/pylib/utils/findbugs.py | 154 - .../android/pylib/utils/host_path_finder.py | 22 - .../build/android/pylib/utils/host_utils.py | 16 - .../build/android/pylib/utils/isolator.py | 173 - .../utils/json_results_generator_unittest.py | 213 - .../android/pylib/utils/logging_utils.py | 27 - .../build/android/pylib/utils/md5sum.py | 91 - .../build/android/pylib/utils/md5sum_test.py | 231 - .../build/android/pylib/utils/mock_calls.py | 182 - .../android/pylib/utils/mock_calls_test.py | 175 - .../build/android/pylib/utils/parallelizer.py | 242 - .../android/pylib/utils/parallelizer_test.py | 166 - .../build/android/pylib/utils/proguard.py | 148 - .../build/android/pylib/utils/repo_utils.py | 16 - .../android/pylib/utils/reraiser_thread.py | 158 - .../pylib/utils/reraiser_thread_unittest.py | 96 - .../android/pylib/utils/run_tests_helper.py | 44 - .../android/pylib/utils/test_environment.py | 47 - .../build/android/pylib/utils/time_profile.py | 26 - .../android/pylib/utils/timeout_retry.py | 167 - .../pylib/utils/timeout_retry_unittest.py | 52 - .../android/pylib/utils/watchdog_timer.py | 47 - .../flutter/build/android/pylib/utils/xvfb.py | 58 - .../build/android/pylib/utils/zip_utils.py | 31 - .../build/android/pylib/valgrind_tools.py | 304 - engine/src/flutter/build/android/rezip.gyp | 45 - .../src/flutter/build/android/rezip/BUILD.gn | 11 - .../flutter/build/android/rezip/RezipApk.java | 448 -- .../src/flutter/build/android/screenshot.py | 98 - engine/src/flutter/build/android/setup.gyp | 111 - engine/src/flutter/build/android/symbolize.py | 88 - .../flutter/build/android/symbolize_test.py | 130 - .../src/flutter/build/android/test_runner.py | 1067 ---- .../build/android/tests/symbolize/Makefile | 11 - .../build/android/tests/symbolize/a.cc | 14 - .../build/android/tests/symbolize/b.cc | 14 - .../src/flutter/build/android/tombstones.py | 252 - .../build/android/update_verification.py | 108 - .../src/flutter/build/android_sdk_extras.json | 2 - engine/src/flutter/build/apply_locales.py | 45 - engine/src/flutter/build/branding_value.sh | 51 - engine/src/flutter/build/build-ctags.sh | 49 - engine/src/flutter/build/build_config.h | 168 - .../src/flutter/build/check_return_value.py | 17 - .../flutter/build/check_sdk_extras_version.py | 131 - engine/src/flutter/build/clobber.py | 110 - engine/src/flutter/build/common.croc | 127 - engine/src/flutter/build/compiled_action.gni | 173 - engine/src/flutter/build/compiler_version.py | 143 - engine/src/flutter/build/config/BUILD.gn | 435 -- .../src/flutter/build/config/BUILDCONFIG.gn | 834 --- engine/src/flutter/build/config/OWNERS | 6 - engine/src/flutter/build/config/allocator.gni | 16 - .../src/flutter/build/config/android/BUILD.gn | 32 - .../src/flutter/build/config/android/OWNERS | 1 - .../flutter/build/config/android/config.gni | 206 - .../build/config/android/internal_rules.gni | 1596 ----- .../flutter/build/config/android/rules.gni | 2238 ------- engine/src/flutter/build/config/arm.gni | 78 - .../src/flutter/build/config/chrome_build.gni | 19 - .../src/flutter/build/config/clang/BUILD.gn | 62 - .../src/flutter/build/config/clang/clang.gni | 9 - .../flutter/build/config/compiler/BUILD.gn | 1241 ---- engine/src/flutter/build/config/crypto.gni | 29 - engine/src/flutter/build/config/features.gni | 204 - engine/src/flutter/build/config/fnl/BUILD.gn | 48 - engine/src/flutter/build/config/gcc/BUILD.gn | 46 - .../flutter/build/config/gcc/gcc_version.gni | 26 - engine/src/flutter/build/config/ios/BUILD.gn | 15 - .../build/config/ios/XcodeHarness/.gitignore | 18 - .../build/config/ios/XcodeHarness/FakeMain.m | 10 - .../Harness.xcodeproj/project.pbxproj | 294 - .../build/config/ios/find_signing_identity.py | 36 - .../src/flutter/build/config/ios/ios_app.py | 137 - .../src/flutter/build/config/ios/ios_sdk.gni | 58 - .../src/flutter/build/config/ios/ios_sdk.py | 19 - .../build/config/ios/lldb_start_commands.txt | 4 - engine/src/flutter/build/config/ios/rules.gni | 234 - .../src/flutter/build/config/linux/BUILD.gn | 62 - .../flutter/build/config/linux/gtk/BUILD.gn | 45 - .../flutter/build/config/linux/pkg-config.py | 200 - .../flutter/build/config/linux/pkg_config.gni | 83 - .../build/config/linux/sysroot_ld_path.py | 20 - engine/src/flutter/build/config/locales.gni | 118 - engine/src/flutter/build/config/mac/BUILD.gn | 34 - .../src/flutter/build/config/mac/mac_app.py | 113 - .../src/flutter/build/config/mac/mac_sdk.gni | 41 - engine/src/flutter/build/config/mac/rules.gni | 220 - engine/src/flutter/build/config/mips.gni | 43 - .../flutter/build/config/sanitizers/BUILD.gn | 59 - .../build/config/sanitizers/sanitizers.gni | 20 - engine/src/flutter/build/config/sysroot.gni | 60 - .../build/config/templates/templates.gni | 56 - engine/src/flutter/build/config/ui.gni | 68 - engine/src/flutter/build/config/win/BUILD.gn | 181 - .../config/win/visual_studio_version.gni | 39 - .../src/flutter/build/copy_test_data_ios.py | 105 - engine/src/flutter/build/cp.py | 23 - engine/src/flutter/build/detect_host_arch.py | 40 - engine/src/flutter/build/dir_exists.py | 23 - .../src/flutter/build/download_gold_plugin.py | 45 - .../flutter/build/download_nacl_toolchains.py | 59 - .../src/flutter/build/download_sdk_extras.py | 71 - engine/src/flutter/build/env_dump.py | 56 - engine/src/flutter/build/extract_from_cab.py | 63 - .../src/flutter/build/find_isolated_tests.py | 78 - engine/src/flutter/build/gdb-add-index | 162 - engine/src/flutter/build/get_landmines.py | 42 - .../flutter/build/get_sdk_extras_packages.py | 24 - .../src/flutter/build/get_syzygy_binaries.py | 487 -- engine/src/flutter/build/git-hooks/OWNERS | 3 - engine/src/flutter/build/git-hooks/pre-commit | 60 - engine/src/flutter/build/gn_helpers.py | 39 - engine/src/flutter/build/gn_run_binary.py | 22 - engine/src/flutter/build/gyp_chromium | 333 -- engine/src/flutter/build/gyp_chromium.py | 18 - engine/src/flutter/build/gyp_chromium_test.py | 66 - engine/src/flutter/build/gyp_environment.py | 33 - engine/src/flutter/build/gyp_helper.py | 68 - engine/src/flutter/build/gypi_to_gn.py | 167 - .../src/flutter/build/install-android-sdks.sh | 20 - .../build/install-build-deps-android.sh | 100 - .../src/flutter/build/install-build-deps.py | 430 -- .../src/flutter/build/install-build-deps.sh | 477 -- engine/src/flutter/build/install-chroot.sh | 888 --- .../flutter/build/internal/README.chromium | 24 - engine/src/flutter/build/inverse_depth.py | 24 - engine/src/flutter/build/ios/OWNERS | 4 - engine/src/flutter/build/ios/PRESUBMIT.py | 42 - engine/src/flutter/build/ios/chrome_ios.croc | 71 - engine/src/flutter/build/ios/clean_env.py | 77 - .../src/flutter/build/ios/grit_whitelist.txt | 1155 ---- engine/src/flutter/build/json_schema_api.gni | 242 - engine/src/flutter/build/landmine_utils.py | 120 - engine/src/flutter/build/landmines.py | 134 - engine/src/flutter/build/ls.py | 31 - engine/src/flutter/build/module_args/dart.gni | 6 - engine/src/flutter/build/module_args/mojo.gni | 16 - engine/src/flutter/build/module_args/nacl.gni | 6 - engine/src/flutter/build/module_args/v8.gni | 13 - .../src/flutter/build/output_dll_copy.rules | 17 - engine/src/flutter/build/precompile.cc | 7 - engine/src/flutter/build/precompile.h | 109 - engine/src/flutter/build/protoc_java.py | 68 - engine/src/flutter/build/rmdir_and_stamp.py | 45 - .../flutter/build/sanitize-mac-build-log.sed | 33 - .../flutter/build/sanitize-mac-build-log.sh | 5 - .../flutter/build/sanitize-win-build-log.sed | 15 - .../flutter/build/sanitize-win-build-log.sh | 5 - engine/src/flutter/build/sanitizers/BUILD.gn | 24 - engine/src/flutter/build/sanitizers/OWNERS | 4 - .../build/sanitizers/asan_suppressions.cc | 23 - .../build/sanitizers/lsan_suppressions.cc | 108 - .../build/sanitizers/sanitizer_options.cc | 164 - .../flutter/build/sanitizers/sanitizers.gyp | 92 - .../build/sanitizers/tsan_suppressions.cc | 318 - .../build/secondary/testing/gmock/BUILD.gn | 54 - .../build/secondary/testing/gtest/BUILD.gn | 135 - .../third_party/android_tools/BUILD.gn | 104 - .../third_party/libjpeg_turbo/BUILD.gn | 221 - .../secondary/third_party/libsrtp/BUILD.gn | 391 -- .../build/secondary/third_party/nss/BUILD.gn | 1211 ---- .../build/secondary/tools/grit/BUILD.gn | 27 - .../build/secondary/tools/grit/grit_rule.gni | 483 -- .../build/secondary/tools/grit/repack.gni | 47 - .../tools/grit/stamp_grit_sources.py | 55 - engine/src/flutter/build/slave/OWNERS | 20 - engine/src/flutter/build/slave/README | 8 - engine/src/flutter/build/some.gyp | 24 - engine/src/flutter/build/symlink.py | 39 - .../flutter/build/temp_gyp/README.chromium | 3 - .../src/flutter/build/temp_gyp/pdfsqueeze.gyp | 40 - engine/src/flutter/build/toolchain/OWNERS | 3 - .../flutter/build/toolchain/android/BUILD.gn | 155 - engine/src/flutter/build/toolchain/ccache.gni | 25 - engine/src/flutter/build/toolchain/clang.gni | 9 - .../src/flutter/build/toolchain/cros/BUILD.gn | 35 - .../src/flutter/build/toolchain/fnl/BUILD.gn | 24 - .../flutter/build/toolchain/gcc_toolchain.gni | 252 - .../build/toolchain/get_concurrent_links.py | 64 - engine/src/flutter/build/toolchain/goma.gni | 22 - .../flutter/build/toolchain/linux/BUILD.gn | 115 - .../src/flutter/build/toolchain/mac/BUILD.gn | 261 - .../build/toolchain/mac/setup_toolchain.py | 29 - .../src/flutter/build/toolchain/nacl/BUILD.gn | 63 - .../src/flutter/build/toolchain/win/BUILD.gn | 253 - .../src/flutter/build/toolchain/win/midl.gni | 113 - .../build/toolchain/win/setup_toolchain.py | 154 - engine/src/flutter/build/tree_truth.sh | 102 - .../src/flutter/build/update-linux-sandbox.sh | 75 - engine/src/flutter/build/util/BUILD.gn | 48 - engine/src/flutter/build/util/lastchange.py | 309 - .../flutter/build/util/lib/common/__init__.py | 0 .../util/lib/common/perf_result_data_type.py | 20 - .../lib/common/perf_tests_results_helper.py | 166 - .../build/util/lib/common/unittest_util.py | 153 - .../src/flutter/build/util/lib/common/util.py | 151 - engine/src/flutter/build/util/version.py | 166 - engine/src/flutter/build/vs_toolchain.py | 259 - engine/src/flutter/build/whitespace_file.txt | 156 - .../src/flutter/build/win_is_xtree_patched.py | 26 - engine/src/flutter/testing/BUILD.gn | 13 - engine/src/flutter/testing/OWNERS | 1 - engine/src/flutter/testing/PRESUBMIT.py | 25 - engine/src/flutter/testing/android/OWNERS | 7 - .../testing/android/appurify_support.gyp | 22 - .../testing/android/appurify_support/BUILD.gn | 15 - .../test/support/ResultsBundleGenerator.java | 30 - .../test/support/RobotiumBundleGenerator.java | 61 - .../flutter/testing/android/broker/BUILD.gn | 13 - .../broker/OnDeviceInstrumentationBroker.java | 64 - .../flutter/testing/android/driver/BUILD.gn | 21 - .../android/driver/java/AndroidManifest.xml | 23 - .../driver/OnDeviceInstrumentationDriver.java | 271 - .../flutter/testing/android/junit/BUILD.gn | 24 - .../chromium/testing/local/GtestComputer.java | 76 - .../chromium/testing/local/GtestFilter.java | 98 - .../chromium/testing/local/GtestListener.java | 80 - .../chromium/testing/local/GtestLogger.java | 109 - .../chromium/testing/local/JsonListener.java | 54 - .../chromium/testing/local/JsonLogger.java | 89 - .../testing/local/JunitTestArgParser.java | 117 - .../chromium/testing/local/JunitTestMain.java | 109 - .../local/LocalRobolectricTestRunner.java | 49 - .../chromium/testing/local/PackageFilter.java | 41 - ...obolectricClasspathDependencyResolver.java | 72 - .../chromium/testing/local/RunnerFilter.java | 45 - .../testing/local/GtestFilterTest.java | 124 - .../testing/local/GtestLoggerTest.java | 146 - .../testing/local/PackageFilterTest.java | 47 - .../testing/local/RunnerFilterTest.java | 58 - .../testing/android/junit/junit_test.gyp | 43 - .../flutter/testing/android/native_test.gyp | 72 - .../testing/android/native_test/BUILD.gn | 44 - .../android/native_test/README.chromium | 2 - .../native_test/java/AndroidManifest.xml | 39 - .../NativeBrowserTestActivity.java | 85 - .../native_test/NativeTestActivity.java | 142 - .../NativeTestInstrumentationTestRunner.java | 327 -- .../native_test/NativeUnitTestActivity.java | 42 - .../native_test/native_test_jni_onload.cc | 38 - .../native_test/native_test_launcher.cc | 161 - .../native_test/native_test_launcher.h | 19 - .../android/native_test/native_test_util.cc | 50 - .../android/native_test/native_test_util.h | 39 - .../android/on_device_instrumentation.gyp | 79 - .../flutter/testing/android/reporter/BUILD.gn | 19 - .../test/reporter/TestStatusListener.java | 78 - .../test/reporter/TestStatusReceiver.java | 154 - .../test/reporter/TestStatusReporter.java | 104 - engine/src/flutter/testing/buildbot/OWNERS | 18 - .../src/flutter/testing/buildbot/PRESUBMIT.py | 24 - .../testing/buildbot/chromium.chrome.json | 1 - .../testing/buildbot/chromium.chromiumos.json | 935 --- .../testing/buildbot/chromium.fyi.json | 4169 ------------- .../testing/buildbot/chromium.linux.json | 1469 ----- .../testing/buildbot/chromium.mac.json | 1339 ----- .../testing/buildbot/chromium.memory.fyi.json | 805 --- .../testing/buildbot/chromium.memory.json | 645 -- .../testing/buildbot/chromium.perf.json | 440 -- .../testing/buildbot/chromium.webkit.json | 1255 ---- .../testing/buildbot/chromium.webrtc.fyi.json | 280 - .../testing/buildbot/chromium.win.json | 1907 ------ .../testing/buildbot/chromium_arm.json | 14 - .../buildbot/chromium_memory_trybot.json | 122 - .../testing/buildbot/chromium_trybot.json | 379 -- .../buildbot/chromium_win8_trybot.json | 19 - .../testing/buildbot/client.v8.branches.json | 1 - .../testing/buildbot/client.v8.fyi.json | 70 - engine/src/flutter/testing/buildbot/manage.py | 302 - .../flutter/testing/buildbot/ninja_to_gn.pyl | 102 - .../buildbot/trybot_analyze_config.json | 56 - .../testing/buildbot/tryserver.blink.json | 64 - .../buildbot/tryserver.chromium.linux.json | 362 -- .../buildbot/tryserver.chromium.mac.json | 72 - .../buildbot/tryserver.chromium.perf.json | 1 - .../buildbot/tryserver.chromium.win.json | 214 - .../testing/buildbot/tryserver.v8.json | 71 - .../app_remoting_integration_tests.isolate | 38 - .../browser_test_commands_linux.txt | 13 - .../chromoting/browser_tests_launcher.py | 271 - .../chromoting_integration_tests.isolate | 127 - .../chromoting/chromoting_test_files.txt | 1 - .../testing/chromoting/download_test_files.py | 57 - .../testing/chromoting/integration_tests.gyp | 79 - .../example_task.isolate | 18 - .../example_test_controller.isolate | 31 - .../example_test_controller.py | 143 - .../src/flutter/testing/coverage_util_ios.cc | 15 - .../src/flutter/testing/coverage_util_ios.h | 17 - .../flutter/testing/generate_gmock_mutant.py | 450 -- engine/src/flutter/testing/gmock.gyp | 67 - engine/src/flutter/testing/gmock_mutant.h | 5177 ----------------- engine/src/flutter/testing/gtest.gyp | 222 - .../src/flutter/testing/gtest_ios/Default.png | Bin 1707 -> 0 bytes .../flutter/testing/gtest_ios/run-unittest.sh | 87 - .../testing/gtest_ios/unittest-Info.plist | 150 - engine/src/flutter/testing/gtest_mac.h | 80 - engine/src/flutter/testing/gtest_mac.mm | 125 - .../src/flutter/testing/gtest_mac_unittest.mm | 109 - engine/src/flutter/testing/gtest_nacl.gyp | 94 - engine/src/flutter/testing/iossim/OWNERS | 2 - engine/src/flutter/testing/iossim/iossim.gyp | 156 - engine/src/flutter/testing/iossim/iossim.mm | 1037 ---- .../flutter/testing/iossim/redirect-stdout.sh | 25 - .../testing/legion/SimpleJSONRPCServer.py | 195 - engine/src/flutter/testing/legion/__init__.py | 3 - .../src/flutter/testing/legion/common_lib.py | 43 - .../hello_world/controller_test.isolate | 21 - .../examples/hello_world/controller_test.py | 77 - .../examples/hello_world/task_test.isolate | 23 - .../legion/examples/hello_world/task_test.py | 27 - .../subprocess/subprocess_test.isolate | 21 - .../examples/subprocess/subprocess_test.py | 131 - .../legion/examples/subprocess/task.isolate | 22 - .../src/flutter/testing/legion/jsonrpclib.py | 370 -- .../src/flutter/testing/legion/legion.isolate | 25 - .../testing/legion/legion_test_case.py | 142 - engine/src/flutter/testing/legion/process.py | 267 - .../src/flutter/testing/legion/rpc_methods.py | 79 - .../src/flutter/testing/legion/rpc_server.py | 128 - engine/src/flutter/testing/legion/run_task.py | 49 - engine/src/flutter/testing/legion/ssl_util.py | 103 - .../flutter/testing/legion/task_controller.py | 234 - .../legion/task_registration_server.py | 54 - .../flutter/testing/legion/test_controller.py | 69 - .../flutter/testing/legion/tools/legion.py | 161 - .../flutter/testing/multiprocess_func_list.cc | 57 - .../flutter/testing/multiprocess_func_list.h | 70 - engine/src/flutter/testing/perf/BUILD.gn | 14 - engine/src/flutter/testing/perf/perf_test.cc | 204 - engine/src/flutter/testing/perf/perf_test.gyp | 18 - engine/src/flutter/testing/perf/perf_test.h | 116 - engine/src/flutter/testing/platform_test.h | 36 - .../src/flutter/testing/platform_test_mac.mm | 15 - engine/src/flutter/testing/scripts/OWNERS | 5 - .../testing/scripts/android_gtest_test.py | 60 - .../src/flutter/testing/scripts/checkdeps.py | 46 - .../flutter/testing/scripts/checklicenses.py | 46 - .../src/flutter/testing/scripts/checkperms.py | 46 - engine/src/flutter/testing/scripts/common.py | 171 - .../testing/scripts/get_compile_targets.py | 55 - .../src/flutter/testing/scripts/gn_check.py | 57 - .../testing/scripts/gtest_perf_test.py | 81 - .../testing/scripts/gyp_flag_compare.py | 49 - .../src/flutter/testing/scripts/host_info.py | 136 - .../flutter/testing/scripts/mojo_apptests.py | 45 - .../testing/scripts/nacl_integration.py | 49 - .../scripts/telemetry_gpu_unittests.py | 53 - .../scripts/telemetry_perf_unittests.py | 60 - .../testing/scripts/telemetry_unittests.py | 53 - .../flutter/testing/scripts/webkit_lint.py | 43 - .../testing/scripts/webkit_python_tests.py | 47 - .../testing/scripts/webview_licenses.py | 43 - engine/src/flutter/testing/test.gni | 256 - engine/src/flutter/testing/test_env.py | 239 - .../flutter/testing/variations/PRESUBMIT.py | 83 - .../fieldtrial_testing_config_android.json | 62 - .../fieldtrial_testing_config_chromeos.json | 1 - .../fieldtrial_testing_config_ios.json | 1 - .../fieldtrial_testing_config_linux.json | 1 - .../fieldtrial_testing_config_mac.json | 1 - .../fieldtrial_testing_config_win.json | 67 - engine/src/flutter/testing/xvfb.py | 123 - engine/src/flutter/third_party/.dartignore | 0 engine/src/flutter/third_party/BUILD.gn | 43 - engine/src/flutter/third_party/README | 44 - .../third_party/android_testrunner/LICENSE | 202 - .../third_party/android_testrunner/OWNERS | 3 - .../android_testrunner/README.chromium | 36 - .../android_testrunner/adb_interface.py | 522 -- .../am_instrument_parser.py | 169 - .../third_party/android_testrunner/errors.py | 46 - .../third_party/android_testrunner/logger.py | 96 - .../third_party/android_testrunner/patch.diff | 104 - .../android_testrunner/run_command.py | 192 - .../flutter/third_party/apple_apsl/CFBase.h | 82 - .../third_party/apple_apsl/CFRuntime.h | 44 - .../flutter/third_party/apple_apsl/LICENSE | 327 -- .../src/flutter/third_party/apple_apsl/OWNERS | 2 - .../third_party/apple_apsl/README.chromium | 61 - .../third_party/apple_apsl/cssmapplePriv.h | 77 - .../flutter/third_party/apple_apsl/dnsinfo.h | 114 - .../flutter/third_party/apple_apsl/malloc.h | 58 - .../src/flutter/third_party/ashmem/BUILD.gn | 12 - engine/src/flutter/third_party/ashmem/LICENSE | 202 - engine/src/flutter/third_party/ashmem/OWNERS | 1 - .../third_party/ashmem/README.chromium | 6 - .../flutter/third_party/ashmem/ashmem-dev.c | 100 - .../src/flutter/third_party/ashmem/ashmem.gyp | 16 - .../src/flutter/third_party/ashmem/ashmem.h | 46 - .../flutter/third_party/binutils/.gitignore | 8 - .../src/flutter/third_party/binutils/LICENSE | 340 -- .../binutils/Linux_ia32/binutils.tar.bz2.sha1 | 1 - .../binutils/Linux_x64/binutils.tar.bz2.sha1 | 1 - .../src/flutter/third_party/binutils/OWNERS | 3 - .../third_party/binutils/README.chromium | 29 - .../flutter/third_party/binutils/build-all.sh | 123 - .../flutter/third_party/binutils/build-one.sh | 20 - .../flutter/third_party/binutils/download.py | 118 - .../third_party/binutils/ehframe-race.patch | 96 - .../third_party/binutils/plugin-dso-fix.patch | 97 - .../third_party/binutils/unlock-thin.patch | 129 - .../flutter/third_party/binutils/upload.sh | 65 - .../third_party/freetype-android/BUILD.gn | 56 - .../third_party/freetype-android/OWNERS | 3 - .../freetype-android/README.chromium | 26 - .../third_party/freetype-android/freetype.gyp | 67 - .../freetype-android-config/ftmodule.h | 38 - .../freetype-android-config/ftoption.h | 886 --- .../src/flutter/third_party/iccjpeg/BUILD.gn | 19 - .../src/flutter/third_party/iccjpeg/LICENSE | 49 - engine/src/flutter/third_party/iccjpeg/OWNERS | 1 - .../third_party/iccjpeg/README.chromium | 20 - .../src/flutter/third_party/iccjpeg/iccjpeg.c | 248 - .../flutter/third_party/iccjpeg/iccjpeg.gyp | 24 - .../src/flutter/third_party/iccjpeg/iccjpeg.h | 78 - .../instrumented_libraries/BUILD.gn | 67 - .../third_party/instrumented_libraries/OWNERS | 1 - .../instrumented_libraries/README.chromium | 14 - .../binaries/.gitignore | 2 - .../msan-chained-origins-precise.tgz.sha1 | 1 - .../msan-chained-origins-trusty.tgz.sha1 | 1 - .../binaries/msan-no-origins-precise.tgz.sha1 | 1 - .../binaries/msan-no-origins-trusty.tgz.sha1 | 1 - .../blacklists/asan/libglib2.0-0.txt | 2 - .../blacklists/msan/libglib2.0-0.txt | 2 - .../blacklists/msan/libx11-6.txt | 2 - .../instrumented_libraries.gyp | 860 --- .../instrumented_libraries.isolate | 22 - .../patches/libcups2.diff | 31 - .../patches/libfontconfig.precise.diff | 13 - .../patches/libfontconfig.trusty.diff | 13 - .../patches/libgtk2.0-0.precise.diff | 28 - .../patches/libgtk2.0-0.trusty.diff | 15 - .../patches/libpixman-1-0.diff | 23 - .../patches/libva1.diff | 22 - .../patches/libxcb1.precise.diff | 26 - .../instrumented_libraries/patches/nss.diff | 30 - .../patches/pulseaudio.precise.diff | 16 - .../patches/zlib1g.diff | 12 - .../scripts/build_and_package.sh | 87 - .../scripts/download_binaries.py | 61 - .../scripts/download_build_install.py | 436 -- .../scripts/fix_rpaths.sh | 30 - .../scripts/install-build-deps.sh | 98 - .../scripts/pre-build/autogen.sh | 21 - .../scripts/pre-build/autoreconf.sh | 6 - .../scripts/pre-build/freetype.sh | 13 - .../scripts/pre-build/libasound2.sh | 16 - .../scripts/pre-build/libgdk-pixbuf2.0-0.sh | 13 - .../scripts/pre-build/libgtk2.0-0.sh | 13 - .../scripts/pre-build/libnspr4.sh | 17 - .../scripts/pre-build/libva1.sh | 11 - .../scripts/pre-build/pulseaudio.sh | 14 - .../scripts/pre-build/udev.sh | 15 - .../scripts/unpack_binaries.py | 42 - .../src/flutter/third_party/jsr-305/BUILD.gn | 38 - .../third_party/jsr-305/README.chromium | 16 - .../flutter/third_party/jsr-305/jsr-305.gyp | 19 - engine/src/flutter/third_party/junit/BUILD.gn | 20 - engine/src/flutter/third_party/junit/LICENSE | 218 - engine/src/flutter/third_party/junit/OWNERS | 3 - .../flutter/third_party/junit/README.chromium | 10 - .../src/flutter/third_party/junit/junit.gyp | 36 - .../flutter/third_party/markupsafe/AUTHORS | 13 - .../flutter/third_party/markupsafe/LICENSE | 33 - .../markupsafe/MarkupSafe-0.18.tar.gz.md5 | 1 - .../markupsafe/MarkupSafe-0.18.tar.gz.sha512 | 1 - .../src/flutter/third_party/markupsafe/OWNERS | 3 - .../third_party/markupsafe/README.chromium | 24 - .../third_party/markupsafe/__init__.py | 234 - .../flutter/third_party/markupsafe/_compat.py | 24 - .../third_party/markupsafe/_constants.py | 267 - .../flutter/third_party/markupsafe/_native.py | 46 - .../third_party/markupsafe/_speedups.c | 239 - .../third_party/markupsafe/get_markupsafe.sh | 121 - .../src/flutter/third_party/mockito/BUILD.gn | 28 - .../src/flutter/third_party/mockito/LICENSE | 21 - engine/src/flutter/third_party/mockito/OWNERS | 2 - .../third_party/mockito/README.chromium | 9 - .../flutter/third_party/mockito/mockito.gyp | 50 - .../src/flutter/third_party/modp_b64/BUILD.gn | 11 - engine/src/flutter/third_party/modp_b64/DEPS | 3 - .../src/flutter/third_party/modp_b64/LICENSE | 33 - .../src/flutter/third_party/modp_b64/OWNERS | 2 - .../third_party/modp_b64/README.chromium | 15 - .../flutter/third_party/modp_b64/modp_b64.cc | 265 - .../flutter/third_party/modp_b64/modp_b64.h | 171 - .../third_party/modp_b64/modp_b64_data.h | 482 -- .../flutter/third_party/pymock/LICENSE.txt | 26 - engine/src/flutter/third_party/pymock/OWNERS | 1 - .../third_party/pymock/README.chromium | 10 - engine/src/flutter/third_party/pymock/mock.py | 2367 -------- .../flutter/third_party/robolectric/BUILD.gn | 31 - .../flutter/third_party/robolectric/LICENSE | 177 - .../flutter/third_party/robolectric/OWNERS | 2 - .../third_party/robolectric/README.chromium | 11 - .../licenses/extreme.indiana.edu.license.txt | 47 - .../licenses/javolution.license.txt | 23 - .../licenses/pivotal.labs.license.txt | 21 - .../third_party/robolectric/robolectric.gyp | 58 - engine/src/flutter/tools/checkperms/OWNERS | 1 - .../src/flutter/tools/checkperms/PRESUBMIT.py | 27 - .../flutter/tools/checkperms/checkperms.py | 480 -- engine/src/flutter/tools/dart/update.py | 101 - engine/src/flutter/tools/find_depot_tools.py | 45 - engine/src/flutter/tools/gdb/gdb_chrome.py | 331 -- .../generate_library_loader.gni | 70 - .../generate_library_loader.py | 249 - engine/src/flutter/tools/git/README | 16 - .../tools/git/for-all-touched-files.py | 126 - engine/src/flutter/tools/git/git-diff-ide.py | 93 - engine/src/flutter/tools/git/git-utils.sh | 17 - engine/src/flutter/tools/git/graph.sh | 42 - engine/src/flutter/tools/git/mass-rename.py | 50 - engine/src/flutter/tools/git/mass-rename.sh | 17 - engine/src/flutter/tools/git/mffr.py | 169 - .../flutter/tools/git/move_source_file.bat | 6 - .../src/flutter/tools/git/move_source_file.py | 235 - engine/src/flutter/tools/git/post-checkout | 22 - engine/src/flutter/tools/git/post-merge | 12 - .../flutter/tools/git/update-copyrights.sh | 7 - engine/src/flutter/tools/go/VERSION_LINUX | 1 - engine/src/flutter/tools/go/VERSION_MACOSX | 1 - engine/src/flutter/tools/go/download.py | 91 - engine/src/flutter/tools/go/upload.py | 177 - .../flutter/tools/gritsettings/resource_ids | 265 - .../flutter/tools/gyp/pylib/gyp/mac_tool.py | 610 -- .../src/flutter/tools/idl_parser/PRESUBMIT.py | 15 - .../src/flutter/tools/idl_parser/__init__.py | 0 .../src/flutter/tools/idl_parser/idl_lexer.py | 294 - .../tools/idl_parser/idl_lexer_test.py | 99 - .../src/flutter/tools/idl_parser/idl_node.py | 217 - .../flutter/tools/idl_parser/idl_parser.py | 1285 ---- .../tools/idl_parser/idl_parser_test.py | 106 - .../tools/idl_parser/idl_ppapi_lexer.py | 71 - .../tools/idl_parser/idl_ppapi_parser.py | 317 - .../src/flutter/tools/idl_parser/run_tests.py | 20 - engine/src/flutter/tools/licenses/README | 3 - engine/src/flutter/tools/licenses/data/README | 7 - .../flutter/tools/licenses/data/academic-3.0 | 47 - .../tools/licenses/data/apache-license-2.0 | 202 - .../flutter/tools/licenses/data/google-bsd | 12 - .../src/flutter/tools/licenses/data/gpl-3.0 | 674 --- .../tools/licenses/data/gpl-gcc-exception-3.1 | 72 - .../tools/licenses/data/lesser-gpl-2.1 | 502 -- .../tools/licenses/data/library-gpl-2.0 | 481 -- .../flutter/tools/licenses/data/mozilla-2.0 | 194 - engine/src/flutter/tools/licenses/lib/README | 80 - .../src/flutter/tools/licenses/lib/cache.dart | 44 - .../tools/licenses/lib/filesystem.dart | 645 -- .../flutter/tools/licenses/lib/licenses.dart | 858 --- .../src/flutter/tools/licenses/lib/main.dart | 1952 ------- .../flutter/tools/licenses/lib/patterns.dart | 1658 ------ .../src/flutter/tools/licenses/pubspec.lock | 46 - .../src/flutter/tools/licenses/pubspec.yaml | 4 - engine/src/flutter/tools/linux/PRESUBMIT.py | 45 - .../tools/linux/dump-static-initializers.py | 234 - engine/src/flutter/tools/linux/procfs.py | 747 --- .../flutter/tools/linux/tests/procfs_tests.py | 110 - .../flutter/tools/memory/asan/blacklist.txt | 5 - .../tools/protoc_wrapper/protoc_wrapper.py | 134 - .../flutter/tools/relocation_packer/BUILD.gn | 148 - .../flutter/tools/relocation_packer/LICENSE | 27 - .../tools/relocation_packer/README.TXT | 135 - .../tools/relocation_packer/config.gni | 21 - .../relocation_packer/relocation_packer.gyp | 161 - .../tools/relocation_packer/src/debug.cc | 55 - .../tools/relocation_packer/src/debug.h | 115 - .../relocation_packer/src/debug_unittest.cc | 122 - .../relocation_packer/src/delta_encoder.cc | 72 - .../relocation_packer/src/delta_encoder.h | 80 - .../src/delta_encoder_unittest.cc | 150 - .../tools/relocation_packer/src/elf_file.cc | 1317 ----- .../tools/relocation_packer/src/elf_file.h | 134 - .../src/elf_file_unittest.cc | 164 - .../tools/relocation_packer/src/elf_traits.h | 103 - .../tools/relocation_packer/src/leb128.cc | 69 - .../tools/relocation_packer/src/leb128.h | 74 - .../relocation_packer/src/leb128_unittest.cc | 111 - .../tools/relocation_packer/src/main.cc | 175 - .../tools/relocation_packer/src/packer.cc | 124 - .../tools/relocation_packer/src/packer.h | 78 - .../relocation_packer/src/packer_unittest.cc | 250 - .../src/run_all_unittests.cc | 10 - .../src/run_length_encoder.cc | 144 - .../src/run_length_encoder.h | 81 - .../src/run_length_encoder_unittest.cc | 124 - .../tools/relocation_packer/src/sleb128.cc | 95 - .../tools/relocation_packer/src/sleb128.h | 75 - .../relocation_packer/src/sleb128_unittest.cc | 166 - .../test_data/elf_file_unittest_relocs.cc | 1014 ---- .../generate_elf_file_unittest_relocs.py | 88 - .../generate_elf_file_unittest_relocs.sh | 35 - .../flutter/tools/remove_stale_pyc_files.py | 39 - .../tools/resources/about_credits_entry.tmpl | 8 - engine/src/flutter/tools/sort-headers.py | 192 - engine/src/flutter/tools/sort_sources.py | 187 - .../tools/vim/chromium.ycm_extra_conf.py | 233 - engine/src/flutter/tools/vim/clang-format.vim | 19 - engine/src/flutter/tools/vim/filetypes.vim | 9 - engine/src/flutter/tools/vim/ninja-build.vim | 115 - engine/src/flutter/tools/vim/ninja_output.py | 57 - .../src/flutter/tools/xdisplaycheck/BUILD.gn | 15 - .../tools/xdisplaycheck/xdisplaycheck.cc | 119 - .../tools/xdisplaycheck/xdisplaycheck.gyp | 19 - engine/src/flutter/tools/yes_no.py | 28 - 909 files changed, 133302 deletions(-) delete mode 100644 engine/src/flutter/.gn delete mode 100644 engine/src/flutter/build/OWNERS delete mode 100644 engine/src/flutter/build/PRESUBMIT.py delete mode 100644 engine/src/flutter/build/README.chromium delete mode 100644 engine/src/flutter/build/all.gyp delete mode 100644 engine/src/flutter/build/android/AndroidManifest.xml delete mode 100644 engine/src/flutter/build/android/BUILD.gn delete mode 100644 engine/src/flutter/build/android/CheckInstallApk-debug.apk delete mode 100644 engine/src/flutter/build/android/OWNERS delete mode 100644 engine/src/flutter/build/android/PRESUBMIT.py delete mode 100755 engine/src/flutter/build/android/adb_android_webview_command_line delete mode 100755 engine/src/flutter/build/android/adb_chrome_public_command_line delete mode 100755 engine/src/flutter/build/android/adb_chrome_shell_command_line delete mode 100755 engine/src/flutter/build/android/adb_command_line_functions.sh delete mode 100755 engine/src/flutter/build/android/adb_content_shell_command_line delete mode 100755 engine/src/flutter/build/android/adb_device_functions.sh delete mode 100755 engine/src/flutter/build/android/adb_gdb delete mode 100755 engine/src/flutter/build/android/adb_gdb_android_webview_shell delete mode 100755 engine/src/flutter/build/android/adb_gdb_chrome_public delete mode 100755 engine/src/flutter/build/android/adb_gdb_chrome_shell delete mode 100755 engine/src/flutter/build/android/adb_gdb_content_shell delete mode 100755 engine/src/flutter/build/android/adb_gdb_cronet_sample delete mode 100755 engine/src/flutter/build/android/adb_gdb_mojo_shell delete mode 100755 engine/src/flutter/build/android/adb_install_apk.py delete mode 100755 engine/src/flutter/build/android/adb_kill_android_webview_shell delete mode 100755 engine/src/flutter/build/android/adb_kill_chrome_public delete mode 100755 engine/src/flutter/build/android/adb_kill_chrome_shell delete mode 100755 engine/src/flutter/build/android/adb_kill_content_shell delete mode 100755 engine/src/flutter/build/android/adb_logcat_monitor.py delete mode 100755 engine/src/flutter/build/android/adb_logcat_printer.py delete mode 100755 engine/src/flutter/build/android/adb_profile_chrome delete mode 100755 engine/src/flutter/build/android/adb_reverse_forwarder.py delete mode 100755 engine/src/flutter/build/android/adb_run_android_webview_shell delete mode 100755 engine/src/flutter/build/android/adb_run_chrome_public delete mode 100755 engine/src/flutter/build/android/adb_run_chrome_shell delete mode 100755 engine/src/flutter/build/android/adb_run_content_shell delete mode 100755 engine/src/flutter/build/android/adb_run_mojo_shell delete mode 100644 engine/src/flutter/build/android/android_no_jni_exports.lst delete mode 100644 engine/src/flutter/build/android/ant/BUILD.gn delete mode 100644 engine/src/flutter/build/android/ant/apk-package.xml delete mode 100644 engine/src/flutter/build/android/ant/chromium-debug.keystore delete mode 100644 engine/src/flutter/build/android/ant/empty/res/.keep delete mode 100755 engine/src/flutter/build/android/asan_symbolize.py delete mode 100755 engine/src/flutter/build/android/avd.py delete mode 100755 engine/src/flutter/build/android/bb_run_sharded_steps.py delete mode 100644 engine/src/flutter/build/android/buildbot/OWNERS delete mode 100644 engine/src/flutter/build/android/buildbot/bb_annotations.py delete mode 100755 engine/src/flutter/build/android/buildbot/bb_device_status_check.py delete mode 100755 engine/src/flutter/build/android/buildbot/bb_device_steps.py delete mode 100755 engine/src/flutter/build/android/buildbot/bb_host_steps.py delete mode 100755 engine/src/flutter/build/android/buildbot/bb_run_bot.py delete mode 100644 engine/src/flutter/build/android/buildbot/bb_utils.py delete mode 100755 engine/src/flutter/build/android/buildbot/env_to_json.py delete mode 100755 engine/src/flutter/build/android/buildbot/tests/bb_run_bot_test.py delete mode 100644 engine/src/flutter/build/android/chrome_with_libs.gyp delete mode 100644 engine/src/flutter/build/android/empty/src/.keep delete mode 100644 engine/src/flutter/build/android/empty_proguard.flags delete mode 100755 engine/src/flutter/build/android/enable_asserts.py delete mode 100755 engine/src/flutter/build/android/envsetup.sh delete mode 100755 engine/src/flutter/build/android/findbugs_diff.py delete mode 100644 engine/src/flutter/build/android/findbugs_filter/findbugs_exclude.xml delete mode 100755 engine/src/flutter/build/android/generate_emma_html.py delete mode 100755 engine/src/flutter/build/android/gn/zip.py delete mode 100755 engine/src/flutter/build/android/gyp/aidl.py delete mode 100755 engine/src/flutter/build/android/gyp/ant.py delete mode 100755 engine/src/flutter/build/android/gyp/apk_install.py delete mode 100755 engine/src/flutter/build/android/gyp/apk_obfuscate.py delete mode 100755 engine/src/flutter/build/android/gyp/copy_ex.py delete mode 100755 engine/src/flutter/build/android/gyp/create_device_library_links.py delete mode 100755 engine/src/flutter/build/android/gyp/create_dist_jar.py delete mode 100644 engine/src/flutter/build/android/gyp/create_flutter_jar.py delete mode 100755 engine/src/flutter/build/android/gyp/create_java_binary_script.py delete mode 100755 engine/src/flutter/build/android/gyp/create_placeholder_files.py delete mode 100755 engine/src/flutter/build/android/gyp/create_standalone_apk.py delete mode 100755 engine/src/flutter/build/android/gyp/create_test_runner_script.py delete mode 100755 engine/src/flutter/build/android/gyp/dex.py delete mode 100755 engine/src/flutter/build/android/gyp/emma_instr.py delete mode 100755 engine/src/flutter/build/android/gyp/finalize_apk.py delete mode 100755 engine/src/flutter/build/android/gyp/finalize_splits.py delete mode 100755 engine/src/flutter/build/android/gyp/find.py delete mode 100755 engine/src/flutter/build/android/gyp/find_sun_tools_jar.py delete mode 100755 engine/src/flutter/build/android/gyp/gcc_preprocess.py delete mode 100755 engine/src/flutter/build/android/gyp/generate_split_manifest.py delete mode 100755 engine/src/flutter/build/android/gyp/generate_v14_compatible_resources.py delete mode 100755 engine/src/flutter/build/android/gyp/get_device_configuration.py delete mode 100755 engine/src/flutter/build/android/gyp/insert_chromium_version.py delete mode 100755 engine/src/flutter/build/android/gyp/jar.py delete mode 100755 engine/src/flutter/build/android/gyp/jar_toc.py delete mode 100755 engine/src/flutter/build/android/gyp/java_cpp_enum.py delete mode 100755 engine/src/flutter/build/android/gyp/java_cpp_enum_tests.py delete mode 100755 engine/src/flutter/build/android/gyp/javac.py delete mode 100755 engine/src/flutter/build/android/gyp/jinja_template.py delete mode 100755 engine/src/flutter/build/android/gyp/lint.py delete mode 100755 engine/src/flutter/build/android/gyp/locale_pak_resources.py delete mode 100755 engine/src/flutter/build/android/gyp/pack_relocations.py delete mode 100755 engine/src/flutter/build/android/gyp/package_resources.py delete mode 100755 engine/src/flutter/build/android/gyp/process_resources.py delete mode 100755 engine/src/flutter/build/android/gyp/proguard.py delete mode 100755 engine/src/flutter/build/android/gyp/push_libraries.py delete mode 100755 engine/src/flutter/build/android/gyp/strip_library_for_device.py delete mode 100644 engine/src/flutter/build/android/gyp/test/BUILD.gn delete mode 100644 engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldMain.java delete mode 100644 engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldPrinter.java delete mode 100755 engine/src/flutter/build/android/gyp/touch.py delete mode 100644 engine/src/flutter/build/android/gyp/util/__init__.py delete mode 100644 engine/src/flutter/build/android/gyp/util/build_device.py delete mode 100644 engine/src/flutter/build/android/gyp/util/build_utils.py delete mode 100644 engine/src/flutter/build/android/gyp/util/md5_check.py delete mode 100644 engine/src/flutter/build/android/gyp/util/md5_check_test.py delete mode 100644 engine/src/flutter/build/android/gyp/util/proguard_util.py delete mode 100755 engine/src/flutter/build/android/gyp/write_build_config.py delete mode 100755 engine/src/flutter/build/android/gyp/write_ordered_libraries.py delete mode 100755 engine/src/flutter/build/android/gyp/zip.py delete mode 100755 engine/src/flutter/build/android/host_heartbeat.py delete mode 100755 engine/src/flutter/build/android/install_emulator_deps.py delete mode 100755 engine/src/flutter/build/android/lighttpd_server.py delete mode 100644 engine/src/flutter/build/android/lint/OWNERS delete mode 100755 engine/src/flutter/build/android/lint/suppress.py delete mode 100644 engine/src/flutter/build/android/lint/suppressions.xml delete mode 100755 engine/src/flutter/build/android/method_count.py delete mode 100644 engine/src/flutter/build/android/ndk.gyp delete mode 100644 engine/src/flutter/build/android/preprocess_google_play_services.config.json delete mode 100755 engine/src/flutter/build/android/preprocess_google_play_services.py delete mode 100755 engine/src/flutter/build/android/provision_devices.py delete mode 100644 engine/src/flutter/build/android/pylib/OWNERS delete mode 100644 engine/src/flutter/build/android/pylib/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/android_commands.py delete mode 100644 engine/src/flutter/build/android/pylib/android_commands_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/base/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/base/base_setup.py delete mode 100644 engine/src/flutter/build/android/pylib/base/base_test_result.py delete mode 100644 engine/src/flutter/build/android/pylib/base/base_test_result_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/base/base_test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/base/environment.py delete mode 100644 engine/src/flutter/build/android/pylib/base/environment_factory.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_collection.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_dispatcher.py delete mode 100755 engine/src/flutter/build/android/pylib/base/test_dispatcher_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_instance.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_instance_factory.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_run.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_run_factory.py delete mode 100644 engine/src/flutter/build/android/pylib/base/test_server.py delete mode 100644 engine/src/flutter/build/android/pylib/chrome_test_server_spawner.py delete mode 100644 engine/src/flutter/build/android/pylib/cmd_helper.py delete mode 100644 engine/src/flutter/build/android/pylib/cmd_helper_test.py delete mode 100644 engine/src/flutter/build/android/pylib/constants/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/constants/keyevent.py delete mode 100644 engine/src/flutter/build/android/pylib/content_settings.py delete mode 100644 engine/src/flutter/build/android/pylib/device/OWNERS delete mode 100644 engine/src/flutter/build/android/pylib/device/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/device/adb_wrapper.py delete mode 100644 engine/src/flutter/build/android/pylib/device/adb_wrapper_test.py delete mode 100644 engine/src/flutter/build/android/pylib/device/battery_utils.py delete mode 100755 engine/src/flutter/build/android/pylib/device/battery_utils_test.py delete mode 100644 engine/src/flutter/build/android/pylib/device/commands/BUILD.gn delete mode 100644 engine/src/flutter/build/android/pylib/device/commands/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/device/commands/commands.gyp delete mode 100644 engine/src/flutter/build/android/pylib/device/commands/install_commands.py delete mode 100644 engine/src/flutter/build/android/pylib/device/commands/java/src/org/chromium/android/commands/unzip/Unzip.java delete mode 100644 engine/src/flutter/build/android/pylib/device/decorators.py delete mode 100644 engine/src/flutter/build/android/pylib/device/decorators_test.py delete mode 100644 engine/src/flutter/build/android/pylib/device/device_blacklist.py delete mode 100644 engine/src/flutter/build/android/pylib/device/device_errors.py delete mode 100644 engine/src/flutter/build/android/pylib/device/device_list.py delete mode 100644 engine/src/flutter/build/android/pylib/device/device_utils.py delete mode 100755 engine/src/flutter/build/android/pylib/device/device_utils_device_test.py delete mode 100755 engine/src/flutter/build/android/pylib/device/device_utils_test.py delete mode 100644 engine/src/flutter/build/android/pylib/device/intent.py delete mode 100644 engine/src/flutter/build/android/pylib/device/logcat_monitor.py delete mode 100755 engine/src/flutter/build/android/pylib/device/logcat_monitor_test.py delete mode 100644 engine/src/flutter/build/android/pylib/device/shared_prefs.py delete mode 100755 engine/src/flutter/build/android/pylib/device/shared_prefs_test.py delete mode 100644 engine/src/flutter/build/android/pylib/device_settings.py delete mode 100644 engine/src/flutter/build/android/pylib/device_signal.py delete mode 100755 engine/src/flutter/build/android/pylib/efficient_android_directory_copy.sh delete mode 100644 engine/src/flutter/build/android/pylib/flag_changer.py delete mode 100644 engine/src/flutter/build/android/pylib/forwarder.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/OWNERS delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/base_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/base_unittests_emulator_additional_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/blink_heap_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/breakpad_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/cc_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/content_browsertests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/content_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/gfx_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/ipc_tests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/media_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/net_unittests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/sync_unit_tests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/unit_tests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/filter/webkit_unit_tests_disabled delete mode 100644 engine/src/flutter/build/android/pylib/gtest/gtest_config.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/gtest_test_instance.py delete mode 100755 engine/src/flutter/build/android/pylib/gtest/gtest_test_instance_test.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/local_device_gtest_run.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/test_options.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/test_package.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/test_package_apk.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/test_package_exe.py delete mode 100644 engine/src/flutter/build/android/pylib/gtest/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/test_case.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/test_info_collection.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/test_server.py delete mode 100644 engine/src/flutter/build/android/pylib/host_driven/tests_annotations.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/instrumentation_parser.py delete mode 100755 engine/src/flutter/build/android/pylib/instrumentation/instrumentation_parser_test.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/instrumentation_test_instance.py delete mode 100755 engine/src/flutter/build/android/pylib/instrumentation/instrumentation_test_instance_test.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/json_perf_parser.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/test_jar.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/test_options.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/test_package.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/test_result.py delete mode 100644 engine/src/flutter/build/android/pylib/instrumentation/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/junit/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/junit/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/junit/test_dispatcher.py delete mode 100644 engine/src/flutter/build/android/pylib/junit/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/linker/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/linker/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/linker/test_case.py delete mode 100644 engine/src/flutter/build/android/pylib/linker/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/local/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/local/device/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/local/device/local_device_environment.py delete mode 100644 engine/src/flutter/build/android/pylib/local/device/local_device_instrumentation_test_run.py delete mode 100644 engine/src/flutter/build/android/pylib/local/device/local_device_test_run.py delete mode 100644 engine/src/flutter/build/android/pylib/local/local_test_server_spawner.py delete mode 100644 engine/src/flutter/build/android/pylib/monkey/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/monkey/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/monkey/test_options.py delete mode 100644 engine/src/flutter/build/android/pylib/monkey/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/cache_control.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/perf_control.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/perf_control_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/surface_stats_collector.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/surface_stats_collector_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/test_options.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/perf/thermal_throttle.py delete mode 100644 engine/src/flutter/build/android/pylib/pexpect.py delete mode 100644 engine/src/flutter/build/android/pylib/ports.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/appurify_constants.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/appurify_sanitized.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/dummy/BUILD.gn delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/dummy/dummy.gyp delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/dummy/src/org/chromium/dummy/Dummy.java delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/remote_device_environment.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/remote_device_gtest_run.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/remote_device_helper.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/remote_device_instrumentation_test_run.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/remote_device_test_run.py delete mode 100644 engine/src/flutter/build/android/pylib/remote/device/remote_device_uirobot_test_run.py delete mode 100755 engine/src/flutter/build/android/pylib/restart_adbd.sh delete mode 100644 engine/src/flutter/build/android/pylib/results/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/results/flakiness_dashboard/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/results/flakiness_dashboard/json_results_generator.py delete mode 100644 engine/src/flutter/build/android/pylib/results/flakiness_dashboard/results_uploader.py delete mode 100644 engine/src/flutter/build/android/pylib/results/json_results.py delete mode 100755 engine/src/flutter/build/android/pylib/results/json_results_test.py delete mode 100644 engine/src/flutter/build/android/pylib/results/report_results.py delete mode 100644 engine/src/flutter/build/android/pylib/screenshot.py delete mode 100644 engine/src/flutter/build/android/pylib/sdk/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/sdk/aapt.py delete mode 100644 engine/src/flutter/build/android/pylib/sdk/dexdump.py delete mode 100644 engine/src/flutter/build/android/pylib/sdk/split_select.py delete mode 100644 engine/src/flutter/build/android/pylib/symbols/PRESUBMIT.py delete mode 100644 engine/src/flutter/build/android/pylib/symbols/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/symbols/elf_symbolizer.py delete mode 100755 engine/src/flutter/build/android/pylib/symbols/elf_symbolizer_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/symbols/mock_addr2line/__init__.py delete mode 100755 engine/src/flutter/build/android/pylib/symbols/mock_addr2line/mock_addr2line delete mode 100644 engine/src/flutter/build/android/pylib/system_properties.py delete mode 100644 engine/src/flutter/build/android/pylib/uiautomator/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/uiautomator/setup.py delete mode 100644 engine/src/flutter/build/android/pylib/uiautomator/test_options.py delete mode 100644 engine/src/flutter/build/android/pylib/uiautomator/test_package.py delete mode 100644 engine/src/flutter/build/android/pylib/uiautomator/test_runner.py delete mode 100644 engine/src/flutter/build/android/pylib/uirobot/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/uirobot/uirobot_test_instance.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/__init__.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/apk_helper.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/base_error.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/command_option_parser.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/device_temp_file.py delete mode 100755 engine/src/flutter/build/android/pylib/utils/device_temp_file_test.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/emulator.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/findbugs.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/host_path_finder.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/host_utils.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/isolator.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/json_results_generator_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/logging_utils.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/md5sum.py delete mode 100755 engine/src/flutter/build/android/pylib/utils/md5sum_test.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/mock_calls.py delete mode 100755 engine/src/flutter/build/android/pylib/utils/mock_calls_test.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/parallelizer.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/parallelizer_test.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/proguard.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/repo_utils.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/reraiser_thread.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/reraiser_thread_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/run_tests_helper.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/test_environment.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/time_profile.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/timeout_retry.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/timeout_retry_unittest.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/watchdog_timer.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/xvfb.py delete mode 100644 engine/src/flutter/build/android/pylib/utils/zip_utils.py delete mode 100644 engine/src/flutter/build/android/pylib/valgrind_tools.py delete mode 100644 engine/src/flutter/build/android/rezip.gyp delete mode 100644 engine/src/flutter/build/android/rezip/BUILD.gn delete mode 100644 engine/src/flutter/build/android/rezip/RezipApk.java delete mode 100755 engine/src/flutter/build/android/screenshot.py delete mode 100644 engine/src/flutter/build/android/setup.gyp delete mode 100755 engine/src/flutter/build/android/symbolize.py delete mode 100755 engine/src/flutter/build/android/symbolize_test.py delete mode 100755 engine/src/flutter/build/android/test_runner.py delete mode 100644 engine/src/flutter/build/android/tests/symbolize/Makefile delete mode 100644 engine/src/flutter/build/android/tests/symbolize/a.cc delete mode 100644 engine/src/flutter/build/android/tests/symbolize/b.cc delete mode 100755 engine/src/flutter/build/android/tombstones.py delete mode 100755 engine/src/flutter/build/android/update_verification.py delete mode 100644 engine/src/flutter/build/android_sdk_extras.json delete mode 100755 engine/src/flutter/build/apply_locales.py delete mode 100755 engine/src/flutter/build/branding_value.sh delete mode 100755 engine/src/flutter/build/build-ctags.sh delete mode 100644 engine/src/flutter/build/build_config.h delete mode 100755 engine/src/flutter/build/check_return_value.py delete mode 100755 engine/src/flutter/build/check_sdk_extras_version.py delete mode 100755 engine/src/flutter/build/clobber.py delete mode 100644 engine/src/flutter/build/common.croc delete mode 100644 engine/src/flutter/build/compiled_action.gni delete mode 100755 engine/src/flutter/build/compiler_version.py delete mode 100644 engine/src/flutter/build/config/BUILD.gn delete mode 100644 engine/src/flutter/build/config/BUILDCONFIG.gn delete mode 100644 engine/src/flutter/build/config/OWNERS delete mode 100644 engine/src/flutter/build/config/allocator.gni delete mode 100644 engine/src/flutter/build/config/android/BUILD.gn delete mode 100644 engine/src/flutter/build/config/android/OWNERS delete mode 100644 engine/src/flutter/build/config/android/config.gni delete mode 100644 engine/src/flutter/build/config/android/internal_rules.gni delete mode 100644 engine/src/flutter/build/config/android/rules.gni delete mode 100644 engine/src/flutter/build/config/arm.gni delete mode 100644 engine/src/flutter/build/config/chrome_build.gni delete mode 100644 engine/src/flutter/build/config/clang/BUILD.gn delete mode 100644 engine/src/flutter/build/config/clang/clang.gni delete mode 100644 engine/src/flutter/build/config/compiler/BUILD.gn delete mode 100644 engine/src/flutter/build/config/crypto.gni delete mode 100644 engine/src/flutter/build/config/features.gni delete mode 100644 engine/src/flutter/build/config/fnl/BUILD.gn delete mode 100644 engine/src/flutter/build/config/gcc/BUILD.gn delete mode 100644 engine/src/flutter/build/config/gcc/gcc_version.gni delete mode 100644 engine/src/flutter/build/config/ios/BUILD.gn delete mode 100644 engine/src/flutter/build/config/ios/XcodeHarness/.gitignore delete mode 100644 engine/src/flutter/build/config/ios/XcodeHarness/FakeMain.m delete mode 100644 engine/src/flutter/build/config/ios/XcodeHarness/Harness.xcodeproj/project.pbxproj delete mode 100644 engine/src/flutter/build/config/ios/find_signing_identity.py delete mode 100644 engine/src/flutter/build/config/ios/ios_app.py delete mode 100644 engine/src/flutter/build/config/ios/ios_sdk.gni delete mode 100644 engine/src/flutter/build/config/ios/ios_sdk.py delete mode 100644 engine/src/flutter/build/config/ios/lldb_start_commands.txt delete mode 100644 engine/src/flutter/build/config/ios/rules.gni delete mode 100644 engine/src/flutter/build/config/linux/BUILD.gn delete mode 100644 engine/src/flutter/build/config/linux/gtk/BUILD.gn delete mode 100644 engine/src/flutter/build/config/linux/pkg-config.py delete mode 100644 engine/src/flutter/build/config/linux/pkg_config.gni delete mode 100644 engine/src/flutter/build/config/linux/sysroot_ld_path.py delete mode 100644 engine/src/flutter/build/config/locales.gni delete mode 100644 engine/src/flutter/build/config/mac/BUILD.gn delete mode 100644 engine/src/flutter/build/config/mac/mac_app.py delete mode 100644 engine/src/flutter/build/config/mac/mac_sdk.gni delete mode 100644 engine/src/flutter/build/config/mac/rules.gni delete mode 100644 engine/src/flutter/build/config/mips.gni delete mode 100644 engine/src/flutter/build/config/sanitizers/BUILD.gn delete mode 100644 engine/src/flutter/build/config/sanitizers/sanitizers.gni delete mode 100644 engine/src/flutter/build/config/sysroot.gni delete mode 100644 engine/src/flutter/build/config/templates/templates.gni delete mode 100644 engine/src/flutter/build/config/ui.gni delete mode 100644 engine/src/flutter/build/config/win/BUILD.gn delete mode 100644 engine/src/flutter/build/config/win/visual_studio_version.gni delete mode 100755 engine/src/flutter/build/copy_test_data_ios.py delete mode 100755 engine/src/flutter/build/cp.py delete mode 100755 engine/src/flutter/build/detect_host_arch.py delete mode 100755 engine/src/flutter/build/dir_exists.py delete mode 100755 engine/src/flutter/build/download_gold_plugin.py delete mode 100755 engine/src/flutter/build/download_nacl_toolchains.py delete mode 100755 engine/src/flutter/build/download_sdk_extras.py delete mode 100755 engine/src/flutter/build/env_dump.py delete mode 100755 engine/src/flutter/build/extract_from_cab.py delete mode 100755 engine/src/flutter/build/find_isolated_tests.py delete mode 100755 engine/src/flutter/build/gdb-add-index delete mode 100755 engine/src/flutter/build/get_landmines.py delete mode 100755 engine/src/flutter/build/get_sdk_extras_packages.py delete mode 100755 engine/src/flutter/build/get_syzygy_binaries.py delete mode 100644 engine/src/flutter/build/git-hooks/OWNERS delete mode 100755 engine/src/flutter/build/git-hooks/pre-commit delete mode 100644 engine/src/flutter/build/gn_helpers.py delete mode 100644 engine/src/flutter/build/gn_run_binary.py delete mode 100755 engine/src/flutter/build/gyp_chromium delete mode 100644 engine/src/flutter/build/gyp_chromium.py delete mode 100755 engine/src/flutter/build/gyp_chromium_test.py delete mode 100644 engine/src/flutter/build/gyp_environment.py delete mode 100644 engine/src/flutter/build/gyp_helper.py delete mode 100644 engine/src/flutter/build/gypi_to_gn.py delete mode 100755 engine/src/flutter/build/install-android-sdks.sh delete mode 100755 engine/src/flutter/build/install-build-deps-android.sh delete mode 100755 engine/src/flutter/build/install-build-deps.py delete mode 100755 engine/src/flutter/build/install-build-deps.sh delete mode 100755 engine/src/flutter/build/install-chroot.sh delete mode 100644 engine/src/flutter/build/internal/README.chromium delete mode 100755 engine/src/flutter/build/inverse_depth.py delete mode 100644 engine/src/flutter/build/ios/OWNERS delete mode 100644 engine/src/flutter/build/ios/PRESUBMIT.py delete mode 100644 engine/src/flutter/build/ios/chrome_ios.croc delete mode 100755 engine/src/flutter/build/ios/clean_env.py delete mode 100644 engine/src/flutter/build/ios/grit_whitelist.txt delete mode 100644 engine/src/flutter/build/json_schema_api.gni delete mode 100644 engine/src/flutter/build/landmine_utils.py delete mode 100755 engine/src/flutter/build/landmines.py delete mode 100755 engine/src/flutter/build/ls.py delete mode 100644 engine/src/flutter/build/module_args/dart.gni delete mode 100644 engine/src/flutter/build/module_args/mojo.gni delete mode 100644 engine/src/flutter/build/module_args/nacl.gni delete mode 100644 engine/src/flutter/build/module_args/v8.gni delete mode 100644 engine/src/flutter/build/output_dll_copy.rules delete mode 100644 engine/src/flutter/build/precompile.cc delete mode 100644 engine/src/flutter/build/precompile.h delete mode 100755 engine/src/flutter/build/protoc_java.py delete mode 100755 engine/src/flutter/build/rmdir_and_stamp.py delete mode 100644 engine/src/flutter/build/sanitize-mac-build-log.sed delete mode 100755 engine/src/flutter/build/sanitize-mac-build-log.sh delete mode 100644 engine/src/flutter/build/sanitize-win-build-log.sed delete mode 100755 engine/src/flutter/build/sanitize-win-build-log.sh delete mode 100644 engine/src/flutter/build/sanitizers/BUILD.gn delete mode 100644 engine/src/flutter/build/sanitizers/OWNERS delete mode 100644 engine/src/flutter/build/sanitizers/asan_suppressions.cc delete mode 100644 engine/src/flutter/build/sanitizers/lsan_suppressions.cc delete mode 100644 engine/src/flutter/build/sanitizers/sanitizer_options.cc delete mode 100644 engine/src/flutter/build/sanitizers/sanitizers.gyp delete mode 100644 engine/src/flutter/build/sanitizers/tsan_suppressions.cc delete mode 100644 engine/src/flutter/build/secondary/testing/gmock/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/testing/gtest/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/third_party/libjpeg_turbo/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/third_party/libsrtp/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/third_party/nss/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/tools/grit/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/tools/grit/grit_rule.gni delete mode 100644 engine/src/flutter/build/secondary/tools/grit/repack.gni delete mode 100644 engine/src/flutter/build/secondary/tools/grit/stamp_grit_sources.py delete mode 100644 engine/src/flutter/build/slave/OWNERS delete mode 100644 engine/src/flutter/build/slave/README delete mode 100644 engine/src/flutter/build/some.gyp delete mode 100755 engine/src/flutter/build/symlink.py delete mode 100644 engine/src/flutter/build/temp_gyp/README.chromium delete mode 100644 engine/src/flutter/build/temp_gyp/pdfsqueeze.gyp delete mode 100644 engine/src/flutter/build/toolchain/OWNERS delete mode 100644 engine/src/flutter/build/toolchain/android/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/ccache.gni delete mode 100644 engine/src/flutter/build/toolchain/clang.gni delete mode 100644 engine/src/flutter/build/toolchain/cros/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/fnl/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/gcc_toolchain.gni delete mode 100644 engine/src/flutter/build/toolchain/get_concurrent_links.py delete mode 100644 engine/src/flutter/build/toolchain/goma.gni delete mode 100644 engine/src/flutter/build/toolchain/linux/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/mac/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/mac/setup_toolchain.py delete mode 100644 engine/src/flutter/build/toolchain/nacl/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/win/BUILD.gn delete mode 100644 engine/src/flutter/build/toolchain/win/midl.gni delete mode 100644 engine/src/flutter/build/toolchain/win/setup_toolchain.py delete mode 100755 engine/src/flutter/build/tree_truth.sh delete mode 100755 engine/src/flutter/build/update-linux-sandbox.sh delete mode 100644 engine/src/flutter/build/util/BUILD.gn delete mode 100755 engine/src/flutter/build/util/lastchange.py delete mode 100644 engine/src/flutter/build/util/lib/common/__init__.py delete mode 100644 engine/src/flutter/build/util/lib/common/perf_result_data_type.py delete mode 100644 engine/src/flutter/build/util/lib/common/perf_tests_results_helper.py delete mode 100644 engine/src/flutter/build/util/lib/common/unittest_util.py delete mode 100644 engine/src/flutter/build/util/lib/common/util.py delete mode 100755 engine/src/flutter/build/util/version.py delete mode 100644 engine/src/flutter/build/vs_toolchain.py delete mode 100644 engine/src/flutter/build/whitespace_file.txt delete mode 100755 engine/src/flutter/build/win_is_xtree_patched.py delete mode 100644 engine/src/flutter/testing/BUILD.gn delete mode 100644 engine/src/flutter/testing/OWNERS delete mode 100644 engine/src/flutter/testing/PRESUBMIT.py delete mode 100644 engine/src/flutter/testing/android/OWNERS delete mode 100644 engine/src/flutter/testing/android/appurify_support.gyp delete mode 100644 engine/src/flutter/testing/android/appurify_support/BUILD.gn delete mode 100644 engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/ResultsBundleGenerator.java delete mode 100644 engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java delete mode 100644 engine/src/flutter/testing/android/broker/BUILD.gn delete mode 100644 engine/src/flutter/testing/android/broker/java/src/org/chromium/test/broker/OnDeviceInstrumentationBroker.java delete mode 100644 engine/src/flutter/testing/android/driver/BUILD.gn delete mode 100644 engine/src/flutter/testing/android/driver/java/AndroidManifest.xml delete mode 100644 engine/src/flutter/testing/android/driver/java/src/org/chromium/test/driver/OnDeviceInstrumentationDriver.java delete mode 100644 engine/src/flutter/testing/android/junit/BUILD.gn delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestComputer.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestListener.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestLogger.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonListener.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonLogger.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/LocalRobolectricTestRunner.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/PackageFilter.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RobolectricClasspathDependencyResolver.java delete mode 100644 engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RunnerFilter.java delete mode 100644 engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestFilterTest.java delete mode 100644 engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestLoggerTest.java delete mode 100644 engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/PackageFilterTest.java delete mode 100644 engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/RunnerFilterTest.java delete mode 100644 engine/src/flutter/testing/android/junit/junit_test.gyp delete mode 100644 engine/src/flutter/testing/android/native_test.gyp delete mode 100644 engine/src/flutter/testing/android/native_test/BUILD.gn delete mode 100644 engine/src/flutter/testing/android/native_test/README.chromium delete mode 100644 engine/src/flutter/testing/android/native_test/java/AndroidManifest.xml delete mode 100644 engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java delete mode 100644 engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java delete mode 100644 engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java delete mode 100644 engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java delete mode 100644 engine/src/flutter/testing/android/native_test/native_test_jni_onload.cc delete mode 100644 engine/src/flutter/testing/android/native_test/native_test_launcher.cc delete mode 100644 engine/src/flutter/testing/android/native_test/native_test_launcher.h delete mode 100644 engine/src/flutter/testing/android/native_test/native_test_util.cc delete mode 100644 engine/src/flutter/testing/android/native_test/native_test_util.h delete mode 100644 engine/src/flutter/testing/android/on_device_instrumentation.gyp delete mode 100644 engine/src/flutter/testing/android/reporter/BUILD.gn delete mode 100644 engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusListener.java delete mode 100644 engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReceiver.java delete mode 100644 engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java delete mode 100644 engine/src/flutter/testing/buildbot/OWNERS delete mode 100644 engine/src/flutter/testing/buildbot/PRESUBMIT.py delete mode 100644 engine/src/flutter/testing/buildbot/chromium.chrome.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.chromiumos.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.fyi.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.linux.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.mac.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.memory.fyi.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.memory.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.perf.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.webkit.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.webrtc.fyi.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium.win.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium_arm.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium_memory_trybot.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium_trybot.json delete mode 100644 engine/src/flutter/testing/buildbot/chromium_win8_trybot.json delete mode 100644 engine/src/flutter/testing/buildbot/client.v8.branches.json delete mode 100644 engine/src/flutter/testing/buildbot/client.v8.fyi.json delete mode 100755 engine/src/flutter/testing/buildbot/manage.py delete mode 100644 engine/src/flutter/testing/buildbot/ninja_to_gn.pyl delete mode 100644 engine/src/flutter/testing/buildbot/trybot_analyze_config.json delete mode 100644 engine/src/flutter/testing/buildbot/tryserver.blink.json delete mode 100644 engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json delete mode 100644 engine/src/flutter/testing/buildbot/tryserver.chromium.mac.json delete mode 100644 engine/src/flutter/testing/buildbot/tryserver.chromium.perf.json delete mode 100644 engine/src/flutter/testing/buildbot/tryserver.chromium.win.json delete mode 100644 engine/src/flutter/testing/buildbot/tryserver.v8.json delete mode 100644 engine/src/flutter/testing/chromoting/app_remoting_integration_tests.isolate delete mode 100644 engine/src/flutter/testing/chromoting/browser_test_commands_linux.txt delete mode 100644 engine/src/flutter/testing/chromoting/browser_tests_launcher.py delete mode 100644 engine/src/flutter/testing/chromoting/chromoting_integration_tests.isolate delete mode 100644 engine/src/flutter/testing/chromoting/chromoting_test_files.txt delete mode 100644 engine/src/flutter/testing/chromoting/download_test_files.py delete mode 100644 engine/src/flutter/testing/chromoting/integration_tests.gyp delete mode 100644 engine/src/flutter/testing/chromoting/multi_machine_example/example_task.isolate delete mode 100644 engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.isolate delete mode 100755 engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.py delete mode 100644 engine/src/flutter/testing/coverage_util_ios.cc delete mode 100644 engine/src/flutter/testing/coverage_util_ios.h delete mode 100755 engine/src/flutter/testing/generate_gmock_mutant.py delete mode 100644 engine/src/flutter/testing/gmock.gyp delete mode 100644 engine/src/flutter/testing/gmock_mutant.h delete mode 100644 engine/src/flutter/testing/gtest.gyp delete mode 100644 engine/src/flutter/testing/gtest_ios/Default.png delete mode 100755 engine/src/flutter/testing/gtest_ios/run-unittest.sh delete mode 100644 engine/src/flutter/testing/gtest_ios/unittest-Info.plist delete mode 100644 engine/src/flutter/testing/gtest_mac.h delete mode 100644 engine/src/flutter/testing/gtest_mac.mm delete mode 100644 engine/src/flutter/testing/gtest_mac_unittest.mm delete mode 100644 engine/src/flutter/testing/gtest_nacl.gyp delete mode 100644 engine/src/flutter/testing/iossim/OWNERS delete mode 100644 engine/src/flutter/testing/iossim/iossim.gyp delete mode 100644 engine/src/flutter/testing/iossim/iossim.mm delete mode 100755 engine/src/flutter/testing/iossim/redirect-stdout.sh delete mode 100644 engine/src/flutter/testing/legion/SimpleJSONRPCServer.py delete mode 100644 engine/src/flutter/testing/legion/__init__.py delete mode 100644 engine/src/flutter/testing/legion/common_lib.py delete mode 100644 engine/src/flutter/testing/legion/examples/hello_world/controller_test.isolate delete mode 100755 engine/src/flutter/testing/legion/examples/hello_world/controller_test.py delete mode 100644 engine/src/flutter/testing/legion/examples/hello_world/task_test.isolate delete mode 100755 engine/src/flutter/testing/legion/examples/hello_world/task_test.py delete mode 100644 engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.isolate delete mode 100755 engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py delete mode 100644 engine/src/flutter/testing/legion/examples/subprocess/task.isolate delete mode 100644 engine/src/flutter/testing/legion/jsonrpclib.py delete mode 100644 engine/src/flutter/testing/legion/legion.isolate delete mode 100644 engine/src/flutter/testing/legion/legion_test_case.py delete mode 100644 engine/src/flutter/testing/legion/process.py delete mode 100644 engine/src/flutter/testing/legion/rpc_methods.py delete mode 100644 engine/src/flutter/testing/legion/rpc_server.py delete mode 100755 engine/src/flutter/testing/legion/run_task.py delete mode 100644 engine/src/flutter/testing/legion/ssl_util.py delete mode 100644 engine/src/flutter/testing/legion/task_controller.py delete mode 100644 engine/src/flutter/testing/legion/task_registration_server.py delete mode 100644 engine/src/flutter/testing/legion/test_controller.py delete mode 100755 engine/src/flutter/testing/legion/tools/legion.py delete mode 100644 engine/src/flutter/testing/multiprocess_func_list.cc delete mode 100644 engine/src/flutter/testing/multiprocess_func_list.h delete mode 100644 engine/src/flutter/testing/perf/BUILD.gn delete mode 100644 engine/src/flutter/testing/perf/perf_test.cc delete mode 100644 engine/src/flutter/testing/perf/perf_test.gyp delete mode 100644 engine/src/flutter/testing/perf/perf_test.h delete mode 100644 engine/src/flutter/testing/platform_test.h delete mode 100644 engine/src/flutter/testing/platform_test_mac.mm delete mode 100644 engine/src/flutter/testing/scripts/OWNERS delete mode 100755 engine/src/flutter/testing/scripts/android_gtest_test.py delete mode 100755 engine/src/flutter/testing/scripts/checkdeps.py delete mode 100755 engine/src/flutter/testing/scripts/checklicenses.py delete mode 100755 engine/src/flutter/testing/scripts/checkperms.py delete mode 100644 engine/src/flutter/testing/scripts/common.py delete mode 100755 engine/src/flutter/testing/scripts/get_compile_targets.py delete mode 100755 engine/src/flutter/testing/scripts/gn_check.py delete mode 100755 engine/src/flutter/testing/scripts/gtest_perf_test.py delete mode 100755 engine/src/flutter/testing/scripts/gyp_flag_compare.py delete mode 100755 engine/src/flutter/testing/scripts/host_info.py delete mode 100755 engine/src/flutter/testing/scripts/mojo_apptests.py delete mode 100755 engine/src/flutter/testing/scripts/nacl_integration.py delete mode 100755 engine/src/flutter/testing/scripts/telemetry_gpu_unittests.py delete mode 100755 engine/src/flutter/testing/scripts/telemetry_perf_unittests.py delete mode 100755 engine/src/flutter/testing/scripts/telemetry_unittests.py delete mode 100755 engine/src/flutter/testing/scripts/webkit_lint.py delete mode 100755 engine/src/flutter/testing/scripts/webkit_python_tests.py delete mode 100755 engine/src/flutter/testing/scripts/webview_licenses.py delete mode 100644 engine/src/flutter/testing/test.gni delete mode 100755 engine/src/flutter/testing/test_env.py delete mode 100644 engine/src/flutter/testing/variations/PRESUBMIT.py delete mode 100644 engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json delete mode 100644 engine/src/flutter/testing/variations/fieldtrial_testing_config_chromeos.json delete mode 100644 engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json delete mode 100644 engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json delete mode 100644 engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json delete mode 100644 engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json delete mode 100755 engine/src/flutter/testing/xvfb.py delete mode 100644 engine/src/flutter/third_party/.dartignore delete mode 100644 engine/src/flutter/third_party/BUILD.gn delete mode 100644 engine/src/flutter/third_party/README delete mode 100644 engine/src/flutter/third_party/android_testrunner/LICENSE delete mode 100644 engine/src/flutter/third_party/android_testrunner/OWNERS delete mode 100644 engine/src/flutter/third_party/android_testrunner/README.chromium delete mode 100644 engine/src/flutter/third_party/android_testrunner/adb_interface.py delete mode 100644 engine/src/flutter/third_party/android_testrunner/am_instrument_parser.py delete mode 100644 engine/src/flutter/third_party/android_testrunner/errors.py delete mode 100644 engine/src/flutter/third_party/android_testrunner/logger.py delete mode 100644 engine/src/flutter/third_party/android_testrunner/patch.diff delete mode 100644 engine/src/flutter/third_party/android_testrunner/run_command.py delete mode 100644 engine/src/flutter/third_party/apple_apsl/CFBase.h delete mode 100644 engine/src/flutter/third_party/apple_apsl/CFRuntime.h delete mode 100644 engine/src/flutter/third_party/apple_apsl/LICENSE delete mode 100644 engine/src/flutter/third_party/apple_apsl/OWNERS delete mode 100644 engine/src/flutter/third_party/apple_apsl/README.chromium delete mode 100644 engine/src/flutter/third_party/apple_apsl/cssmapplePriv.h delete mode 100644 engine/src/flutter/third_party/apple_apsl/dnsinfo.h delete mode 100644 engine/src/flutter/third_party/apple_apsl/malloc.h delete mode 100644 engine/src/flutter/third_party/ashmem/BUILD.gn delete mode 100644 engine/src/flutter/third_party/ashmem/LICENSE delete mode 100644 engine/src/flutter/third_party/ashmem/OWNERS delete mode 100644 engine/src/flutter/third_party/ashmem/README.chromium delete mode 100644 engine/src/flutter/third_party/ashmem/ashmem-dev.c delete mode 100644 engine/src/flutter/third_party/ashmem/ashmem.gyp delete mode 100644 engine/src/flutter/third_party/ashmem/ashmem.h delete mode 100644 engine/src/flutter/third_party/binutils/.gitignore delete mode 100644 engine/src/flutter/third_party/binutils/LICENSE delete mode 100644 engine/src/flutter/third_party/binutils/Linux_ia32/binutils.tar.bz2.sha1 delete mode 100644 engine/src/flutter/third_party/binutils/Linux_x64/binutils.tar.bz2.sha1 delete mode 100644 engine/src/flutter/third_party/binutils/OWNERS delete mode 100644 engine/src/flutter/third_party/binutils/README.chromium delete mode 100755 engine/src/flutter/third_party/binutils/build-all.sh delete mode 100755 engine/src/flutter/third_party/binutils/build-one.sh delete mode 100755 engine/src/flutter/third_party/binutils/download.py delete mode 100644 engine/src/flutter/third_party/binutils/ehframe-race.patch delete mode 100644 engine/src/flutter/third_party/binutils/plugin-dso-fix.patch delete mode 100644 engine/src/flutter/third_party/binutils/unlock-thin.patch delete mode 100755 engine/src/flutter/third_party/binutils/upload.sh delete mode 100644 engine/src/flutter/third_party/freetype-android/BUILD.gn delete mode 100644 engine/src/flutter/third_party/freetype-android/OWNERS delete mode 100644 engine/src/flutter/third_party/freetype-android/README.chromium delete mode 100644 engine/src/flutter/third_party/freetype-android/freetype.gyp delete mode 100644 engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftmodule.h delete mode 100644 engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftoption.h delete mode 100644 engine/src/flutter/third_party/iccjpeg/BUILD.gn delete mode 100644 engine/src/flutter/third_party/iccjpeg/LICENSE delete mode 100644 engine/src/flutter/third_party/iccjpeg/OWNERS delete mode 100644 engine/src/flutter/third_party/iccjpeg/README.chromium delete mode 100644 engine/src/flutter/third_party/iccjpeg/iccjpeg.c delete mode 100644 engine/src/flutter/third_party/iccjpeg/iccjpeg.gyp delete mode 100644 engine/src/flutter/third_party/iccjpeg/iccjpeg.h delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/BUILD.gn delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/OWNERS delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/README.chromium delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/binaries/.gitignore delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-precise.tgz.sha1 delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1 delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-precise.tgz.sha1 delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1 delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/blacklists/asan/libglib2.0-0.txt delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libglib2.0-0.txt delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libx11-6.txt delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/instrumented_libraries.gyp delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/instrumented_libraries.isolate delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libcups2.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libfontconfig.precise.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libfontconfig.trusty.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.precise.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.trusty.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libpixman-1-0.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libva1.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/libxcb1.precise.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/nss.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/pulseaudio.precise.diff delete mode 100644 engine/src/flutter/third_party/instrumented_libraries/patches/zlib1g.diff delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/build_and_package.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/download_binaries.py delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/download_build_install.py delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/fix_rpaths.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/install-build-deps.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autogen.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/freetype.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libva1.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/udev.sh delete mode 100755 engine/src/flutter/third_party/instrumented_libraries/scripts/unpack_binaries.py delete mode 100644 engine/src/flutter/third_party/jsr-305/BUILD.gn delete mode 100644 engine/src/flutter/third_party/jsr-305/README.chromium delete mode 100644 engine/src/flutter/third_party/jsr-305/jsr-305.gyp delete mode 100644 engine/src/flutter/third_party/junit/BUILD.gn delete mode 100644 engine/src/flutter/third_party/junit/LICENSE delete mode 100644 engine/src/flutter/third_party/junit/OWNERS delete mode 100644 engine/src/flutter/third_party/junit/README.chromium delete mode 100644 engine/src/flutter/third_party/junit/junit.gyp delete mode 100644 engine/src/flutter/third_party/markupsafe/AUTHORS delete mode 100644 engine/src/flutter/third_party/markupsafe/LICENSE delete mode 100644 engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.md5 delete mode 100644 engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.sha512 delete mode 100644 engine/src/flutter/third_party/markupsafe/OWNERS delete mode 100644 engine/src/flutter/third_party/markupsafe/README.chromium delete mode 100644 engine/src/flutter/third_party/markupsafe/__init__.py delete mode 100644 engine/src/flutter/third_party/markupsafe/_compat.py delete mode 100644 engine/src/flutter/third_party/markupsafe/_constants.py delete mode 100644 engine/src/flutter/third_party/markupsafe/_native.py delete mode 100644 engine/src/flutter/third_party/markupsafe/_speedups.c delete mode 100755 engine/src/flutter/third_party/markupsafe/get_markupsafe.sh delete mode 100644 engine/src/flutter/third_party/mockito/BUILD.gn delete mode 100644 engine/src/flutter/third_party/mockito/LICENSE delete mode 100644 engine/src/flutter/third_party/mockito/OWNERS delete mode 100644 engine/src/flutter/third_party/mockito/README.chromium delete mode 100644 engine/src/flutter/third_party/mockito/mockito.gyp delete mode 100644 engine/src/flutter/third_party/modp_b64/BUILD.gn delete mode 100644 engine/src/flutter/third_party/modp_b64/DEPS delete mode 100644 engine/src/flutter/third_party/modp_b64/LICENSE delete mode 100644 engine/src/flutter/third_party/modp_b64/OWNERS delete mode 100644 engine/src/flutter/third_party/modp_b64/README.chromium delete mode 100644 engine/src/flutter/third_party/modp_b64/modp_b64.cc delete mode 100644 engine/src/flutter/third_party/modp_b64/modp_b64.h delete mode 100644 engine/src/flutter/third_party/modp_b64/modp_b64_data.h delete mode 100644 engine/src/flutter/third_party/pymock/LICENSE.txt delete mode 100644 engine/src/flutter/third_party/pymock/OWNERS delete mode 100644 engine/src/flutter/third_party/pymock/README.chromium delete mode 100644 engine/src/flutter/third_party/pymock/mock.py delete mode 100644 engine/src/flutter/third_party/robolectric/BUILD.gn delete mode 100644 engine/src/flutter/third_party/robolectric/LICENSE delete mode 100644 engine/src/flutter/third_party/robolectric/OWNERS delete mode 100644 engine/src/flutter/third_party/robolectric/README.chromium delete mode 100644 engine/src/flutter/third_party/robolectric/licenses/extreme.indiana.edu.license.txt delete mode 100644 engine/src/flutter/third_party/robolectric/licenses/javolution.license.txt delete mode 100644 engine/src/flutter/third_party/robolectric/licenses/pivotal.labs.license.txt delete mode 100644 engine/src/flutter/third_party/robolectric/robolectric.gyp delete mode 100644 engine/src/flutter/tools/checkperms/OWNERS delete mode 100644 engine/src/flutter/tools/checkperms/PRESUBMIT.py delete mode 100755 engine/src/flutter/tools/checkperms/checkperms.py delete mode 100755 engine/src/flutter/tools/dart/update.py delete mode 100644 engine/src/flutter/tools/find_depot_tools.py delete mode 100644 engine/src/flutter/tools/gdb/gdb_chrome.py delete mode 100644 engine/src/flutter/tools/generate_library_loader/generate_library_loader.gni delete mode 100755 engine/src/flutter/tools/generate_library_loader/generate_library_loader.py delete mode 100644 engine/src/flutter/tools/git/README delete mode 100755 engine/src/flutter/tools/git/for-all-touched-files.py delete mode 100755 engine/src/flutter/tools/git/git-diff-ide.py delete mode 100755 engine/src/flutter/tools/git/git-utils.sh delete mode 100755 engine/src/flutter/tools/git/graph.sh delete mode 100755 engine/src/flutter/tools/git/mass-rename.py delete mode 100755 engine/src/flutter/tools/git/mass-rename.sh delete mode 100755 engine/src/flutter/tools/git/mffr.py delete mode 100755 engine/src/flutter/tools/git/move_source_file.bat delete mode 100755 engine/src/flutter/tools/git/move_source_file.py delete mode 100755 engine/src/flutter/tools/git/post-checkout delete mode 100755 engine/src/flutter/tools/git/post-merge delete mode 100755 engine/src/flutter/tools/git/update-copyrights.sh delete mode 100644 engine/src/flutter/tools/go/VERSION_LINUX delete mode 100644 engine/src/flutter/tools/go/VERSION_MACOSX delete mode 100755 engine/src/flutter/tools/go/download.py delete mode 100755 engine/src/flutter/tools/go/upload.py delete mode 100644 engine/src/flutter/tools/gritsettings/resource_ids delete mode 100755 engine/src/flutter/tools/gyp/pylib/gyp/mac_tool.py delete mode 100644 engine/src/flutter/tools/idl_parser/PRESUBMIT.py delete mode 100644 engine/src/flutter/tools/idl_parser/__init__.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_lexer.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_lexer_test.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_node.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_parser.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_parser_test.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_ppapi_lexer.py delete mode 100755 engine/src/flutter/tools/idl_parser/idl_ppapi_parser.py delete mode 100755 engine/src/flutter/tools/idl_parser/run_tests.py delete mode 100644 engine/src/flutter/tools/licenses/README delete mode 100644 engine/src/flutter/tools/licenses/data/README delete mode 100644 engine/src/flutter/tools/licenses/data/academic-3.0 delete mode 100644 engine/src/flutter/tools/licenses/data/apache-license-2.0 delete mode 100644 engine/src/flutter/tools/licenses/data/google-bsd delete mode 100644 engine/src/flutter/tools/licenses/data/gpl-3.0 delete mode 100644 engine/src/flutter/tools/licenses/data/gpl-gcc-exception-3.1 delete mode 100644 engine/src/flutter/tools/licenses/data/lesser-gpl-2.1 delete mode 100644 engine/src/flutter/tools/licenses/data/library-gpl-2.0 delete mode 100644 engine/src/flutter/tools/licenses/data/mozilla-2.0 delete mode 100644 engine/src/flutter/tools/licenses/lib/README delete mode 100644 engine/src/flutter/tools/licenses/lib/cache.dart delete mode 100644 engine/src/flutter/tools/licenses/lib/filesystem.dart delete mode 100644 engine/src/flutter/tools/licenses/lib/licenses.dart delete mode 100644 engine/src/flutter/tools/licenses/lib/main.dart delete mode 100644 engine/src/flutter/tools/licenses/lib/patterns.dart delete mode 100644 engine/src/flutter/tools/licenses/pubspec.lock delete mode 100644 engine/src/flutter/tools/licenses/pubspec.yaml delete mode 100644 engine/src/flutter/tools/linux/PRESUBMIT.py delete mode 100755 engine/src/flutter/tools/linux/dump-static-initializers.py delete mode 100755 engine/src/flutter/tools/linux/procfs.py delete mode 100755 engine/src/flutter/tools/linux/tests/procfs_tests.py delete mode 100644 engine/src/flutter/tools/memory/asan/blacklist.txt delete mode 100755 engine/src/flutter/tools/protoc_wrapper/protoc_wrapper.py delete mode 100644 engine/src/flutter/tools/relocation_packer/BUILD.gn delete mode 100644 engine/src/flutter/tools/relocation_packer/LICENSE delete mode 100644 engine/src/flutter/tools/relocation_packer/README.TXT delete mode 100644 engine/src/flutter/tools/relocation_packer/config.gni delete mode 100644 engine/src/flutter/tools/relocation_packer/relocation_packer.gyp delete mode 100644 engine/src/flutter/tools/relocation_packer/src/debug.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/debug.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/debug_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/delta_encoder.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/delta_encoder.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/delta_encoder_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/elf_file.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/elf_file.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/elf_file_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/elf_traits.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/leb128.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/leb128.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/leb128_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/main.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/packer.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/packer.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/packer_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/run_all_unittests.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/run_length_encoder.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/run_length_encoder.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/run_length_encoder_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/sleb128.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/src/sleb128.h delete mode 100644 engine/src/flutter/tools/relocation_packer/src/sleb128_unittest.cc delete mode 100644 engine/src/flutter/tools/relocation_packer/test_data/elf_file_unittest_relocs.cc delete mode 100755 engine/src/flutter/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.py delete mode 100755 engine/src/flutter/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.sh delete mode 100755 engine/src/flutter/tools/remove_stale_pyc_files.py delete mode 100644 engine/src/flutter/tools/resources/about_credits_entry.tmpl delete mode 100755 engine/src/flutter/tools/sort-headers.py delete mode 100755 engine/src/flutter/tools/sort_sources.py delete mode 100644 engine/src/flutter/tools/vim/chromium.ycm_extra_conf.py delete mode 100644 engine/src/flutter/tools/vim/clang-format.vim delete mode 100644 engine/src/flutter/tools/vim/filetypes.vim delete mode 100644 engine/src/flutter/tools/vim/ninja-build.vim delete mode 100644 engine/src/flutter/tools/vim/ninja_output.py delete mode 100644 engine/src/flutter/tools/xdisplaycheck/BUILD.gn delete mode 100644 engine/src/flutter/tools/xdisplaycheck/xdisplaycheck.cc delete mode 100644 engine/src/flutter/tools/xdisplaycheck/xdisplaycheck.gyp delete mode 100644 engine/src/flutter/tools/yes_no.py diff --git a/engine/src/flutter/.gitignore b/engine/src/flutter/.gitignore index 32b0e4d20c..b5f80bd40a 100644 --- a/engine/src/flutter/.gitignore +++ b/engine/src/flutter/.gitignore @@ -17,58 +17,4 @@ cscope.* Session.vim tags Thumbs.db -/build/util/LASTCHANGE* .idea - -# directories pulled in via deps or hooks -/base/ -/build/linux/bin/eu-strip -/buildtools/ -/dart/ -/lib/ -/mojo/devtools/ -/mojo/public/ -/native_client/ -/out/ -/out_*/ -/sdch/open-vcdiff/ -/testing/gmock/ -/testing/gtest/ -/third_party/android_tools/ -/third_party/angle/ -/third_party/appurify-python/ -/third_party/boringssl/src/ -/third_party/colorama/src/ -/third_party/dart-sdk/ -/third_party/dejavu-fonts-ttf-2.34/ttf/*.ttf -/third_party/freetype-android/src -/third_party/go/tool/ -/third_party/gtest/ -/third_party/icu/ -/third_party/jsr-305/src/ -/third_party/libc++/trunk/ -/third_party/libc++abi/trunk/ -/third_party/libjpeg_turbo/ -/third_party/llvm/ -/third_party/llvm-build/ -/third_party/junit/src/ -/third_party/mockito/src/ -/third_party/pdfium/ -/third_party/pywebsocket/src/ -/third_party/requests/src/ -/third_party/robolectric/lib/ -/third_party/skia/ -/third_party/yasm/binaries/ -/third_party/yasm/source/patched-yasm/ -/tools/grit/ - -# dart packages directories and related. -/examples/**/packages -/examples/**/pubspec.lock -/mojo/common/dart/packages -/sky/packages/**/packages -/sky/packages/sky_services/lib/ -/sky/tools/pubspec_maintenance/packages/ -/sky/tools/pubspec_maintenance/pubspec.lock -/mojo/dart/packages/**/packages/ -/mojo/dart/packages/**/pubspec.lock diff --git a/engine/src/flutter/.gn b/engine/src/flutter/.gn deleted file mode 100644 index 29288a8f40..0000000000 --- a/engine/src/flutter/.gn +++ /dev/null @@ -1,22 +0,0 @@ -# This file is used by the experimental meta-buildsystem in src/tools/gn to -# find the root of the source tree and to set startup options. - -# The location of the build configuration file. -buildconfig = "//build/config/BUILDCONFIG.gn" - -# The secondary source root is a parallel directory tree where -# GN build files are placed when they can not be placed directly -# in the source tree, e.g. for third party source trees. -secondary_source = "//build/secondary/" - -# The set of targets known to pass 'gn check'. When all targets pass, remove -# this. -check_targets = [ - "//dart/*", - "//flow/*", - "//flutter/*", - "//glue/*", - "//mojo/*", - "//skia/*", - "//sky/*", -] diff --git a/engine/src/flutter/build/OWNERS b/engine/src/flutter/build/OWNERS deleted file mode 100644 index 17d067cff3..0000000000 --- a/engine/src/flutter/build/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -cjhopman@chromium.org -dpranke@chromium.org -jochen@chromium.org -scottmg@chromium.org -thakis@chromium.org diff --git a/engine/src/flutter/build/PRESUBMIT.py b/engine/src/flutter/build/PRESUBMIT.py deleted file mode 100644 index fca962f1ca..0000000000 --- a/engine/src/flutter/build/PRESUBMIT.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - - -def _RunTests(input_api, output_api): - return (input_api.canned_checks.RunUnitTestsInDirectory( - input_api, output_api, '.', whitelist=[r'.+_test.py$'])) - - -def CheckChangeOnUpload(input_api, output_api): - return _RunTests(input_api, output_api) - - -def CheckChangeOnCommit(input_api, output_api): - return _RunTests(input_api, output_api) diff --git a/engine/src/flutter/build/README.chromium b/engine/src/flutter/build/README.chromium deleted file mode 100644 index 012df35c7a..0000000000 --- a/engine/src/flutter/build/README.chromium +++ /dev/null @@ -1,15 +0,0 @@ -List of property sheets to be included by projects: - common.vsprops - Not used anymore. No-op. Kept for compatibility with current projects. - - debug.vsprops - Enables debug settings. Must be included directly in Debug configuration. Includes internal\essential.vsprops. - - external_code.vsprops - Contains settings made to simplify usage of external (non-Google) code. It relaxes the warning levels. Should be included after debug.vsprops or release.vsprops to override their settings. - - output_dll_copy.rules - Run to enable automatic copy of DLL when they are as an input file in a vcproj project. - - release.vsprops - Enables release settings. Must be included directly in Release configuration. Includes internal\essential.vsprops. Also includes "internal\release_impl$(CHROME_BUILD_TYPE).vsprops". So the behavior is dependant on the CHROME_BUILD_TYPE environment variable. diff --git a/engine/src/flutter/build/all.gyp b/engine/src/flutter/build/all.gyp deleted file mode 100644 index b36fae6a57..0000000000 --- a/engine/src/flutter/build/all.gyp +++ /dev/null @@ -1,1442 +0,0 @@ -# Copyright (c) 2012 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': { - # A hook that can be overridden in other repositories to add additional - # compilation targets to 'All'. - 'app_targets%': [], - # For Android-specific targets. - 'android_app_targets%': [], - }, - 'targets': [ - { - 'target_name': 'All', - 'type': 'none', - 'xcode_create_dependents_test_runner': 1, - 'dependencies': [ - '<@(app_targets)', - 'some.gyp:*', - '../base/base.gyp:*', - '../components/components.gyp:*', - '../components/components_tests.gyp:*', - '../content/content.gyp:*', - '../crypto/crypto.gyp:*', - '../net/net.gyp:*', - '../sdch/sdch.gyp:*', - '../sql/sql.gyp:*', - '../testing/gmock.gyp:*', - '../testing/gtest.gyp:*', - '../third_party/icu/icu.gyp:*', - '../third_party/libxml/libxml.gyp:*', - '../third_party/sqlite/sqlite.gyp:*', - '../third_party/zlib/zlib.gyp:*', - '../ui/accessibility/accessibility.gyp:*', - '../ui/base/ui_base.gyp:*', - '../ui/display/display.gyp:display_unittests', - '../ui/snapshot/snapshot.gyp:*', - '../url/url.gyp:*', - ], - 'conditions': [ - ['OS!="ios" and OS!="mac"', { - 'dependencies': [ - '../ui/touch_selection/ui_touch_selection.gyp:*', - ], - }], - ['OS=="ios"', { - 'dependencies': [ - '../chrome/chrome.gyp:browser', - '../chrome/chrome.gyp:browser_ui', - '../ios/ios.gyp:*', - # NOTE: This list of targets is present because - # mojo_base.gyp:mojo_base cannot be built on iOS, as - # javascript-related targets cause v8 to be built. - '../mojo/mojo_base.gyp:mojo_common_lib', - '../mojo/mojo_base.gyp:mojo_common_unittests', - '../google_apis/google_apis.gyp:google_apis_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../third_party/mojo/mojo_edk.gyp:mojo_system_impl', - '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_bindings_unittests', - '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_environment_unittests', - '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_system_unittests', - '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_utility_unittests', - '../third_party/mojo/mojo_edk_tests.gyp:mojo_system_unittests', - '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings', - '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils', - '../third_party/mojo/mojo_public.gyp:mojo_system', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - ], - }], - ['OS=="android"', { - 'dependencies': [ - '../content/content_shell_and_tests.gyp:content_shell_apk', - '<@(android_app_targets)', - 'android_builder_tests', - '../tools/telemetry/telemetry.gyp:*#host', - # TODO(nyquist) This should instead by a target for sync when all of - # the sync-related code for Android has been upstreamed. - # See http://crbug.com/159203 - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib', - ], - 'conditions': [ - ['chromecast==0', { - 'dependencies': [ - '../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', - '../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', - ], - }], - # TODO: Enable packed relocations for x64. See: b/20532404 - ['target_arch != "x64"', { - 'dependencies': [ - '../third_party/android_platform/relocation_packer.gyp:android_relocation_packer_unittests#host', - ], - }], - ], - }, { - 'dependencies': [ - '../content/content_shell_and_tests.gyp:*', - # TODO: This should build on Android and the target should move to the list above. - '../sync/sync.gyp:*', - ], - }], - ['OS!="ios" and OS!="android" and chromecast==0', { - 'dependencies': [ - '../third_party/re2/re2.gyp:re2', - '../chrome/chrome.gyp:*', - '../chrome/tools/profile_reset/jtl_compiler.gyp:*', - '../cc/blink/cc_blink_tests.gyp:*', - '../cc/cc_tests.gyp:*', - '../device/usb/usb.gyp:*', - '../extensions/extensions.gyp:*', - '../extensions/extensions_tests.gyp:*', - '../gin/gin.gyp:*', - '../gpu/gpu.gyp:*', - '../gpu/tools/tools.gyp:*', - '../ipc/ipc.gyp:*', - '../ipc/mojo/ipc_mojo.gyp:*', - '../jingle/jingle.gyp:*', - '../media/cast/cast.gyp:*', - '../media/media.gyp:*', - '../media/midi/midi.gyp:*', - '../mojo/mojo.gyp:*', - '../mojo/mojo_base.gyp:*', - '../ppapi/ppapi.gyp:*', - '../ppapi/ppapi_internal.gyp:*', - '../ppapi/tools/ppapi_tools.gyp:*', - '../printing/printing.gyp:*', - '../skia/skia.gyp:*', - '../sync/tools/sync_tools.gyp:*', - '../third_party/WebKit/public/all.gyp:*', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:*', - '../third_party/codesighs/codesighs.gyp:*', - '../third_party/ffmpeg/ffmpeg.gyp:*', - '../third_party/iccjpeg/iccjpeg.gyp:*', - '../third_party/libpng/libpng.gyp:*', - '../third_party/libusb/libusb.gyp:*', - '../third_party/libwebp/libwebp.gyp:*', - '../third_party/libxslt/libxslt.gyp:*', - '../third_party/lzma_sdk/lzma_sdk.gyp:*', - '../third_party/mesa/mesa.gyp:*', - '../third_party/modp_b64/modp_b64.gyp:*', - '../third_party/npapi/npapi.gyp:*', - '../third_party/ots/ots.gyp:*', - '../third_party/pdfium/samples/samples.gyp:*', - '../third_party/qcms/qcms.gyp:*', - '../tools/gn/gn.gyp:*', - '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', - '../tools/telemetry/telemetry.gyp:*', - '../v8/tools/gyp/v8.gyp:*', - '<(libjpeg_gyp_path):*', - ], - }], - ['OS!="ios"', { - '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")', { - 'dependencies': [ - '../third_party/nss/nss.gyp:*', - ], - }], - ['OS=="win" or OS=="ios" or OS=="linux"', { - 'dependencies': [ - '../breakpad/breakpad.gyp:*', - ], - }], - ['OS=="mac"', { - 'dependencies': [ - '../sandbox/sandbox.gyp:*', - '../third_party/crashpad/crashpad/crashpad.gyp:*', - '../third_party/ocmock/ocmock.gyp:*', - ], - }], - ['OS=="linux"', { - 'dependencies': [ - '../courgette/courgette.gyp:*', - '../sandbox/sandbox.gyp:*', - ], - 'conditions': [ - ['branding=="Chrome"', { - 'dependencies': [ - '../chrome/chrome.gyp:linux_packages_<(channel)', - ], - }], - ['enable_ipc_fuzzer==1', { - 'dependencies': [ - '../tools/ipc_fuzzer/ipc_fuzzer.gyp:*', - ], - }], - ['use_dbus==1', { - 'dependencies': [ - '../dbus/dbus.gyp:*', - ], - }], - ], - }], - ['chromecast==1', { - 'dependencies': [ - '../chromecast/chromecast.gyp:*', - ], - }], - ['use_x11==1', { - 'dependencies': [ - '../tools/xdisplaycheck/xdisplaycheck.gyp:*', - ], - }], - ['OS=="win"', { - 'conditions': [ - ['win_use_allocator_shim==1', { - 'dependencies': [ - '../base/allocator/allocator.gyp:*', - ], - }], - ], - 'dependencies': [ - '../chrome/tools/crash_service/caps/caps.gyp:*', - '../chrome_elf/chrome_elf.gyp:*', - '../cloud_print/cloud_print.gyp:*', - '../courgette/courgette.gyp:*', - '../rlz/rlz.gyp:*', - '../sandbox/sandbox.gyp:*', - '<(angle_path)/src/angle.gyp:*', - '../third_party/bspatch/bspatch.gyp:*', - '../tools/win/static_initializers/static_initializers.gyp:*', - ], - }, { - 'dependencies': [ - '../third_party/libevent/libevent.gyp:*', - ], - }], - ['toolkit_views==1', { - 'dependencies': [ - '../ui/views/controls/webview/webview.gyp:*', - '../ui/views/views.gyp:*', - ], - }], - ['use_aura==1', { - 'dependencies': [ - '../ui/aura/aura.gyp:*', - '../ui/aura_extra/aura_extra.gyp:*', - ], - }], - ['use_ash==1', { - 'dependencies': [ - '../ash/ash.gyp:*', - ], - }], - ['remoting==1', { - 'dependencies': [ - '../remoting/remoting_all.gyp:remoting_all', - ], - }], - ['use_openssl==0', { - 'dependencies': [ - '../net/third_party/nss/ssl.gyp:*', - ], - }], - ['use_openssl==1', { - 'dependencies': [ - '../third_party/boringssl/boringssl.gyp:*', - '../third_party/boringssl/boringssl_tests.gyp:*', - ], - }], - ['enable_app_list==1', { - 'dependencies': [ - '../ui/app_list/app_list.gyp:*', - ], - }], - ['OS!="android" and OS!="ios"', { - 'dependencies': [ - '../google_apis/gcm/gcm.gyp:*', - ], - }], - ['(chromeos==1 or OS=="linux" or OS=="win" or OS=="mac") and chromecast==0', { - 'dependencies': [ - '../extensions/shell/app_shell.gyp:*', - ], - }], - ['envoy==1', { - 'dependencies': [ - '../envoy/envoy.gyp:*', - ], - }], - ], - }, # target_name: All - { - 'target_name': 'All_syzygy', - 'type': 'none', - 'conditions': [ - ['OS=="win" and fastbuild==0 and target_arch=="ia32" and ' - '(syzyasan==1 or syzygy_optimize==1)', { - 'dependencies': [ - '../chrome/installer/mini_installer_syzygy.gyp:*', - ], - }], - ], - }, # target_name: All_syzygy - { - # Note: Android uses android_builder_tests below. - # TODO: Consider merging that with this target. - 'target_name': 'chromium_builder_tests', - 'type': 'none', - 'dependencies': [ - '../base/base.gyp:base_unittests', - '../components/components_tests.gyp:components_unittests', - '../crypto/crypto.gyp:crypto_unittests', - '../net/net.gyp:net_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/display/display.gyp:display_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../url/url.gyp:url_unittests', - ], - 'conditions': [ - ['OS!="ios"', { - 'dependencies': [ - '../ui/gl/gl_tests.gyp:gl_unittests', - ], - }], - ['OS!="ios" and OS!="mac"', { - 'dependencies': [ - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests', - ], - }], - ['OS!="ios" and OS!="android"', { - 'dependencies': [ - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', - '../cc/cc_tests.gyp:cc_unittests', - '../cloud_print/cloud_print.gyp:cloud_print_unittests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_shell', - '../content/content_shell_and_tests.gyp:content_unittests', - '../device/device_tests.gyp:device_unittests', - '../gin/gin.gyp:gin_unittests', - '../google_apis/google_apis.gyp:google_apis_unittests', - '../gpu/gles2_conform_support/gles2_conform_support.gyp:gles2_conform_support', - '../gpu/gpu.gyp:gpu_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/cast/cast.gyp:cast_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../mojo/mojo.gyp:mojo', - '../ppapi/ppapi_internal.gyp:ppapi_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../third_party/WebKit/public/all.gyp:all_blink', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../tools/telemetry/telemetry.gyp:*', - ], - }], - ['OS!="ios" and OS!="android" and chromecast==0', { - 'dependencies': [ - '../chrome/chrome.gyp:browser_tests', - '../chrome/chrome.gyp:chromedriver_tests', - '../chrome/chrome.gyp:chromedriver_unittests', - '../chrome/chrome.gyp:interactive_ui_tests', - '../chrome/chrome.gyp:sync_integration_tests', - '../chrome/chrome.gyp:unit_tests', - '../extensions/extensions_tests.gyp:extensions_browsertests', - '../extensions/extensions_tests.gyp:extensions_unittests', - ], - }], - ['OS=="win"', { - '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', - '../content/content_shell_and_tests.gyp:copy_test_netscape_plugin', - '../courgette/courgette.gyp:courgette_unittests', - '../sandbox/sandbox.gyp:sbox_integration_tests', - '../sandbox/sandbox.gyp:sbox_unittests', - '../sandbox/sandbox.gyp:sbox_validation_tests', - '../ui/app_list/app_list.gyp:app_list_unittests', - ], - 'conditions': [ - # remoting_host_installation uses lots of non-trivial GYP that tend - # to break because of differences between ninja and msbuild. Make - # sure this target is built by the builders on the main waterfall. - # See http://crbug.com/180600. - ['wix_exists == "True" and sas_dll_exists == "True"', { - 'dependencies': [ - '../remoting/remoting.gyp:remoting_host_installation', - ], - }], - ['syzyasan==1', { - 'variables': { - # Disable incremental linking for all modules. - # 0: inherit, 1: disabled, 2: enabled. - 'msvs_debug_link_incremental': '1', - 'msvs_large_module_debug_link_mode': '1', - # Disable RTC. Syzygy explicitly doesn't support RTC - # instrumented binaries for now. - 'win_debug_RuntimeChecks': '0', - }, - 'defines': [ - # Disable iterator debugging (huge speed boost). - '_HAS_ITERATOR_DEBUGGING=0', - ], - 'msvs_settings': { - 'VCLinkerTool': { - # Enable profile information (necessary for SyzyAsan - # instrumentation). This is incompatible with incremental - # linking. - 'Profile': 'true', - }, - } - }], - ], - }], - ['chromeos==1', { - 'dependencies': [ - '../ui/chromeos/ui_chromeos.gyp:ui_chromeos_unittests', - ], - }], - ['OS=="linux"', { - 'dependencies': [ - '../sandbox/sandbox.gyp:sandbox_linux_unittests', - ], - }], - ['OS=="linux" and use_dbus==1', { - 'dependencies': [ - '../dbus/dbus.gyp:dbus_unittests', - ], - }], - ['OS=="mac"', { - 'dependencies': [ - '../ui/app_list/app_list.gyp:app_list_unittests', - '../ui/message_center/message_center.gyp:*', - ], - }], - ['test_isolation_mode != "noop"', { - 'dependencies': [ - 'chromium_swarm_tests', - ], - }], - ['OS!="android"', { - 'dependencies': [ - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - ], - }], - ['enable_basic_printing==1 or enable_print_preview==1', { - 'dependencies': [ - '../printing/printing.gyp:printing_unittests', - ], - }], - ['use_aura==1', { - 'dependencies': [ - '../ui/app_list/app_list.gyp:app_list_unittests', - '../ui/aura/aura.gyp:aura_unittests', - '../ui/compositor/compositor.gyp:compositor_unittests', - ], - }], - ['use_aura==1 and chromecast==0', { - 'dependencies': [ - '../ui/keyboard/keyboard.gyp:keyboard_unittests', - '../ui/views/views.gyp:views_unittests', - ], - }], - ['use_aura==1 or toolkit_views==1', { - 'dependencies': [ - '../ui/events/events.gyp:events_unittests', - ], - }], - ['use_ash==1', { - 'dependencies': [ - '../ash/ash.gyp:ash_unittests', - ], - }], - ['disable_nacl==0', { - 'dependencies': [ - '../components/nacl.gyp:nacl_loader_unittests', - ], - }], - ['disable_nacl==0 and disable_nacl_untrusted==0 and enable_nacl_nonsfi_test==1', { - 'dependencies': [ - '../components/nacl.gyp:nacl_helper_nonsfi_unittests', - ], - }], - ['disable_nacl==0 and disable_nacl_untrusted==0', { - 'dependencies': [ - '../mojo/mojo_nacl_untrusted.gyp:libmojo', - '../mojo/mojo_nacl.gyp:monacl_codegen', - '../mojo/mojo_nacl.gyp:monacl_sel', - '../mojo/mojo_nacl.gyp:monacl_shell', - ], - }], - ], - }, # target_name: chromium_builder_tests - ], - 'conditions': [ - # TODO(GYP): make gn_migration.gypi work unconditionally. - ['OS=="mac" or OS=="win" or (OS=="linux" and target_arch=="x64" and chromecast==0)', { - 'includes': [ - 'gn_migration.gypi', - ], - }], - ['OS!="ios"', { - 'targets': [ - { - 'target_name': 'blink_tests', - 'type': 'none', - 'dependencies': [ - '../third_party/WebKit/public/all.gyp:all_blink', - ], - 'conditions': [ - ['OS=="android"', { - 'dependencies': [ - '../content/content_shell_and_tests.gyp:content_shell_apk', - '../breakpad/breakpad.gyp:dump_syms#host', - '../breakpad/breakpad.gyp:minidump_stackwalk#host', - ], - }, { # OS!="android" - 'dependencies': [ - '../content/content_shell_and_tests.gyp:content_shell', - ], - }], - ['OS=="win"', { - 'dependencies': [ - '../components/test_runner/test_runner.gyp:layout_test_helper', - '../content/content_shell_and_tests.gyp:content_shell_crash_service', - ], - }], - ['OS!="win" and OS!="android"', { - 'dependencies': [ - '../breakpad/breakpad.gyp:minidump_stackwalk', - ], - }], - ['OS=="mac"', { - 'dependencies': [ - '../components/test_runner/test_runner.gyp:layout_test_helper', - '../breakpad/breakpad.gyp:dump_syms#host', - ], - }], - ['OS=="linux"', { - 'dependencies': [ - '../breakpad/breakpad.gyp:dump_syms#host', - ], - }], - ], - }, # target_name: blink_tests - ], - }], # OS!=ios - ['OS!="ios" and OS!="android" and chromecast==0', { - 'targets': [ - { - 'target_name': 'chromium_builder_nacl_win_integration', - 'type': 'none', - 'dependencies': [ - 'chromium_builder_tests', - ], - }, # target_name: chromium_builder_nacl_win_integration - { - 'target_name': 'chromium_builder_perf', - 'type': 'none', - 'dependencies': [ - '../cc/cc_tests.gyp:cc_perftests', - '../chrome/chrome.gyp:chrome', - '../chrome/chrome.gyp:load_library_perf_tests', - '../chrome/chrome.gyp:performance_browser_tests', - '../chrome/chrome.gyp:sync_performance_tests', - '../content/content_shell_and_tests.gyp:content_shell', - '../gpu/gpu.gyp:gpu_perftests', - '../media/media.gyp:media_perftests', - '../media/midi/midi.gyp:midi_unittests', - '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', - '../tools/telemetry/telemetry.gyp:*', - ], - 'conditions': [ - ['OS!="ios" and OS!="win"', { - 'dependencies': [ - '../breakpad/breakpad.gyp:minidump_stackwalk', - ], - }], - ['OS=="linux"', { - 'dependencies': [ - '../chrome/chrome.gyp:linux_symbols' - ], - }], - ['OS=="win"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service', - '../gpu/gpu.gyp:angle_perftests', - ], - }], - ['OS=="win" and target_arch=="ia32"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service_win64', - ], - }], - ], - }, # target_name: chromium_builder_perf - { - 'target_name': 'chromium_gpu_builder', - 'type': 'none', - 'dependencies': [ - '../chrome/chrome.gyp:chrome', - '../chrome/chrome.gyp:performance_browser_tests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_gl_tests', - '../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test', - '../gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test', - '../gpu/gpu.gyp:gl_tests', - '../gpu/gpu.gyp:angle_unittests', - '../gpu/gpu.gyp:gpu_unittests', - '../tools/telemetry/telemetry.gyp:*', - ], - 'conditions': [ - ['OS!="ios" and OS!="win"', { - 'dependencies': [ - '../breakpad/breakpad.gyp:minidump_stackwalk', - ], - }], - ['OS=="linux"', { - 'dependencies': [ - '../chrome/chrome.gyp:linux_symbols' - ], - }], - ['OS=="win"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service', - ], - }], - ['OS=="win" and target_arch=="ia32"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service_win64', - ], - }], - ], - }, # target_name: chromium_gpu_builder - { - 'target_name': 'chromium_gpu_debug_builder', - 'type': 'none', - 'dependencies': [ - '../chrome/chrome.gyp:chrome', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_gl_tests', - '../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test', - '../gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test', - '../gpu/gpu.gyp:gl_tests', - '../gpu/gpu.gyp:angle_unittests', - '../gpu/gpu.gyp:gpu_unittests', - '../tools/telemetry/telemetry.gyp:*', - ], - 'conditions': [ - ['OS!="ios" and OS!="win"', { - 'dependencies': [ - '../breakpad/breakpad.gyp:minidump_stackwalk', - ], - }], - ['OS=="linux"', { - 'dependencies': [ - '../chrome/chrome.gyp:linux_symbols' - ], - }], - ['OS=="win"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service', - ], - }], - ['OS=="win" and target_arch=="ia32"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service_win64', - ], - }], - ], - }, # target_name: chromium_gpu_debug_builder - { - # This target contains everything we need to run tests on the special - # device-equipped WebRTC bots. We have device-requiring tests in - # browser_tests and content_browsertests. - 'target_name': 'chromium_builder_webrtc', - 'type': 'none', - 'dependencies': [ - 'chromium_builder_perf', - '../chrome/chrome.gyp:browser_tests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../third_party/webrtc/tools/tools.gyp:frame_analyzer', - '../third_party/webrtc/tools/tools.gyp:rgba_to_i420_converter', - ], - 'conditions': [ - ['remoting==1', { - 'dependencies': [ - '../remoting/remoting.gyp:*', - ], - }], - ], - }, # target_name: chromium_builder_webrtc - { - 'target_name': 'chromium_builder_chromedriver', - 'type': 'none', - 'dependencies': [ - '../chrome/chrome.gyp:chromedriver', - '../chrome/chrome.gyp:chromedriver_tests', - '../chrome/chrome.gyp:chromedriver_unittests', - ], - }, # target_name: chromium_builder_chromedriver - { - 'target_name': 'chromium_builder_asan', - 'type': 'none', - 'dependencies': [ - '../chrome/chrome.gyp:chrome', - - # We refer to content_shell directly rather than blink_tests - # because we don't want the _unittests binaries. - '../content/content_shell_and_tests.gyp:content_shell', - ], - 'conditions': [ - ['OS!="win"', { - 'dependencies': [ - '../net/net.gyp:hpack_fuzz_wrapper', - '../net/net.gyp:dns_fuzz_stub', - '../skia/skia.gyp:filter_fuzz_stub', - ], - }], - ['enable_ipc_fuzzer==1 and component!="shared_library" and ' - '(OS=="linux" or OS=="win")', { - 'dependencies': [ - '../tools/ipc_fuzzer/ipc_fuzzer.gyp:*', - ], - }], - ['chromeos==0', { - 'dependencies': [ - '../v8/src/d8.gyp:d8#host', - '../third_party/pdfium/samples/samples.gyp:pdfium_test', - ], - }], - ['internal_filter_fuzzer==1', { - 'dependencies': [ - '../skia/tools/clusterfuzz-data/fuzzers/filter_fuzzer/filter_fuzzer.gyp:filter_fuzzer', - ], - }], # internal_filter_fuzzer - ['clang==1', { - 'dependencies': [ - 'sanitizers/sanitizers.gyp:llvm-symbolizer', - ], - }], - ['OS=="win" and fastbuild==0 and target_arch=="ia32" and syzyasan==1', { - 'dependencies': [ - '../chrome/chrome_syzygy.gyp:chrome_dll_syzygy', - '../content/content_shell_and_tests.gyp:content_shell_syzyasan', - ], - 'conditions': [ - ['chrome_multiple_dll==1', { - 'dependencies': [ - '../chrome/chrome_syzygy.gyp:chrome_child_dll_syzygy', - ], - }], - ], - }], - ], - }, - { - 'target_name': 'chromium_builder_nacl_sdk', - 'type': 'none', - 'dependencies': [ - '../chrome/chrome.gyp:chrome', - ], - 'conditions': [ - ['OS=="win"', { - 'dependencies': [ - '../chrome/chrome.gyp:chrome_nacl_win64', - ] - }], - ], - }, #target_name: chromium_builder_nacl_sdk - ], # targets - }], #OS!=ios and OS!=android - ['OS=="android"', { - 'targets': [ - { - # The current list of tests for android. This is temporary - # until the full set supported. If adding a new test here, - # please also add it to build/android/pylib/gtest/gtest_config.py, - # else the test is not run. - # - # WARNING: - # Do not add targets here without communicating the implications - # on tryserver triggers and load. Discuss with - # chrome-infrastructure-team please. - 'target_name': 'android_builder_tests', - 'type': 'none', - 'dependencies': [ - '../base/android/jni_generator/jni_generator.gyp:jni_generator_tests', - '../base/base.gyp:base_unittests', - '../breakpad/breakpad.gyp:breakpad_unittests_deps', - # Also compile the tools needed to deal with minidumps, they are - # needed to run minidump tests upstream. - '../breakpad/breakpad.gyp:dump_syms#host', - '../breakpad/breakpad.gyp:symupload#host', - '../breakpad/breakpad.gyp:minidump_dump#host', - '../breakpad/breakpad.gyp:minidump_stackwalk#host', - '../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', - '../cc/cc_tests.gyp:cc_unittests', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_gl_tests', - '../content/content_shell_and_tests.gyp:content_junit_tests', - '../content/content_shell_and_tests.gyp:chromium_linker_test_apk', - '../content/content_shell_and_tests.gyp:content_shell_test_apk', - '../content/content_shell_and_tests.gyp:content_unittests', - '../gpu/gpu.gyp:gl_tests', - '../gpu/gpu.gyp:gpu_perftests_apk', - '../gpu/gpu.gyp:gpu_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../media/media.gyp:media_perftests_apk', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests_apk', - '../media/midi/midi.gyp:midi_unittests', - '../net/net.gyp:net_unittests', - '../sandbox/sandbox.gyp:sandbox_linux_unittests_deps', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../testing/android/junit/junit_test.gyp:junit_unit_tests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/WebKit/public/all.gyp:*', - '../tools/android/android_tools.gyp:android_tools', - '../tools/android/android_tools.gyp:memconsumer', - '../tools/android/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test', - '../ui/android/ui_android.gyp:ui_android_unittests', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/events/events.gyp:events_unittests', - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests', - # Unit test bundles packaged as an apk. - '../base/base.gyp:base_unittests_apk', - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests_apk', - '../cc/cc_tests.gyp:cc_unittests_apk', - '../components/components_tests.gyp:components_browsertests_apk', - '../components/components_tests.gyp:components_unittests_apk', - '../content/content_shell_and_tests.gyp:content_browsertests_apk', - '../content/content_shell_and_tests.gyp:content_gl_tests_apk', - '../content/content_shell_and_tests.gyp:content_unittests_apk', - '../content/content_shell_and_tests.gyp:video_decode_accelerator_unittest_apk', - '../gpu/gpu.gyp:gl_tests_apk', - '../gpu/gpu.gyp:gpu_unittests_apk', - '../ipc/ipc.gyp:ipc_tests_apk', - '../media/media.gyp:media_unittests_apk', - '../media/midi/midi.gyp:midi_unittests_apk', - '../net/net.gyp:net_unittests_apk', - '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk', - '../skia/skia_tests.gyp:skia_unittests_apk', - '../sql/sql.gyp:sql_unittests_apk', - '../sync/sync.gyp:sync_unit_tests_apk', - '../tools/android/heap_profiler/heap_profiler.gyp:heap_profiler_unittests_apk', - '../ui/android/ui_android.gyp:ui_android_unittests_apk', - '../ui/base/ui_base_tests.gyp:ui_base_unittests_apk', - '../ui/events/events.gyp:events_unittests_apk', - '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk', - '../ui/gl/gl_tests.gyp:gl_unittests_apk', - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests_apk', - ], - 'conditions': [ - ['chromecast==0', { - 'dependencies': [ - '../android_webview/android_webview.gyp:android_webview_unittests', - '../chrome/chrome.gyp:unit_tests', - # Unit test bundles packaged as an apk. - '../android_webview/android_webview.gyp:android_webview_test_apk', - '../android_webview/android_webview.gyp:android_webview_unittests_apk', - '../chrome/android/chrome_apk.gyp:chrome_public_test_apk', - '../chrome/chrome.gyp:chrome_junit_tests', - '../chrome/chrome.gyp:chrome_shell_test_apk', - '../chrome/chrome.gyp:chrome_sync_shell_test_apk', - '../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', - ], - }], - ], - }, - { - # WebRTC Chromium tests to run on Android. - 'target_name': 'android_builder_chromium_webrtc', - 'type': 'none', - 'dependencies': [ - '../build/android/pylib/device/commands/commands.gyp:chromium_commands', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../tools/android/android_tools.gyp:android_tools', - '../tools/android/android_tools.gyp:memconsumer', - '../content/content_shell_and_tests.gyp:content_browsertests_apk', - ], - }, # target_name: android_builder_chromium_webrtc - ], # targets - }], # OS="android" - ['OS=="mac"', { - 'targets': [ - { - # Target to build everything plus the dmg. We don't put the dmg - # in the All target because developers really don't need it. - 'target_name': 'all_and_dmg', - 'type': 'none', - 'dependencies': [ - 'All', - '../chrome/chrome.gyp:build_app_dmg', - ], - }, - # These targets are here so the build bots can use them to build - # subsets of a full tree for faster cycle times. - { - 'target_name': 'chromium_builder_dbg', - 'type': 'none', - 'dependencies': [ - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', - '../cc/cc_tests.gyp:cc_unittests', - '../chrome/chrome.gyp:browser_tests', - '../chrome/chrome.gyp:interactive_ui_tests', - '../chrome/chrome.gyp:sync_integration_tests', - '../chrome/chrome.gyp:unit_tests', - '../cloud_print/cloud_print.gyp:cloud_print_unittests', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../device/device_tests.gyp:device_unittests', - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - '../gpu/gpu.gyp:gpu_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../ppapi/ppapi_internal.gyp:ppapi_unittests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../rlz/rlz.gyp:*', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', - '../tools/telemetry/telemetry.gyp:*', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../url/url.gyp:url_unittests', - ], - }, - { - 'target_name': 'chromium_builder_rel', - 'type': 'none', - 'dependencies': [ - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', - '../cc/cc_tests.gyp:cc_unittests', - '../chrome/chrome.gyp:browser_tests', - '../chrome/chrome.gyp:performance_browser_tests', - '../chrome/chrome.gyp:sync_integration_tests', - '../chrome/chrome.gyp:unit_tests', - '../cloud_print/cloud_print.gyp:cloud_print_unittests', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../device/device_tests.gyp:device_unittests', - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - '../gpu/gpu.gyp:gpu_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../ppapi/ppapi_internal.gyp:ppapi_unittests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', - '../tools/telemetry/telemetry.gyp:*', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../url/url.gyp:url_unittests', - ], - }, - { - 'target_name': 'chromium_builder_dbg_tsan_mac', - 'type': 'none', - 'dependencies': [ - '../base/base.gyp:base_unittests', - '../cloud_print/cloud_print.gyp:cloud_print_unittests', - '../crypto/crypto.gyp:crypto_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../net/net.gyp:net_unittests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../url/url.gyp:url_unittests', - ], - }, - { - 'target_name': 'chromium_builder_dbg_valgrind_mac', - 'type': 'none', - 'dependencies': [ - '../base/base.gyp:base_unittests', - '../chrome/chrome.gyp:unit_tests', - '../cloud_print/cloud_print.gyp:cloud_print_unittests', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../crypto/crypto.gyp:crypto_unittests', - '../device/device_tests.gyp:device_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../net/net.gyp:net_unittests', - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../url/url.gyp:url_unittests', - ], - }, - ], # targets - }], # OS="mac" - ['OS=="win"', { - 'targets': [ - # These targets are here so the build bots can use them to build - # subsets of a full tree for faster cycle times. - { - 'target_name': 'chromium_builder', - 'type': 'none', - 'dependencies': [ - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', - '../cc/cc_tests.gyp:cc_unittests', - '../chrome/chrome.gyp:browser_tests', - '../chrome/chrome.gyp:crash_service', - '../chrome/chrome.gyp:gcapi_test', - '../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', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../content/content_shell_and_tests.gyp:copy_test_netscape_plugin', - # ../chrome/test/mini_installer requires mini_installer. - '../chrome/installer/mini_installer.gyp:mini_installer', - '../courgette/courgette.gyp:courgette_unittests', - '../device/device_tests.gyp:device_unittests', - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - '../gpu/gpu.gyp:gpu_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../ppapi/ppapi_internal.gyp:ppapi_unittests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', - '../tools/telemetry/telemetry.gyp:*', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/events/events.gyp:events_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests', - '../ui/views/views.gyp:views_unittests', - '../url/url.gyp:url_unittests', - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service_win64', - ], - }], - ], - }, - { - 'target_name': 'chromium_builder_dbg_tsan_win', - 'type': 'none', - 'dependencies': [ - '../base/base.gyp:base_unittests', - '../cloud_print/cloud_print.gyp:cloud_print_unittests', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../crypto/crypto.gyp:crypto_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../net/net.gyp:net_unittests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../sql/sql.gyp:sql_unittests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../url/url.gyp:url_unittests', - ], - }, - { - 'target_name': 'chromium_builder_lkgr_drmemory_win', - 'type': 'none', - 'dependencies': [ - '../components/test_runner/test_runner.gyp:layout_test_helper', - '../content/content_shell_and_tests.gyp:content_shell', - '../content/content_shell_and_tests.gyp:content_shell_crash_service', - ], - }, - { - 'target_name': 'chromium_builder_dbg_drmemory_win', - 'type': 'none', - 'dependencies': [ - '../ash/ash.gyp:ash_shell_unittests', - '../ash/ash.gyp:ash_unittests', - '../base/base.gyp:base_unittests', - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', - '../cc/cc_tests.gyp:cc_unittests', - '../chrome/chrome.gyp:browser_tests', - '../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', - '../components/components_tests.gyp:components_unittests', - '../components/test_runner/test_runner.gyp:layout_test_helper', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_shell', - '../content/content_shell_and_tests.gyp:content_shell_crash_service', - '../content/content_shell_and_tests.gyp:content_unittests', - '../courgette/courgette.gyp:courgette_unittests', - '../crypto/crypto.gyp:crypto_unittests', - '../device/device_tests.gyp:device_unittests', - '../extensions/extensions_tests.gyp:extensions_browsertests', - '../extensions/extensions_tests.gyp:extensions_unittests', - '../gin/gin.gyp:gin_shell', - '../gin/gin.gyp:gin_unittests', - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - '../google_apis/google_apis.gyp:google_apis_unittests', - '../gpu/gpu.gyp:angle_unittests', - '../gpu/gpu.gyp:gpu_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests', - '../jingle/jingle.gyp:jingle_unittests', - '../media/cast/cast.gyp:cast_unittests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../mojo/mojo.gyp:mojo', - '../net/net.gyp:net_unittests', - '../printing/printing.gyp:printing_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests', - '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', - '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', - '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', - '../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_heap_unittests', - '../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_platform_unittests', - '../ui/accessibility/accessibility.gyp:accessibility_unittests', - '../ui/app_list/app_list.gyp:app_list_unittests', - '../ui/aura/aura.gyp:aura_unittests', - '../ui/compositor/compositor.gyp:compositor_unittests', - '../ui/display/display.gyp:display_unittests', - '../ui/events/events.gyp:events_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../ui/keyboard/keyboard.gyp:keyboard_unittests', - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests', - '../url/url.gyp:url_unittests', - ], - }, - ], # targets - 'conditions': [ - ['branding=="Chrome"', { - 'targets': [ - { - 'target_name': 'chrome_official_builder_no_unittests', - 'type': 'none', - 'dependencies': [ - '../chrome/chrome.gyp:crash_service', - '../chrome/chrome.gyp:gcapi_dll', - '../chrome/chrome.gyp:pack_policy_templates', - '../chrome/installer/mini_installer.gyp:mini_installer', - '../cloud_print/cloud_print.gyp:cloud_print', - '../courgette/courgette.gyp:courgette', - '../courgette/courgette.gyp:courgette64', - '../remoting/remoting.gyp:remoting_webapp', - '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter', - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service_win64', - ], - }], - ['component != "shared_library" and wix_exists == "True" and \ - sas_dll_exists == "True"', { - 'dependencies': [ - '../remoting/remoting.gyp:remoting_host_installation', - ], - }], # component != "shared_library" - ] - }, { - 'target_name': 'chrome_official_builder', - 'type': 'none', - 'dependencies': [ - 'chrome_official_builder_no_unittests', - '../base/base.gyp:base_unittests', - '../chrome/chrome.gyp:browser_tests', - '../chrome/chrome.gyp:sync_integration_tests', - '../ipc/ipc.gyp:ipc_tests', - '../media/media.gyp:media_unittests', - '../media/midi/midi.gyp:midi_unittests', - '../net/net.gyp:net_unittests', - '../printing/printing.gyp:printing_unittests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests', - '../ui/views/views.gyp:views_unittests', - '../url/url.gyp:url_unittests', - ], - }, - ], # targets - }], # 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': [ - { - 'target_name': 'aura_builder', - 'type': 'none', - 'dependencies': [ - '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', - '../cc/cc_tests.gyp:cc_unittests', - '../components/components_tests.gyp:components_unittests', - '../content/content_shell_and_tests.gyp:content_browsertests', - '../content/content_shell_and_tests.gyp:content_unittests', - '../device/device_tests.gyp:device_unittests', - '../google_apis/gcm/gcm.gyp:gcm_unit_tests', - '../ppapi/ppapi_internal.gyp:ppapi_unittests', - '../remoting/remoting.gyp:remoting_unittests', - '../skia/skia_tests.gyp:skia_unittests', - '../ui/app_list/app_list.gyp:*', - '../ui/aura/aura.gyp:*', - '../ui/aura_extra/aura_extra.gyp:*', - '../ui/base/ui_base_tests.gyp:ui_base_unittests', - '../ui/compositor/compositor.gyp:*', - '../ui/display/display.gyp:display_unittests', - '../ui/events/events.gyp:*', - '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/gl/gl_tests.gyp:gl_unittests', - '../ui/keyboard/keyboard.gyp:*', - '../ui/snapshot/snapshot.gyp:snapshot_unittests', - '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests', - '../ui/wm/wm.gyp:*', - 'blink_tests', - ], - 'conditions': [ - ['OS=="win"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service', - ], - }], - ['OS=="win" and target_arch=="ia32"', { - 'dependencies': [ - '../chrome/chrome.gyp:crash_service_win64', - ], - }], - ['use_ash==1', { - 'dependencies': [ - '../ash/ash.gyp:ash_shell', - '../ash/ash.gyp:ash_unittests', - ], - }], - ['OS=="linux"', { - # Tests that currently only work on Linux. - 'dependencies': [ - '../base/base.gyp:base_unittests', - '../ipc/ipc.gyp:ipc_tests', - '../sql/sql.gyp:sql_unittests', - '../sync/sync.gyp:sync_unit_tests', - ], - }], - ['chromeos==1', { - 'dependencies': [ - '../chromeos/chromeos.gyp:chromeos_unittests', - '../ui/chromeos/ui_chromeos.gyp:ui_chromeos_unittests', - ], - }], - ['use_ozone==1', { - 'dependencies': [ - '../ui/ozone/ozone.gyp:*', - '../ui/ozone/demo/ozone_demos.gyp:*', - ], - }], - ['chromecast==0', { - 'dependencies': [ - '../chrome/chrome.gyp:browser_tests', - '../chrome/chrome.gyp:chrome', - '../chrome/chrome.gyp:interactive_ui_tests', - '../chrome/chrome.gyp:unit_tests', - '../ui/message_center/message_center.gyp:*', - '../ui/views/examples/examples.gyp:views_examples_with_content_exe', - '../ui/views/views.gyp:views', - '../ui/views/views.gyp:views_unittests', - ], - }], - ], - }, - ], # targets - }], # "use_aura==1" - ['test_isolation_mode != "noop"', { - 'targets': [ - { - 'target_name': 'chromium_swarm_tests', - 'type': 'none', - 'dependencies': [ - '../base/base.gyp:base_unittests_run', - '../content/content_shell_and_tests.gyp:content_browsertests_run', - '../content/content_shell_and_tests.gyp:content_unittests_run', - '../net/net.gyp:net_unittests_run', - ], - 'conditions': [ - ['chromecast==0', { - 'dependencies': [ - '../chrome/chrome.gyp:browser_tests_run', - '../chrome/chrome.gyp:interactive_ui_tests_run', - '../chrome/chrome.gyp:sync_integration_tests_run', - '../chrome/chrome.gyp:unit_tests_run', - ], - }], - ], - }, # target_name: chromium_swarm_tests - ], - }], - ['archive_chromoting_tests==1', { - 'targets': [ - { - 'target_name': 'chromoting_swarm_tests', - 'type': 'none', - 'dependencies': [ - '../testing/chromoting/integration_tests.gyp:*', - ], - }, # target_name: chromoting_swarm_tests - ] - }], - ['OS=="mac" and toolkit_views==1', { - 'targets': [ - { - 'target_name': 'macviews_builder', - 'type': 'none', - 'dependencies': [ - '../ui/views/examples/examples.gyp:views_examples_with_content_exe', - '../ui/views/views.gyp:views', - '../ui/views/views.gyp:views_unittests', - ], - }, # target_name: macviews_builder - ], # targets - }], # os=='mac' and toolkit_views==1 - ], # conditions -} diff --git a/engine/src/flutter/build/android/AndroidManifest.xml b/engine/src/flutter/build/android/AndroidManifest.xml deleted file mode 100644 index f27872eee4..0000000000 --- a/engine/src/flutter/build/android/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/engine/src/flutter/build/android/BUILD.gn b/engine/src/flutter/build/android/BUILD.gn deleted file mode 100644 index d90ad70abe..0000000000 --- a/engine/src/flutter/build/android/BUILD.gn +++ /dev/null @@ -1,56 +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("//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/CheckInstallApk-debug.apk b/engine/src/flutter/build/android/CheckInstallApk-debug.apk deleted file mode 100644 index 3dc31910a5388024da4558c9e5f249a37e3783bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37106 zcmWIWW@Zs#;9%fjU=CaE^is0qtR*7@!wx0}24MykhN9GB{hY+g{L&Kr+{Da0y^7qN zf2SB2S|@JwJM19f^1MJtT4;%gNQ1@-K`$#VD;2ITg;^Y4LXIvvJ+e33TKdjEVqT%~ zLm(@I`MuvZ12Lg;srT>RyvxXct9j*fSIU;ftrM?(DelYuXJ*0RY``R0!J7X-R>v_~ zvt~)Bkf>BMhnnK$K%YMzCH&PZEoWx$(cJmfEzhfdiFA(Rwxi{XT0b+t68dG7mAik- z^Hp4DOIFyKU!VGV|6-%?^?~=5XHR;4_dxMBzU@ne_sp1`6)v79ZkYAkWqC>TT4l8j(UlCWRhK4nZtbj{Xej?cc#dRp%C5fW z*I#sBKJ?41P5x>{HPav7b>V*RreAyJv@+Z4+!c%Lzq9;~hW>K&wg2P%-+pcC$(!>+ zw;NVot9rWo7VqD#_a^sJrE0de=LdMRb0CK?YUt-Uv|bivVqoxLWnd6yU|?{}ODW3F zOz}<3%S=lxE&+vp>*TX}mmNe}&)>*=Www8c!oo|e++iLP6CxDCrf_ivykP3IeJ8)w z=ltoL<;)wPdj=2XAmdA_kfbJJ=c=gn&}4pjAjZHVRly|2>awb<_E->XhPu4NMoJRIe+ev{Ngb49iEX?d?B zjOT5Xd#QI`WN&g!dxhWBus^}4&5r0RKa%~-a)0Gp{a2?p^*;Rm@$`xl&;5PMTh32B zdiFsc%UO|UXS8IapJuK&a{T#`iuXLH6`o8>x_kWfysxK=?aqByK5Wb%>$!$$zdfsQ zZA11e)iu}e#BJKzGk@as{qFX=nJR_K@4f!w?TeZ7UQPY_XR>#|qSX_NqYs?i$x-59*{W;vE@-uVugs{wd+52> zhr*>ban;Hhzb*Oxu0JMP)hks0)xK))g6rBZLmzYPi~QNvlpp#lc6`f4@y$y4rHUyTM4O_7$43rVNMy(XhhYIjHpq-&f@K&PKtaLK!N|bC3{9_~l*NMNKOH1C4+8^( z0s{ks0Ru>1B0~v72}2PB0|N&GdI|)kdF1p9;)BAm2ppoIbO*{CDGU&MVOD6s7z_*y zQVa|XY77hv+&EG&$OW)G0dheiLjgkpLp(zsI3`oUCNVJyFbIJC1?Dn<_#zAp3`{UF zMg|5(CJP21BrzKX1_l*~awu5=r9n2rnP3J7m;~9*zzojs1kG9i)q&qEu=@y_^?@j} z!0}4ZEC-PD!R8^yJxBoAk03c%7=q0ODFB5f)O?s2W*9;hVxd6hgDmHOCIy)JAiF@~ zAT6*sf{Br8J}5jv=Cd*|Frb#@TjaXpUn(;&fUqJ1Bd9FbPbo?)PfW^5)y+sL$kfkF zj?YOf%}dTmEz&E($0{)Kk)twU{N zL%-j<|99^FpL2`n-9E%vQ}ZMH{If;Z>tcilAq^Vt0Fob@lQ z=YMwMJ9)ZCW>eqCi9%ip9fvb7Dkbx)x^+k{aqU&B_KfgcqgvKlEvVDUbKz8WMEIj? zFSRWa|7fhddjDAQwKua0a%T5-+VB*9oWB2H`@MqajF#$_6BuGYpV;|irs*{g4n>>Q zA%5%T&AIpc;MCRAY8T!0dOJU^V(0!Jwfc{Ks@t`$iamX}rk&SD{`3ZmTM}MLniDT7 zEnYm0D|c2^@bmi?s+Qf6-!&91dN?~0*dKL?KRI&p<;!gIe?_m;=NJ9z>bBP18vpyq z-nzSq%`ty=-L8LI+{LHjV19o`bJ0$p#m@}fZV9jMjor5C*F;@@`>I-znX~WLJ}iC{ zJG<-;m@m(QN=mi$z_BK!8Nk7cj!9I^O5 zP1assJVhtzgq4-u@w3w`a-T8Qm!!K~Gdg{F15fAo$7#ps+@?e5Zz|MGy@+P>!X z*2&jnK22MFp5-v>dkbeR=dl0Z4wu`1Wcc+eHu=gnnZtd$eb4s_6`yhZ{4n~y?7xSr zzFwW)^}?OKyf>kp@3@3N(G|#B% z&ibjYd^7)E;p}j;jU5tBpUsY_|72#o`E>iK0*g-z4!`YfUVPH!-o)wqKc2ZiJLC1d za+Z^Q;#V}h92y%IZMosw`&Q%9-6Wn=4ra&Nr{X*H|LWGg=z95UZup(*=j+n%)crkU z9iD42UvH}Sw@26ao%#Rox1M|Gk5{VfZI0g@n7%C4jz4h9>(I<}+fH%Y$0buY+Mb;E z?VGLf{mmAA_>o0~-(u4R&fW{(jF-Jl zySAkAZ|cD_|IbZhFO#kPem;HQ?|=M#e+zH(9m%i#=VqTT1HsiTq z=SqWPiY`5+o-r-r4$ZP>Hq4yE)2^(pTyCj%{^Vzw=QfqEu2`<0yUqM;<;{zEC$x{Y z&9|O@TPMHjV#}`_1x?NO|IXh2U(UE|>0ht5Q>RbvNsjSX-E=!w>4#Ks`q~F8-kaU9 zn=<*AW7zFTv*5HI$1uTQ#Rn%c9(e9%h%}nD#N^`-CYiG*W7|#_Z?aK7A0w{gKaX{O z>73kaPHRJ_-xoUUA38Vp+Uz(}#|E9&|J4Wo%Pfh%&CZ(cY20oqxN`69ZA+fo{=0Hj z=JQ*&VCUjD-yX|kF2C8ev}sa6@+^n8M*&mj{rj@Sib0NpLyCpBO@K#=N2*1Dhs9xI z$HzcTp4nyp)`rENXUgk-v?%(PHS3Es4FE2P~qWkRRiGr5+jg>J0d&2i;7Z$!wRP6=bPm}^)Oms_>xPMo|l(YpV% zZKYg6w3fW25!0cOy{a&-WBXTZrNTe_uS^5<7(sMyIy%$K5OGIzH!7` z(D%l+@An;(h4-}CJpZvWcJ1xiruFtKZ2#SffAwVVY0ICHr*}S`wet8x$9+wwrHx+BX~FPSL6w%Fw7H!JPv zwUgbtXFYC9M$VeN)Uxu~3FH3LHhTOiGnLJhThmrPei6D}B~kTU>WU^qHo@QX`1d}X z{)~Bl^~(K^Zy%qO{$c0$+^U+*H_Y>Gr*8~R$W3uRv3J!x+mP6w=a0>};8iaD-ulVH zgI>Rb{NjGf3EZ&yp8PKVkLc7-3QCvm?z-;bxI3Do@d5Kab|;RC_l5U_V-!wX&j@(B zv%R+K#{9zWh~SX+=1zD9h>#j6dv~lW+3(2F|TA zS!guNzK-YDJK6PWk|zR!GMATbous2b{q*cb7LoIITC%DuC^QLXEcXpqD8irIbM%&6 zan*y8%X_k>J9cHgU|JfRz;&SO`h?v*ZpCsnlFpq13M|g^R++uxojEtl*YB;t@rwE9 zdvyDclq$`g-FA9^(fLN^7lO6wUTxv-I?hkHj9>ChJd#sapssPP{ekNl@1D}|&OqK< zLKEsZ8WWBz(psUFwB!P(*v93*16X-?9a!{k^Y?`bAsj5%Q>U@>F3Xmv{b;uoRV4yUyqpBH2;?@x+@lpDKfyHL*WzCUl*JlXDXrO@Je zqQRwQX~8!IeLtRF@$h@Z(UVuM_Xk7=`kM zv-efo9T(NKEk2rk{dergT^HtU&^W?XP-S&BIkG?V+|#4!GEZjOTX;+kTfHoQ?}v!s z%aO**Hzyk17F_lu|B&ZY{p>jvw-em*_P*8o6%KH|AhzA!X*Re#&X!|xPte|lA#(epi*GmiVGVHbz%ic;r3 zr5{|+N|a-EE!?VdW>?gbRk3cR#?j%EovtUc$A`RK_}j`tmBn%IM2&3@`~EHRPT%>p z?Q+Gz*Z-B?{5meVdHa{6ht(dXW*gtTebcAzzo2y4nY&xw#%=!kuTo%r=I!LgIq?m8 z|DW!3DgSGFnSF0(#6Z2dYj-?wK%!sLrj1aI7_#{Xp3qj>kXZ|=R1 ztUne$QVAcF` z@YT!UkBo+0od*{ESm3d)qF;OJ;%g5Az8;hR`@rDelc(}u^=rP}UHj%y?J8!vhODQFZn#TH#2x8CCw*0{qy{ywROMPm%r1#B>($}xW(_Yw=MQ;nqFmb zYl^SsmYLSd6aMxta(Cl-HRbl1d%yHD&)q)x^6tCbY<{`F=f1VSD!c7$YHw^^&Uo`e zdZ2NXR8Drx$)z?cczBLYIn}0Nc%wt9SyJG#ZeVJorLEy5J&RQWRl7t)?yo%@BUi9< zQW?|Sumx8?Eb(=|=Vh{X`ckv|_pEJgKVO?4S9jmMuHZlGlCvMSq-Ou|S66dmKfbv1 z)~C;#HveNd`!j9E{M^|q=e`upuRYlne#K#5%~83z^L>AQzQ4QrzD`;3TV9Ec$8Kd6 z>?j9^U1|_eZwt~~7P9e3=RpbQIT4FyEN$Zbv1i5i znh!gCUT%?{yG_~OHZ$5Yy3eNBhCf1hqKcsKX}5^l3p>KvLbB%0U0;96^V|Dtc@h8i zioSj-svWlW#3Pl?*mq0r`ed3&EsXR&d?iIHw|>RPq|kp$LpE-U3H?9)eMLfMNA2rr zpKts;z%g^@@eadAfw|Lv@8o>H`OFOqMrK7tf7`D=)3%kbnzZ@;;6%Fex#y*uZm?LGTui~8G&O;^5iUyQqv zae;O3q^81ST!A?rUPr@Lxr7|o(Y_YF>abz+VMFJ|f=^c|YFhW)lywoZ-g$N37t#7( zAMXEspwDi$V&fL+>O~rx7IB@kymV#emZzm@+mp}tmCV&rQB{6DKjdzBbIkHn2Ocm) zZ#%d0vu5&P>1kJIl}<_M@eG{0PJ``I-}bLN=d6@{`^tRw{wJdTmH)a{zMQ=xtbIvH z+r+1bx=NLAR7|nZ6THdNq~OA$Um?yB$8k5zjbj00(fr3XaZBDl;5eu(vS@u&iL5J^ zaAbw@QEUHcm7BJ3Y%epuu%rP=|B|z8 z$C?a%dqjIgs*=|nEa6?WQ7oG$sq4e5PD_m@O+A+n-kZYouU22*%5&~<%y!mG*{x5! z=4tD-`gw1;%=2Vt{=xTb@9pAVU9D`*zTSFfrN~{M$P2T#On%2bf$3?+h7E437Nj}a z{C*!HaN*Ia?3APr_bOr>dXBOML>nk|h&8>birt&!cQJhbI)l|5i^QG>7fly*XXbDU zxc_;k_nG8=#@7EY<+__zEXWdz?%2?ztuv$Xkd@AifY^}VnGFwIFDy!a>6{(kz*3;- zd_+Y3YVpp6?%9z+K3yDAP6ryDU40JBV%S!$*|o{3sl@*N-*c))IR;4ukzR}UPCuB! zyZEW|P2269$y19mS1@S(SgI~8c4lGO;oxd<->n&!S1metLcuw*iOA&)lB(YwEl6h1DD-`?4=B(lZDOh!k%O`KID3;qA5`bl=_mCY&`_ z)9WLH+a%Y-MSmZ2-Rf6x`26|&^i2uvO;sVGAxoDt{M~Rlz$a`=bU^!q@5dD)b_-3& z({}QiZ~C_?)3aA3!1dlHNr&jzS=ow@F0DUfcsI(&J4eF4buyoQzw$LZ?(9eJ>Z%Xu zY&l*X>-P3i(%DVP7S%WBe}41$Uqkf!zkJf$<6N!p-_}npDeSzoHkxZK*Vj#vubtO_ zm+R8ovq{6~*Mly7p(zL3H{_eHuQ)6@L375)c!6Qtj$E_Ca}d7{dy@OT)KW; znV3~Aw}Wn9{sNn_D#3Z)4m`Jf&pN#;y5=|MkbTYX;Fv!f%{LT3|Mre`gX{YALYa5@ z1~;!tWh*=UxXBy-ahADVKf9TqvE7zN9dGd&A|lF$S5I{@RV1w2xtU|8-D>f2-d(>x za3?Q~o1P%w5chYE{-*5naXk@hdIP7HeeY(e;A!4c-l|={$D`f(g6di>kxw>HEsyVQ z?!H$esW$%b*5?`~!?s1tXSw|_M zC-w6)_R9C|dJpc_f2?tv#y$W4iSrfT-`CF+ef;{vy;5i9n0*0eU$zGRns=6$CrVrC zW7GFYhm9vRnpRakw_bZ^YhdZ`^GOVg51$Sc4dqd~^u{%)uynfFrWe=rkM=lhR#m$3 zUB>&ipHka`R>|6DoX-ni89pz#EBpV1`MN*e>vsGq-t%kD|I;7+?RwY8eJjk{@z>hs z?@RyZ!Sa6?-DN-ZFbVK-l)T>V^t$WP;)1KO*97)t1qS^{Q~O1ZQ7$Cao>8QowAevilydT`(86FTB~=qwDWbGKpX2RuSButDy8UWXM*pa z*z9jLU;h3F)qRCW*?)YQo^JVT#p9oURPR5Zp*-)Zzk=7qMDgYS|8;2S@aev6-_cPb zUA*^=miLWo`x_WJwncBdp|tkx`po=Yn%6rHb_l-YireTMYr?3jp_IfnPc5rtqV3!G zsdaA`|DJ0mxlzHDh=qVcN~* z@K$=;@vi6l3^Gdy!4jq=@q0ZiqwdOGa(c1aYyUz04nCflT?*Us6-qPR^uB}!^!jj!@rJcj{Ac(o zE+WzFA;`=v>G?hNu#%wr?qY}7sONvSt3T{!`D8!)H&?zF%#Uhz%ZWswml+mkG4 z=qmR5THmgMMo~wW^^V3NhHfQ>*^B?ic(Z4%5k$9VjnKLrpAAd-<%OR_uG}% z`}?j;`u=J?+sgRB6Um2`z6dV$*Vtm>k{92<ifCUYdmjF>fI(3>$lbD(pIJ4j4NiCaH#PlY%%H=<4uXZVi3LKQr9YtBN4N|uoiu6 zF==s_6!PO?>HNpP=Et`Nq%2+FI(KV4-&^%HQ&1ZRXN9)Ut~y(7Uo5qH zTK}=Nd$?vP=@_^)CoP_F^IDqS&#Tu9e)i8lx%&Lx3CrjGnWMyH^5*b_<4wUo798R; ziRN9m<5hOe`&Ie|w)=aP`=YioybxMw=8`r;AnkEbwq<1Gy*sO>u9I20E;`Ih=<7Xi z?d(aWw>4K@-kfCi zdAFyzzvkn1i*FaiKddUgch=B-Zj6Y}J>4I&u?7!TF(&I|&ibT(y{7y9zZak1%-cPG z>gr<=wKv#$cv;p+-h5TCZEsAJ>hX0p>M`|yWqGEBG4{XXzVNI0deM(SOR9Gi;HB}a&Ho^!^R}#b-F3y5xa@7yzjq7w zdY}5`9JZks;mD+^v=?TYv6^=C4V{}tO`|L>@ZXVb>E6KZ#gewY6FTW)u5TCDlzth)mKaohO}Tg4)o z#ct2PuJbkXQvPO*h0C&DZZTOSyXr(_`@R!34?a)-&A!d7c5mR**Y-A-xBcmv*7j+E zRK~gIJ!?CEK1(_lUz+aUbK}g_ z@(H_j=2Tw$tg=m6vE|Q_ZL{~J?knCeI=O4(rQB$pHJn`CryAqTOw5$trr2ysoum%pXn|1nHC^Q{Zn3V3OK%o^6gjHh(s5*6(5F>7_y1-5I02X~?foQj)z@EfS;ner(~jS0&Pz*s-1+D3@%Mkui%+^= z@U_|Iz3TDe`_0=wUp^frQ~gRSXHM(g&);9xTCZPn@#exvH7gsFGe3S5&7HIJ^cAV% z-92Iax!a}He_lA(;u;nrAFcM~)ZRq`X2&)p9krOWWyad~Nd+p2S!KrA*Zd4NCT)oL zpZub4?NScy$Tw@bF6`ltaO;eicK+6PxCkW>24dWUwBw43q3`St-s=mo*N1UdmaMZ+pM<^{cRLub=FYiP;%sI8jts<6V$hm>AokO;^5uxh1md=#C(R zC7BBiS*24CihMg}y>R;>pOZ%YEsXMp%jWtSXKh)Q@3r}y_f@krwn?H!rjeIluDpBa zlm5%c+b8_d-}j{|<^u?|vQ6WZhS%qw zZ?(S{w`a!Y2-)mk^G-7G&bP5?YXT-+u!U~s1I2;Yvr+= zyjR6@6*x8*&wH(R|Kkr`mGXT%>Q_hfJZR#sPJPUL|NiH@=a)R+_c!^x)%MFP>r3kD z-UsTHFSOclX3FG`i$op!_$3cMWs!;MS>~KSwOufnXMeA#LDQ_f{^hrIUa#BRx5y!- zsOYw$_wBBe|7`ud=Ks6nS{`3`?S0QoQ|;^C*G@X8F7T33=jm5D(09DwkwHB6m-Laq z&YQRR=A2&DfpaN23&Av1lWS=@~3 zug7jKi@2?EEMcwcroipW8XAoPGCRFrmPDCIeZG}bvcz!uxvA~e&;Oidf4@iWS;gP# z`H3bHu3XnOr6#9p{{OPF`k(vrAK7;UzE3QVJy>n`v8b*6+QqE*Ph9nDr~P}f>Nd!# zpihB8W@pYlyONgOaiw!|tjf}kPY#_ynhRrA1!$>SnMB>4p|bRjgmq3&V0LbSZor=d`D_=Gw6KvenL;?=6v8uaK1SjeYvPO6~)%^=xdV*6{7z9{a&d@9*x@ z9Bwa6{yl#nGr^iqf9D7GJICN`8xpwoh&Z!<58@Xn*w7;ME)qSqO=Y{)!*)ShAoE7@>)^YQHQP0yY82Y{S z{wSVwIP%o~haU6Q8I4&^Qvz0p=r$`GDkmE*KAq&ICe-Gpw8~lV>cJVO9DG*FOjcoj zc(8M~rfJwxYqLpSksgy=yqC6|a_D>&F!NQw%*KO4Q?q zViCA$(xptt<)KS5g%3oyUT(Sgag|JYQm9#84x3NLZ4Uv#t=l5bNFH?(krXhPsMyD= z82@Tx&XSs6w)XY`%S#_H{Q6UV@5HB2QMGbkQSIPf0oAq>l50#|1S3{UtiG`#B4X+` z-;MW9a4c=?_!YA(;YNW$gtydjRte9WL0XZIR1TFf7M+_U;k+-yN5^dg`LbaJ$2zO=FvyA5Wmt6n34Z zn^e1Wj?H>h_Wq7Q_tEt3cD|<0FP)qM2R_GdmPuyK=2cpBOk`f_#~Dt^3q!*8Y(M(e zXJt~)ady=%o~4b9O({n_mppBpp%HjW^mc4c+?p=kV-{@Q2d~uKP2ss_*T`6Pv3q{w z%PI-M%iBn%*qinOt*I;PK(dQ@lh^O*MMz)#K8)B*#;z zxi_c$YqsI4o9qiT7G0fbzkp#T^Uu_$DFW}Cs@Ts3iZ9t8uyMt5F=kdZE`=@5C#1XF z3$5(7Ifbpi(_m;cb4t>q76J96Ue(f~TW4-e(8*e(VD={9>YIzl^j%aho4mCtl)RF) z%;Nc>BOe@D&emVcYtwalDbQlWk{_t7#Fm}gvG_*0lln)i|9_MH;><+VH)dX26d*N0 z;3ngdmV6!_wfv3SZ1R#%9$nR$6Vmf~LV~Z-+N$oD%j@GmoO^7*7A$*y&&QL(;tSs1 zmRGF&VRg6gh32uJC8th(c-`xAUs@{0FfXulR`)~};i)Y;zCAwi>5GrG&fTWodECU$ zibvl#@%)p+%WlrxnO{-x^tIQ=2lxAV*2`=TToNeKz0ojo)~uN`ZMU4A$1hX!Lh*md z+P+iH{P*9jWyRRQuH8bJa zq$QJ73zsUM_&ayY&%b_F-@kQkY}TJWJ8$;e&Hop=udmZIzgr@`e9pdEzv~RE51f11 z@Q-!X_PQS-VQVesRLlJnT+qWWpY`fz&po@(9d;$U7rW=1TRoa{dVjs|;=(HnuNK^C zD|Itj(Ghsnp;RL=r=~~OI&Z&{>-tQ~U>{A^7^Z(1JarnzCa0j&5$kWx&Wt~$(6Y4@CoijSqleicd zKv)s7=o7I}C_Fdc)(3ofv)5RnL+cxj@hYLL~mzOds49$F%|yCz>U z((=5L!JzCV!1++npi`xV<+1Mx>+e6S=RCKo{@P#szIBTCQ?0wk)#u)CKYuU1_Ii2k z^;^$#X1G*8dth4sYySDU<$qGH?J+2N8+pI}#XQb?Y-TvGzVE&{1Up5x6 zzmaW6j6Iv&_HuE#GFl&muVuE|HS`V=kG~5tf|!WO37v0 z|9^_Nr^T7`EqnRy&yzJXZTHWxP3G%N5t-R_VXdUAkth#uLFm;rJ|aiw?ATHBiFx+D z-;a08+oexCQT8rk?~}LOHyOYC*Uvn0!rW1tbD`J@hA<;ma|jBw3l3c^U8ubMQuX&g zKknwUe3|{G_;K_68d)FdY3I4DIRhtT$wZwrog~D@87LrJ=2k5s+-m4KWzvypDknWI z^UO|-$Tsy2j#1-2KCjwkf5EZ*FUwdNwra|4uYc{sP}6Xh+1&8_ZsDu-+WdwU;qBL0 ztJ#0mSr)k1l^6V8^IrDln>~9XzSxJnKfB_JZI`M5vl5raE0$2!#R^^eOi2YZlY~_> z#8L|C6*rshse63DcW-ah7PG_gJIX(ZZhrK#SbondTmM-0g17hQm#k^4+w{EacgW=I zklJ7T-#0(M&dfh&Tgtm;7US!GUL5S*m3+Fvq&+F*;Aftri`t({A8BBEWpX`m(UFNq zmr1&{WG!A$>^DbitK9#kmCMsl``eVhx_h;1`h6+RFAnk1^D5tbSeYFzbHni5g^23P z(+e*jN@4iWVb#Z6ZFRXj?)lu{w7myf!@r$U4fl8bu%T12S2mN!EHvlYhRn9hJVy>n zL~ES0oOI&kiH64y?mawq(C+_^sB-UJT8f#EmY7btD09jyS)z||$t%^Fp#iF!`_8Nq z-}WbB?}W0;kHlG$d6X6(>00or;}FM0AtlLunn}jy+vb@R9+@a)!W+0`U5H3vdxJwB z*Og*nCMVaqr_(K2OGS*jm#jQo(Zyj=sL|kbaJA9eZ8N^_uh#56cpC^;DVWlEsw4gYA-Y}bQX9evA~B>(_;40NVk0!!aa@iUd7xq zd~4%p_s@UE)!i92e_PY9yp*mFa1brR>)_U6Py*f zhd=bMousz^z1wE@s~ke9Wmk5edANzms7OkD&-;7<#pf|8Q>qv4Hk-UzJof0ty{>VY z`&%@lu4wKH4_(SSD|n6HRm&r(UJ@z~TUrCBdd!_v?%*q^QhrWz)uA=_j4fVo@!s)u z_4H4FrXA;8bZ*DINhWFMS6lyl6gywZ6TjoFW>|_7+O5UdW+hf={yKKJmUvm8Nuv~@3PkjZ}g!(XwurAj)mw8UW>Q%;W zdFzjH%PyS^4g{?o%I1kXH>0ohZG^bjQ7v_u?K32emj$mc>u+Z4c*GDhPj^=4zstQ$ zfkg+c89mfkRFo3e{i&H4?Ajx_{?IG8;*a%PYkI5qihZs%*sRgC>SXt_Mf3FI^j=+W zI5^ut#bb${xgD3+oXsz1tP2q>d1NkTdu-#MC>_ya^*I4rCIRh90cVXXObTrnWG~g% zDK9YCP@S8#LGy;hrYR4-u8U|t>gWD@_3-V8pBIYS+WO_VADcFDG?_`yi#^V~`u&24 zH-}a>3A?P0yzsH6Dq3Mr{)FN|b4~XoX+PyyF%Ps9U+poo*U@FrGB=;{_x8(HvZHlt#*Hc+TuSH-CemTvQcUC&#&jgQZJ_$BBb_ByYc04IyC2^0bLsEtZ>xT7dM&m}T?+(QB#C%GC}B^&elp8b4i^tKfck-PdUQ zoqx8M@N72PANIP=C^v0pRBR@nr5l^BXF^x-?&qhE=U0TMK7aQ-c45r2ApKySDy<)r z%2I;ZrT(R;iF+Lr@oxHPW6Bn&ZXzqvEq1=W=xllFdXKe%N51!_WHy!=IcC=HKG*KD zMD^H%N~NQl+;@g8h|z3k@Bfy$HL$dIUQyI*y?{)SEvp{|zcQ+rSMu*ZL+PxKpLAY& z^?VEXv@A&H8h`4#oni^!3hPD0v~QL#^P4N^^WN66s`~i@@jq)jd;VNsGH2eIC&l(b z&w4J4pZmJ!)6ad^MO_{L9BJ#7=G*@xqVE4M{j=t_y~6(%TnUYSH1pDh0}~HN@Bj8w zz5V~6U&aP?XSV-;`t*L*<9deHc_MuKCr)3EyMcOY!TzNOg&7z?SdoDlbtQW)mIf*V z1Gcs72B7U7;5KSF)6aGW2H_4+8#UwJ)~L)avY}J|eY0HtsxSZC2P4NrQw&-hntg-> zraH0&IxKN?35Y%zws87_MNM3nGD2oGC^fCIaOm!GxV+%Z1s_Gl76wHh&PvXcvyWHj z-(6+({LNkaSNFs(#NAyoG3xc2((tw6p}%ie*WbVQdye~!bFVMnt3R^vuKe-SA0Ka6 zSC#Ys!-rWxhWk@%7I}4-?Q@U%7;B^<abyf+v1TdRX>W z@{Y~(2P=Qua7gSbc-gz@iFWq=ZMJFEjC(fav3%aWeraMxWvy<#{fT7fM|V8u{?yzx zb$`Fe<9VTnSPrNDI`*Xa{L*wLl@B4InO4EEU%R7!w%z}B>hJb>dve~s+80>v@h4$l z!U{9TO}5`Id}G>?b2I6Q*UGNfeT%i^H{3q7ZTYFS4`(j<@cQDb33k61WFM?36X)OE z@GxDYMbUXxOALR?ty^_g``$0rb$=bR@j-O)T5-F-Dd(5&-}`E*?X6vhzFNP#wd}yG z`d@EN-^(@pm-;DiEacckH#}KwWeZhj; z3q2P1h?%k$SMbbE7rXGwdf}-gw!$u#TLzPzd{h+_91>;LCkd=Scu48vMitMwk5w9d z=XR+b33W?7`I7z4$FtG%?1Ol}NURJ~V&r(!m_K*ptN&ZP_sc$(m;A>e!yFjp8gAjr z%4Opr{d~)XFTa(gZk_Lb*s*Gg^KPXlE4mn0C2?oHaF#RWQHhgdgmjuT2pS*j)~G`VthONhzw@tl^^`?_Ie`{tgipv6%pd>v(GQ<<;X zL@Rexb=-W#`n&YR>hr!2CM-^W(7FH1|MlBeZf92LlhH75Fe(dkf2-iTOiHSquo+oK+N>E15|^-pgp zs6Urlymjr?U*7x5v}7do`|NtRp0{hC_abyp{rtxTSKi#dFV*N^e8E zQm@X9-_HeaNP4?i>%v^Q1+G_L9f?`t!l39X=fdL1@`>@0#o0@~98KoT84Vxg?itSc z+`!LJ@r0Z4Qp>|Ns)>!hPcKO8t(>*;?yb8u_a|x{Y>|3&-NA!(-`Vqg-yLncHhfvv z{NX9T{&}Sji>%pMuXZvhM#w~ZT{-;q>b@PNGV8(==bq!;a%#EDv(KHfzjg*Zni@1q z#8I%(gHb^s)q9Cx1Y-otC6ofHvj>~N4sNHa)p*puGD z(ZO>NNA#M$zqeHoRJ>dsXh|o8|T` zi_`A!>}6hk$v^4)0|%`K9*j!1ExY$GORx)``f;22vAFu=gzmkI)-L{AK6_qv_UoIw zUQI7NJ7469u;vzysZqS2T$>G+FW_~QW?i~1(3?d-&_MZdqp-zkk7PHQ$}3uYR|_Ym zC@py<5&3#C_r3b0@1d8|x7U`mM+X1jt9^a$d*8Tc_x9Ocy&e4fX=eM`A32O~ORmc5 zd%T~P#rELcb^E4o(=umu)XY+g4?Y#^$g%h98n@$YnXiu(+Wd4l|4;n?izVB7Utg)^ zzx!8a@0S{R-Y;PSSA!~!PjGv`zL$wHK+Rj7!$F}UPixWvOa5;TVirykQd_n?O+EI; zPixB4*5B`HazC=#-~9V-=I2xF)4g;vL)NZ7RpI(Icirmn`Lit~7Cdd;6r?NL#mnIG zw|HaL)3Zv4X58EOJ~7aUN9nA<;uxiu3H7=qg?aNu{c~o7Wq4kFGv;4=B<=lD)Gwq+pX8~ z%ih`UFy&(Gk6Ducj$nT`( z#mqAvNqT)>Hv3kwPdJ^;Rm7FJLa;?@=Onj{XAej)FBO?`>B6Z4zeUbjYjE9HStxg| zYRO7>sdVji#*d^t_euqr1b)xVvfa#bwrbME)ib9ZxtZT;u`->ZgCmMvAaTO4)$g1X zBrRvgteRo`h)b2}z0IRt^F!wNbeh;iyL>Ht@r$Is%MnT4|wpQucZ$&#ACQc}?L8SD98D}(%VN&=FnUM+ugl6}X*`$`Fk zVh^o;zljseZM|~sV(2~AoOx*_@N>gf#rZR}1O+2(oF*S%G}r&YyyAY>|2MiL zHoj9^Q~6deW9s=m`e(az{WNnGMbf^{zId|1Awl}R=(kB*FYB+XXNZ!_5M@v>?+lY- z5nyU$ay^#Hs>%Ftj&nxW3Z5+spR0Dy$vhdOu`h6ml&BQfyv>JFOBzZR^^|JM_LMjt z@n7bCZpy+bZQoa>%s*$;U|b_0SaxpdIZK1;iu*Iz<*FX3Wr#Yh77#cxnYBYYinl@J zDQB0|J%*MEwAaQaM`>e%Wc6)!Bzn-OARdsp$6Mj%_~u}*!sCv z2!2{N(f53c-19SenUky^yUlTVk@Nak__x|Zt<@6dD4H^c1D&j z-}8^Y|Myty%a^ssCbriyJ^y=Is70-Rw_Kf|nW)1399xM)hknM`DR|^XbER@Gk=cC2 zi_wKi@EpUI?S98URIoYLG;>c4@1 z{@G7|^zV3{WBO^nin6gC9gO}V_3gF&_4H>qKPhq%iTCZ@zwizciT>$sv4>B_m&-xi7O z_kJha?0RGt^KkB*+xF8_!O-)&&HS` zFhImCnv>PR)Xu@P`RkEC&$dOlD69*7v+b$<1qSuWD-A8zrwRU*Zs@(ovg+ct6wB4K zYKj#+T^&A&r3<=ftabIw+QQa-PU-HK89`DmEUu^06i?qfzAw;0f#pX^w9o9fZS6t4 zd_K?2ea|uF^9G8Yd}g}y?>Q!=UV{wA&Zf=x(jC7D1l|$gT&wYg)%I%E;(!yZ9odT` zxo(CWFcZmlUSimGlac3qLwSS6`v#MVolg6B9L$$YSs2Q9`0?xyoA1x*@11?kS(CRx zt$5E)N&#MnquTG^uVeoA>B3nJ(dY*^%@;{D1)NzMZF}MI<%FgFrvfrmKeFDa z5`5CF{qJkIdf&f4^Co*}s(!6nEPeOGDQS=30(W=wHN1JUx4JfqZq+M0_jAX&ou_u> z{QUejdV1ZTEARNj9y=b%<7Qw^Yc!O4U6ptA)Y9^Y6I_=+Om?pqyuAEuMfb&-mn18W zSA6(*yWsWw=}D(AaKD&$lW$SdHCFScH33gH{z^!?9J&1Fid@g^#9v9X!vfdy*jtzh z#eTWHTHbY^Pe$(f#~)w+GG=J6uMlULkgd17``5N_p`TjUCGXmOyI+~>ThHsV$(w)f zUbpLAH}j#c!wWigr3wj7NHMa=_A{TfQf#&P-Hxl*?=*gY_t$ey*&$YrCV^uq((?U! z``NeOE#}?Ux6bMM7o%@8EZOhkU`g}G_K2=j;-0{o9`r5ZUy^_VJGTvt} zS2up&r>M>HURES(&PU_3&w6Li-}7?0zx=1=$MwTj&#P&VbcnhGsI015Pb8iaWj~Gd4hN^#_;URj*j@ZQe1ZreWqP zvx%$zHO}jAeDTfT%3A2M|F$M^V3S7&B@EI7H{W$E>8_i7hU{uu1_bdw0TE=%gcNlYIYOjUz6E6vTE zknw4rr{>g?is`ov?{Ve4QuS@w^Vp(q_4D#={{JgQRK2$6JbOOB}noKb=aAaWR zWo(?87_9wuh1b>c9W9@T~m*w@-Rp zl5(-}YSnx-N&oH<{XP2@eRU6?zq#)7Gv44sF@auBg{GcPee&7$$!FHgOznJ*rU1#c zo-I+2E#8%!Q}We)70CPeakAdJgC0>kHqLneqbDG%X_}*7&LIIufhUX?f1I6~eeb8? z>!r{C3dYA5*{nJ8VouPcr}}prCr)I%Y-#)8#`FML@g5$(goM{E8`v95gL<=$>)EW_ zb}_cvJF9QUC+YQTk)fubR5={^i2m!djTJ@lAX7 zy`SHzKJR+el%xHAdHoGZhYrilVn>f|^0Qw4G$2paMbs@s@Jcq*^hrxLZu_D!}#fA7y? z1H}bA&0Cf$ET5>K!P3}f$Ro_rA+w0HkRr?|IVUnpQ>tipR=z|FOTI<=14rJ5YOW(Ewt2_`4ekz(#-`ok_4XhPH^y= z>#$O_KgMoBl6ONf&C2BI` zo7c_dSZlB<*mCv!mDk+P-75aS?qBcvzJP!=fp@=s7xiu}eY^H9d&#!*S=ssXHNBp? zFIw?wt*!XG`p4@&moMj)4lkI&|KZPM<@a*z3<(z(F>iRkkKMESwa%`8m$v5X#P56b zV&cP#&be#sre3-Hy}v)d_WeHgcb}McIP~B7t~33M%{z^^E+T#Rtb$^9Z-4rNLk({?3>GdCy(JANk3PRP}U!NSwnx1o&dYfsG`|ox4qh^0Fs?B}WpQKhRul=+62HWifVYY(P$J#em zMsgM}|0>MN`Mk+4#7lUF#Og=Q?stAqx^q1F*WVp`e?`}9_pgeZzB;JMKYwv)O|ah+)11ty57+j>T60@&q+1>;BxkDUBGv5J@Jo4nh*59>pEIlNv}RDKQppJ z`u*?Q*QfEXu?h-&_voOn^5(SjFQ0E*xT@lNWBG#mDE@oJC*m0yLjOojt7mRtuyC2t z$M}cQG)JL(hJLv|5crS`t&o#ew~$zt4qSy$nOf@ zVVJ9a>C)28VkelFpM4c;Q2Xo4X1*CF|6`>OZ?gDQdtl!0{BEOreM)Ig4$4QhI9LuH zoaEBWci=pOPRRi$wgapTwH`;9Y_x=8e56dpIDT;cE}W#=at(1xeGI z#pAj*mQIfS|H%4ixPRQI#hrrR+b_BB28!(ctX_WS+q+)p*KauATl?tE*vH`f%rNQ7 zl0z{|KeFuFxV_upu$BwkjFg7fJj*@~_m3y<)LJOGpRi2GmrmTInb0-2wf3%)U7x6= zrMt`mooK6~Z|@mYF0AN`KfmX;Zm;~mM<+5e*Izw-JmYfK_q{uBpS~^kE892j$5TV= z4?CCz<1D#m>~wHEQmi=TacKY7WL1ae)m`$EvOU)`*9K~c?Ne0{o44ct+HH1oSh}zD zcP8ofuK<<}MGk z&lT~1yZxT7uHVt@+{RyL+YHa1zI1-o?&I$RjThNf_x*h!_*nRA|N3a#Cf?PLcK`b{ z`&Q&`*$b-E?oHfrb&u}5y_RkppDz{X-y6gA<5a7=qTW+MUn#~Vj#Dlht+amKV^#M` zX5X6nuHOy{)|V%f5%NoXfBB z?fdrpFn{d}>CI11Exq<^mrT_%k3WBQ_wOqbVPMdf*zx5*pXzhhdp`+oMx?XvKpG4oWQ!=NL~3GPE%t4(t)^ zNoHUxwJ?aburM%e5$RBf5nu9}t@xp0^3|zZKRx-prshYzyW26leQyrxRy=CF^_=_Y zp_!G5Pj1FnT$uNxGgd+6fzHEC#d4LYnh!dEq~yrIZ5Fg?n;-knJm(J2uS4$fs`h2C znr(}}OYO^iSY})OX6s>_&6l?@r^+@nZJ6V}pOq;wKvXK#V#c#xYX&hk&Ql(Nt;~nD z4;(sl(BkYh$@I0%uN@}6ZWKA{>+Bp|H9umP<^D$#UzLj2MaqBQ`MLUy>3-R=^#4WH zbx-CMUOB}S|8IVEoY>3@r_=wcFYYreSuD@}g>{F1oov}FyNIV3li3RHpZWAma{8)! zrtUtc{gc|`ULDKP7C5P8Hqnh!ao2?7A}lZ3T=*JT4j6bC^p(yy5EYSe!{^5|-8ID< zt{sYGPhR6YnZ1J=e3sx8RS1SdCaiR=gI?_gHr96`}TaE zINO4?3h5-j_d7#2C>qx1pG&Or^CWWmcA-u^aWBU^}B-X<3?>d`j5+S)39HR}5MT z*SL1A;eK8ZC&ts(<|rvu8nGnd#+fpepeqT9o831m6i9m&F&NKaoxwUM z`8_X>0H+Ys8mH_fW$*R;Waq7V-TL@<+O_P%(nTqA%W^o*y{wPtuQ0F`{M^*M@#Nih z-$!OS$MZvla)egZ?vTGdkNrU20ijn%nF1Z`+dfz@JrP{M&B%3=S4cuis<5qQN9ALl zrqh%1l)pwvNSw1dAQAC8zW1WRtwR#r*}6St8?GH(!gnkpcJ&Q~b)P~HzwY{PTE2Xf z+%j3!VhYcU-JdimU z*&u6l`unx>eVhI`B&0QHPUtf6{Qm4+=F;Nud&bOty(&z(altGMK2aZz?DrSiSNp_w z$MPB*4n?griMHgzpnK3<%;fva#vL^Ulb&Hc*?w^n`ZGuyWU+c)|@G?FlpH#=T*~qnk`)J_9^CpAo#xD+?Qw&S|SKc{b7y0*g$FDPTuhT2;&(c{Z&HY@)=UaWY>>SoDo{Bl*-)4SQ zePi_3c82{=jw_crb2N3C6`P8u%}LGHeL8n*ciFw&Wt9;LX<{qWrNn^Q@JvACA${AJ8vlzQ>q%-tDX?#W-Hmg`uPTnUlO~XY~ygz z|JAhDK$3m&ypROb!x_wLdAEFYU$yoBelw3?-np}$C6<&)a4%l_o#XNc9=ACm7v|p= z-(1b_BJw36C{d6v?hC8WDP6Z&*J|Pzv=v)KRpRd(hsqmU2v~|{3SR%SInw$6EyWkR zmiM`>P1=}#eY!x~l4&sN*0;+ zWq;)g%}(~1B(>%nlV<4l21$V>3K|Z&vParJpdb8q*UEtY4Tef`49b0Uk356-?e z@o&yQ-_30wcpIx>c`^u3e}8- zB&Um}>8|_tTC1UhLEsUWV}OdAdB2jtUUy6H&y!3_zy4}jab10n!q&zIHf^i;AAIZ$ zKN!_~@KVs9+`rQUug-qh({Rmda{_m=$(Cz&JWK6lBy%TZJ-(mcGXKo4(!<;(%7W25 zd=8Y`{WP`N_0B8gvEiK`+r2lG{m5fk#F6aN)*-@B#9(}IZ}&&BmY*!=qSjP9J+xi^ z{=@pnj=LK^u}H|ZFOm6lRK|5v_i;6|c=@Nh`c;~|zwRjMm_1$f$C0r0kt{QqdJ8!+ z1zGP3Oj2CR(&4aRTXe31Sc-&PLEq-@F==*JI> zqMaOGn)5%*Z7^oaOp4taB)Ifr$%?2&%#$z9TfS@A^p=2gSG~FH|6bcvZ_B^oT4PJ& zMVEvR52h`=d2E++kD17E(TT6DdYV|8nVRt)TuN6q~ zIelwuUdS#x_K0L7mnlc=tL=n^2cPVdTcPlUEA6EwcbY{RlgqTZ zuhY}{XIcG?vsmsL{ws{3CHemL&->>wP1@4+$|9jxwDu?Sfxh_EEpPoU-%!o$-4kFD z++;7M*c5Rvk~^6rR!t*<;&;L}K@cv@neEoWEzETg#J%1E4cS)u)kSAp;RpSCC9h3 z@l8*kC0AtJEV@ymJSA$uzkP4AHoy1Fw>!P#((R55|Wx(gMP2X3F zmUWzH=3nHK!K3v5)k;?R$ugVk&lieKlUjf8*WA*5%Qp1>|NY_V>vlI*-wnq$FYvs( z-?(ysW++F+JeS7m6{|DLeKNY$X&2`iQ7T5`h9J?#vc1c%4>Tbun z7b4zh(H}|CI+g>O~m>90X1ODb}?X&%Pfm^0r?+>)-E7evW=`yH(bH z`W4u)_SQ|Qc9Txyh?|@0(r?MxRDX3Ukjy$cDcyR?6+SC&!(A^$C3jxi@Z(wax~IIn z`U!b$O6yhTOYgZP^?vsmVVyOmN8%j2({xsxVQARFwd+N6`UCFyQf*Eh4Z999aJHyu z`qw^O$I#IGx~<^j+kNvtOt$8)O5}<-JD=(ET#4r_(La20j>Jzqp0tNOevwSoN{7jr z7uK~Iimr(a&M$Z$vNmVqd#f)!GSN5RuW2&uyS1{hjImtiT4@mHwL>L)()Vtfb*M}> z@%Ztoa~aQlcJStB*w2W*H)*c5+cQJnrIHrMkN9lp;|_W`(|&KYR13@0fMeUw&Gww7 zb!w4Lb%BC-fzkOT=RfWGRodloLhD-c)5ot34WpVT9H_kh{{MN+2OEEwG_bbaeaoS! z=s2TU`H8|ik;?@P-;>zRFG;Rg{y?Ya3j2}?0(Xx}Tr*rcH7?{;^fIIFlR3=ECJ9@b zFWNnmKJ43VzHF{T_L0|RcE=CB^7*kY@on$??Xq6R%a(FXKUzEe@7p$|n6_C_&rfXF z&z~3<`C;KXPPUe`*9mLp?LO=no=~#Gsrl)uIlk!|T1?oK#UkukD-x_e-`(psrDw{a zTS5G1=h*tPEaY!=Ik5Bko8Ny#Hk_#uuoP`nIGCUkvs}na$sxtPpr6?y{lPM(#e2`_ z$Ohexo%6Jg%oB-)_DA#&)jocG>DDTV9bgm2vvw;E)hu-&&NKvuxdI=GRjnqhbT$?w`She8u{si?~TwC94h@7*XXR^_yBZ@1HAI);z%XLGg$yaGc zRL2rEgFv}ncJux}pDrXHivRakKRe*C$fl~xiyBM$|Jm8EwA#JCeBQf>tW4KkW<8l0 zQWUfH%8t0p9^Ib!vTcE)V7@_X(x#cThptqJc0-QU{1UdP0DJl;Le z?(2mI8$QebyDbpLKV?JKQ#C2MSq_sVUYM|Yx=jh@P5v$V#WsRi*PgR-% zl+JJp7`9B{VB!?rw7%oE$c2VA*9=OyBC-$mEev*>6`@jkUUO-uYgBnhcF&T$1;TDZ z(J!tzIyiDPYH(#9+cNXTOq0xWcVzQNhcft5v+X=hA>hW^E?!V7M!o$y}l#jC3?X8jTAik(zlRi$a3 z*dM)r*N51q*iDsxkIcJe#B6FPw~XVEK*E+CD_xZPcrRI9{;}cNLEf)-8DlJW?DPA) z{rxxAdz&>E*xh44!(z5pTK$$=Qcd@*rPJ0-?l~ghsiat2RL1h0VX^L|8wEa-}s=A;`+y|RyP7%$#ebS{f6J#n+r8o_xj3`>+eR2NKX;Hs(UE)q)g zt6Ja15$LBBKB1%NkhZeIiUY^37uR;InkH*$cFju7^WnGR7hhE6{~dexGb%JVRY_4) z%424gSTkd~%$72{EmvhO%~%naTK9hSyMxhw^V<9OzkL7W$j#k$yP4+jF(xh9%5nKc z@{gZu-=Dmy-6TBMiHmhY-myDwF{ZZ^J9Ss7`Yzqb((rK0ovX20i_JZc8CZoh3NQr; zdh{spFl(p^ws0kiEZD7n=*&*r30_K57+WR?IQ^1gm>GJ2$AD4btjgM0uIFpi@7+lL z?)D<_hswK!t8&BkU;7o1vSq&DrIpT;eh5rb#D}BQcpWwEVO?!9FVvx z_G!h`W~t77j3N(Ke|I~RZ@}PoJ3YKXp_N%Jwu3vrqPTgZOgfw8@de)&PDm@tK75X4 zLO|^9ch-x|xvIT9bF$lV!)JJ@6{#>cO=*dU;Fx&VF7@Qp3y#hLoE(dKctsT)1yufg z-KqPhfcvm{*BUn2iwTZ96>FZ)`r3B<-yJtclOLJ~mPE=KG97DJlbDh0&Uhel`3=D} z$sET8p0u8gti5Pv{LIn8+56^i&qecN8Snh4T$bjSkf+F-lI))mbZG5i;aESGO7$gg zH|8wedhIg5OP$6kE+$U>lKK=Tao3o2F->SPRhYyV^lP{3qMW|_yO)X22F(cruOHiC#(kX6@Tbt^j@7;KEDcqjw*LGXLPypLOf#KprFDIp zP>h<&r^P3XK1#%Gv@u3ozJ{N(ri|P!fw0N(8xI@6sTW+`9i)%FRX^J&2S=jr} z?&oLgK=wnq{JrZocd<*HyIB-Gn_*7hJZ1J2`x~ER3eE#WZtyopW+E!$nDFWBlBUuZ3}<@N22pZ_Rd44rYw zq$P9m_M;cs>sWvH?&bCl|0mbKZm*c|R^5(6OotTabKWmG@~rH1Zuuv*9VY|AwU?)~ z&NJ?dtkjq%DOP&q_%{28%Rikc=ax>^eYewQf$p-O|EC*iE7V18Y+kmtBC3;NLkOd% zqH6Kv$ebPNhqE`uIItA$2|cS?vnRE?s8r+)OWN1Bt#`%th+3bw7fPIPewMyilgnyD z=JuD9#UFqDT_?u==11P0{g1e8wmq}znG&WLAh>A349#0*4#(0~JY>6)8|*SW;pF8s z7nh0KbJ%aT9oiwQu)w&zWBw`OFJVdRipclpZ=4 zmBeN$ckQ^tsXF!Mc{krr{NST9(Ph=^j>%dgq8kftWpBK`E&uqUne5J9S4C_bP2R8P z6j7+%!MJ#PHe1~0=j|Kce^Y<((X{>`v-Y|J%Pt;gNP2Q8?|jLomkj)o%W}D$Thu;$ zdpBR=vC70Z->w%P(V2Z>bu9DRmOE@JQYWR(FKn3BHfyc(#ZO(=e9hkP$+TT3xqqpW z;mY(p9)-*!H`>C@Cs|oHurzn>5sz%{{3Q0}+4F>c*8GF>Zp*Ys2AAh$-HzV#M&Qro z<4G=Q{5)l1cUxE9$UiQ;;d|Nf#G41sRwNvKzoF>x-3!aQ-X+DWPs*+?%W{w7d(!A? zwC&HySvg)8wmQpaJ?mS0I77K|^J%9Ub?XFFWbA&-^%Rig^>i}Wx;Ek&&&Lm87bfrg zxNrMQ=CZonzy0O4YtP9R^jXi4O3Rn;lXbe6!0c`MpOYc{euCRP?Y}{b0VF z3#Uqmv5BW-!u8yH4Rgi!$u%eUKYkb*{`j7H-Rsr4>9Z4?SNPVwsgcOk`C8C2f#vt5 z)`qf-dn~Op%l3%>xT*J$+hS5*^yc96OwKc7r@5|J%d?2@%Y}p2m7NXmtVozCIW0Mv zb>o6EkDGm)r8}p~9=s*8^pZr|HKARHBF_dqmPv1_Pkih>CG_GoDFc}n1(7Q@Yij2h z7(I&g`EbpW|K^go28XA!yZD(HXDD>PjShU6QEisTDrqm3UmE7Py?J4JFvH;}UdL05 z{oHu(9AM^UEl$7mP^~K=P0Ph`-GtyvT!LHnEIu0*)yl1CTKYxoSz_J))rHsm{SJM6 zf1msM|Ce3|JUtXQcd~tN5=ofLD(L9dnzgfS{=Y}REnfY2Tk!Dw{zlm}dDc#w9#h!{ zC23z5fs%z2X5SJKbbPe2G5VzCXA`!B*Gd~D&E__rcJhCG_15zoPorgiaS!fZ-d)Tz z;jxuUzh4w9 z#On8WMqg_dQ$PA9p*QcE;5p6+seHERE#mRAtwGM3OkU5TEVurxKF{jB*x>#ZmBtl~ zO;Ja=tWLfER^xEw%?&eyV6il*Rm=Qp4XwJ?-`!>{l0LVN`CZimu0OAC8Gl?VzmKu{ z&(Ge9kvVzD`_S za3Rj!nWM4ulEkW1X7Mdr56&@lZ`>5Pp3xCfynro=30&0Ry>etVDM_oec^7h zb8C9&0c-xf9O?fah0g0_ad65@{rcz3q4RPJ3>jMaB+i^Y$()w;QgN~PtCKE^PdF}6 zlG%5E_lEoH{&&uv_J`&Aoj=Sq5BFS8c>nf(oAA9aoNqRLem8T&UoTI^7Jk#4mJ&Oj zezSjcJ$!!e)7SY2`K;fx=*#_A1{pD-`_sM2HyS+@d}U-d&Ocf^tJSRQc+YO7&Mc#Q zt^!BP3~n}U%q?|!=5|do?b~co)03`M=bU&ZDBVBCx-c{Mt>GTq#Gl=})+jhDrwOMk z=kNJ?cq{+)w5IPp$zidZoDJi?RR2|#ZZg%)#dp!hy*ux_ zTe}z)>3f-~_KEiTZTn%#h|Kz8|zpwWXC|2*|HoyB@ zIi~!wYQ_EMb*Or{DVF3g#P@Wqu4gE9c(3 zZ#C6!G1HVFxg$&hP7z(63sx{Nh^+_h2WnW;o|bWFLz-~QZOx?q-lZyx3al|(Kjv&P zEjnPVzI3_vq44dSm%r^O-~Ta2X507Og@4~Zf4oY%uHp8yn8w!4-;Ugu-zQjmx%kJ8 z%=ja(`G4m7%-^)(@S~+aj=#P*yC-Az$IYjexc+GHY?|ZTJ8Md`;womw!07c&DVxo* z78^xv`L=oU!bPmhBT5Vw&D|_NcWTNqlZ7h+GIlw;m!8Xe5O>1D~*SqvX8JM*UJ8~uN5@a4>Rwat8U zohujd&9#!4U3JRoRC>$u^Lu6-G5>J!;Qj6TTeA)%>xZspUGi#A;PJVN9k->w^aejS zz4oZ)?&r@8Gp9ZXyb-GEG}S1gf9=kGo@J)${eQhAvkX?t?re(AyZ_GfzsZ8_$HIqThX0wuUKs@ z3KP3FH7Fp+S4rvVZm$J=E}O4rqR|hRdBTR*@Ik>Mu1VzP6rb+OZR^T z&7XB}&cSHbcYRN8IhpeMUEFg2Mp$0&v1MVr-zLU$y#2$}@_r6;M|5&?#=!t4$CWZn zkq#mvd(ABlNHPlP?5NF3f4wZ^vcO(*O+l5T8CAb-=Fe-WxzhYy{(mWpR+XLQ0e-*S z;tLZw4jmAjc=Xz37Fpj8zqwnM@?`1P&zyhHnL)6p)A&~8FWZ`Vm(_1sm;7(JXnZ*8 zap1g=f*d20qq4#E=d4&91$VC4zIFbDU>5bPDI0h7{ycwf<-ubWtqc>B9Im-t4^|D> z$zwNp`TqHrnIjy!WU9peO)Q)9aTb^HQ3tk`S-bsAuZ0(`_C6B1zi)HfK90>RSzqNO zo27U1EZWeqwVD6n_3QIGbq~+p^vwFF-nGvS=6`IGBAh?Cuq<_26SrID{_Yn%Q&unL zXxiX8Ve6;a&DRXKT&$Cp7SnOoeg33RzQC&LR93^xUjD%7UZr1>A<8l0oPA+Ax3*}q z&bYQF_UwGi&k-T3zue(k5w81b(fs=bAMOQB{baWCVpKY-W%}IGZHh1Y0v^qnd$DK9 zxzM>6q8LuN#`0*Gh+MiDowqwvm37^|uhu_Ki1!^x-Tzl^)m5V!NcaYx)*XnH1@mdg$8fj~~o0U)i{ueR^Ezh5WW_xn8m z#u!{$Y~mzr-`=(GvNZV;Ptnw2NiIcj~3-sdUneO}~?9FE+~#kzla%&cWAUI>-c zI^DXmW~I9De4fc~^X$HQw|8{!tDHVp<1HJTa@V|e_L$GJcNc!IHCKMs6#ePIT$T%a zzXlZ?x*=vBA*so>&MI8(@!v&8m$X+Y+itQ637J|bv~|RTB`GB!-=s_y=* zppnt{%CI~tYVj}5;+~tI)sxTv6?go~_vp}R`=`M2PNnW&`}#%8(%o1)%^QzN&bqx{-x`M zu3tGr!K>Zp-0i{-w)4nGbT=uGY|NQ;ouiImqw(tMA*dk-U@}HKCp3!ns4jww@#H-4@B(q66 z|F5jx{%7qsEH?2NKleHGu3N0BCA&Aw>BrFq7ytE_9CKYXm>r^YXMcI|e`ddK_CvAv zs-iQ(IbQwyHr;RMt2MIs_)NEo?|7Xwqkmqdg!S@;N|SEq?(e<3p^mw)?!C>PUkAef zE8qM1GJd}OQ!bymEGtsD78&$sEzRPNo#>Oi*Ua~<JjWaBE=T0Y$boOhujqKOrns-SayX_bK;g2W-LwPLQ6)xr(cWhZ# z`W-ae5NpdC)EF?|>W_0w*G5IttBw2rv5B5=S?SP`UAOg;q+apXpyPMunIFtr)9{(K zGkdm7-t2|%Be*X_Y*A$S`E+H9V$0Dxtd}=jmNVW^_C~Dc;T!YE-syYASF=rXPU(KT z#<=3g#{G|-m&-S=pYuDfN3}ok`rcc~GavvPvYnAJE z4K6>tX65Y%U7y+i{WN;^C11WbditG)x8iSFYSwWmn*4kJ`upP@!ReE?Dl`h*Qt2^B z44=vKT1HIwh8Xv@nff`C${jPx3O7~NTSl(!krs3^V|lH+uJE3Yq>OznXH#}`{Q;q^ zQC(NH%^S0W4R)>bFBCEl?xYs@voP;@!{}W@$+GsD>I7j@>#z#lwM-O6na3e+rH!DDTc6h zyBR%$oc69Mym)>3qr>-aNZbGT^Y{P%(kGttZ-_RYQoQNuj|oA&-{CP$EEVi@v9Y|tA+0^34Oq{@{gC>#;ZZ9b#40`xgY0m zW$PAgV>{jPnr-v5uSqp)ns(@1Ft+4Z%-!ZRY1V7LS=Te9n+xyQdAy$PpSjj?j=M@a zlUn+zr<g zd#YXb8buE_E++;4ZHMx8-`x84>-o05b2l4)e71}6lY27X3H@|YfglGC)}<;fAvc4< zpQc-HW)*#K;Co7BJ~q9PnF|E~S*+f_AZ)3xMH>(ghSJ@ZQ|_sbs> z&oaMBArg-x3K|zB7&%?#eZ=ubWQOPg#yMwMj&hyNnx)FXn#8(@VUm*otAJ9=0*;`z z04;V;!6iKk8cd4pPArQ!jwl{byrF5a{K1w6Q?55tnuEh`M@U5rD*TNQXjA9qUHh|n zf!xOPcI`W|z8c=yv8HA5w;%d{9{q`qGnu*fMYQ<+qQ8eLzP>JZnRG>fO>kR}-N_)Y zi?K5d%buzKFZj9o{)W>HrfJj6PRisaOXND5^#}MlEm3pq)Z;K|5v_O_JyX+>(XUbC z%lsKGiY*-q6Eqzv7IwEC5Nx#gWPiT#|Lk+xjW_CVwM}t!o1g7?$ySo>AZzgNw0S|R zdhEp5Sa-f{VtuDAzfY`vZ>n9{oB6EWhBh_lA9Sm&pZ?}E^Er#(5*E)5;^O#^iv_Fe z3NrICoj$K{puE-?JoCTuZ&&hnbRrv*p5SSPnzU3rhcD%@n+t|bCC@? z5_~RCI{y4p%i3n^x^12#hf{Ll_MGgs+lm9k&Sgr>R=66vE=>E$oPFL}|1=x_iyTk8 ztY`hU^S6A2QvIJ^_cx*Cb6TR`OB`^?l$l=l{OJD>)t^C{56($Xe;oRMqbpn%r?fu8uGu8a`-LjjyQCokl^gHo)-s#v6*6*nI zirE~qUdl^&e?)W3{S@U6l_n1*9@Z&AC!T(uz;(xZXGOihDo)3&NdiXtEF0Hrio8Ce zyXvYIYqm_#T(j*4e!|Tvo)gv7ZhtuJlzq5%?`O*?tQ#{6jtW-G7=7NxtDU^D;JBXc zh8pFxbMyHW|9oQ=ug!hwtu}x9ALEpLUthld(0qSR&;P$C))yYk_h)5j34GDyQLt~t z0ujX?mXdAu&7OZ(c*Yd3m~MHyZJr>jSYgoSU266lzRc_WE?*;a=#WSO$At$hKa7w6 zzrSSl`u}Io_S^n^u#V+ri^9W)>prbnF=@i3#mfwYCNL`Ybg&f9y0zn${o3<-yUSJG z%>53%Ti+RQZ-(=vEAc@O?X^WeE;?p8b*)gMz3jG(bN{v~EDBl}z3{@?3sOTt@|dCUw*pI_Rwza1+u}Sl=P`@ufuH{$Gu=AKq9Pr)cx_x~0YUFS`p5PM5Da znfiHC?VQ|ejL8fy-rv5b<*LTh`n=f0S*uZ@<^Dshv==RjCJCC+XRc?=5_o*$`kQX{ z_dA-u#nmv>|NSj5a$N4aTKWzbl^rLQIS=}39oqj~`+b`6^grJ$H@IxFES}YyE`RoP6=MW@W|CV%yC7ki}dL=N@0%2>fD$T{S!6M1hKhEtQQL`T{OYfqp+GOqtH%l(qTMwFd{j+Z9VU z9q^a@;{SHD)1eg(DbbUD&fU~>;(xCjNB1YDz$fdMGyON8UA%#XR4wiY{YvI8-2bIEvHk%0-9FZPQPhx%ql{DcP&fimZNO{`d2j zmW;Ujmh5Vc3KI%4pRWsZ+RJ3iz_9PbJn5+0ev|TBwm&jW{djBtsx!(>4FYX;F)Ryn zE}mvslB1(ie)FGm)6^giC;4-W=D1ti-ATD8z{R5YQ`d-@aiz;Peuk|@4Hd0g4KrtF zbR2xA%LKhePYUsIZ0Y6OAr61kL{O|pAt%l$xu&HvM4xwlvIjoDjf3T>`Y4n2L@}#l5$Ii^`f2e=`BvF?f>DgZmo27rV@65?gzWqX&d6F{Ar9#uV zi3$u7t_)m3g8RR&kX6}S9JI=UL&VvF&xuo%V}(Q2ty!Dy`pYz`R_jk@QVG1S_R;## zgvU`^f1Ucmu!G^}OUs%!Z(5leu69OxPGCv89%1UV;9P%^0#k?L)F&3QrME(_iGAAZ z%%d><`){_|2Q9{in(U*i!dE{@ z-M{I-V`6k%A=irQJaxYg8($RFT@*gwWrl=roy>L3R&G^`E$b|kUxvF+3YehPGR1Ov z%0-LgPHewwBnx7%JojGfy(XlA`JUT}a@KF(&1=O2?RF`|bC{KiRyQXt^k+}(o7yGN zX4#S`7Z~EAcfD03ykzGJ>8~k0Le?dWoIVoSM|Qajy_@@ut92p6g{kwq7yJ?1efLjj z(j}2Qc3Yb44)+vS?@m84CrHolG@oCyhhq?nqOziBOPTP(Nhgo~{rjm#sEbAOx^-*7 z+G&M19NU{C3U-<)Z3)Rs}gjwdO@kw-9Pt8YHkJLAN_{8@|p`a1LjQwLTduuSOU{<}{e0Rk!n^3s-O0_H&&2L*^>}2p=Ca3S ztFSc{S5&KFJT&u!9IG;P@0Mgv>I*+)pudZ&c9XWf>$5|7o&v{q{g6|ClEe^-qQLh|s?H}1q=RJdn+MA6SSg_=xAkj-&^;bW4!_4Dlhx0=?lkF%{9K)Q zSHjKhSm3(61A8p1y(Lx5(#4Z*=*+wwJ*Pat&b)Hrq@5=s_il`m-~IlhskdC*jrs;( zEkBD@yEiMb3{H9$nym#MC}7V9BbW)_{ot{DO}TEOb)%c=p_mZDBt* zemVPl?)Q6V-kd2ueA8oo{XeF^hWq#aJ+v|C?5^)8=N|QbZ?~tm=F_3W``zj))LpMA zE$Ur5voL6XzwV-Rk5|PF3k6jjvKO$u(0XC;!hJ!(QuhV(RXgjhb)Gx)&~gFW9=;gX zJf`=I@r?T!`WrKU>}T83=->FhvHF0$!!;Ex#`K2t#?J?MJ}3n+uVcF2@cMw20K@D9 zVg=Gagnmf<;MXz$W4qt)Avo_{PFP7x>We z=ycl&L$6(3^)XK?qMn{)o;7Rz!PhD$XL(#zU3o?NgT~4z&!fts{UJ6%TPLrY8M0?1 zp2H%HakSJwr%+c*5Rdb3XW|7;bPUwvLYEhgP=QPh$D8K-PBo*G?T z`Spvv?Zx0F{t8_k#n-2p{&X#rbJy5-wA=H{i6HxD=j;sMzhC^nRQ~V#-!J5ketA^K z`>!nNQ@&xPxte|7$y*FpPwsh9WL`6~XtV6~>@z?AEZbd_*IO#7nms-Je$~`1th3e_ z-^=)&xA;)h+Ec35CA;%>L@w=Aud-iprmW&{@v4$#dB4wgZ9X_l_x#EmtNZr8`=pRE z?|9Vfsf{|JR@Dn$i$42Qx9(HpzV1}9wzpby?T)Ozn6~}KCXLTm6z9p^{$l;`VV&cR zGRtd4pAzYkM4y+mJ^q4d(dWjvd6)j6KoZW9XN zYOihHyv(`nMvT{2vwov>wTF{s`$D&!oMP?jChU2lLv2Zo-Sx7F7Z)lH?D9)?e8aMR zuDSEV(`;*jv3Kle1v{?6z;c6Hc^jNp>^en$UQ^w_@)ErvD37f4C%a{1Lw>J%#Q2 zTGMUE_rCrbX?rc3{deyA=V~kOmsi*Ne7Wc1ck9US1)`z-4h)+$zCMz@US!n%BDyN@ zndn}tg?|=*->C7p%iJV#N~P=j1&hw8R&{Cw1^*ZP#~$F#&VgJefDVF&lorfk%bjxX z$;)IhGB7M)Vqg$qU|{fd4RO@<^mEhqb@cOea}5sB^L6XJa5}HaL8Rf~-p=`8pY&b~pdAR{69g8y{*Mw{=YV{h;i9B+Dm*PF5bKL+KK> z7AYG_X7@JMbiFc^-fFfo^WeWF)0+Z+AKNKsv-jKIhXvD2{mp-i{NADH*PTbK? z0q6Vgs?YpUx>V0ET{PLZ#96rgww1sapXVn^0uH}4{wiOe9xZw@%zb{+zM|jB*ID8d z*RH=7Td?lV>O?2o6BQ0KzdJ~4N}JRkGKb1-aNZ?lGS3=N;1Lo4Wd7uiEd|@n5Au zafKWssBu+fndZ{X$iQ%wiGe`?Ij)>tgF^Iz-Fh$P=Pxo~IR5du+CFx zU%+>;aK&WCNAq-+>P9@Bugmj%_5Dq6C&^lFuD)jSQhk5^uLGBuuJSJT^4OV>YB;ft z`NI3VMO|55Q(m6_-TH-DtYvyn%-3rEVv7);X+eS7+#wsDyfv73OJgc?Ne9nup*L27 z2V|A=r+xjLvO=;-b9U5OL2b6>Hov*&cuZrI?x;O?eBHL1EgnHX zzuqg3PPtzyb11O;QIFPg*_AU+eF$!w#q?f7KE(A_;`4KAD)(|rR5G95+V--)sW|5i z-|??+xPMFjT>eV_^PK0_mpywll_Sh1UC0irnKJv8WZo_B&!663|9j=naiNn^YqouF zUwh}6rMw$Y*CmPgp#O^{r_9@V_KR7>Q-wI0<0d7t(s$)t0Qq*1>&8u}Fwr z&~90Fw%q2IXD(fO8>9OzV)j9OmU9yX@);H`Kll4Y?wqrq1x`HlU8C=@iDj49-eR+_ zP2Pz&zb9Tl=oS52JDvGk!IM`fJ-0g-=>Oh-(fx)tC?b)g3pFD3Z!J)YXJTOBU}j(t z#E8hCU`OMOq_o7xSF%25{62U3#JMdCI$y4K6u#`P=H}*{$LwbomTQ-$rWwY@oY$gs zjMcYCpLdqTe5Q@}nbOqU)YPUO;G3++9JfQtEo^~U@dnN_3w3f1`7Aux#>7^mz&G7s zcXFIpU|m|*!WoSm9xahG#I+VZm^3S7R-S_Tx$KObgsgDBu1PUB+GJ#4{>@0jq|C_F%*f~UC*zb~Wha-`&NcqL=4kD@_`m(9f_%IoUa=PvtWm8|&l$sw)P4xM)zvYww`$bN6x{8>jQT-)<7VuI7_b$|Mv+@I8b z=I}hbx=B-S?ezV>{MX9u&yH=c+8Xw^IDG#@)quB~Vsei@zAUV^?76G#%Nu$dufGZE z`x&<{zTW)Pul!vnj+{AhphK+Xj6=EU`u$gm{;j!Ke$-8#@o~jmUG{#9SWX z7N1vkjW#mKG5Xy+_n6Y@+a`Ut{%c&@X#IP?)q{zT)&^VsbKe(zFFGgW%G}q2YROVr z(R=niY$;ipdaqLNe#yGSRqvO&oVhzG%u4Rx+8;L6-t*Qc9?bsvcKZ+6PcqEgmy{Id z1?=7Oc188}HHnXfn~$|0_>z#|Uv|LxGJ8;wQ!m@JV{DIE+j5iaxSz$nz1nprY^qV_ z+E-fp+S#r0EA)T=`0=%w+rL+R?@bw{O~2QKb)uAW<$ z^KLtrv%kOHuJre6TW7ypEgeyRGUbNsxelFqU!Fbtm)&PqQ17j+@&~?NEMu zQoQf(+Lc`Ua`*o2pBftWBsFjH-2Duo)QOx11H2iTL>Lg2!b{1LvzCku3_F+@7=#&E zKy6JVT$Ea@pOaXbUs|G{o0yrWSCO0Z?-T5OU%<-10K$A=Q5bQBnE`YlY<_7`a%!<& zVo`B2y522vUGXoK85lrV5vC1HFW?00Mcj6P?H~zs= 21 )); then - SU_CMD="su 0" - fi - fi - - if [ $# -eq 0 ] ; then - # If nothing specified, print the command line (stripping off "chrome ") - adb shell "cat $CMD_LINE_FILE 2>/dev/null" | cut -d ' ' -s -f2- - elif [ $# -eq 1 ] && [ "$1" = '' ] ; then - # If given an empty string, delete the command line. - set -x - adb shell $SU_CMD rm $CMD_LINE_FILE >/dev/null - else - # Else set it. - set -x - adb shell "echo 'chrome $*' | $SU_CMD dd of=$CMD_LINE_FILE" - # Prevent other apps from modifying flags (this can create security issues). - adb shell $SU_CMD chmod 0664 $CMD_LINE_FILE - fi -} - diff --git a/engine/src/flutter/build/android/adb_content_shell_command_line b/engine/src/flutter/build/android/adb_content_shell_command_line deleted file mode 100755 index 2ac7ece75c..0000000000 --- a/engine/src/flutter/build/android/adb_content_shell_command_line +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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. - -# If no flags are given, prints the current content shell flags. -# -# Otherwise, the given flags are used to REPLACE (not modify) the content shell -# flags. For example: -# adb_content_shell_command_line --enable-webgl -# -# To remove all content shell flags, pass an empty string for the flags: -# adb_content_shell_command_line "" - -. $(dirname $0)/adb_command_line_functions.sh -CMD_LINE_FILE=/data/local/tmp/content-shell-command-line -REQUIRES_SU=0 -set_command_line "$@" - diff --git a/engine/src/flutter/build/android/adb_device_functions.sh b/engine/src/flutter/build/android/adb_device_functions.sh deleted file mode 100755 index 66cc32fc4e..0000000000 --- a/engine/src/flutter/build/android/adb_device_functions.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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 collection of functions useful for maintaining android devices - - -# Run an adb command on all connected device in parallel. -# Usage: adb_all command line to eval. Quoting is optional. -# -# Examples: -# adb_all install Chrome.apk -# adb_all 'shell cat /path/to/file' -# -adb_all() { - if [[ $# == 0 ]]; then - echo "Usage: adb_all . Quoting is optional." - echo "Example: adb_all install Chrome.apk" - return 1 - fi - local DEVICES=$(adb_get_devices -b) - local NUM_DEVICES=$(echo $DEVICES | wc -w) - if (( $NUM_DEVICES > 1 )); then - echo "Looping over $NUM_DEVICES devices" - fi - _adb_multi "$DEVICES" "$*" -} - - -# Run a command on each connected device. Quoting the command is suggested but -# not required. The script setups up variable DEVICE to correspond to the -# current serial number. Intended for complex one_liners that don't work in -# adb_all -# Usage: adb_device_loop 'command line to eval' -adb_device_loop() { - if [[ $# == 0 ]]; then - echo "Intended for more complex one-liners that cannot be done with" \ - "adb_all." - echo 'Usage: adb_device_loop "echo $DEVICE: $(adb root &&' \ - 'adb shell cat /data/local.prop)"' - return 1 - fi - local DEVICES=$(adb_get_devices) - if [[ -z $DEVICES ]]; then - return - fi - # Do not change DEVICE variable name - part of api - for DEVICE in $DEVICES; do - DEV_TYPE=$(adb -s $DEVICE shell getprop ro.product.device | sed 's/\r//') - echo "Running on $DEVICE ($DEV_TYPE)" - ANDROID_SERIAL=$DEVICE eval "$*" - done -} - -# Erases data from any devices visible on adb. To preserve a device, -# disconnect it or: -# 1) Reboot it into fastboot with 'adb reboot bootloader' -# 2) Run wipe_all_devices to wipe remaining devices -# 3) Restore device it with 'fastboot reboot' -# -# Usage: wipe_all_devices [-f] -# -wipe_all_devices() { - if [[ -z $(which adb) || -z $(which fastboot) ]]; then - echo "aborting: adb and fastboot not in path" - return 1 - elif ! $(groups | grep -q 'plugdev'); then - echo "If fastboot fails, run: 'sudo adduser $(whoami) plugdev'" - fi - - local DEVICES=$(adb_get_devices -b) - - if [[ $1 != '-f' ]]; then - echo "This will ERASE ALL DATA from $(echo $DEVICES | wc -w) device." - read -p "Hit enter to continue" - fi - - _adb_multi "$DEVICES" "reboot bootloader" - # Subshell to isolate job list - ( - for DEVICE in $DEVICES; do - fastboot_erase $DEVICE & - done - wait - ) - - # Reboot devices together - for DEVICE in $DEVICES; do - fastboot -s $DEVICE reboot - done -} - -# Wipe a device in fastboot. -# Usage fastboot_erase [serial] -fastboot_erase() { - if [[ -n $1 ]]; then - echo "Wiping $1" - local SERIAL="-s $1" - else - if [ -z $(fastboot devices) ]; then - echo "No devices in fastboot, aborting." - echo "Check out wipe_all_devices to see if sufficient" - echo "You can put a device in fastboot using adb reboot bootloader" - return 1 - fi - local SERIAL="" - fi - fastboot $SERIAL erase cache - fastboot $SERIAL erase userdata -} - -# Get list of devices connected via adb -# Args: -b block until adb detects a device -adb_get_devices() { - local DEVICES="$(adb devices | grep 'device$')" - if [[ -z $DEVICES && $1 == '-b' ]]; then - echo '- waiting for device -' >&2 - local DEVICES="$(adb wait-for-device devices | grep 'device$')" - fi - echo "$DEVICES" | awk -vORS=' ' '{print $1}' | sed 's/ $/\n/' -} - -################################################### -## HELPER FUNCTIONS -################################################### - -# Run an adb command in parallel over a device list -_adb_multi() { - local DEVICES=$1 - local ADB_ARGS=$2 - ( - for DEVICE in $DEVICES; do - adb -s $DEVICE $ADB_ARGS & - done - wait - ) -} diff --git a/engine/src/flutter/build/android/adb_gdb b/engine/src/flutter/build/android/adb_gdb deleted file mode 100755 index 65ec7b20b8..0000000000 --- a/engine/src/flutter/build/android/adb_gdb +++ /dev/null @@ -1,1047 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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 generic script used to attach to a running Chromium process and -# debug it. Most users should not use this directly, but one of the -# wrapper scripts like adb_gdb_content_shell -# -# Use --help to print full usage instructions. -# - -PROGNAME=$(basename "$0") -PROGDIR=$(dirname "$0") - -# Location of Chromium-top-level sources. -CHROMIUM_SRC=$(cd "$PROGDIR"/../.. >/dev/null && pwd 2>/dev/null) - -# Location of Chromium out/ directory. -if [ -z "$CHROMIUM_OUT_DIR" ]; then - CHROMIUM_OUT_DIR=out -fi - -TMPDIR= -GDBSERVER_PIDFILE= -TARGET_GDBSERVER= -COMMAND_PREFIX= - -clean_exit () { - if [ "$TMPDIR" ]; then - GDBSERVER_PID=$(cat $GDBSERVER_PIDFILE 2>/dev/null) - if [ "$GDBSERVER_PID" ]; then - log "Killing background gdbserver process: $GDBSERVER_PID" - kill -9 $GDBSERVER_PID >/dev/null 2>&1 - fi - if [ "$TARGET_GDBSERVER" ]; then - log "Removing target gdbserver binary: $TARGET_GDBSERVER." - "$ADB" shell "$COMMAND_PREFIX" rm "$TARGET_GDBSERVER" >/dev/null 2>&1 - fi - log "Cleaning up: $TMPDIR" - rm -rf "$TMPDIR" - fi - trap "" EXIT - exit $1 -} - -# Ensure clean exit on Ctrl-C or normal exit. -trap "clean_exit 1" INT HUP QUIT TERM -trap "clean_exit \$?" EXIT - -panic () { - echo "ERROR: $@" >&2 - exit 1 -} - -fail_panic () { - if [ $? != 0 ]; then panic "$@"; fi -} - -log () { - if [ "$VERBOSE" -gt 0 ]; then - echo "$@" - fi -} - -DEFAULT_PULL_LIBS_DIR=/tmp/$USER-adb-gdb-libs - -# NOTE: Allow wrapper scripts to set various default through ADB_GDB_XXX -# environment variables. This is only for cosmetic reasons, i.e. to -# display proper - -# Allow wrapper scripts to set the default activity through -# the ADB_GDB_ACTIVITY variable. Users are still able to change the -# final activity name through --activity= option. -# -# This is only for cosmetic reasons, i.e. to display the proper default -# in the --help output. -# -DEFAULT_ACTIVITY=${ADB_GDB_ACTIVITY:-".Main"} - -# Allow wrapper scripts to set the program name through ADB_GDB_PROGNAME -PROGNAME=${ADB_GDB_PROGNAME:-$(basename "$0")} - -ACTIVITY=$DEFAULT_ACTIVITY -ADB= -ANNOTATE= -# Note: Ignore BUILDTYPE variable, because the Ninja build doesn't use it. -BUILDTYPE= -FORCE= -GDBEXEPOSTFIX=gdb -GDBINIT= -GDBSERVER= -HELP= -NDK_DIR= -NO_PULL_LIBS= -PACKAGE_NAME= -PID= -PORT= -PRIVILEGED= -PRIVILEGED_INDEX= -PROGRAM_NAME="activity" -PULL_LIBS= -PULL_LIBS_DIR= -SANDBOXED= -SANDBOXED_INDEX= -START= -SU_PREFIX= -SYMBOL_DIR= -TARGET_ARCH= -TOOLCHAIN= -VERBOSE=0 - -for opt; do - optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') - case $opt in - --adb=*) - ADB=$optarg - ;; - --activity=*) - ACTIVITY=$optarg - ;; - --annotate=3) - ANNOTATE=$optarg - ;; - --force) - FORCE=true - ;; - --gdbserver=*) - GDBSERVER=$optarg - ;; - --gdb=*) - GDB=$optarg - ;; - --help|-h|-?) - HELP=true - ;; - --ndk-dir=*) - NDK_DIR=$optarg - ;; - --no-pull-libs) - NO_PULL_LIBS=true - ;; - --package-name=*) - PACKAGE_NAME=$optarg - ;; - --pid=*) - PID=$optarg - ;; - --port=*) - PORT=$optarg - ;; - --privileged) - PRIVILEGED=true - ;; - --privileged=*) - PRIVILEGED=true - PRIVILEGED_INDEX=$optarg - ;; - --program-name=*) - PROGRAM_NAME=$optarg - ;; - --pull-libs) - PULL_LIBS=true - ;; - --pull-libs-dir=*) - PULL_LIBS_DIR=$optarg - ;; - --sandboxed) - SANDBOXED=true - ;; - --sandboxed=*) - SANDBOXED=true - SANDBOXED_INDEX=$optarg - ;; - --script=*) - GDBINIT=$optarg - ;; - --start) - START=true - ;; - --su-prefix=*) - SU_PREFIX=$optarg - ;; - --symbol-dir=*) - SYMBOL_DIR=$optarg - ;; - --out-dir=*) - CHROMIUM_OUT_DIR=$optarg - ;; - --target-arch=*) - TARGET_ARCH=$optarg - ;; - --toolchain=*) - TOOLCHAIN=$optarg - ;; - --ui) - GDBEXEPOSTFIX=gdbtui - ;; - --verbose) - VERBOSE=$(( $VERBOSE + 1 )) - ;; - --debug) - BUILDTYPE=Debug - ;; - --release) - BUILDTYPE=Release - ;; - -*) - panic "Unknown option $OPT, see --help." >&2 - ;; - *) - if [ "$PACKAGE_NAME" ]; then - panic "You can only provide a single package name as argument!\ - See --help." - fi - PACKAGE_NAME=$opt - ;; - esac -done - -print_help_options () { - cat <] - -Attach gdb to a running Android $PROGRAM_NAME process. - -If provided, must be the name of the Android application's -package name to be debugged. You can also use --package-name= to -specify it. -EOF - fi - - cat < option) or a privileged (--privileged or ---privileged=) service. - -This script needs several things to work properly. It will try to pick -them up automatically for you though: - - - target gdbserver binary - - host gdb client (e.g. arm-linux-androideabi-gdb) - - directory with symbolic version of $PROGRAM_NAME's shared libraries. - -You can also use --ndk-dir= to specify an alternative NDK installation -directory. - -The script tries to find the most recent version of the debug version of -shared libraries under one of the following directories: - - \$CHROMIUM_SRC//Release/lib/ (used by Ninja builds) - \$CHROMIUM_SRC//Debug/lib/ (used by Ninja builds) - \$CHROMIUM_SRC//Release/lib.target/ (used by Make builds) - \$CHROMIUM_SRC//Debug/lib.target/ (used by Make builds) - -Where is 'out' by default, unless the --out= option is used or -the CHROMIUM_OUT_DIR environment variable is defined. - -You can restrict this search by using --release or --debug to specify the -build type, or simply use --symbol-dir= to specify the file manually. - -The script tries to extract the target architecture from your target device, -but if this fails, will default to 'arm'. Use --target-arch= to force -its value. - -Otherwise, the script will complain, but you can use the --gdbserver, ---gdb and --symbol-lib options to specify everything manually. - -An alternative to --gdb= is to use --toollchain= to specify -the path to the host target-specific cross-toolchain. - -You will also need the 'adb' tool in your path. Otherwise, use the --adb -option. The script will complain if there is more than one device connected -and ANDROID_SERIAL is not defined. - -The first time you use it on a device, the script will pull many system -libraries required by the process into a temporary directory. This -is done to strongly improve the debugging experience, like allowing -readable thread stacks and more. The libraries are copied to the following -directory by default: - - $DEFAULT_PULL_LIBS_DIR/ - -But you can use the --pull-libs-dir= option to specify an -alternative. The script can detect when you change the connected device, -and will re-pull the libraries only in this case. You can however force it -with the --pull-libs option. - -Any local .gdbinit script will be ignored, but it is possible to pass a -gdb command script with the --script= option. Note that its commands -will be passed to gdb after the remote connection and library symbol -loading have completed. - -Valid options: - --help|-h|-? Print this message. - --verbose Increase verbosity. - - --sandboxed Debug first sandboxed process we find. - --sandboxed= Debug specific sandboxed process. - --symbol-dir= Specify directory with symbol shared libraries. - --out-dir= Specify the out directory. - --package-name= Specify package name (alternative to 1st argument). - --privileged Debug first privileged process we find. - --privileged= Debug specific privileged process. - --program-name= Specify program name (cosmetic only). - --pid= Specify application process pid. - --force Kill any previous debugging session, if any. - --start Start package's activity on device. - --ui Use gdbtui instead of gdb - --activity= Activity name for --start [$DEFAULT_ACTIVITY]. - --annotate= Enable gdb annotation. - --script= Specify extra GDB init script. - - --gdbserver= Specify target gdbserver binary. - --gdb= Specify host gdb client binary. - --target-arch= Specify NDK target arch. - --adb= Specify host ADB binary. - --port= Specify the tcp port to use. - - --su-prefix= Prepend to 'adb shell' commands that are - run by this script. This can be useful to use - the 'su' program on rooted production devices. - e.g. --su-prefix="su -c" - - --pull-libs Force system libraries extraction. - --no-pull-libs Do not extract any system library. - --libs-dir= Specify system libraries extraction directory. - - --debug Use libraries under out/Debug. - --release Use libraries under out/Release. - -EOF - exit 0 -fi - -if [ -z "$PACKAGE_NAME" ]; then - panic "Please specify a package name on the command line. See --help." -fi - -if [ -z "$NDK_DIR" ]; then - ANDROID_NDK_ROOT=$(PYTHONPATH=$CHROMIUM_SRC/build/android python -c \ -'from pylib.constants import ANDROID_NDK_ROOT; print ANDROID_NDK_ROOT,') -else - if [ ! -d "$NDK_DIR" ]; then - panic "Invalid directory: $NDK_DIR" - fi - if [ ! -f "$NDK_DIR/ndk-build" ]; then - panic "Not a valid NDK directory: $NDK_DIR" - fi - ANDROID_NDK_ROOT=$NDK_DIR -fi - -if [ "$GDBINIT" -a ! -f "$GDBINIT" ]; then - panic "Unknown --script file: $GDBINIT" -fi - -# Check that ADB is in our path -if [ -z "$ADB" ]; then - ADB=$(which adb 2>/dev/null) - if [ -z "$ADB" ]; then - panic "Can't find 'adb' tool in your path. Install it or use \ ---adb=" - fi - log "Auto-config: --adb=$ADB" -fi - -# Check that it works minimally -ADB_VERSION=$($ADB version 2>/dev/null) -echo "$ADB_VERSION" | fgrep -q -e "Android Debug Bridge" -if [ $? != 0 ]; then - panic "Your 'adb' tool seems invalid, use --adb= to specify a \ -different one: $ADB" -fi - -# If there are more than one device connected, and ANDROID_SERIAL is not -# defined, print an error message. -NUM_DEVICES_PLUS2=$($ADB devices 2>/dev/null | wc -l) -if [ "$NUM_DEVICES_PLUS2" -lt 3 -a -z "$ANDROID_SERIAL" ]; then - echo "ERROR: There is more than one Android device connected to ADB." - echo "Please define ANDROID_SERIAL to specify which one to use." - exit 1 -fi - -# Run a command through adb shell, strip the extra \r from the output -# and return the correct status code to detect failures. This assumes -# that the adb shell command prints a final \n to stdout. -# $1+: command to run -# Out: command's stdout -# Return: command's status -# Note: the command's stderr is lost -adb_shell () { - local TMPOUT="$(mktemp)" - local LASTLINE RET - local ADB=${ADB:-adb} - - # The weird sed rule is to strip the final \r on each output line - # Since 'adb shell' never returns the command's proper exit/status code, - # we force it to print it as '%%' in the temporary output file, - # which we will later strip from it. - $ADB shell $@ ";" echo "%%\$?" 2>/dev/null | \ - sed -e 's![[:cntrl:]]!!g' > $TMPOUT - # Get last line in log, which contains the exit code from the command - LASTLINE=$(sed -e '$!d' $TMPOUT) - # Extract the status code from the end of the line, which must - # be '%%'. - RET=$(echo "$LASTLINE" | \ - awk '{ if (match($0, "%%[0-9]+$")) { print substr($0,RSTART+2); } }') - # Remove the status code from the last line. Note that this may result - # in an empty line. - LASTLINE=$(echo "$LASTLINE" | \ - awk '{ if (match($0, "%%[0-9]+$")) { print substr($0,1,RSTART-1); } }') - # The output itself: all lines except the status code. - sed -e '$d' $TMPOUT && printf "%s" "$LASTLINE" - # Remove temp file. - rm -f $TMPOUT - # Exit with the appropriate status. - return $RET -} - -# Find the target architecture from the target device. -# This returns an NDK-compatible architecture name. -# out: NDK Architecture name, or empty string. -get_gyp_target_arch () { - local ARCH=$(adb_shell getprop ro.product.cpu.abi) - case $ARCH in - mips|x86|x86_64) echo "$ARCH";; - arm64*) echo "arm64";; - arm*) echo "arm";; - *) echo ""; - esac -} - -if [ -z "$TARGET_ARCH" ]; then - TARGET_ARCH=$(get_gyp_target_arch) - if [ -z "$TARGET_ARCH" ]; then - TARGET_ARCH=arm - fi -else - # Nit: accept Chromium's 'ia32' as a valid target architecture. This - # script prefers the NDK 'x86' name instead because it uses it to find - # NDK-specific files (host gdb) with it. - if [ "$TARGET_ARCH" = "ia32" ]; then - TARGET_ARCH=x86 - log "Auto-config: --arch=$TARGET_ARCH (equivalent to ia32)" - fi -fi - -# Detect the NDK system name, i.e. the name used to identify the host. -# out: NDK system name (e.g. 'linux' or 'darwin') -get_ndk_host_system () { - local HOST_OS - if [ -z "$NDK_HOST_SYSTEM" ]; then - HOST_OS=$(uname -s) - case $HOST_OS in - Linux) NDK_HOST_SYSTEM=linux;; - Darwin) NDK_HOST_SYSTEM=darwin;; - *) panic "You can't run this script on this system: $HOST_OS";; - esac - fi - echo "$NDK_HOST_SYSTEM" -} - -# Detect the NDK host architecture name. -# out: NDK arch name (e.g. 'x86' or 'x86_64') -get_ndk_host_arch () { - local HOST_ARCH HOST_OS - if [ -z "$NDK_HOST_ARCH" ]; then - HOST_OS=$(get_ndk_host_system) - HOST_ARCH=$(uname -p) - case $HOST_ARCH in - i?86) NDK_HOST_ARCH=x86;; - x86_64|amd64) NDK_HOST_ARCH=x86_64;; - *) panic "You can't run this script on this host architecture: $HOST_ARCH";; - esac - # Darwin trick: "uname -p" always returns i386 on 64-bit installations. - if [ "$HOST_OS" = darwin -a "$NDK_HOST_ARCH" = "x86" ]; then - # Use '/usr/bin/file', not just 'file' to avoid buggy MacPorts - # implementations of the tool. See http://b.android.com/53769 - HOST_64BITS=$(/usr/bin/file -L "$SHELL" | grep -e "x86[_-]64") - if [ "$HOST_64BITS" ]; then - NDK_HOST_ARCH=x86_64 - fi - fi - fi - echo "$NDK_HOST_ARCH" -} - -# Convert an NDK architecture name into a GNU configure triplet. -# $1: NDK architecture name (e.g. 'arm') -# Out: Android GNU configure triplet (e.g. 'arm-linux-androideabi') -get_arch_gnu_config () { - case $1 in - arm) - echo "arm-linux-androideabi" - ;; - arm64) - echo "aarch64-linux-android" - ;; - x86) - echo "i686-linux-android" - ;; - x86_64) - echo "x86_64-linux-android" - ;; - mips) - echo "mipsel-linux-android" - ;; - *) - echo "$ARCH-linux-android" - ;; - esac -} - -# Convert an NDK architecture name into a toolchain name prefix -# $1: NDK architecture name (e.g. 'arm') -# Out: NDK toolchain name prefix (e.g. 'arm-linux-androideabi') -get_arch_toolchain_prefix () { - # Return the configure triplet, except for x86! - if [ "$1" = "x86" ]; then - echo "$1" - else - get_arch_gnu_config $1 - fi -} - -# Find a NDK toolchain prebuilt file or sub-directory. -# This will probe the various arch-specific toolchain directories -# in the NDK for the needed file. -# $1: NDK install path -# $2: NDK architecture name -# $3: prebuilt sub-path to look for. -# Out: file path, or empty if none is found. -get_ndk_toolchain_prebuilt () { - local NDK_DIR="${1%/}" - local ARCH="$2" - local SUBPATH="$3" - local NAME="$(get_arch_toolchain_prefix $ARCH)" - local FILE TARGET - FILE=$NDK_DIR/toolchains/$NAME-4.9/prebuilt/$SUBPATH - if [ ! -f "$FILE" ]; then - FILE=$NDK_DIR/toolchains/$NAME-4.8/prebuilt/$SUBPATH - if [ ! -f "$FILE" ]; then - FILE= - fi - fi - echo "$FILE" -} - -# Find the path to an NDK's toolchain full prefix for a given architecture -# $1: NDK install path -# $2: NDK target architecture name -# Out: install path + binary prefix (e.g. -# ".../path/to/bin/arm-linux-androideabi-") -get_ndk_toolchain_fullprefix () { - local NDK_DIR="$1" - local ARCH="$2" - local TARGET NAME HOST_OS HOST_ARCH GCC CONFIG - - # NOTE: This will need to be updated if the NDK changes the names or moves - # the location of its prebuilt toolchains. - # - GCC= - HOST_OS=$(get_ndk_host_system) - HOST_ARCH=$(get_ndk_host_arch) - CONFIG=$(get_arch_gnu_config $ARCH) - GCC=$(get_ndk_toolchain_prebuilt \ - "$NDK_DIR" "$ARCH" "$HOST_OS-$HOST_ARCH/bin/$CONFIG-gcc") - if [ -z "$GCC" -a "$HOST_ARCH" = "x86_64" ]; then - GCC=$(get_ndk_toolchain_prebuilt \ - "$NDK_DIR" "$ARCH" "$HOST_OS-x86/bin/$CONFIG-gcc") - fi - if [ ! -f "$GCC" -a "$ARCH" = "x86" ]; then - # Special case, the x86 toolchain used to be incorrectly - # named i686-android-linux-gcc! - GCC=$(get_ndk_toolchain_prebuilt \ - "$NDK_DIR" "$ARCH" "$HOST_OS-x86/bin/i686-android-linux-gcc") - fi - if [ -z "$GCC" ]; then - panic "Cannot find Android NDK toolchain for '$ARCH' architecture. \ -Please verify your NDK installation!" - fi - echo "${GCC%%gcc}" -} - -# $1: NDK install path -# $2: target architecture. -get_ndk_gdbserver () { - local NDK_DIR="$1" - local ARCH=$2 - local BINARY - - # The location has moved after NDK r8 - BINARY=$NDK_DIR/prebuilt/android-$ARCH/gdbserver/gdbserver - if [ ! -f "$BINARY" ]; then - BINARY=$(get_ndk_toolchain_prebuilt "$NDK_DIR" "$ARCH" gdbserver) - fi - echo "$BINARY" -} - -# Check/probe the path to the Android toolchain installation. Always -# use the NDK versions of gdb and gdbserver. They must match to avoid -# issues when both binaries do not speak the same wire protocol. -# -if [ -z "$TOOLCHAIN" ]; then - ANDROID_TOOLCHAIN=$(get_ndk_toolchain_fullprefix \ - "$ANDROID_NDK_ROOT" "$TARGET_ARCH") - ANDROID_TOOLCHAIN=$(dirname "$ANDROID_TOOLCHAIN") - log "Auto-config: --toolchain=$ANDROID_TOOLCHAIN" -else - # Be flexible, allow one to specify either the install path or the bin - # sub-directory in --toolchain: - # - if [ -d "$TOOLCHAIN/bin" ]; then - TOOLCHAIN=$TOOLCHAIN/bin - fi - ANDROID_TOOLCHAIN=$TOOLCHAIN -fi - -# Cosmetic: Remove trailing directory separator. -ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN%/} - -# Find host GDB client binary -if [ -z "$GDB" ]; then - GDB=$(which $ANDROID_TOOLCHAIN/*-$GDBEXEPOSTFIX 2>/dev/null | head -1) - if [ -z "$GDB" ]; then - panic "Can't find Android gdb client in your path, check your \ ---toolchain or --gdb path." - fi - log "Host gdb client: $GDB" -fi - -# Find gdbserver binary, we will later push it to /data/local/tmp -# This ensures that both gdbserver and $GDB talk the same binary protocol, -# otherwise weird problems will appear. -# -if [ -z "$GDBSERVER" ]; then - GDBSERVER=$(get_ndk_gdbserver "$ANDROID_NDK_ROOT" "$TARGET_ARCH") - if [ -z "$GDBSERVER" ]; then - panic "Can't find NDK gdbserver binary. use --gdbserver to specify \ -valid one!" - fi - log "Auto-config: --gdbserver=$GDBSERVER" -fi - -# A unique ID for this script's session. This needs to be the same in all -# sub-shell commands we're going to launch, so take the PID of the launcher -# process. -TMP_ID=$$ - -# Temporary directory, will get cleaned up on exit. -TMPDIR=/tmp/$USER-adb-gdb-tmp-$TMP_ID -mkdir -p "$TMPDIR" && rm -rf "$TMPDIR"/* - -GDBSERVER_PIDFILE="$TMPDIR"/gdbserver-$TMP_ID.pid - -# If --force is specified, try to kill any gdbserver process started by the -# same user on the device. Normally, these are killed automatically by the -# script on exit, but there are a few corner cases where this would still -# be needed. -if [ "$FORCE" ]; then - GDBSERVER_PIDS=$(adb_shell ps | awk '$9 ~ /gdbserver/ { print $2; }') - for GDB_PID in $GDBSERVER_PIDS; do - log "Killing previous gdbserver (PID=$GDB_PID)" - adb_shell kill -9 $GDB_PID - done -fi - -if [ "$START" ]; then - log "Starting $PROGRAM_NAME on device." - adb_shell am start -n $PACKAGE_NAME/$ACTIVITY 2>/dev/null - adb_shell ps | grep -q $PACKAGE_NAME - fail_panic "Could not start $PROGRAM_NAME on device. Are you sure the \ -package is installed?" -fi - -# Return the timestamp of a given time, as number of seconds since epoch. -# $1: file path -# Out: file timestamp -get_file_timestamp () { - stat -c %Y "$1" 2>/dev/null -} - -# Detect the build type and symbol directory. This is done by finding -# the most recent sub-directory containing debug shared libraries under -# $CHROMIUM_SRC/$CHROMIUM_OUT_DIR/ -# -# $1: $BUILDTYPE value, can be empty -# Out: nothing, but this sets SYMBOL_DIR -# -detect_symbol_dir () { - local SUBDIRS SUBDIR LIST DIR DIR_LIBS TSTAMP - # Note: Ninja places debug libraries under out/$BUILDTYPE/lib/, while - # Make places then under out/$BUILDTYPE/lib.target. - if [ "$1" ]; then - SUBDIRS="$1/lib $1/lib.target" - else - SUBDIRS="Release/lib Debug/lib Release/lib.target Debug/lib.target" - fi - LIST=$TMPDIR/scan-subdirs-$$.txt - printf "" > "$LIST" - for SUBDIR in $SUBDIRS; do - DIR=$CHROMIUM_SRC/$CHROMIUM_OUT_DIR/$SUBDIR - if [ -d "$DIR" ]; then - # Ignore build directories that don't contain symbol versions - # of the shared libraries. - DIR_LIBS=$(ls "$DIR"/lib*.so 2>/dev/null) - if [ -z "$DIR_LIBS" ]; then - echo "No shared libs: $DIR" - continue - fi - TSTAMP=$(get_file_timestamp "$DIR") - printf "%s %s\n" "$TSTAMP" "$SUBDIR" >> "$LIST" - fi - done - SUBDIR=$(cat $LIST | sort -r | head -1 | cut -d" " -f2) - rm -f "$LIST" - - if [ -z "$SUBDIR" ]; then - if [ -z "$1" ]; then - panic "Could not find any build directory under \ -$CHROMIUM_SRC/$CHROMIUM_OUT_DIR. Please build the program first!" - else - panic "Could not find any $1 directory under \ -$CHROMIUM_SRC/$CHROMIUM_OUT_DIR. Check your build type!" - fi - fi - - SYMBOL_DIR=$CHROMIUM_SRC/$CHROMIUM_OUT_DIR/$SUBDIR - log "Auto-config: --symbol-dir=$SYMBOL_DIR" -} - -if [ -z "$SYMBOL_DIR" ]; then - detect_symbol_dir "$BUILDTYPE" -fi - -# Allow several concurrent debugging sessions -TARGET_GDBSERVER=/data/data/$PACKAGE_NAME/gdbserver-adb-gdb-$TMP_ID -TMP_TARGET_GDBSERVER=/data/local/tmp/gdbserver-adb-gdb-$TMP_ID - -# Return the build fingerprint contained in a build.prop file. -# $1: path to build.prop file -get_build_fingerprint_from () { - cat "$1" | grep -e '^ro.build.fingerprint=' | cut -d= -f2 -} - - -ORG_PULL_LIBS_DIR=$PULL_LIBS_DIR -PULL_LIBS_DIR=${PULL_LIBS_DIR:-$DEFAULT_PULL_LIBS_DIR} - -HOST_FINGERPRINT= -DEVICE_FINGERPRINT=$(adb_shell getprop ro.build.fingerprint) -log "Device build fingerprint: $DEVICE_FINGERPRINT" - -# If --pull-libs-dir is not specified, and this is a platform build, look -# if we can use the symbolic libraries under $ANDROID_PRODUCT_OUT/symbols/ -# directly, if the build fingerprint matches the device. -if [ -z "$ORG_PULL_LIBS_DIR" -a \ - "$ANDROID_PRODUCT_OUT" -a \ - -f "$ANDROID_PRODUCT_OUT/system/build.prop" ]; then - ANDROID_FINGERPRINT=$(get_build_fingerprint_from \ - "$ANDROID_PRODUCT_OUT"/system/build.prop) - log "Android build fingerprint: $ANDROID_FINGERPRINT" - if [ "$ANDROID_FINGERPRINT" = "$DEVICE_FINGERPRINT" ]; then - log "Perfect match!" - PULL_LIBS_DIR=$ANDROID_PRODUCT_OUT/symbols - HOST_FINGERPRINT=$ANDROID_FINGERPRINT - if [ "$PULL_LIBS" ]; then - log "Ignoring --pull-libs since the device and platform build \ -fingerprints match." - NO_PULL_LIBS=true - fi - fi -fi - -# If neither --pull-libs an --no-pull-libs were specified, check the build -# fingerprints of the device, and the cached system libraries on the host. -# -if [ -z "$NO_PULL_LIBS" -a -z "$PULL_LIBS" ]; then - if [ ! -f "$PULL_LIBS_DIR/build.prop" ]; then - log "Auto-config: --pull-libs (no cached libraries)" - PULL_LIBS=true - else - HOST_FINGERPRINT=$(get_build_fingerprint_from "$PULL_LIBS_DIR/build.prop") - log "Host build fingerprint: $HOST_FINGERPRINT" - if [ "$HOST_FINGERPRINT" == "$DEVICE_FINGERPRINT" ]; then - log "Auto-config: --no-pull-libs (fingerprint match)" - NO_PULL_LIBS=true - else - log "Auto-config: --pull-libs (fingerprint mismatch)" - PULL_LIBS=true - fi - fi -fi - -# Extract the system libraries from the device if necessary. -if [ "$PULL_LIBS" -a -z "$NO_PULL_LIBS" ]; then - echo "Extracting system libraries into: $PULL_LIBS_DIR" -fi - -mkdir -p "$PULL_LIBS_DIR" -fail_panic "Can't create --libs-dir directory: $PULL_LIBS_DIR" - -# If requested, work for M-x gdb. The gdb indirections make it -# difficult to pass --annotate=3 to the gdb binary itself. -GDB_ARGS= -if [ "$ANNOTATE" ]; then - GDB_ARGS=$GDB_ARGS" --annotate=$ANNOTATE" -fi - -# Get the PID from the first argument or else find the PID of the -# browser process. -if [ -z "$PID" ]; then - PROCESSNAME=$PACKAGE_NAME - if [ "$SANDBOXED_INDEX" ]; then - PROCESSNAME=$PROCESSNAME:sandboxed_process$SANDBOXED_INDEX - elif [ "$SANDBOXED" ]; then - PROCESSNAME=$PROCESSNAME:sandboxed_process - PID=$(adb_shell ps | \ - awk '$9 ~ /^'$PROCESSNAME'/ { print $2; }' | head -1) - elif [ "$PRIVILEGED_INDEX" ]; then - PROCESSNAME=$PROCESSNAME:privileged_process$PRIVILEGED_INDEX - elif [ "$PRIVILEGED" ]; then - PROCESSNAME=$PROCESSNAME:privileged_process - PID=$(adb_shell ps | \ - awk '$9 ~ /^'$PROCESSNAME'/ { print $2; }' | head -1) - fi - if [ -z "$PID" ]; then - PID=$(adb_shell ps | \ - awk '$9 == "'$PROCESSNAME'" { print $2; }' | head -1) - fi - if [ -z "$PID" ]; then - if [ "$START" ]; then - panic "Can't find application process PID, did it crash?" - else - panic "Can't find application process PID, are you sure it is \ -running? Try using --start." - fi - fi - log "Found process PID: $PID" -elif [ "$SANDBOXED" ]; then - echo "WARNING: --sandboxed option ignored due to use of --pid." -elif [ "$PRIVILEGED" ]; then - echo "WARNING: --privileged option ignored due to use of --pid." -fi - -# Determine if 'adb shell' runs as root or not. -# If so, we can launch gdbserver directly, otherwise, we have to -# use run-as $PACKAGE_NAME ..., which requires the package to be debuggable. -# -if [ "$SU_PREFIX" ]; then - # Need to check that this works properly. - SU_PREFIX_TEST_LOG=$TMPDIR/su-prefix.log - adb_shell $SU_PREFIX \"echo "foo"\" > $SU_PREFIX_TEST_LOG 2>&1 - if [ $? != 0 -o "$(cat $SU_PREFIX_TEST_LOG)" != "foo" ]; then - echo "ERROR: Cannot use '$SU_PREFIX' as a valid su prefix:" - echo "$ adb shell $SU_PREFIX \"echo foo\"" - cat $SU_PREFIX_TEST_LOG - exit 1 - fi - COMMAND_PREFIX="$SU_PREFIX \"" - COMMAND_SUFFIX="\"" -else - SHELL_UID=$(adb shell cat /proc/self/status | \ - awk '$1 == "Uid:" { print $2; }') - log "Shell UID: $SHELL_UID" - if [ "$SHELL_UID" != 0 -o -n "$NO_ROOT" ]; then - COMMAND_PREFIX="run-as $PACKAGE_NAME" - COMMAND_SUFFIX= - else - COMMAND_PREFIX= - COMMAND_SUFFIX= - fi -fi -log "Command prefix: '$COMMAND_PREFIX'" -log "Command suffix: '$COMMAND_SUFFIX'" - -# Pull device's system libraries that are mapped by our process. -# Pulling all system libraries is too long, so determine which ones -# we need by looking at /proc/$PID/maps instead -if [ "$PULL_LIBS" -a -z "$NO_PULL_LIBS" ]; then - echo "Extracting system libraries into: $PULL_LIBS_DIR" - rm -f $PULL_LIBS_DIR/build.prop - MAPPINGS=$(adb_shell $COMMAND_PREFIX cat /proc/$PID/maps $COMMAND_SUFFIX) - if [ $? != 0 ]; then - echo "ERROR: Could not list process's memory mappings." - if [ "$SU_PREFIX" ]; then - panic "Are you sure your --su-prefix is correct?" - else - panic "Use --su-prefix if the application is not debuggable." - fi - fi - SYSTEM_LIBS=$(echo "$MAPPINGS" | \ - awk '$6 ~ /\/system\/.*\.so$/ { print $6; }' | sort -u) - for SYSLIB in /system/bin/linker $SYSTEM_LIBS; do - echo "Pulling from device: $SYSLIB" - DST_FILE=$PULL_LIBS_DIR$SYSLIB - DST_DIR=$(dirname "$DST_FILE") - mkdir -p "$DST_DIR" && adb pull $SYSLIB "$DST_FILE" 2>/dev/null - fail_panic "Could not pull $SYSLIB from device !?" - done - echo "Pulling device build.prop" - adb pull /system/build.prop $PULL_LIBS_DIR/build.prop - fail_panic "Could not pull device build.prop !?" -fi - -# Find all the sub-directories of $PULL_LIBS_DIR, up to depth 4 -# so we can add them to solib-search-path later. -SOLIB_DIRS=$(find $PULL_LIBS_DIR -mindepth 1 -maxdepth 4 -type d | \ - grep -v "^$" | tr '\n' ':') - -# This is a re-implementation of gdbclient, where we use compatible -# versions of gdbserver and $GDBNAME to ensure that everything works -# properly. -# - -# Push gdbserver to the device -log "Pushing gdbserver $GDBSERVER to $TARGET_GDBSERVER" -adb push $GDBSERVER $TMP_TARGET_GDBSERVER &>/dev/null -adb shell $COMMAND_PREFIX cp $TMP_TARGET_GDBSERVER $TARGET_GDBSERVER -adb shell rm $TMP_TARGET_GDBSERVER -fail_panic "Could not copy gdbserver to the device!" - -if [ -z "$PORT" ]; then - PORT=5039 -fi -HOST_PORT=$PORT -TARGET_PORT=$PORT - -# Select correct app_process for architecture. -case $TARGET_ARCH in - arm|x86|mips) GDBEXEC=app_process;; - arm64|x86_64) GDBEXEC=app_process64;; - *) fail_panic "Unknown app_process for architecture!";; -esac - -# Detect AddressSanitizer setup on the device. In that case app_process is a -# script, and the real executable is app_process.real. -GDBEXEC_ASAN=app_process.real -adb_shell ls /system/bin/$GDBEXEC_ASAN -if [ $? == 0 ]; then - GDBEXEC=$GDBEXEC_ASAN -fi - -# Pull the app_process binary from the device. -log "Pulling $GDBEXEC from device" -adb pull /system/bin/$GDBEXEC "$TMPDIR"/$GDBEXEC &>/dev/null -fail_panic "Could not retrieve $GDBEXEC from the device!" - -# Setup network redirection -log "Setting network redirection (host:$HOST_PORT -> device:$TARGET_PORT)" -adb forward tcp:$HOST_PORT tcp:$TARGET_PORT -fail_panic "Could not setup network redirection from \ -host:localhost:$HOST_PORT to device:localhost:$TARGET_PORT!" - -# Start gdbserver in the background -# Note that using run-as requires the package to be debuggable. -# -# If not, this will fail horribly. The alternative is to run the -# program as root, which requires of course root privileges. -# Maybe we should add a --root option to enable this? -# -log "Starting gdbserver in the background:" -GDBSERVER_LOG=$TMPDIR/gdbserver-$TMP_ID.log -log "adb shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \ ---attach $PID $COMMAND_SUFFIX" -("$ADB" shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \ - --attach $PID $COMMAND_SUFFIX > $GDBSERVER_LOG 2>&1) & -GDBSERVER_PID=$! -echo "$GDBSERVER_PID" > $GDBSERVER_PIDFILE -log "background job pid: $GDBSERVER_PID" - -# Check that it is still running after a few seconds. If not, this means we -# could not properly attach to it -sleep 2 -log "Job control: $(jobs -l)" -STATE=$(jobs -l | awk '$2 == "'$GDBSERVER_PID'" { print $3; }') -if [ "$STATE" != "Running" ]; then - echo "ERROR: GDBServer could not attach to PID $PID!" - if [ $(adb_shell su -c getenforce) != "Permissive" ]; then - echo "Device mode is Enforcing. Changing Device mode to Permissive " - $(adb_shell su -c setenforce 0) - if [ $(adb_shell su -c getenforce) != "Permissive" ]; then - echo "ERROR: Failed to Change Device mode to Permissive" - echo "Failure log (use --verbose for more information):" - cat $GDBSERVER_LOG - exit 1 - fi - else - echo "Failure log (use --verbose for more information):" - cat $GDBSERVER_LOG - exit 1 - fi -fi - -# Generate a file containing useful GDB initialization commands -readonly COMMANDS=$TMPDIR/gdb.init -log "Generating GDB initialization commands file: $COMMANDS" -echo -n "" > $COMMANDS -echo "set print pretty 1" >> $COMMANDS -echo "python" >> $COMMANDS -echo "import sys" >> $COMMANDS -echo "sys.path.insert(0, '$CHROMIUM_SRC/tools/gdb/')" >> $COMMANDS -echo "try:" >> $COMMANDS -echo " import gdb_chrome" >> $COMMANDS -echo "finally:" >> $COMMANDS -echo " sys.path.pop(0)" >> $COMMANDS -echo "end" >> $COMMANDS -echo "file $TMPDIR/$GDBEXEC" >> $COMMANDS -echo "directory $CHROMIUM_SRC" >> $COMMANDS -echo "set solib-absolute-prefix $PULL_LIBS_DIR" >> $COMMANDS -echo "set solib-search-path $SOLIB_DIRS:$PULL_LIBS_DIR:$SYMBOL_DIR" \ - >> $COMMANDS -echo "echo Attaching and reading symbols, this may take a while.." \ - >> $COMMANDS -echo "target remote :$HOST_PORT" >> $COMMANDS - -if [ "$GDBINIT" ]; then - cat "$GDBINIT" >> $COMMANDS -fi - -if [ "$VERBOSE" -gt 0 ]; then - echo "### START $COMMANDS" - cat $COMMANDS - echo "### END $COMMANDS" -fi - -log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" -$GDB $GDB_ARGS -x $COMMANDS && -rm -f "$GDBSERVER_PIDFILE" diff --git a/engine/src/flutter/build/android/adb_gdb_android_webview_shell b/engine/src/flutter/build/android/adb_gdb_android_webview_shell deleted file mode 100755 index f685fda77c..0000000000 --- a/engine/src/flutter/build/android/adb_gdb_android_webview_shell +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# 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. -# -# Attach to or start a ContentShell process and debug it. -# See --help for details. -# -PROGDIR=$(dirname "$0") -export ADB_GDB_PROGNAME=$(basename "$0") -export ADB_GDB_ACTIVITY=.AwShellActivity -"$PROGDIR"/adb_gdb \ - --program-name=AwShellApplication \ - --package-name=org.chromium.android_webview.shell \ - "$@" diff --git a/engine/src/flutter/build/android/adb_gdb_chrome_public b/engine/src/flutter/build/android/adb_gdb_chrome_public deleted file mode 100755 index 4366c838e7..0000000000 --- a/engine/src/flutter/build/android/adb_gdb_chrome_public +++ /dev/null @@ -1,16 +0,0 @@ -#!/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. -# -# Attach to or start a ChromePublic process and debug it. -# See --help for details. -# -PROGDIR=$(dirname "$0") -export ADB_GDB_PROGNAME=$(basename "$0") -export ADB_GDB_ACTIVITY=com.google.android.apps.chrome.Main -"$PROGDIR"/adb_gdb \ - --program-name=ChromePublic \ - --package-name=org.chromium.chrome \ - "$@" diff --git a/engine/src/flutter/build/android/adb_gdb_chrome_shell b/engine/src/flutter/build/android/adb_gdb_chrome_shell deleted file mode 100755 index e5c8a306be..0000000000 --- a/engine/src/flutter/build/android/adb_gdb_chrome_shell +++ /dev/null @@ -1,16 +0,0 @@ -#!/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. -# -# Attach to or start a ChromeShell process and debug it. -# See --help for details. -# -PROGDIR=$(dirname "$0") -export ADB_GDB_PROGNAME=$(basename "$0") -export ADB_GDB_ACTIVITY=.ChromeShellActivity -"$PROGDIR"/adb_gdb \ - --program-name=ChromeShell \ - --package-name=org.chromium.chrome.shell \ - "$@" diff --git a/engine/src/flutter/build/android/adb_gdb_content_shell b/engine/src/flutter/build/android/adb_gdb_content_shell deleted file mode 100755 index 18e1a61d89..0000000000 --- a/engine/src/flutter/build/android/adb_gdb_content_shell +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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. -# -# Attach to or start a ContentShell process and debug it. -# See --help for details. -# -PROGDIR=$(dirname "$0") -export ADB_GDB_PROGNAME=$(basename "$0") -export ADB_GDB_ACTIVITY=.ContentShellActivity -"$PROGDIR"/adb_gdb \ - --program-name=ContentShell \ - --package-name=org.chromium.content_shell_apk \ - "$@" diff --git a/engine/src/flutter/build/android/adb_gdb_cronet_sample b/engine/src/flutter/build/android/adb_gdb_cronet_sample deleted file mode 100755 index 8d0c864d13..0000000000 --- a/engine/src/flutter/build/android/adb_gdb_cronet_sample +++ /dev/null @@ -1,16 +0,0 @@ -#!/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. -# -# Attach to or start a ContentShell process and debug it. -# See --help for details. -# -PROGDIR=$(dirname "$0") -export ADB_GDB_PROGNAME=$(basename "$0") -export ADB_GDB_ACTIVITY=.CronetSampleActivity -"$PROGDIR"/adb_gdb \ - --program-name=CronetSample \ - --package-name=org.chromium.cronet_sample_apk \ - "$@" diff --git a/engine/src/flutter/build/android/adb_gdb_mojo_shell b/engine/src/flutter/build/android/adb_gdb_mojo_shell deleted file mode 100755 index ba91149cce..0000000000 --- a/engine/src/flutter/build/android/adb_gdb_mojo_shell +++ /dev/null @@ -1,16 +0,0 @@ -#!/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. -# -# Attach to or start a ContentShell process and debug it. -# See --help for details. -# -PROGDIR=$(dirname "$0") -export ADB_GDB_PROGNAME=$(basename "$0") -export ADB_GDB_ACTIVITY=.MojoShellActivity -"$PROGDIR"/adb_gdb \ - --program-name=MojoShell \ - --package-name=org.chromium.mojo_shell_apk \ - "$@" diff --git a/engine/src/flutter/build/android/adb_install_apk.py b/engine/src/flutter/build/android/adb_install_apk.py deleted file mode 100755 index 50faea7d29..0000000000 --- a/engine/src/flutter/build/android/adb_install_apk.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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 script to install APKs from the command line quickly.""" - -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 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') - 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.') - 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() - - run_tests_helper.SetLogLevel(args.verbose) - constants.SetBuildType(args.build_type) - - 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 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 args.device: - devices = [d for d in devices if d == args.device] - if not devices: - raise device_errors.DeviceUnreachableError(args.device) - elif not devices: - raise device_errors.NoDevicesError() - - 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()) - diff --git a/engine/src/flutter/build/android/adb_kill_android_webview_shell b/engine/src/flutter/build/android/adb_kill_android_webview_shell deleted file mode 100755 index 5f287f0826..0000000000 --- a/engine/src/flutter/build/android/adb_kill_android_webview_shell +++ /dev/null @@ -1,24 +0,0 @@ -#!/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. -# -# Kill a running android webview shell. -# -# Assumes you have sourced the build/android/envsetup.sh script. - -SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.android_webview.shell') -VAL=$(echo "$SHELL_PID_LINES" | wc -l) -if [ $VAL -lt 1 ] ; then - echo "Not running android webview shell." -else - SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') - if [ "$SHELL_PID" != "" ] ; then - set -x - adb shell kill $SHELL_PID - set - - else - echo "Android webview shell does not appear to be running." - fi -fi diff --git a/engine/src/flutter/build/android/adb_kill_chrome_public b/engine/src/flutter/build/android/adb_kill_chrome_public deleted file mode 100755 index 5b539a043d..0000000000 --- a/engine/src/flutter/build/android/adb_kill_chrome_public +++ /dev/null @@ -1,24 +0,0 @@ -#!/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. -# -# Kill a running instance of ChromePublic. -# -# Assumes you have sourced the build/android/envsetup.sh script. - -SHELL_PID_LINES=$(adb shell ps | grep -w 'org.chromium.chrome') -VAL=$(echo "$SHELL_PID_LINES" | wc -l) -if [ $VAL -lt 1 ] ; then - echo "Not running ChromePublic." -else - SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') - if [ "$SHELL_PID" != "" ] ; then - set -x - adb shell kill $SHELL_PID - set - - else - echo "ChromePublic does not appear to be running." - fi -fi diff --git a/engine/src/flutter/build/android/adb_kill_chrome_shell b/engine/src/flutter/build/android/adb_kill_chrome_shell deleted file mode 100755 index 2b63c9af3d..0000000000 --- a/engine/src/flutter/build/android/adb_kill_chrome_shell +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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. -# -# Kill a running chrome shell. -# -# Assumes you have sourced the build/android/envsetup.sh script. - -SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.chrome.shell') -VAL=$(echo "$SHELL_PID_LINES" | wc -l) -if [ $VAL -lt 1 ] ; then - echo "Not running Chrome shell." -else - SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') - if [ "$SHELL_PID" != "" ] ; then - set -x - adb shell kill $SHELL_PID - set - - else - echo "Chrome shell does not appear to be running." - fi -fi diff --git a/engine/src/flutter/build/android/adb_kill_content_shell b/engine/src/flutter/build/android/adb_kill_content_shell deleted file mode 100755 index e379dd4714..0000000000 --- a/engine/src/flutter/build/android/adb_kill_content_shell +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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. -# -# Kill a running content shell. -# -# Assumes you have sourced the build/android/envsetup.sh script. - -SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.content_shell_apk') -VAL=$(echo "$SHELL_PID_LINES" | wc -l) -if [ $VAL -lt 1 ] ; then - echo "Not running Content shell." -else - SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') - if [ "$SHELL_PID" != "" ] ; then - set -x - adb shell kill $SHELL_PID - set - - else - echo "Content shell does not appear to be running." - fi -fi diff --git a/engine/src/flutter/build/android/adb_logcat_monitor.py b/engine/src/flutter/build/android/adb_logcat_monitor.py deleted file mode 100755 index d3cc67dbcc..0000000000 --- a/engine/src/flutter/build/android/adb_logcat_monitor.py +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""Saves logcats from all connected devices. - -Usage: adb_logcat_monitor.py [] - -This script will repeatedly poll adb for new devices and save logcats -inside the directory, which it attempts to create. The -script will run until killed by an external signal. To test, run the -script in a shell and -C it after a while. It should be -resilient across phone disconnects and reconnects and start the logcat -early enough to not miss anything. -""" - -import logging -import os -import re -import shutil -import signal -import subprocess -import sys -import time - -# Map from device_id -> (process, logcat_num) -devices = {} - - -class TimeoutException(Exception): - """Exception used to signal a timeout.""" - pass - - -class SigtermError(Exception): - """Exception used to catch a sigterm.""" - pass - - -def StartLogcatIfNecessary(device_id, adb_cmd, base_dir): - """Spawns a adb logcat process if one is not currently running.""" - process, logcat_num = devices[device_id] - if process: - if process.poll() is None: - # Logcat process is still happily running - return - else: - logging.info('Logcat for device %s has died', device_id) - error_filter = re.compile('- waiting for device -') - for line in process.stderr: - if not error_filter.match(line): - logging.error(device_id + ': ' + line) - - logging.info('Starting logcat %d for device %s', logcat_num, - device_id) - logcat_filename = 'logcat_%s_%03d' % (device_id, logcat_num) - logcat_file = open(os.path.join(base_dir, logcat_filename), 'w') - process = subprocess.Popen([adb_cmd, '-s', device_id, - 'logcat', '-v', 'threadtime'], - stdout=logcat_file, - stderr=subprocess.PIPE) - devices[device_id] = (process, logcat_num + 1) - - -def GetAttachedDevices(adb_cmd): - """Gets the device list from adb. - - We use an alarm in this function to avoid deadlocking from an external - dependency. - - Args: - adb_cmd: binary to run adb - - Returns: - list of devices or an empty list on timeout - """ - signal.alarm(2) - try: - out, err = subprocess.Popen([adb_cmd, 'devices'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() - if err: - logging.warning('adb device error %s', err.strip()) - return re.findall('^(\\S+)\tdevice$', out, re.MULTILINE) - except TimeoutException: - logging.warning('"adb devices" command timed out') - return [] - except (IOError, OSError): - logging.exception('Exception from "adb devices"') - return [] - finally: - signal.alarm(0) - - -def main(base_dir, adb_cmd='adb'): - """Monitor adb forever. Expects a SIGINT (Ctrl-C) to kill.""" - # We create the directory to ensure 'run once' semantics - if os.path.exists(base_dir): - print 'adb_logcat_monitor: %s already exists? Cleaning' % base_dir - shutil.rmtree(base_dir, ignore_errors=True) - - os.makedirs(base_dir) - logging.basicConfig(filename=os.path.join(base_dir, 'eventlog'), - level=logging.INFO, - format='%(asctime)-2s %(levelname)-8s %(message)s') - - # Set up the alarm for calling 'adb devices'. This is to ensure - # our script doesn't get stuck waiting for a process response - def TimeoutHandler(_signum, _unused_frame): - raise TimeoutException() - signal.signal(signal.SIGALRM, TimeoutHandler) - - # Handle SIGTERMs to ensure clean shutdown - def SigtermHandler(_signum, _unused_frame): - raise SigtermError() - signal.signal(signal.SIGTERM, SigtermHandler) - - logging.info('Started with pid %d', os.getpid()) - pid_file_path = os.path.join(base_dir, 'LOGCAT_MONITOR_PID') - - try: - with open(pid_file_path, 'w') as f: - f.write(str(os.getpid())) - while True: - for device_id in GetAttachedDevices(adb_cmd): - if not device_id in devices: - subprocess.call([adb_cmd, '-s', device_id, 'logcat', '-c']) - devices[device_id] = (None, 0) - - for device in devices: - # This will spawn logcat watchers for any device ever detected - StartLogcatIfNecessary(device, adb_cmd, base_dir) - - time.sleep(5) - except SigtermError: - logging.info('Received SIGTERM, shutting down') - except: # pylint: disable=bare-except - logging.exception('Unexpected exception in main.') - finally: - for process, _ in devices.itervalues(): - if process: - try: - process.terminate() - except OSError: - pass - os.remove(pid_file_path) - - -if __name__ == '__main__': - if 2 <= len(sys.argv) <= 3: - print 'adb_logcat_monitor: Initializing' - sys.exit(main(*sys.argv[1:3])) - - print 'Usage: %s []' % sys.argv[0] diff --git a/engine/src/flutter/build/android/adb_logcat_printer.py b/engine/src/flutter/build/android/adb_logcat_printer.py deleted file mode 100755 index 55176ab920..0000000000 --- a/engine/src/flutter/build/android/adb_logcat_printer.py +++ /dev/null @@ -1,213 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""Shutdown adb_logcat_monitor and print accumulated logs. - -To test, call './adb_logcat_printer.py ' where - contains 'adb logcat -v threadtime' files named as -logcat__ - -The script will print the files to out, and will combine multiple -logcats from a single device if there is overlap. - -Additionally, if a /LOGCAT_MONITOR_PID exists, the script -will attempt to terminate the contained PID by sending a SIGINT and -monitoring for the deletion of the aforementioned file. -""" -# pylint: disable=W0702 - -import cStringIO -import logging -import optparse -import os -import re -import signal -import sys -import time - - -# Set this to debug for more verbose output -LOG_LEVEL = logging.INFO - - -def CombineLogFiles(list_of_lists, logger): - """Splices together multiple logcats from the same device. - - Args: - list_of_lists: list of pairs (filename, list of timestamped lines) - logger: handler to log events - - Returns: - list of lines with duplicates removed - """ - cur_device_log = [''] - for cur_file, cur_file_lines in list_of_lists: - # Ignore files with just the logcat header - if len(cur_file_lines) < 2: - continue - common_index = 0 - # Skip this step if list just has empty string - if len(cur_device_log) > 1: - try: - line = cur_device_log[-1] - # Used to make sure we only splice on a timestamped line - if re.match(r'^\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} ', line): - common_index = cur_file_lines.index(line) - else: - logger.warning('splice error - no timestamp in "%s"?', line.strip()) - except ValueError: - # The last line was valid but wasn't found in the next file - cur_device_log += ['***** POSSIBLE INCOMPLETE LOGCAT *****'] - logger.info('Unable to splice %s. Incomplete logcat?', cur_file) - - cur_device_log += ['*'*30 + ' %s' % cur_file] - cur_device_log.extend(cur_file_lines[common_index:]) - - return cur_device_log - - -def FindLogFiles(base_dir): - """Search a directory for logcat files. - - Args: - base_dir: directory to search - - Returns: - Mapping of device_id to a sorted list of file paths for a given device - """ - logcat_filter = re.compile(r'^logcat_(\S+)_(\d+)$') - # list of tuples (, , ) - filtered_list = [] - for cur_file in os.listdir(base_dir): - matcher = logcat_filter.match(cur_file) - if matcher: - filtered_list += [(matcher.group(1), int(matcher.group(2)), - os.path.join(base_dir, cur_file))] - filtered_list.sort() - file_map = {} - for device_id, _, cur_file in filtered_list: - if device_id not in file_map: - file_map[device_id] = [] - - file_map[device_id] += [cur_file] - return file_map - - -def GetDeviceLogs(log_filenames, logger): - """Read log files, combine and format. - - Args: - log_filenames: mapping of device_id to sorted list of file paths - logger: logger handle for logging events - - Returns: - list of formatted device logs, one for each device. - """ - device_logs = [] - - for device, device_files in log_filenames.iteritems(): - logger.debug('%s: %s', device, str(device_files)) - device_file_lines = [] - for cur_file in device_files: - with open(cur_file) as f: - device_file_lines += [(cur_file, f.read().splitlines())] - combined_lines = CombineLogFiles(device_file_lines, logger) - # Prepend each line with a short unique ID so it's easy to see - # when the device changes. We don't use the start of the device - # ID because it can be the same among devices. Example lines: - # AB324: foo - # AB324: blah - device_logs += [('\n' + device[-5:] + ': ').join(combined_lines)] - return device_logs - - -def ShutdownLogcatMonitor(base_dir, logger): - """Attempts to shutdown adb_logcat_monitor and blocks while waiting.""" - try: - monitor_pid_path = os.path.join(base_dir, 'LOGCAT_MONITOR_PID') - with open(monitor_pid_path) as f: - monitor_pid = int(f.readline()) - - logger.info('Sending SIGTERM to %d', monitor_pid) - os.kill(monitor_pid, signal.SIGTERM) - i = 0 - while True: - time.sleep(.2) - if not os.path.exists(monitor_pid_path): - return - if not os.path.exists('/proc/%d' % monitor_pid): - logger.warning('Monitor (pid %d) terminated uncleanly?', monitor_pid) - return - logger.info('Waiting for logcat process to terminate.') - i += 1 - if i >= 10: - logger.warning('Monitor pid did not terminate. Continuing anyway.') - return - - except (ValueError, IOError, OSError): - logger.exception('Error signaling logcat monitor - continuing') - - -def main(argv): - parser = optparse.OptionParser(usage='Usage: %prog [options] ') - parser.add_option('--output-path', - help='Output file path (if unspecified, prints to stdout)') - options, args = parser.parse_args(argv) - if len(args) != 1: - parser.error('Wrong number of unparsed args') - base_dir = args[0] - if options.output_path: - output_file = open(options.output_path, 'w') - else: - output_file = sys.stdout - - log_stringio = cStringIO.StringIO() - logger = logging.getLogger('LogcatPrinter') - logger.setLevel(LOG_LEVEL) - sh = logging.StreamHandler(log_stringio) - sh.setFormatter(logging.Formatter('%(asctime)-2s %(levelname)-8s' - ' %(message)s')) - logger.addHandler(sh) - - try: - # Wait at least 5 seconds after base_dir is created before printing. - # - # The idea is that 'adb logcat > file' output consists of 2 phases: - # 1 Dump all the saved logs to the file - # 2 Stream log messages as they are generated - # - # We want to give enough time for phase 1 to complete. There's no - # good method to tell how long to wait, but it usually only takes a - # second. On most bots, this code path won't occur at all, since - # adb_logcat_monitor.py command will have spawned more than 5 seconds - # prior to called this shell script. - try: - sleep_time = 5 - (time.time() - os.path.getctime(base_dir)) - except OSError: - sleep_time = 5 - if sleep_time > 0: - logger.warning('Monitor just started? Sleeping %.1fs', sleep_time) - time.sleep(sleep_time) - - assert os.path.exists(base_dir), '%s does not exist' % base_dir - ShutdownLogcatMonitor(base_dir, logger) - separator = '\n' + '*' * 80 + '\n\n' - for log in GetDeviceLogs(FindLogFiles(base_dir), logger): - output_file.write(log) - output_file.write(separator) - with open(os.path.join(base_dir, 'eventlog')) as f: - output_file.write('\nLogcat Monitor Event Log\n') - output_file.write(f.read()) - except: - logger.exception('Unexpected exception') - - logger.info('Done.') - sh.flush() - output_file.write('\nLogcat Printer Event Log\n') - output_file.write(log_stringio.getvalue()) - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/adb_profile_chrome b/engine/src/flutter/build/android/adb_profile_chrome deleted file mode 100755 index 21f6faf7b9..0000000000 --- a/engine/src/flutter/build/android/adb_profile_chrome +++ /dev/null @@ -1,8 +0,0 @@ -#!/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. -# -# Start / stop profiling in chrome. -exec $(dirname $0)/../../tools/profile_chrome.py $@ diff --git a/engine/src/flutter/build/android/adb_reverse_forwarder.py b/engine/src/flutter/build/android/adb_reverse_forwarder.py deleted file mode 100755 index 3ce53595da..0000000000 --- a/engine/src/flutter/build/android/adb_reverse_forwarder.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -"""Command line tool for forwarding ports from a device to the host. - -Allows an Android device to connect to services running on the host machine, -i.e., "adb forward" in reverse. Requires |host_forwarder| and |device_forwarder| -to be built. -""" - -import logging -import optparse -import sys -import time - -from pylib import constants -from pylib import forwarder -from pylib.device import adb_wrapper -from pylib.device import device_errors -from pylib.device import device_utils -from pylib.utils import run_tests_helper - - -def main(argv): - parser = optparse.OptionParser(usage='Usage: %prog [options] device_port ' - 'host_port [device_port_2 host_port_2] ...', - description=__doc__) - parser.add_option('-v', - '--verbose', - dest='verbose_count', - default=0, - action='count', - help='Verbose level (multiple times for more)') - parser.add_option('--device', - help='Serial number of device we should use.') - parser.add_option('--debug', action='store_const', const='Debug', - dest='build_type', default='Release', - help='Use Debug build of host tools instead of Release.') - - options, args = parser.parse_args(argv) - run_tests_helper.SetLogLevel(options.verbose_count) - - if len(args) < 2 or not len(args) % 2: - parser.error('Need even number of port pairs') - sys.exit(1) - - try: - port_pairs = map(int, args[1:]) - port_pairs = zip(port_pairs[::2], port_pairs[1::2]) - except ValueError: - parser.error('Bad port number') - sys.exit(1) - - devices = device_utils.DeviceUtils.HealthyDevices() - - if options.device: - device = next((d for d in devices if d == options.device), None) - if not device: - raise device_errors.DeviceUnreachableError(options.device) - elif devices: - device = devices[0] - logging.info('No device specified. Defaulting to %s', devices[0]) - else: - raise device_errors.NoDevicesError() - - constants.SetBuildType(options.build_type) - try: - forwarder.Forwarder.Map(port_pairs, device) - while True: - time.sleep(60) - except KeyboardInterrupt: - sys.exit(0) - finally: - forwarder.Forwarder.UnmapAllDevicePorts(device) - -if __name__ == '__main__': - main(sys.argv) diff --git a/engine/src/flutter/build/android/adb_run_android_webview_shell b/engine/src/flutter/build/android/adb_run_android_webview_shell deleted file mode 100755 index 1014a731f4..0000000000 --- a/engine/src/flutter/build/android/adb_run_android_webview_shell +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# 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. - -optional_url=$1 - -adb shell am start \ - -a android.intent.action.VIEW \ - -n org.chromium.android_webview.shell/.AwShellActivity \ - ${optional_url:+-d "$optional_url"} diff --git a/engine/src/flutter/build/android/adb_run_chrome_public b/engine/src/flutter/build/android/adb_run_chrome_public deleted file mode 100755 index bf15071144..0000000000 --- a/engine/src/flutter/build/android/adb_run_chrome_public +++ /dev/null @@ -1,12 +0,0 @@ -#!/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. - -optional_url=$1 - -adb shell am start \ - -a android.intent.action.VIEW \ - -n org.chromium.chrome/com.google.android.apps.chrome.Main \ - ${optional_url:+-d "$optional_url"} diff --git a/engine/src/flutter/build/android/adb_run_chrome_shell b/engine/src/flutter/build/android/adb_run_chrome_shell deleted file mode 100755 index 79c4c32b5c..0000000000 --- a/engine/src/flutter/build/android/adb_run_chrome_shell +++ /dev/null @@ -1,12 +0,0 @@ -#!/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. - -optional_url=$1 - -adb shell am start \ - -a android.intent.action.VIEW \ - -n org.chromium.chrome.shell/.ChromeShellActivity \ - ${optional_url:+-d "$optional_url"} diff --git a/engine/src/flutter/build/android/adb_run_content_shell b/engine/src/flutter/build/android/adb_run_content_shell deleted file mode 100755 index 3f01f3bf02..0000000000 --- a/engine/src/flutter/build/android/adb_run_content_shell +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012 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. - -optional_url=$1 - -adb shell am start \ - -a android.intent.action.VIEW \ - -n org.chromium.content_shell_apk/.ContentShellActivity \ - ${optional_url:+-d "$optional_url"} diff --git a/engine/src/flutter/build/android/adb_run_mojo_shell b/engine/src/flutter/build/android/adb_run_mojo_shell deleted file mode 100755 index b585e4a71f..0000000000 --- a/engine/src/flutter/build/android/adb_run_mojo_shell +++ /dev/null @@ -1,16 +0,0 @@ -#!/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. - -optional_url=$1 -parameters=$2 - -adb logcat -c -adb shell am start -S \ - -a android.intent.action.VIEW \ - -n org.chromium.mojo_shell_apk/.MojoShellActivity \ - ${parameters:+--esa parameters "$parameters"} \ - ${optional_url:+-d "$optional_url"} -adb logcat -s MojoShellApplication MojoShellActivity chromium diff --git a/engine/src/flutter/build/android/android_no_jni_exports.lst b/engine/src/flutter/build/android/android_no_jni_exports.lst deleted file mode 100644 index ffc6cf7028..0000000000 --- a/engine/src/flutter/build/android/android_no_jni_exports.lst +++ /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. - -# This script makes all JNI exported symbols local, to prevent the JVM from -# being able to find them, enforcing use of manual JNI function registration. -# This is used for all Android binaries by default, unless they explicitly state -# that they want JNI exported symbols to remain visible, as we need to ensure -# the manual registration path is correct to maintain compatibility with the -# crazy linker. -# Check ld version script manual: -# https://sourceware.org/binutils/docs-2.24/ld/VERSION.html#VERSION - -{ - local: - Java_*; -}; diff --git a/engine/src/flutter/build/android/ant/BUILD.gn b/engine/src/flutter/build/android/ant/BUILD.gn deleted file mode 100644 index a30fb54bf4..0000000000 --- a/engine/src/flutter/build/android/ant/BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ -# 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. - -copy("keystore") { - sources = [ - "chromium-debug.keystore", - ] - - outputs = [ - "$root_out_dir/chromium-debug.keystore", - ] -} diff --git a/engine/src/flutter/build/android/ant/apk-package.xml b/engine/src/flutter/build/android/ant/apk-package.xml deleted file mode 100644 index e8b76f7e45..0000000000 --- a/engine/src/flutter/build/android/ant/apk-package.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/engine/src/flutter/build/android/ant/chromium-debug.keystore b/engine/src/flutter/build/android/ant/chromium-debug.keystore deleted file mode 100644 index 67eb0aa34c5af88603ee1e2dedf4bfee3e33be2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2223 zcmezO_TO6u1_mYu1_nkj7D&!0%FoR#%}q&7DoxK$tz=+ewA>i;bp`_iD~mxBD}wAci(dwyW|m5>^vNpE&E@P096b?8*_67@X(=9YQsLu*Y-?S)Y` z!u#5-Z<@PjmN0JOwVm}-i}ib!}4z@D2pj= zl;iW)@(g||*{d)G}k(#@}a8iims?hYhHP@70E#%+Z@TF8Lg0IHov0Q(rL3jS` zo5lCzQ+1ePGkV=0oh-QaV+*72o7rx!SC>BBdNi*U);J$CG;Fe)_Njt*+Po)I4xGJw-sD+)o3GfHCjy(#PPy?;V(H6U?k8vP zPUx9)@*LZHu}8X3eKViNESqNeAjr({NY0MfB3{G$moCQz)vaXGVtHufWqmBhW@k%ct4wpG;pI@|xFi=a2go?sGy`e)aDrR-KuhSbgtesWkJNb(3Z; z+Fy6Y9VG`5yn{g?jhMqT)uLYc%7UJolw)%2{Lsj&zGat?WvoZy})qCq;+3LaN zwob6kfWbSMeSciiNBf(--Ld*Hyu7pv2kbS^ww z<;uAJGuxNLM}2~et(G|$bWiz~!zf(4Z~m^ir&%keczm4Mo&DtxciNd<$M>Ap-(SSS z^45ONrjOr?&iijqwqSjg*7!MS!u$_Dj9YX6-aGpJquqj^ytz(hw^p&qSnjR+V)IMY z|GzTh_HRtF}z@Qjt3y88X=<}%km8s*KcK5P0*Ik@wP!-)rX zz6ADWh|imU_};@kf~{5=*-Y=&PPv_Ic2JnbNch|2`L>f;Twh8`wR9wCJ#Tow^0tl4 zgV_RK0-09H-n;j6R=CjHIQ>UI%l565DVI6g9Pr<8wNFySGt<`(judSBzbIhyGZ8OM z@%j5&76w;b@wu`tynFY&&hO`r?7Xou!$xL%vA}9m@9-oet@Uny9)*?g1X<@UH){P; zV0QM&+o|c|zY=e}H8}O?Zn6DG5w;2uhW&}_6<$Te`%77I$9zewd9jJ_bI!Yy5BV27 zJ$5oKq3WG9dz&}6-k+KRDKD#k@(pJS-4-UahAgX)y{qAuSTk4Z^wr1Tn;37(#(Cy& z9o$&IdDW&>PcQte7iIl&DSaV}z;wf7`WeZOnpwR3Y@Awc9&O)w85vnw84Pj^1q}Gum_u3E zgxN#$vh(uG^I#$z7$WQ#B3u|E+!!Lva1jFqab80s14}~#Lkj~lQ;R4Gej`J$fFV?X z&hBYqR6-6AMpg#qCPsb+gC<5UrY1&4h9fIFdgCu-+DNasYf-m*jov zzjJBQJ$1S5j}1Q_J5jyG*sIH3-y`jQRlxfFZb281_+%`X+(6}N8?G?xz2SoXD=quV}h$+?%eZUu-liuvj{ z?tdt{Pu=B%wc~=gSsVB9vKEUy-M#rj@bAKt@{crpCG?E~J5QaNd}+rAabZ4P))m(l z>N)RdGyS1>Q&3vg)?fVMg^04{?`DVD&ehR9dT*-T>)4g6Z`!PW%+VR-yuV~a$+z2C enUC`gQ+7*Af9CJ(+Qv73;lhr0XKtlhW&r@GI>*%j diff --git a/engine/src/flutter/build/android/ant/empty/res/.keep b/engine/src/flutter/build/android/ant/empty/res/.keep deleted file mode 100644 index 1fd038b8cf..0000000000 --- a/engine/src/flutter/build/android/ant/empty/res/.keep +++ /dev/null @@ -1,2 +0,0 @@ -# This empty res folder can be passed to aapt while building Java libraries or -# APKs that don't have any resources. diff --git a/engine/src/flutter/build/android/asan_symbolize.py b/engine/src/flutter/build/android/asan_symbolize.py deleted file mode 100755 index 10087a637a..0000000000 --- a/engine/src/flutter/build/android/asan_symbolize.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env 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. - - -import collections -import optparse -import os -import re -import sys - -from pylib import constants - -# Uses symbol.py from third_party/android_platform, not python's. -sys.path.insert(0, - os.path.join(constants.DIR_SOURCE_ROOT, - 'third_party/android_platform/development/scripts')) -import symbol - - -_RE_ASAN = re.compile(r'(.*?)(#\S*?) (\S*?) \((.*?)\+(.*?)\)') - -def _ParseAsanLogLine(line): - m = re.match(_RE_ASAN, line) - if not m: - return None - return { - 'prefix': m.group(1), - 'library': m.group(4), - 'pos': m.group(2), - 'rel_address': '%08x' % int(m.group(5), 16), - } - - -def _FindASanLibraries(): - asan_lib_dir = os.path.join(constants.DIR_SOURCE_ROOT, - 'third_party', 'llvm-build', - 'Release+Asserts', 'lib') - asan_libs = [] - for src_dir, _, files in os.walk(asan_lib_dir): - asan_libs += [os.path.relpath(os.path.join(src_dir, f)) - for f in files - if f.endswith('.so')] - return asan_libs - - -def _TranslateLibPath(library, asan_libs): - for asan_lib in asan_libs: - if os.path.basename(library) == os.path.basename(asan_lib): - return '/' + asan_lib - return symbol.TranslateLibPath(library) - - -def _Symbolize(asan_input): - asan_libs = _FindASanLibraries() - libraries = collections.defaultdict(list) - asan_lines = [] - for asan_log_line in [a.rstrip() for a in asan_input]: - m = _ParseAsanLogLine(asan_log_line) - if m: - libraries[m['library']].append(m) - asan_lines.append({'raw_log': asan_log_line, 'parsed': m}) - - all_symbols = collections.defaultdict(dict) - for library, items in libraries.iteritems(): - libname = _TranslateLibPath(library, asan_libs) - lib_relative_addrs = set([i['rel_address'] for i in items]) - info_dict = symbol.SymbolInformationForSet(libname, - lib_relative_addrs, - True) - if info_dict: - all_symbols[library]['symbols'] = info_dict - - for asan_log_line in asan_lines: - m = asan_log_line['parsed'] - if not m: - print asan_log_line['raw_log'] - continue - if (m['library'] in all_symbols and - m['rel_address'] in all_symbols[m['library']]['symbols']): - s = all_symbols[m['library']]['symbols'][m['rel_address']][0] - print '%s%s %s %s' % (m['prefix'], m['pos'], s[0], s[1]) - else: - print asan_log_line['raw_log'] - - -def main(): - parser = optparse.OptionParser() - parser.add_option('-l', '--logcat', - help='File containing adb logcat output with ASan stacks. ' - 'Use stdin if not specified.') - options, _ = parser.parse_args() - if options.logcat: - asan_input = file(options.logcat, 'r') - else: - asan_input = sys.stdin - _Symbolize(asan_input.readlines()) - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/engine/src/flutter/build/android/avd.py b/engine/src/flutter/build/android/avd.py deleted file mode 100755 index c45544f8bc..0000000000 --- a/engine/src/flutter/build/android/avd.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -# 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. - -"""Launches Android Virtual Devices with a set configuration for testing Chrome. - -The script will launch a specified number of Android Virtual Devices (AVD's). -""" - - -import install_emulator_deps -import logging -import optparse -import os -import re -import sys - -from pylib import cmd_helper -from pylib import constants -from pylib.utils import emulator - - -def main(argv): - # ANDROID_SDK_ROOT needs to be set to the location of the SDK used to launch - # the emulator to find the system images upon launch. - emulator_sdk = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk') - os.environ['ANDROID_SDK_ROOT'] = emulator_sdk - - opt_parser = optparse.OptionParser(description='AVD script.') - opt_parser.add_option('--name', help='Optinaly, name of existing AVD to ' - 'launch. If not specified, new AVD\'s will be created') - opt_parser.add_option('-n', '--num', dest='emulator_count', - help='Number of emulators to launch (default is 1).', - type='int', default='1') - opt_parser.add_option('--abi', default='x86', - help='Platform of emulators to launch (x86 default).') - opt_parser.add_option('--api-level', dest='api_level', - help='API level for the image, e.g. 19 for Android 4.4', - type='int', default=constants.ANDROID_SDK_VERSION) - - options, _ = opt_parser.parse_args(argv[1:]) - - logging.basicConfig(level=logging.INFO, - format='# %(asctime)-15s: %(message)s') - logging.root.setLevel(logging.INFO) - - # Check if KVM is enabled for x86 AVD's and check for x86 system images. - # TODO(andrewhayden) Since we can fix all of these with install_emulator_deps - # why don't we just run it? - if options.abi == 'x86': - if not install_emulator_deps.CheckKVM(): - logging.critical('ERROR: KVM must be enabled in BIOS, and installed. ' - 'Enable KVM in BIOS and run install_emulator_deps.py') - return 1 - elif not install_emulator_deps.CheckX86Image(options.api_level): - logging.critical('ERROR: System image for x86 AVD not installed. Run ' - 'install_emulator_deps.py') - return 1 - - if not install_emulator_deps.CheckSDK(): - logging.critical('ERROR: Emulator SDK not installed. Run ' - 'install_emulator_deps.py.') - return 1 - - # If AVD is specified, check that the SDK has the required target. If not, - # check that the SDK has the desired target for the temporary AVD's. - api_level = options.api_level - if options.name: - android = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk', 'tools', - 'android') - avds_output = cmd_helper.GetCmdOutput([android, 'list', 'avd']) - names = re.findall(r'Name: (\w+)', avds_output) - api_levels = re.findall(r'API level (\d+)', avds_output) - try: - avd_index = names.index(options.name) - except ValueError: - logging.critical('ERROR: Specified AVD %s does not exist.' % options.name) - return 1 - api_level = int(api_levels[avd_index]) - - if not install_emulator_deps.CheckSDKPlatform(api_level): - logging.critical('ERROR: Emulator SDK missing required target for API %d. ' - 'Run install_emulator_deps.py.') - return 1 - - if options.name: - emulator.LaunchEmulator(options.name, options.abi) - else: - emulator.LaunchTempEmulators(options.emulator_count, options.abi, - options.api_level, True) - - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/bb_run_sharded_steps.py b/engine/src/flutter/build/android/bb_run_sharded_steps.py deleted file mode 100755 index 6aeba5b5f5..0000000000 --- a/engine/src/flutter/build/android/bb_run_sharded_steps.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""DEPRECATED! -TODO(bulach): remove me once all other repositories reference -'test_runner.py perf' directly. -""" - -import optparse -import sys - -from pylib import cmd_helper - - -def main(argv): - parser = optparse.OptionParser() - parser.add_option('-s', '--steps', - help='A JSON file containing all the steps to be ' - 'sharded.') - parser.add_option('--flaky_steps', - help='A JSON file containing steps that are flaky and ' - 'will have its exit code ignored.') - parser.add_option('-p', '--print_results', - help='Only prints the results for the previously ' - 'executed step, do not run it again.') - options, _ = parser.parse_args(argv) - if options.print_results: - return cmd_helper.RunCmd(['build/android/test_runner.py', 'perf', - '--print-step', options.print_results]) - flaky_options = [] - if options.flaky_steps: - flaky_options = ['--flaky-steps', options.flaky_steps] - return cmd_helper.RunCmd(['build/android/test_runner.py', 'perf', '-v', - '--steps', options.steps] + flaky_options) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/buildbot/OWNERS b/engine/src/flutter/build/android/buildbot/OWNERS deleted file mode 100644 index f289720120..0000000000 --- a/engine/src/flutter/build/android/buildbot/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -set noparent - -cmp@chromium.org -jbudorick@chromium.org -navabi@chromium.org - diff --git a/engine/src/flutter/build/android/buildbot/bb_annotations.py b/engine/src/flutter/build/android/buildbot/bb_annotations.py deleted file mode 100644 index 059d673188..0000000000 --- a/engine/src/flutter/build/android/buildbot/bb_annotations.py +++ /dev/null @@ -1,46 +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. - -"""Helper functions to print buildbot messages.""" - -def PrintLink(label, url): - """Adds a link with name |label| linking to |url| to current buildbot step. - - Args: - label: A string with the name of the label. - url: A string of the URL. - """ - print '@@@STEP_LINK@%s@%s@@@' % (label, url) - - -def PrintMsg(msg): - """Appends |msg| to the current buildbot step text. - - Args: - msg: String to be appended. - """ - print '@@@STEP_TEXT@%s@@@' % msg - - -def PrintSummaryText(msg): - """Appends |msg| to main build summary. Visible from waterfall. - - Args: - msg: String to be appended. - """ - print '@@@STEP_SUMMARY_TEXT@%s@@@' % msg - - -def PrintError(): - """Marks the current step as failed.""" - print '@@@STEP_FAILURE@@@' - - -def PrintWarning(): - """Marks the current step with a warning.""" - print '@@@STEP_WARNINGS@@@' - - -def PrintNamedStep(step): - print '@@@BUILD_STEP %s@@@' % step diff --git a/engine/src/flutter/build/android/buildbot/bb_device_status_check.py b/engine/src/flutter/build/android/buildbot/bb_device_status_check.py deleted file mode 100755 index 917c51e28d..0000000000 --- a/engine/src/flutter/build/android/buildbot/bb_device_status_check.py +++ /dev/null @@ -1,404 +0,0 @@ -#!/usr/bin/env 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. - -"""A class to keep track of devices across builds and report state.""" -import json -import logging -import optparse -import os -import psutil -import re -import signal -import smtplib -import subprocess -import sys -import time -import urllib - -import bb_annotations -import bb_utils - -sys.path.append(os.path.join(os.path.dirname(__file__), - os.pardir, os.pardir, 'util', 'lib', - 'common')) -import perf_tests_results_helper # pylint: disable=F0401 - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from pylib import constants -from pylib.cmd_helper import GetCmdOutput -from pylib.device import adb_wrapper -from pylib.device import battery_utils -from pylib.device import device_blacklist -from pylib.device import device_errors -from pylib.device import device_list -from pylib.device import device_utils -from pylib.utils import run_tests_helper - -_RE_DEVICE_ID = re.compile('Device ID = (\d+)') - -def DeviceInfo(device, options): - """Gathers info on a device via various adb calls. - - Args: - device: A DeviceUtils instance for the device to construct info about. - - Returns: - Tuple of device type, build id, report as a string, error messages, and - boolean indicating whether or not device can be used for testing. - """ - battery = battery_utils.BatteryUtils(device) - - build_product = '' - build_id = '' - battery_level = 100 - errors = [] - dev_good = True - json_data = {} - - try: - build_product = device.build_product - build_id = device.build_id - - json_data = { - 'serial': device.adb.GetDeviceSerial(), - 'type': build_product, - 'build': build_id, - 'build_detail': device.GetProp('ro.build.fingerprint'), - 'battery': {}, - 'imei_slice': 'Unknown', - 'wifi_ip': device.GetProp('dhcp.wlan0.ipaddress'), - } - - battery_info = {} - try: - battery_info = battery.GetBatteryInfo(timeout=5) - battery_level = int(battery_info.get('level', battery_level)) - json_data['battery'] = battery_info - except device_errors.CommandFailedError: - logging.exception('Failed to get battery information for %s', str(device)) - - try: - for l in device.RunShellCommand(['dumpsys', 'iphonesubinfo'], - check_return=True, timeout=5): - m = _RE_DEVICE_ID.match(l) - if m: - json_data['imei_slice'] = m.group(1)[-6:] - except device_errors.CommandFailedError: - logging.exception('Failed to get IMEI slice for %s', str(device)) - - if battery_level < 15: - errors += ['Device critically low in battery.'] - dev_good = False - if not battery.GetCharging(): - battery.SetCharging(True) - if not options.no_provisioning_check: - setup_wizard_disabled = ( - device.GetProp('ro.setupwizard.mode') == 'DISABLED') - if not setup_wizard_disabled and device.build_type != 'user': - errors += ['Setup wizard not disabled. Was it provisioned correctly?'] - if (device.product_name == 'mantaray' and - battery_info.get('AC powered', None) != 'true'): - errors += ['Mantaray device not connected to AC power.'] - except device_errors.CommandFailedError: - logging.exception('Failure while getting device status.') - dev_good = False - except device_errors.CommandTimeoutError: - logging.exception('Timeout while getting device status.') - dev_good = False - - return (build_product, build_id, battery_level, errors, dev_good, json_data) - - -def CheckForMissingDevices(options, devices): - """Uses file of previous online devices to detect broken phones. - - Args: - options: out_dir parameter of options argument is used as the base - directory to load and update the cache file. - devices: A list of DeviceUtils instance for the currently visible and - online attached devices. - """ - out_dir = os.path.abspath(options.out_dir) - device_serials = set(d.adb.GetDeviceSerial() for d in devices) - - # last_devices denotes all known devices prior to this run - last_devices_path = os.path.join(out_dir, device_list.LAST_DEVICES_FILENAME) - last_missing_devices_path = os.path.join(out_dir, - device_list.LAST_MISSING_DEVICES_FILENAME) - try: - last_devices = device_list.GetPersistentDeviceList(last_devices_path) - except IOError: - # Ignore error, file might not exist - last_devices = [] - - try: - last_missing_devices = device_list.GetPersistentDeviceList( - last_missing_devices_path) - except IOError: - last_missing_devices = [] - - missing_devs = list(set(last_devices) - device_serials) - new_missing_devs = list(set(missing_devs) - set(last_missing_devices)) - - if new_missing_devs and os.environ.get('BUILDBOT_SLAVENAME'): - logging.info('new_missing_devs %s' % new_missing_devs) - devices_missing_msg = '%d devices not detected.' % len(missing_devs) - bb_annotations.PrintSummaryText(devices_missing_msg) - - from_address = 'chrome-bot@chromium.org' - to_addresses = ['chrome-labs-tech-ticket@google.com', - 'chrome-android-device-alert@google.com'] - cc_addresses = ['chrome-android-device-alert@google.com'] - subject = 'Devices offline on %s, %s, %s' % ( - os.environ.get('BUILDBOT_SLAVENAME'), - os.environ.get('BUILDBOT_BUILDERNAME'), - os.environ.get('BUILDBOT_BUILDNUMBER')) - msg = ('Please reboot the following devices:\n%s' % - '\n'.join(map(str, new_missing_devs))) - SendEmail(from_address, to_addresses, cc_addresses, subject, msg) - - all_known_devices = list(device_serials | set(last_devices)) - device_list.WritePersistentDeviceList(last_devices_path, all_known_devices) - device_list.WritePersistentDeviceList(last_missing_devices_path, missing_devs) - - if not all_known_devices: - # This can happen if for some reason the .last_devices file is not - # present or if it was empty. - return ['No online devices. Have any devices been plugged in?'] - if missing_devs: - devices_missing_msg = '%d devices not detected.' % len(missing_devs) - bb_annotations.PrintSummaryText(devices_missing_msg) - return ['Current online devices: %s' % ', '.join(d for d in device_serials), - '%s are no longer visible. Were they removed?' % missing_devs] - else: - new_devs = device_serials - set(last_devices) - if new_devs and os.path.exists(last_devices_path): - bb_annotations.PrintWarning() - bb_annotations.PrintSummaryText( - '%d new devices detected' % len(new_devs)) - logging.info('New devices detected:') - for d in new_devs: - logging.info(' %s', d) - - -def SendEmail(from_address, to_addresses, cc_addresses, subject, msg): - msg_body = '\r\n'.join(['From: %s' % from_address, - 'To: %s' % ', '.join(to_addresses), - 'CC: %s' % ', '.join(cc_addresses), - 'Subject: %s' % subject, '', msg]) - try: - server = smtplib.SMTP('localhost') - server.sendmail(from_address, to_addresses, msg_body) - server.quit() - except Exception: - logging.exception('Failed to send alert email.') - - -def RestartUsb(): - if not os.path.isfile('/usr/bin/restart_usb'): - logging.error('Could not restart usb. ''/usr/bin/restart_usb not ' - 'installed on host (see BUG=305769).') - return False - - lsusb_proc = bb_utils.SpawnCmd(['lsusb'], stdout=subprocess.PIPE) - lsusb_output, _ = lsusb_proc.communicate() - if lsusb_proc.returncode: - logging.error('Could not get list of USB ports (i.e. lsusb).') - return lsusb_proc.returncode - - usb_devices = [re.findall(r'Bus (\d\d\d) Device (\d\d\d)', lsusb_line)[0] - for lsusb_line in lsusb_output.strip().split('\n')] - - all_restarted = True - # Walk USB devices from leaves up (i.e reverse sorted) restarting the - # connection. If a parent node (e.g. usb hub) is restarted before the - # devices connected to it, the (bus, dev) for the hub can change, making the - # output we have wrong. This way we restart the devices before the hub. - for (bus, dev) in reversed(sorted(usb_devices)): - # Can not restart root usb connections - if dev != '001': - return_code = bb_utils.RunCmd(['/usr/bin/restart_usb', bus, dev]) - if return_code: - logging.error('Error restarting USB device /dev/bus/usb/%s/%s', - bus, dev) - all_restarted = False - else: - logging.info('Restarted USB device /dev/bus/usb/%s/%s', bus, dev) - - return all_restarted - - -def KillAllAdb(): - def GetAllAdb(): - for p in psutil.process_iter(): - try: - if 'adb' in p.name: - yield p - except (psutil.NoSuchProcess, psutil.AccessDenied): - pass - - for sig in [signal.SIGTERM, signal.SIGQUIT, signal.SIGKILL]: - for p in GetAllAdb(): - try: - logging.info('kill %d %d (%s [%s])', sig, p.pid, p.name, - ' '.join(p.cmdline)) - p.send_signal(sig) - except (psutil.NoSuchProcess, psutil.AccessDenied): - pass - for p in GetAllAdb(): - try: - logging.error('Unable to kill %d (%s [%s])', p.pid, p.name, - ' '.join(p.cmdline)) - except (psutil.NoSuchProcess, psutil.AccessDenied): - pass - - -def main(): - parser = optparse.OptionParser() - parser.add_option('', '--out-dir', - help='Directory where the device path is stored', - default=os.path.join(constants.DIR_SOURCE_ROOT, 'out')) - parser.add_option('--no-provisioning-check', action='store_true', - help='Will not check if devices are provisioned properly.') - parser.add_option('--device-status-dashboard', action='store_true', - help='Output device status data for dashboard.') - parser.add_option('--restart-usb', action='store_true', - help='Restart USB ports before running device check.') - parser.add_option('--json-output', - help='Output JSON information into a specified file.') - parser.add_option('-v', '--verbose', action='count', default=1, - help='Log more information.') - - options, args = parser.parse_args() - if args: - parser.error('Unknown options %s' % args) - - run_tests_helper.SetLogLevel(options.verbose) - - # Remove the last build's "bad devices" before checking device statuses. - device_blacklist.ResetBlacklist() - - try: - expected_devices = device_list.GetPersistentDeviceList( - os.path.join(options.out_dir, device_list.LAST_DEVICES_FILENAME)) - except IOError: - expected_devices = [] - devices = device_utils.DeviceUtils.HealthyDevices() - device_serials = [d.adb.GetDeviceSerial() for d in devices] - # Only restart usb if devices are missing. - if set(expected_devices) != set(device_serials): - logging.warning('expected_devices: %s', expected_devices) - logging.warning('devices: %s', device_serials) - KillAllAdb() - retries = 5 - usb_restarted = True - if options.restart_usb: - if not RestartUsb(): - usb_restarted = False - bb_annotations.PrintWarning() - logging.error('USB reset stage failed, ' - 'wait for any device to come back.') - while retries: - logging.info('retry adb devices...') - time.sleep(1) - devices = device_utils.DeviceUtils.HealthyDevices() - device_serials = [d.adb.GetDeviceSerial() for d in devices] - if set(expected_devices) == set(device_serials): - # All devices are online, keep going. - break - if not usb_restarted and devices: - # The USB wasn't restarted, but there's at least one device online. - # No point in trying to wait for all devices. - break - retries -= 1 - - types, builds, batteries, errors, devices_ok, json_data = ( - [], [], [], [], [], []) - if devices: - types, builds, batteries, errors, devices_ok, json_data = ( - zip(*[DeviceInfo(dev, options) for dev in devices])) - - # Write device info to file for buildbot info display. - if os.path.exists('/home/chrome-bot'): - with open('/home/chrome-bot/.adb_device_info', 'w') as f: - for device in json_data: - try: - f.write('%s %s %s %.1fC %s%%\n' % (device['serial'], device['type'], - device['build'], float(device['battery']['temperature']) / 10, - device['battery']['level'])) - except Exception: - pass - - err_msg = CheckForMissingDevices(options, devices) or [] - - unique_types = list(set(types)) - unique_builds = list(set(builds)) - - bb_annotations.PrintMsg('Online devices: %d. Device types %s, builds %s' - % (len(devices), unique_types, unique_builds)) - - for j in json_data: - logging.info('Device %s (%s)', j.get('serial'), j.get('type')) - logging.info(' Build: %s (%s)', j.get('build'), j.get('build_detail')) - logging.info(' Current Battery Service state:') - for k, v in j.get('battery', {}).iteritems(): - logging.info(' %s: %s', k, v) - logging.info(' IMEI slice: %s', j.get('imei_slice')) - logging.info(' WiFi IP: %s', j.get('wifi_ip')) - - - for dev, dev_errors in zip(devices, errors): - if dev_errors: - err_msg += ['%s errors:' % str(dev)] - err_msg += [' %s' % error for error in dev_errors] - - if err_msg: - bb_annotations.PrintWarning() - for e in err_msg: - logging.error(e) - from_address = 'buildbot@chromium.org' - to_addresses = ['chromium-android-device-alerts@google.com'] - bot_name = os.environ.get('BUILDBOT_BUILDERNAME') - slave_name = os.environ.get('BUILDBOT_SLAVENAME') - subject = 'Device status check errors on %s, %s.' % (slave_name, bot_name) - SendEmail(from_address, to_addresses, [], subject, '\n'.join(err_msg)) - - if options.device_status_dashboard: - offline_devices = [ - device_utils.DeviceUtils(a) - for a in adb_wrapper.AdbWrapper.Devices(is_ready=False) - if a.GetState() == 'offline'] - - perf_tests_results_helper.PrintPerfResult('BotDevices', 'OnlineDevices', - [len(devices)], 'devices') - perf_tests_results_helper.PrintPerfResult('BotDevices', 'OfflineDevices', - [len(offline_devices)], 'devices', - 'unimportant') - for dev, battery in zip(devices, batteries): - perf_tests_results_helper.PrintPerfResult('DeviceBattery', str(dev), - [battery], '%', - 'unimportant') - - if options.json_output: - with open(options.json_output, 'wb') as f: - f.write(json.dumps(json_data, indent=4)) - - num_failed_devs = 0 - for device_ok, device in zip(devices_ok, devices): - if not device_ok: - logging.warning('Blacklisting %s', str(device)) - device_blacklist.ExtendBlacklist([str(device)]) - num_failed_devs += 1 - - if num_failed_devs == len(devices): - return 2 - - if not devices: - return 1 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/buildbot/bb_device_steps.py b/engine/src/flutter/build/android/buildbot/bb_device_steps.py deleted file mode 100755 index 8ad42b90d1..0000000000 --- a/engine/src/flutter/build/android/buildbot/bb_device_steps.py +++ /dev/null @@ -1,796 +0,0 @@ -#!/usr/bin/env python -# 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. - -import collections -import glob -import hashlib -import json -import os -import random -import re -import shutil -import sys - -import bb_utils -import bb_annotations - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -import provision_devices -from pylib import constants -from pylib.device import device_utils -from pylib.gtest import gtest_config - -CHROME_SRC_DIR = bb_utils.CHROME_SRC -DIR_BUILD_ROOT = os.path.dirname(CHROME_SRC_DIR) -CHROME_OUT_DIR = bb_utils.CHROME_OUT_DIR -BLINK_SCRIPTS_DIR = 'third_party/WebKit/Tools/Scripts' - -SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave') -LOGCAT_DIR = os.path.join(bb_utils.CHROME_OUT_DIR, 'logcat') -GS_URL = 'https://storage.googleapis.com' -GS_AUTH_URL = 'https://storage.cloud.google.com' - -# Describes an instrumation test suite: -# test: Name of test we're running. -# apk: apk to be installed. -# apk_package: package for the apk to be installed. -# test_apk: apk to run tests on. -# test_data: data folder in format destination:source. -# host_driven_root: The host-driven test root directory. -# annotation: Annotation of the tests to include. -# exclude_annotation: The annotation of the tests to exclude. -I_TEST = collections.namedtuple('InstrumentationTest', [ - 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'isolate_file_path', - 'host_driven_root', 'annotation', 'exclude_annotation', 'extra_flags']) - - -def SrcPath(*path): - return os.path.join(CHROME_SRC_DIR, *path) - - -def I(name, apk, apk_package, test_apk, test_data, isolate_file_path=None, - host_driven_root=None, annotation=None, exclude_annotation=None, - extra_flags=None): - return I_TEST(name, apk, apk_package, test_apk, test_data, isolate_file_path, - host_driven_root, annotation, exclude_annotation, extra_flags) - -INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [ - I('ContentShell', - 'ContentShell.apk', - 'org.chromium.content_shell_apk', - 'ContentShellTest', - 'content:content/test/data/android/device_files', - isolate_file_path='content/content_shell_test_apk.isolate'), - I('ChromeShell', - 'ChromeShell.apk', - 'org.chromium.chrome.shell', - 'ChromeShellTest', - 'chrome:chrome/test/data/android/device_files', - isolate_file_path='chrome/chrome_shell_test_apk.isolate', - host_driven_root=constants.CHROME_SHELL_HOST_DRIVEN_DIR), - I('AndroidWebView', - 'AndroidWebView.apk', - 'org.chromium.android_webview.shell', - 'AndroidWebViewTest', - 'webview:android_webview/test/data/device_files', - isolate_file_path='android_webview/android_webview_test_apk.isolate'), - I('ChromeSyncShell', - 'ChromeSyncShell.apk', - 'org.chromium.chrome.browser.sync', - 'ChromeSyncShellTest', - None), - ]) - -InstallablePackage = collections.namedtuple('InstallablePackage', [ - 'name', 'apk', 'apk_package']) - -INSTALLABLE_PACKAGES = dict((package.name, package) for package in ( - [InstallablePackage(i.name, i.apk, i.apk_package) - for i in INSTRUMENTATION_TESTS.itervalues()] + - [InstallablePackage('ChromeDriverWebViewShell', - 'ChromeDriverWebViewShell.apk', - 'org.chromium.chromedriver_webview_shell')])) - -VALID_TESTS = set([ - 'base_junit_tests', - 'chromedriver', - 'chrome_proxy', - 'components_browsertests', - 'gfx_unittests', - 'gl_unittests', - 'gpu', - 'python_unittests', - 'telemetry_unittests', - 'telemetry_perf_unittests', - 'ui', - 'unit', - 'webkit', - 'webkit_layout' -]) - -RunCmd = bb_utils.RunCmd - - -def _GetRevision(options): - """Get the SVN revision number. - - Args: - options: options object. - - Returns: - The revision number. - """ - revision = options.build_properties.get('got_revision') - if not revision: - revision = options.build_properties.get('revision', 'testing') - return revision - - -def _RunTest(options, cmd, suite): - """Run test command with runtest.py. - - Args: - options: options object. - cmd: the command to run. - suite: test name. - """ - property_args = bb_utils.EncodeProperties(options) - args = [os.path.join(SLAVE_SCRIPTS_DIR, 'runtest.py')] + property_args - args += ['--test-platform', 'android'] - if options.factory_properties.get('generate_gtest_json'): - args.append('--generate-json-file') - args += ['-o', 'gtest-results/%s' % suite, - '--annotate', 'gtest', - '--build-number', str(options.build_properties.get('buildnumber', - '')), - '--builder-name', options.build_properties.get('buildername', '')] - if options.target == 'Release': - args += ['--target', 'Release'] - else: - args += ['--target', 'Debug'] - if options.flakiness_server: - args += ['--flakiness-dashboard-server=%s' % - options.flakiness_server] - args += cmd - RunCmd(args, cwd=DIR_BUILD_ROOT) - - -def RunTestSuites(options, suites, suites_options=None): - """Manages an invocation of test_runner.py for gtests. - - Args: - options: options object. - suites: List of suite names to run. - suites_options: Command line options dictionary for particular suites. - For example, - {'content_browsertests', ['--num_retries=1', '--release']} - will add the options only to content_browsertests. - """ - - if not suites_options: - suites_options = {} - - args = ['--verbose'] - if options.target == 'Release': - args.append('--release') - if options.asan: - args.append('--tool=asan') - if options.gtest_filter: - args.append('--gtest-filter=%s' % options.gtest_filter) - - for suite in suites: - bb_annotations.PrintNamedStep(suite) - cmd = [suite] + args - cmd += suites_options.get(suite, []) - if suite == 'content_browsertests' or suite == 'components_browsertests': - cmd.append('--num_retries=1') - _RunTest(options, cmd, suite) - - -def RunJunitSuite(suite): - bb_annotations.PrintNamedStep(suite) - RunCmd(['build/android/test_runner.py', 'junit', '-s', suite]) - - -def RunChromeDriverTests(options): - """Run all the steps for running chromedriver tests.""" - bb_annotations.PrintNamedStep('chromedriver_annotation') - RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', - '--android-packages=%s,%s,%s,%s' % - ('chrome_shell', - 'chrome_stable', - 'chrome_beta', - 'chromedriver_webview_shell'), - '--revision=%s' % _GetRevision(options), - '--update-log']) - -def RunChromeProxyTests(options): - """Run the chrome_proxy tests. - - Args: - options: options object. - """ - InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) - args = ['--browser', 'android-chrome-shell'] - devices = device_utils.DeviceUtils.HealthyDevices() - if devices: - args = args + ['--device', devices[0].adb.GetDeviceSerial()] - bb_annotations.PrintNamedStep('chrome_proxy') - RunCmd(['tools/chrome_proxy/run_tests'] + args) - - -def RunTelemetryTests(options, step_name, run_tests_path): - """Runs either telemetry_perf_unittests or telemetry_unittests. - - Args: - options: options object. - step_name: either 'telemetry_unittests' or 'telemetry_perf_unittests' - run_tests_path: path to run_tests script (tools/perf/run_tests for - perf_unittests and tools/telemetry/run_tests for - telemetry_unittests) - """ - InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) - args = ['--browser', 'android-chrome-shell'] - devices = device_utils.DeviceUtils.HealthyDevices() - if devices: - args = args + ['--device', 'android'] - bb_annotations.PrintNamedStep(step_name) - RunCmd([run_tests_path] + args) - - -def InstallApk(options, test, print_step=False): - """Install an apk to all phones. - - Args: - options: options object - test: An I_TEST namedtuple - print_step: Print a buildbot step - """ - if print_step: - bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) - - args = ['--apk_package', test.apk_package] - if options.target == 'Release': - args.append('--release') - args.append(test.apk) - - RunCmd(['build/android/adb_install_apk.py'] + args, halt_on_failure=True) - - -def RunInstrumentationSuite(options, test, flunk_on_failure=True, - python_only=False, official_build=False): - """Manages an invocation of test_runner.py for instrumentation tests. - - Args: - options: options object - test: An I_TEST namedtuple - flunk_on_failure: Flunk the step if tests fail. - Python: Run only host driven Python tests. - official_build: Run official-build tests. - """ - bb_annotations.PrintNamedStep('%s_instrumentation_tests' % test.name.lower()) - - if test.apk: - InstallApk(options, test) - args = ['--test-apk', test.test_apk, '--verbose'] - if test.test_data: - args.extend(['--test_data', test.test_data]) - if options.target == 'Release': - args.append('--release') - if options.asan: - args.append('--tool=asan') - if options.flakiness_server: - args.append('--flakiness-dashboard-server=%s' % - options.flakiness_server) - if options.coverage_bucket: - args.append('--coverage-dir=%s' % options.coverage_dir) - if test.isolate_file_path: - args.append('--isolate-file-path=%s' % test.isolate_file_path) - if test.host_driven_root: - args.append('--host-driven-root=%s' % test.host_driven_root) - if test.annotation: - args.extend(['-A', test.annotation]) - if test.exclude_annotation: - args.extend(['-E', test.exclude_annotation]) - if test.extra_flags: - args.extend(test.extra_flags) - if python_only: - args.append('-p') - if official_build: - # The option needs to be assigned 'True' as it does not have an action - # associated with it. - args.append('--official-build') - - RunCmd(['build/android/test_runner.py', 'instrumentation'] + args, - flunk_on_failure=flunk_on_failure) - - -def RunWebkitLint(): - """Lint WebKit's TestExpectation files.""" - bb_annotations.PrintNamedStep('webkit_lint') - RunCmd([SrcPath(os.path.join(BLINK_SCRIPTS_DIR, 'lint-test-expectations'))]) - - -def RunWebkitLayoutTests(options): - """Run layout tests on an actual device.""" - bb_annotations.PrintNamedStep('webkit_tests') - cmd_args = [ - '--no-show-results', - '--no-new-test-results', - '--full-results-html', - '--clobber-old-results', - '--exit-after-n-failures', '5000', - '--exit-after-n-crashes-or-timeouts', '100', - '--debug-rwt-logging', - '--results-directory', '../layout-test-results', - '--target', options.target, - '--builder-name', options.build_properties.get('buildername', ''), - '--build-number', str(options.build_properties.get('buildnumber', '')), - '--master-name', 'ChromiumWebkit', # TODO: Get this from the cfg. - '--build-name', options.build_properties.get('buildername', ''), - '--platform=android'] - - for flag in 'test_results_server', 'driver_name', 'additional_driver_flag': - if flag in options.factory_properties: - cmd_args.extend(['--%s' % flag.replace('_', '-'), - options.factory_properties.get(flag)]) - - for f in options.factory_properties.get('additional_expectations', []): - cmd_args.extend( - ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) - - # TODO(dpranke): Remove this block after - # https://codereview.chromium.org/12927002/ lands. - for f in options.factory_properties.get('additional_expectations_files', []): - cmd_args.extend( - ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) - - exit_code = RunCmd( - [SrcPath(os.path.join(BLINK_SCRIPTS_DIR, 'run-webkit-tests'))] + cmd_args) - if exit_code == 255: # test_run_results.UNEXPECTED_ERROR_EXIT_STATUS - bb_annotations.PrintMsg('?? (crashed or hung)') - elif exit_code == 254: # test_run_results.NO_DEVICES_EXIT_STATUS - bb_annotations.PrintMsg('?? (no devices found)') - elif exit_code == 253: # test_run_results.NO_TESTS_EXIT_STATUS - bb_annotations.PrintMsg('?? (no tests found)') - else: - full_results_path = os.path.join('..', 'layout-test-results', - 'full_results.json') - if os.path.exists(full_results_path): - full_results = json.load(open(full_results_path)) - unexpected_passes, unexpected_failures, unexpected_flakes = ( - _ParseLayoutTestResults(full_results)) - if unexpected_failures: - _PrintDashboardLink('failed', unexpected_failures.keys(), - max_tests=25) - elif unexpected_passes: - _PrintDashboardLink('unexpected passes', unexpected_passes.keys(), - max_tests=10) - if unexpected_flakes: - _PrintDashboardLink('unexpected flakes', unexpected_flakes.keys(), - max_tests=10) - - if exit_code == 0 and (unexpected_passes or unexpected_flakes): - # If exit_code != 0, RunCmd() will have already printed an error. - bb_annotations.PrintWarning() - else: - bb_annotations.PrintError() - bb_annotations.PrintMsg('?? (results missing)') - - if options.factory_properties.get('archive_webkit_results', False): - bb_annotations.PrintNamedStep('archive_webkit_results') - base = 'https://storage.googleapis.com/chromium-layout-test-archives' - builder_name = options.build_properties.get('buildername', '') - build_number = str(options.build_properties.get('buildnumber', '')) - results_link = '%s/%s/%s/layout-test-results/results.html' % ( - base, EscapeBuilderName(builder_name), build_number) - bb_annotations.PrintLink('results', results_link) - bb_annotations.PrintLink('(zip)', '%s/%s/%s/layout-test-results.zip' % ( - base, EscapeBuilderName(builder_name), build_number)) - gs_bucket = 'gs://chromium-layout-test-archives' - RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'chromium', - 'archive_layout_test_results.py'), - '--results-dir', '../../layout-test-results', - '--build-number', build_number, - '--builder-name', builder_name, - '--gs-bucket', gs_bucket], - cwd=DIR_BUILD_ROOT) - - -def _ParseLayoutTestResults(results): - """Extract the failures from the test run.""" - # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results - tests = _ConvertTrieToFlatPaths(results['tests']) - failures = {} - flakes = {} - passes = {} - for (test, result) in tests.iteritems(): - if result.get('is_unexpected'): - actual_results = result['actual'].split() - expected_results = result['expected'].split() - if len(actual_results) > 1: - # We report the first failure type back, even if the second - # was more severe. - if actual_results[1] in expected_results: - flakes[test] = actual_results[0] - else: - failures[test] = actual_results[0] - elif actual_results[0] == 'PASS': - passes[test] = result - else: - failures[test] = actual_results[0] - - return (passes, failures, flakes) - - -def _ConvertTrieToFlatPaths(trie, prefix=None): - """Flatten the trie of failures into a list.""" - # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results - result = {} - for name, data in trie.iteritems(): - if prefix: - name = prefix + '/' + name - - if len(data) and 'actual' not in data and 'expected' not in data: - result.update(_ConvertTrieToFlatPaths(data, name)) - else: - result[name] = data - - return result - - -def _PrintDashboardLink(link_text, tests, max_tests): - """Add a link to the flakiness dashboard in the step annotations.""" - if len(tests) > max_tests: - test_list_text = ' '.join(tests[:max_tests]) + ' and more' - else: - test_list_text = ' '.join(tests) - - dashboard_base = ('http://test-results.appspot.com' - '/dashboards/flakiness_dashboard.html#' - 'master=ChromiumWebkit&tests=') - - bb_annotations.PrintLink('%d %s: %s' % - (len(tests), link_text, test_list_text), - dashboard_base + ','.join(tests)) - - -def EscapeBuilderName(builder_name): - return re.sub('[ ()]', '_', builder_name) - - -def SpawnLogcatMonitor(): - shutil.rmtree(LOGCAT_DIR, ignore_errors=True) - bb_utils.SpawnCmd([ - os.path.join(CHROME_SRC_DIR, 'build', 'android', 'adb_logcat_monitor.py'), - LOGCAT_DIR]) - - # Wait for logcat_monitor to pull existing logcat - RunCmd(['sleep', '5']) - - -def ProvisionDevices(options): - bb_annotations.PrintNamedStep('provision_devices') - - if not bb_utils.TESTING: - # Restart adb to work around bugs, sleep to wait for usb discovery. - device_utils.RestartServer() - RunCmd(['sleep', '1']) - provision_cmd = ['build/android/provision_devices.py', '-t', options.target] - if options.auto_reconnect: - provision_cmd.append('--auto-reconnect') - if options.skip_wipe: - provision_cmd.append('--skip-wipe') - if options.disable_location: - provision_cmd.append('--disable-location') - RunCmd(provision_cmd, halt_on_failure=True) - - -def DeviceStatusCheck(options): - bb_annotations.PrintNamedStep('device_status_check') - cmd = ['build/android/buildbot/bb_device_status_check.py'] - if options.restart_usb: - cmd.append('--restart-usb') - RunCmd(cmd, halt_on_failure=True) - - -def GetDeviceSetupStepCmds(): - return [ - ('device_status_check', DeviceStatusCheck), - ('provision_devices', ProvisionDevices), - ] - - -def RunUnitTests(options): - suites = gtest_config.STABLE_TEST_SUITES - if options.asan: - suites = [s for s in suites - if s not in gtest_config.ASAN_EXCLUDED_TEST_SUITES] - RunTestSuites(options, suites) - - -def RunTelemetryUnitTests(options): - RunTelemetryTests(options, 'telemetry_unittests', 'tools/telemetry/run_tests') - - -def RunTelemetryPerfUnitTests(options): - RunTelemetryTests(options, 'telemetry_perf_unittests', 'tools/perf/run_tests') - - -def RunInstrumentationTests(options): - for test in INSTRUMENTATION_TESTS.itervalues(): - RunInstrumentationSuite(options, test) - - -def RunWebkitTests(options): - RunTestSuites(options, ['webkit_unit_tests', 'blink_heap_unittests']) - RunWebkitLint() - - -def RunGPUTests(options): - revision = _GetRevision(options) - builder_name = options.build_properties.get('buildername', 'noname') - - bb_annotations.PrintNamedStep('pixel_tests') - RunCmd(['content/test/gpu/run_gpu_test.py', - 'pixel', '-v', - '--browser', - 'android-content-shell', - '--build-revision', - str(revision), - '--upload-refimg-to-cloud-storage', - '--refimg-cloud-storage-bucket', - 'chromium-gpu-archive/reference-images', - '--os-type', - 'android', - '--test-machine-name', - EscapeBuilderName(builder_name)]) - - bb_annotations.PrintNamedStep('webgl_conformance_tests') - RunCmd(['content/test/gpu/run_gpu_test.py', '-v', - '--browser=android-content-shell', 'webgl_conformance', - '--webgl-conformance-version=1.0.1']) - - bb_annotations.PrintNamedStep('android_webview_webgl_conformance_tests') - RunCmd(['content/test/gpu/run_gpu_test.py', '-v', - '--browser=android-webview-shell', 'webgl_conformance', - '--webgl-conformance-version=1.0.1']) - - bb_annotations.PrintNamedStep('gpu_rasterization_tests') - RunCmd(['content/test/gpu/run_gpu_test.py', - 'gpu_rasterization', '-v', - '--browser', - 'android-content-shell', - '--build-revision', - str(revision), - '--test-machine-name', - EscapeBuilderName(builder_name)]) - - -def RunPythonUnitTests(_options): - for suite in constants.PYTHON_UNIT_TEST_SUITES: - bb_annotations.PrintNamedStep(suite) - RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) - - -def GetTestStepCmds(): - return [ - ('base_junit_tests', - lambda _options: RunJunitSuite('base_junit_tests')), - ('chromedriver', RunChromeDriverTests), - ('chrome_proxy', RunChromeProxyTests), - ('components_browsertests', - lambda options: RunTestSuites(options, ['components_browsertests'])), - ('gfx_unittests', - lambda options: RunTestSuites(options, ['gfx_unittests'])), - ('gl_unittests', - lambda options: RunTestSuites(options, ['gl_unittests'])), - ('gpu', RunGPUTests), - ('python_unittests', RunPythonUnitTests), - ('telemetry_unittests', RunTelemetryUnitTests), - ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), - ('ui', RunInstrumentationTests), - ('unit', RunUnitTests), - ('webkit', RunWebkitTests), - ('webkit_layout', RunWebkitLayoutTests), - ] - - -def MakeGSPath(options, gs_base_dir): - revision = _GetRevision(options) - bot_id = options.build_properties.get('buildername', 'testing') - randhash = hashlib.sha1(str(random.random())).hexdigest() - gs_path = '%s/%s/%s/%s' % (gs_base_dir, bot_id, revision, randhash) - # remove double slashes, happens with blank revisions and confuses gsutil - gs_path = re.sub('/+', '/', gs_path) - return gs_path - -def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, - link_rel_path='index.html', gs_url=GS_URL): - """Uploads directory at |dir_to_upload| to Google Storage and output a link. - - Args: - options: Command line options. - gs_base_dir: The Google Storage base directory (e.g. - 'chromium-code-coverage/java') - dir_to_upload: Absolute path to the directory to be uploaded. - link_text: Link text to be displayed on the step. - link_rel_path: Link path relative to |dir_to_upload|. - gs_url: Google storage URL. - """ - gs_path = MakeGSPath(options, gs_base_dir) - RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-R', dir_to_upload, 'gs://%s' % gs_path]) - bb_annotations.PrintLink(link_text, - '%s/%s/%s' % (gs_url, gs_path, link_rel_path)) - - -def GenerateJavaCoverageReport(options): - """Generates an HTML coverage report using EMMA and uploads it.""" - bb_annotations.PrintNamedStep('java_coverage_report') - - coverage_html = os.path.join(options.coverage_dir, 'coverage_html') - RunCmd(['build/android/generate_emma_html.py', - '--coverage-dir', options.coverage_dir, - '--metadata-dir', os.path.join(CHROME_OUT_DIR, options.target), - '--cleanup', - '--output', os.path.join(coverage_html, 'index.html')]) - return coverage_html - - -def LogcatDump(options): - # Print logcat, kill logcat monitor - bb_annotations.PrintNamedStep('logcat_dump') - logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt') - RunCmd([SrcPath('build', 'android', 'adb_logcat_printer.py'), - '--output-path', logcat_file, LOGCAT_DIR]) - gs_path = MakeGSPath(options, 'chromium-android/logcat_dumps') - RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-z', 'txt', logcat_file, - 'gs://%s' % gs_path]) - bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path)) - - -def RunStackToolSteps(options): - """Run stack tool steps. - - Stack tool is run for logcat dump, optionally for ASAN. - """ - bb_annotations.PrintNamedStep('Run stack tool with logcat dump') - logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt') - RunCmd([os.path.join(CHROME_SRC_DIR, 'third_party', 'android_platform', - 'development', 'scripts', 'stack'), - '--more-info', logcat_file]) - if options.asan_symbolize: - bb_annotations.PrintNamedStep('Run stack tool for ASAN') - RunCmd([ - os.path.join(CHROME_SRC_DIR, 'build', 'android', 'asan_symbolize.py'), - '-l', logcat_file]) - - -def GenerateTestReport(options): - bb_annotations.PrintNamedStep('test_report') - for report in glob.glob( - os.path.join(CHROME_OUT_DIR, options.target, 'test_logs', '*.log')): - RunCmd(['cat', report]) - os.remove(report) - - -def MainTestWrapper(options): - try: - # Spawn logcat monitor - SpawnLogcatMonitor() - - # Run all device setup steps - for _, cmd in GetDeviceSetupStepCmds(): - cmd(options) - - if options.install: - for i in options.install: - install_obj = INSTALLABLE_PACKAGES[i] - InstallApk(options, install_obj, print_step=True) - - if options.test_filter: - bb_utils.RunSteps(options.test_filter, GetTestStepCmds(), options) - - if options.coverage_bucket: - coverage_html = GenerateJavaCoverageReport(options) - UploadHTML(options, '%s/java' % options.coverage_bucket, coverage_html, - 'Coverage Report') - shutil.rmtree(coverage_html, ignore_errors=True) - - if options.experimental: - RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES) - - finally: - # Run all post test steps - LogcatDump(options) - if not options.disable_stack_tool: - RunStackToolSteps(options) - GenerateTestReport(options) - # KillHostHeartbeat() has logic to check if heartbeat process is running, - # and kills only if it finds the process is running on the host. - provision_devices.KillHostHeartbeat() - if options.cleanup: - shutil.rmtree(os.path.join(CHROME_OUT_DIR, options.target), - ignore_errors=True) - - -def GetDeviceStepsOptParser(): - parser = bb_utils.GetParser() - parser.add_option('--experimental', action='store_true', - help='Run experiemental tests') - parser.add_option('-f', '--test-filter', metavar='', default=[], - action='append', - help=('Run a test suite. Test suites: "%s"' % - '", "'.join(VALID_TESTS))) - parser.add_option('--gtest-filter', - help='Filter for running a subset of tests of a gtest test') - parser.add_option('--asan', action='store_true', help='Run tests with asan.') - parser.add_option('--install', metavar='', action="append", - help='Install an apk by name') - parser.add_option('--no-reboot', action='store_true', - help='Do not reboot devices during provisioning.') - parser.add_option('--coverage-bucket', - help=('Bucket name to store coverage results. Coverage is ' - 'only run if this is set.')) - parser.add_option('--restart-usb', action='store_true', - help='Restart usb ports before device status check.') - parser.add_option( - '--flakiness-server', - help=('The flakiness dashboard server to which the results should be ' - 'uploaded.')) - parser.add_option( - '--auto-reconnect', action='store_true', - help='Push script to device which restarts adbd on disconnections.') - parser.add_option('--skip-wipe', action='store_true', - help='Do not wipe devices during provisioning.') - parser.add_option('--disable-location', action='store_true', - help='Disable location settings.') - parser.add_option( - '--logcat-dump-output', - help='The logcat dump output will be "tee"-ed into this file') - # During processing perf bisects, a seperate working directory created under - # which builds are produced. Therefore we should look for relevent output - # file under this directory.(/b/build/slave//build/bisect/src/out) - parser.add_option( - '--chrome-output-dir', - help='Chrome output directory to be used while bisecting.') - - parser.add_option('--disable-stack-tool', action='store_true', - help='Do not run stack tool.') - parser.add_option('--asan-symbolize', action='store_true', - help='Run stack tool for ASAN') - parser.add_option('--cleanup', action='store_true', - help='Delete out/ directory at the end of the run.') - return parser - - -def main(argv): - parser = GetDeviceStepsOptParser() - options, args = parser.parse_args(argv[1:]) - - if args: - return sys.exit('Unused args %s' % args) - - unknown_tests = set(options.test_filter) - VALID_TESTS - if unknown_tests: - return sys.exit('Unknown tests %s' % list(unknown_tests)) - - setattr(options, 'target', options.factory_properties.get('target', 'Debug')) - - if options.chrome_output_dir: - global CHROME_OUT_DIR - global LOGCAT_DIR - CHROME_OUT_DIR = options.chrome_output_dir - LOGCAT_DIR = os.path.join(CHROME_OUT_DIR, 'logcat') - - if options.coverage_bucket: - setattr(options, 'coverage_dir', - os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) - - MainTestWrapper(options) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/buildbot/bb_host_steps.py b/engine/src/flutter/build/android/buildbot/bb_host_steps.py deleted file mode 100755 index 1e927fb399..0000000000 --- a/engine/src/flutter/build/android/buildbot/bb_host_steps.py +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env 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. - -import os -import json -import sys - -import bb_utils -import bb_annotations - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from pylib import constants - - -SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave') -VALID_HOST_TESTS = set(['check_webview_licenses']) - -DIR_BUILD_ROOT = os.path.dirname(constants.DIR_SOURCE_ROOT) - -# Short hand for RunCmd which is used extensively in this file. -RunCmd = bb_utils.RunCmd - - -def SrcPath(*path): - return os.path.join(constants.DIR_SOURCE_ROOT, *path) - - -def CheckWebViewLicenses(_): - bb_annotations.PrintNamedStep('check_licenses') - RunCmd([SrcPath('android_webview', 'tools', 'webview_licenses.py'), 'scan'], - warning_code=1) - - -def RunHooks(build_type): - RunCmd([SrcPath('build', 'landmines.py')]) - build_path = SrcPath('out', build_type) - landmine_path = os.path.join(build_path, '.landmines_triggered') - clobber_env = os.environ.get('BUILDBOT_CLOBBER') - if clobber_env or os.path.isfile(landmine_path): - bb_annotations.PrintNamedStep('Clobber') - if not clobber_env: - print 'Clobbering due to triggered landmines:' - with open(landmine_path) as f: - print f.read() - RunCmd(['rm', '-rf', build_path]) - - bb_annotations.PrintNamedStep('runhooks') - RunCmd(['gclient', 'runhooks'], halt_on_failure=True) - - -def Compile(options): - RunHooks(options.target) - cmd = [os.path.join(SLAVE_SCRIPTS_DIR, 'compile.py'), - '--build-tool=ninja', - '--compiler=goma', - '--target=%s' % options.target, - '--goma-dir=%s' % bb_utils.GOMA_DIR] - bb_annotations.PrintNamedStep('compile') - if options.build_targets: - build_targets = options.build_targets.split(',') - cmd += ['--build-args', ' '.join(build_targets)] - RunCmd(cmd, halt_on_failure=True, cwd=DIR_BUILD_ROOT) - - -def ZipBuild(options): - bb_annotations.PrintNamedStep('zip_build') - RunCmd([ - os.path.join(SLAVE_SCRIPTS_DIR, 'zip_build.py'), - '--src-dir', constants.DIR_SOURCE_ROOT, - '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests'] - + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT) - - -def ExtractBuild(options): - bb_annotations.PrintNamedStep('extract_build') - RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')] - + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT) - - -def BisectPerfRegression(options): - args = [] - if options.extra_src: - args = ['--extra_src', options.extra_src] - RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), - '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) - RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), - '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir), - '--build-properties=%s' % json.dumps(options.build_properties)] + - args) - - -def GetHostStepCmds(): - return [ - ('compile', Compile), - ('extract_build', ExtractBuild), - ('check_webview_licenses', CheckWebViewLicenses), - ('bisect_perf_regression', BisectPerfRegression), - ('zip_build', ZipBuild) - ] - - -def GetHostStepsOptParser(): - parser = bb_utils.GetParser() - parser.add_option('--steps', help='Comma separated list of host tests.') - parser.add_option('--build-targets', default='', - help='Comma separated list of build targets.') - parser.add_option('--experimental', action='store_true', - help='Indicate whether to compile experimental targets.') - parser.add_option('--extra_src', default='', - help='Path to extra source file. If this is supplied, ' - 'bisect script will use it to override default behavior.') - - return parser - - -def main(argv): - parser = GetHostStepsOptParser() - options, args = parser.parse_args(argv[1:]) - if args: - return sys.exit('Unused args %s' % args) - - setattr(options, 'target', options.factory_properties.get('target', 'Debug')) - setattr(options, 'extra_src', - options.factory_properties.get('extra_src', '')) - - if options.steps: - bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/buildbot/bb_run_bot.py b/engine/src/flutter/build/android/buildbot/bb_run_bot.py deleted file mode 100755 index 0c8a977c9d..0000000000 --- a/engine/src/flutter/build/android/buildbot/bb_run_bot.py +++ /dev/null @@ -1,320 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -import collections -import copy -import json -import os -import pipes -import re -import subprocess -import sys - -import bb_utils - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from pylib import constants - - -CHROMIUM_COVERAGE_BUCKET = 'chromium-code-coverage' - -_BotConfig = collections.namedtuple( - 'BotConfig', ['bot_id', 'host_obj', 'test_obj']) - -HostConfig = collections.namedtuple( - 'HostConfig', - ['script', 'host_steps', 'extra_args', 'extra_gyp_defines', 'target_arch']) - -TestConfig = collections.namedtuple('Tests', ['script', 'tests', 'extra_args']) - - -def BotConfig(bot_id, host_object, test_object=None): - return _BotConfig(bot_id, host_object, test_object) - - -def DictDiff(d1, d2): - diff = [] - for key in sorted(set(d1.keys() + d2.keys())): - if key in d1 and d1[key] != d2.get(key): - diff.append('- %s=%s' % (key, pipes.quote(d1[key]))) - if key in d2 and d2[key] != d1.get(key): - diff.append('+ %s=%s' % (key, pipes.quote(d2[key]))) - return '\n'.join(diff) - - -def GetEnvironment(host_obj, testing, extra_env_vars=None): - init_env = dict(os.environ) - init_env['GYP_GENERATORS'] = 'ninja' - if extra_env_vars: - init_env.update(extra_env_vars) - envsetup_cmd = '. build/android/envsetup.sh' - if testing: - # Skip envsetup to avoid presubmit dependence on android deps. - print 'Testing mode - skipping "%s"' % envsetup_cmd - envsetup_cmd = ':' - else: - print 'Running %s' % envsetup_cmd - proc = subprocess.Popen(['bash', '-exc', - envsetup_cmd + ' >&2; python build/android/buildbot/env_to_json.py'], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, - cwd=bb_utils.CHROME_SRC, env=init_env) - json_env, envsetup_output = proc.communicate() - if proc.returncode != 0: - print >> sys.stderr, 'FATAL Failure in envsetup.' - print >> sys.stderr, envsetup_output - sys.exit(1) - env = json.loads(json_env) - env['GYP_DEFINES'] = env.get('GYP_DEFINES', '') + \ - ' OS=android fastbuild=1 use_goma=1 gomadir=%s' % bb_utils.GOMA_DIR - if host_obj.target_arch: - env['GYP_DEFINES'] += ' target_arch=%s' % host_obj.target_arch - extra_gyp = host_obj.extra_gyp_defines - if extra_gyp: - env['GYP_DEFINES'] += ' %s' % extra_gyp - if re.search('(asan|clang)=1', extra_gyp): - env.pop('CXX_target', None) - - # Bots checkout chrome in /b/build/slave//build/src - build_internal_android = os.path.abspath(os.path.join( - bb_utils.CHROME_SRC, '..', '..', '..', '..', '..', 'build_internal', - 'scripts', 'slave', 'android')) - if os.path.exists(build_internal_android): - env['PATH'] = os.pathsep.join([build_internal_android, env['PATH']]) - return env - - -def GetCommands(options, bot_config): - """Get a formatted list of commands. - - Args: - options: Options object. - bot_config: A BotConfig named tuple. - host_step_script: Host step script. - device_step_script: Device step script. - Returns: - list of Command objects. - """ - property_args = bb_utils.EncodeProperties(options) - commands = [[bot_config.host_obj.script, - '--steps=%s' % ','.join(bot_config.host_obj.host_steps)] + - property_args + (bot_config.host_obj.extra_args or [])] - - test_obj = bot_config.test_obj - if test_obj: - run_test_cmd = [test_obj.script] + property_args - for test in test_obj.tests: - run_test_cmd.extend(['-f', test]) - if test_obj.extra_args: - run_test_cmd.extend(test_obj.extra_args) - commands.append(run_test_cmd) - return commands - - -def GetBotStepMap(): - compile_step = ['compile'] - chrome_proxy_tests = ['chrome_proxy'] - python_unittests = ['python_unittests'] - std_host_tests = ['check_webview_licenses'] - std_build_steps = ['compile', 'zip_build'] - std_test_steps = ['extract_build'] - std_tests = ['ui', 'unit'] - telemetry_tests = ['telemetry_perf_unittests'] - telemetry_tests_user_build = ['telemetry_unittests', - 'telemetry_perf_unittests'] - trial_tests = [ - 'base_junit_tests', - 'components_browsertests', - 'gfx_unittests', - 'gl_unittests', - ] - flakiness_server = ( - '--flakiness-server=%s' % constants.UPSTREAM_FLAKINESS_SERVER) - experimental = ['--experimental'] - bisect_chrome_output_dir = os.path.abspath( - os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, - os.pardir, 'bisect', 'src', 'out')) - B = BotConfig - H = (lambda steps, extra_args=None, extra_gyp=None, target_arch=None: - HostConfig('build/android/buildbot/bb_host_steps.py', steps, extra_args, - extra_gyp, target_arch)) - T = (lambda tests, extra_args=None: - TestConfig('build/android/buildbot/bb_device_steps.py', tests, - extra_args)) - - bot_configs = [ - # Main builders - B('main-builder-dbg', H(std_build_steps + std_host_tests)), - B('main-builder-rel', H(std_build_steps)), - B('main-clang-builder', - H(compile_step, extra_gyp='clang=1 component=shared_library')), - B('main-clobber', H(compile_step)), - B('main-tests-rel', H(std_test_steps), - T(std_tests + telemetry_tests + chrome_proxy_tests, - ['--cleanup', flakiness_server])), - B('main-tests', H(std_test_steps), - T(std_tests, ['--cleanup', flakiness_server])), - - # Other waterfalls - B('asan-builder-tests', H(compile_step, - extra_gyp='asan=1 component=shared_library'), - T(std_tests, ['--asan', '--asan-symbolize'])), - B('blink-try-builder', H(compile_step)), - B('chromedriver-fyi-tests-dbg', H(std_test_steps), - T(['chromedriver'], - ['--install=ChromeShell', '--install=ChromeDriverWebViewShell', - '--skip-wipe', '--disable-location', '--cleanup'])), - B('fyi-x86-builder-dbg', - H(compile_step + std_host_tests, experimental, target_arch='ia32')), - B('fyi-builder-dbg', - H(std_build_steps + std_host_tests, experimental, - extra_gyp='emma_coverage=1')), - B('x86-builder-dbg', - H(compile_step + std_host_tests, target_arch='ia32')), - B('fyi-builder-rel', H(std_build_steps, experimental)), - B('fyi-tests', H(std_test_steps), - T(std_tests + python_unittests, - ['--experimental', flakiness_server, - '--coverage-bucket', CHROMIUM_COVERAGE_BUCKET, - '--cleanup'])), - B('user-build-fyi-tests-dbg', H(std_test_steps), - T(sorted(telemetry_tests_user_build + trial_tests))), - B('fyi-component-builder-tests-dbg', - H(compile_step, extra_gyp='component=shared_library'), - T(std_tests, ['--experimental', flakiness_server])), - B('gpu-builder-tests-dbg', - H(compile_step), - T(['gpu'], ['--install=ContentShell'])), - # Pass empty T([]) so that logcat monitor and device status check are run. - B('perf-bisect-builder-tests-dbg', - H(['bisect_perf_regression']), - T([], ['--chrome-output-dir', bisect_chrome_output_dir])), - B('perf-tests-rel', H(std_test_steps), - T([], ['--install=ChromeShell', '--cleanup'])), - B('webkit-latest-webkit-tests', H(std_test_steps), - T(['webkit_layout', 'webkit'], ['--cleanup', '--auto-reconnect'])), - B('webkit-latest-contentshell', H(compile_step), - T(['webkit_layout'], ['--auto-reconnect'])), - B('builder-unit-tests', H(compile_step), T(['unit'])), - - # Generic builder config (for substring match). - B('builder', H(std_build_steps)), - ] - - bot_map = dict((config.bot_id, config) for config in bot_configs) - - # These bots have identical configuration to ones defined earlier. - copy_map = [ - ('lkgr-clobber', 'main-clobber'), - ('try-builder-dbg', 'main-builder-dbg'), - ('try-builder-rel', 'main-builder-rel'), - ('try-clang-builder', 'main-clang-builder'), - ('try-fyi-builder-dbg', 'fyi-builder-dbg'), - ('try-x86-builder-dbg', 'x86-builder-dbg'), - ('try-tests-rel', 'main-tests-rel'), - ('try-tests', 'main-tests'), - ('try-fyi-tests', 'fyi-tests'), - ('webkit-latest-tests', 'main-tests'), - ] - for to_id, from_id in copy_map: - assert to_id not in bot_map - # pylint: disable=W0212 - bot_map[to_id] = copy.deepcopy(bot_map[from_id])._replace(bot_id=to_id) - - # Trybots do not upload to flakiness dashboard. They should be otherwise - # identical in configuration to their trunk building counterparts. - test_obj = bot_map[to_id].test_obj - if to_id.startswith('try') and test_obj: - extra_args = test_obj.extra_args - if extra_args and flakiness_server in extra_args: - extra_args.remove(flakiness_server) - return bot_map - - -# Return an object from the map, looking first for an exact id match. -# If this fails, look for an id which is a substring of the specified id. -# Choose the longest of all substring matches. -# pylint: disable=W0622 -def GetBestMatch(id_map, id): - config = id_map.get(id) - if not config: - substring_matches = [x for x in id_map.iterkeys() if x in id] - if substring_matches: - max_id = max(substring_matches, key=len) - print 'Using config from id="%s" (substring match).' % max_id - config = id_map[max_id] - return config - - -def GetRunBotOptParser(): - parser = bb_utils.GetParser() - parser.add_option('--bot-id', help='Specify bot id directly.') - parser.add_option('--testing', action='store_true', - help='For testing: print, but do not run commands') - - return parser - - -def GetBotConfig(options, bot_step_map): - bot_id = options.bot_id or options.factory_properties.get('android_bot_id') - if not bot_id: - print (sys.stderr, - 'A bot id must be specified through option or factory_props.') - return - - bot_config = GetBestMatch(bot_step_map, bot_id) - if not bot_config: - print 'Error: config for id="%s" cannot be inferred.' % bot_id - return bot_config - - -def RunBotCommands(options, commands, env): - print 'Environment changes:' - print DictDiff(dict(os.environ), env) - - for command in commands: - print bb_utils.CommandToString(command) - sys.stdout.flush() - if options.testing: - env['BUILDBOT_TESTING'] = '1' - return_code = subprocess.call(command, cwd=bb_utils.CHROME_SRC, env=env) - if return_code != 0: - return return_code - - -def main(argv): - proc = subprocess.Popen( - ['/bin/hostname', '-f'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - hostname_stdout, hostname_stderr = proc.communicate() - if proc.returncode == 0: - print 'Running on: ' + hostname_stdout - else: - print >> sys.stderr, 'WARNING: failed to run hostname' - print >> sys.stderr, hostname_stdout - print >> sys.stderr, hostname_stderr - sys.exit(1) - - parser = GetRunBotOptParser() - options, args = parser.parse_args(argv[1:]) - if args: - parser.error('Unused args: %s' % args) - - bot_config = GetBotConfig(options, GetBotStepMap()) - if not bot_config: - sys.exit(1) - - print 'Using config:', bot_config - - commands = GetCommands(options, bot_config) - for command in commands: - print 'Will run: ', bb_utils.CommandToString(command) - print - - env = GetEnvironment(bot_config.host_obj, options.testing) - return RunBotCommands(options, commands, env) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/buildbot/bb_utils.py b/engine/src/flutter/build/android/buildbot/bb_utils.py deleted file mode 100644 index 3c16cc2bc5..0000000000 --- a/engine/src/flutter/build/android/buildbot/bb_utils.py +++ /dev/null @@ -1,100 +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. - -import json -import optparse -import os -import pipes -import subprocess -import sys - -import bb_annotations - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from pylib import constants - - -TESTING = 'BUILDBOT_TESTING' in os.environ - -BB_BUILD_DIR = os.path.abspath( - os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, - os.pardir, os.pardir, os.pardir, os.pardir)) - -CHROME_SRC = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..', '..', '..')) - -# TODO: Figure out how to merge this with pylib.cmd_helper.OutDirectory(). -CHROME_OUT_DIR = os.path.join(CHROME_SRC, 'out') - -GOMA_DIR = os.environ.get('GOMA_DIR', os.path.join(BB_BUILD_DIR, 'goma')) - -GSUTIL_PATH = os.path.join(BB_BUILD_DIR, 'third_party', 'gsutil', 'gsutil') - -def CommandToString(command): - """Returns quoted command that can be run in bash shell.""" - return ' '.join(map(pipes.quote, command)) - - -def SpawnCmd(command, stdout=None, cwd=CHROME_SRC): - """Spawn a process without waiting for termination.""" - print '>', CommandToString(command) - sys.stdout.flush() - if TESTING: - class MockPopen(object): - @staticmethod - def wait(): - return 0 - @staticmethod - def communicate(): - return '', '' - return MockPopen() - return subprocess.Popen(command, cwd=cwd, stdout=stdout) - - -def RunCmd(command, flunk_on_failure=True, halt_on_failure=False, - warning_code=constants.WARNING_EXIT_CODE, stdout=None, - cwd=CHROME_SRC): - """Run a command relative to the chrome source root.""" - code = SpawnCmd(command, stdout, cwd).wait() - print '<', CommandToString(command) - if code != 0: - print 'ERROR: process exited with code %d' % code - if code != warning_code and flunk_on_failure: - bb_annotations.PrintError() - else: - bb_annotations.PrintWarning() - # Allow steps to have both halting (i.e. 1) and non-halting exit codes. - if code != warning_code and halt_on_failure: - print 'FATAL %d != %d' % (code, warning_code) - sys.exit(1) - return code - - -def GetParser(): - def ConvertJson(option, _, value, parser): - setattr(parser.values, option.dest, json.loads(value)) - parser = optparse.OptionParser() - parser.add_option('--build-properties', action='callback', - callback=ConvertJson, type='string', default={}, - help='build properties in JSON format') - parser.add_option('--factory-properties', action='callback', - callback=ConvertJson, type='string', default={}, - help='factory properties in JSON format') - return parser - - -def EncodeProperties(options): - return ['--factory-properties=%s' % json.dumps(options.factory_properties), - '--build-properties=%s' % json.dumps(options.build_properties)] - - -def RunSteps(steps, step_cmds, options): - unknown_steps = set(steps) - set(step for step, _ in step_cmds) - if unknown_steps: - print >> sys.stderr, 'FATAL: Unknown steps %s' % list(unknown_steps) - sys.exit(1) - - for step, cmd in step_cmds: - if step in steps: - cmd(options) diff --git a/engine/src/flutter/build/android/buildbot/env_to_json.py b/engine/src/flutter/build/android/buildbot/env_to_json.py deleted file mode 100755 index f9a7a443d3..0000000000 --- a/engine/src/flutter/build/android/buildbot/env_to_json.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/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. - -# Encode current environment into json. - -import json -import os - -print json.dumps(dict(os.environ)) diff --git a/engine/src/flutter/build/android/buildbot/tests/bb_run_bot_test.py b/engine/src/flutter/build/android/buildbot/tests/bb_run_bot_test.py deleted file mode 100755 index 810c60dac2..0000000000 --- a/engine/src/flutter/build/android/buildbot/tests/bb_run_bot_test.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -# 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. - -import os -import subprocess -import sys - -BUILDBOT_DIR = os.path.join(os.path.dirname(__file__), '..') -sys.path.append(BUILDBOT_DIR) -import bb_run_bot - -def RunBotProcesses(bot_process_map): - code = 0 - for bot, proc in bot_process_map: - _, err = proc.communicate() - code |= proc.returncode - if proc.returncode != 0: - print 'Error running the bot script with id="%s"' % bot, err - - return code - - -def main(): - procs = [ - (bot, subprocess.Popen( - [os.path.join(BUILDBOT_DIR, 'bb_run_bot.py'), '--bot-id', bot, - '--testing'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)) - for bot in bb_run_bot.GetBotStepMap()] - return RunBotProcesses(procs) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/chrome_with_libs.gyp b/engine/src/flutter/build/android/chrome_with_libs.gyp deleted file mode 100644 index 690be885f0..0000000000 --- a/engine/src/flutter/build/android/chrome_with_libs.gyp +++ /dev/null @@ -1,82 +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. - -# This file is meant to add more loadable libs into Chrome_apk. -# -# This is useful when building Chrome_apk with some loadable modules which are -# not included in Chrome_apk. -# As an example, when building Chrome_apk with -# libpeer_target_type=loadable_module, -# the libpeerconnection.so is not included in Chrome_apk. To add the missing -# lib, follow the steps below: -# - Run gyp: -# GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" CHROMIUM_GYP_FILE="build/android/chrome_with_libs.gyp" build/gyp_chromium -# - Build chrome_with_libs: -# ninja (or make) chrome_with_libs -# -# This tool also allows replacing the loadable module with a new one via the -# following steps: -# - Build Chrome_apk with the gyp define: -# GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" build/gyp_chromium -# ninja (or make) Chrome_apk -# - Replace libpeerconnection.so with a new one: -# cp the_new_one path/to/libpeerconnection.so -# - Run gyp: -# GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" CHROMIUM_GYP_FILE="build/android/chrome_with_libs.gyp" build/gyp_chromium -# - Build chrome_with_libs: -# ninja (or make) chrome_with_libs -{ - 'targets': [ - { - # An "All" target is required for a top-level gyp-file. - 'target_name': 'All', - 'type': 'none', - 'dependencies': [ - 'chrome_with_libs', - ], - }, - { - 'target_name': 'chrome_with_libs', - 'type': 'none', - 'variables': { - 'intermediate_dir': '<(PRODUCT_DIR)/prebuilt_libs/', - 'chrome_unsigned_path': '<(PRODUCT_DIR)/chrome_apk/Chrome-unsigned.apk', - 'chrome_with_libs_unsigned': '<(intermediate_dir)/Chrome-with-libs-unsigned.apk', - 'chrome_with_libs_final': '<(PRODUCT_DIR)/apks/Chrome-with-libs.apk', - }, - 'dependencies': [ - '<(DEPTH)/clank/native/framework/clank.gyp:chrome_apk' - ], - 'copies': [ - { - 'destination': '<(intermediate_dir)/lib/<(android_app_abi)', - 'files': [ - '<(PRODUCT_DIR)/libpeerconnection.so', - ], - }, - ], - 'actions': [ - { - 'action_name': 'put_libs_in_chrome', - 'variables': { - 'inputs': [ - '<(intermediate_dir)/lib/<(android_app_abi)/libpeerconnection.so', - ], - 'input_apk_path': '<(chrome_unsigned_path)', - 'output_apk_path': '<(chrome_with_libs_unsigned)', - 'libraries_top_dir%': '<(intermediate_dir)', - }, - 'includes': [ 'create_standalone_apk_action.gypi' ], - }, - { - 'action_name': 'finalize_chrome_with_libs', - 'variables': { - 'input_apk_path': '<(chrome_with_libs_unsigned)', - 'output_apk_path': '<(chrome_with_libs_final)', - }, - 'includes': [ 'finalize_apk_action.gypi'], - }, - ], - }], -} diff --git a/engine/src/flutter/build/android/empty/src/.keep b/engine/src/flutter/build/android/empty/src/.keep deleted file mode 100644 index 0f710b673d..0000000000 --- a/engine/src/flutter/build/android/empty/src/.keep +++ /dev/null @@ -1,6 +0,0 @@ -This is a file that needs to live here until http://crbug.com/158155 has -been fixed. - -The ant build system requires that a src folder is always present, and for -some of our targets that is not the case. Giving it an empty src-folder works -nicely though. diff --git a/engine/src/flutter/build/android/empty_proguard.flags b/engine/src/flutter/build/android/empty_proguard.flags deleted file mode 100644 index 53484fe815..0000000000 --- a/engine/src/flutter/build/android/empty_proguard.flags +++ /dev/null @@ -1 +0,0 @@ -# Used for apk targets that do not need proguard. See build/java_apk.gypi. diff --git a/engine/src/flutter/build/android/enable_asserts.py b/engine/src/flutter/build/android/enable_asserts.py deleted file mode 100755 index 8fb7dca472..0000000000 --- a/engine/src/flutter/build/android/enable_asserts.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""Enables dalvik vm asserts in the android device.""" - -import argparse -import sys - -from pylib.device import device_utils - - -def main(): - parser = argparse.ArgumentParser() - - set_asserts_group = parser.add_mutually_exclusive_group(required=True) - set_asserts_group.add_argument( - '--enable_asserts', dest='set_asserts', action='store_true', - help='Sets the dalvik.vm.enableassertions property to "all"') - set_asserts_group.add_argument( - '--disable_asserts', dest='set_asserts', action='store_false', - help='Removes the dalvik.vm.enableassertions property') - - args = parser.parse_args() - - # TODO(jbudorick): Accept optional serial number and run only for the - # specified device when present. - devices = device_utils.DeviceUtils.parallel() - - def set_java_asserts_and_restart(device): - if device.SetJavaAsserts(args.set_asserts): - device.RunShellCommand('stop') - device.RunShellCommand('start') - - devices.pMap(set_java_asserts_and_restart) - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/envsetup.sh b/engine/src/flutter/build/android/envsetup.sh deleted file mode 100755 index 0545330bb2..0000000000 --- a/engine/src/flutter/build/android/envsetup.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# Copyright (c) 2012 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. - -# Sets up environment for building Chromium on Android. - -# Make sure we're being sourced (possibly by another script). Check for bash -# since zsh sets $0 when sourcing. -if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then - echo "ERROR: envsetup must be sourced." - exit 1 -fi - -# This only exists to set local variables. Don't call this manually. -android_envsetup_main() { - local SCRIPT_PATH="$1" - local SCRIPT_DIR="$(dirname "$SCRIPT_PATH")" - - local CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")" - if [[ -z "${CHROME_SRC}" ]]; then - # If $CHROME_SRC was not set, assume current directory is CHROME_SRC. - local CHROME_SRC="${CURRENT_DIR}" - fi - - if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then - # If current directory is not in $CHROME_SRC, it might be set for other - # source tree. If $CHROME_SRC was set correctly and we are in the correct - # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". - # Otherwise, it will equal to "${CURRENT_DIR}" - echo "Warning: Current directory is out of CHROME_SRC, it may not be \ - the one you want." - echo "${CHROME_SRC}" - fi - - # Allow the caller to override a few environment variables. If any of them is - # unset, we default to a sane value that's known to work. This allows for - # experimentation with a custom SDK. - if [[ -z "${ANDROID_SDK_ROOT}" || ! -d "${ANDROID_SDK_ROOT}" ]]; then - local ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" - fi - - # Add Android SDK tools to system path. - export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools - - # Add Android utility tools to the system path. - export PATH=$PATH:${ANDROID_SDK_ROOT}/tools/ - - # Add Chromium Android development scripts to system path. - # Must be after CHROME_SRC is set. - export PATH=$PATH:${CHROME_SRC}/build/android - - export ENVSETUP_GYP_CHROME_SRC=${CHROME_SRC} # TODO(thakis): Remove. -} -# In zsh, $0 is the name of the file being sourced. -android_envsetup_main "${BASH_SOURCE:-$0}" -unset -f android_envsetup_main - -android_gyp() { - echo "Please call build/gyp_chromium instead. android_gyp is going away." - "${ENVSETUP_GYP_CHROME_SRC}/build/gyp_chromium" --depth="${ENVSETUP_GYP_CHROME_SRC}" --check "$@" -} diff --git a/engine/src/flutter/build/android/findbugs_diff.py b/engine/src/flutter/build/android/findbugs_diff.py deleted file mode 100755 index f55e46261b..0000000000 --- a/engine/src/flutter/build/android/findbugs_diff.py +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""Runs findbugs, and returns an error code if there are new warnings. - -Other options - --only-analyze used to only analyze the class you are interested. - --relase-build analyze the classes in out/Release directory. - --findbugs-args used to passin other findbugs's options. - -Run - $CHROMIUM_SRC/third_party/findbugs/bin/findbugs -textui for details. - -""" - -import argparse -import os -import sys - -from pylib import constants -from pylib.utils import findbugs - -_DEFAULT_BASE_DIR = os.path.join( - constants.DIR_SOURCE_ROOT, 'build', 'android', 'findbugs_filter') - -sys.path.append( - os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp')) -from util import build_utils - - -def main(): - parser = argparse.ArgumentParser() - - parser.add_argument( - '-a', '--auxclasspath', default=None, dest='auxclasspath', - help='Set aux classpath for analysis.') - parser.add_argument( - '--auxclasspath-gyp', dest='auxclasspath_gyp', - help='A gyp list containing the aux classpath for analysis') - parser.add_argument( - '-o', '--only-analyze', default=None, - dest='only_analyze', help='Only analyze the given classes and packages.') - parser.add_argument( - '-e', '--exclude', default=None, dest='exclude', - help='Exclude bugs matching given filter.') - parser.add_argument( - '-l', '--release-build', action='store_true', dest='release_build', - help='Analyze release build instead of debug.') - parser.add_argument( - '-f', '--findbug-args', default=None, dest='findbug_args', - help='Additional findbug arguments.') - parser.add_argument( - '-b', '--base-dir', default=_DEFAULT_BASE_DIR, - dest='base_dir', help='Base directory for configuration file.') - parser.add_argument( - '--output-file', dest='output_file', - help='Path to save the output to.') - parser.add_argument( - '--stamp', help='Path to touch on success.') - parser.add_argument( - '--depfile', help='Path to the depfile. This must be specified as the ' - "action's first output.") - - parser.add_argument( - 'jar_paths', metavar='JAR_PATH', nargs='+', - help='JAR file to analyze') - - args = parser.parse_args(build_utils.ExpandFileArgs(sys.argv[1:])) - if args.auxclasspath: - args.auxclasspath = args.auxclasspath.split(':') - elif args.auxclasspath_gyp: - args.auxclasspath = build_utils.ParseGypList(args.auxclasspath_gyp) - - if args.base_dir: - if not args.exclude: - args.exclude = os.path.join(args.base_dir, 'findbugs_exclude.xml') - - findbugs_command, findbugs_warnings = findbugs.Run( - args.exclude, args.only_analyze, args.auxclasspath, - args.output_file, args.findbug_args, args.jar_paths) - - if findbugs_warnings: - print - print '*' * 80 - print 'FindBugs run via:' - print findbugs_command - print - print 'FindBugs reported the following issues:' - for warning in sorted(findbugs_warnings): - print str(warning) - print '*' * 80 - print - else: - if args.depfile: - build_utils.WriteDepfile( - args.depfile, - build_utils.GetPythonDependencies() + args.auxclasspath - + args.jar_paths) - if args.stamp: - build_utils.Touch(args.stamp) - - return len(findbugs_warnings) - - -if __name__ == '__main__': - sys.exit(main()) - diff --git a/engine/src/flutter/build/android/findbugs_filter/findbugs_exclude.xml b/engine/src/flutter/build/android/findbugs_filter/findbugs_exclude.xml deleted file mode 100644 index dbff9d9667..0000000000 --- a/engine/src/flutter/build/android/findbugs_filter/findbugs_exclude.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/engine/src/flutter/build/android/generate_emma_html.py b/engine/src/flutter/build/android/generate_emma_html.py deleted file mode 100755 index 93b0b0e59c..0000000000 --- a/engine/src/flutter/build/android/generate_emma_html.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env 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. - -"""Aggregates EMMA coverage files to produce html output.""" - -import fnmatch -import json -import optparse -import os -import sys - -from pylib import cmd_helper -from pylib import constants - - -def _GetFilesWithExt(root_dir, ext): - """Gets all files with a given extension. - - Args: - root_dir: Directory in which to search for files. - ext: Extension to look for (including dot) - - Returns: - A list of absolute paths to files that match. - """ - files = [] - for root, _, filenames in os.walk(root_dir): - basenames = fnmatch.filter(filenames, '*.' + ext) - files.extend([os.path.join(root, basename) - for basename in basenames]) - - return files - - -def main(): - option_parser = optparse.OptionParser() - option_parser.add_option('--output', help='HTML output filename.') - option_parser.add_option('--coverage-dir', default=None, - help=('Root of the directory in which to search for ' - 'coverage data (.ec) files.')) - option_parser.add_option('--metadata-dir', default=None, - help=('Root of the directory in which to search for ' - 'coverage metadata (.em) files.')) - option_parser.add_option('--cleanup', action='store_true', - help=('If set, removes coverage files generated at ' - 'runtime.')) - options, _ = option_parser.parse_args() - - if not (options.coverage_dir and options.metadata_dir and options.output): - option_parser.error('One or more mandatory options are missing.') - - coverage_files = _GetFilesWithExt(options.coverage_dir, 'ec') - metadata_files = _GetFilesWithExt(options.metadata_dir, 'em') - print 'Found coverage files: %s' % str(coverage_files) - print 'Found metadata files: %s' % str(metadata_files) - - sources = [] - for f in metadata_files: - sources_file = os.path.splitext(f)[0] + '_sources.txt' - with open(sources_file, 'r') as sf: - sources.extend(json.load(sf)) - sources = [os.path.join(constants.DIR_SOURCE_ROOT, s) for s in sources] - print 'Sources: %s' % sources - - input_args = [] - for f in coverage_files + metadata_files: - input_args.append('-in') - input_args.append(f) - - output_args = ['-Dreport.html.out.file', options.output] - source_args = ['-sp', ','.join(sources)] - - exit_code = cmd_helper.RunCmd( - ['java', '-cp', - os.path.join(constants.ANDROID_SDK_ROOT, 'tools', 'lib', 'emma.jar'), - 'emma', 'report', '-r', 'html'] - + input_args + output_args + source_args) - - if options.cleanup: - for f in coverage_files: - os.remove(f) - - return exit_code - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gn/zip.py b/engine/src/flutter/build/android/gn/zip.py deleted file mode 100755 index 5050ea0710..0000000000 --- a/engine/src/flutter/build/android/gn/zip.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/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. - -"""Archives a set of files. -""" - -import ast -import optparse -import os -import sys -import zipfile - -sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'gyp')) -from util import build_utils - -def DoZip(inputs, output, base_dir): - with zipfile.ZipFile(output, 'w') as outfile: - for f in inputs: - outfile.write(f, os.path.relpath(f, base_dir)) - -def main(): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--inputs', help='List of files to archive.') - parser.add_option('--output', help='Path to output archive.') - parser.add_option('--base-dir', - help='If provided, the paths in the archive will be ' - 'relative to this directory', default='.') - - options, _ = parser.parse_args() - - inputs = ast.literal_eval(options.inputs) - output = options.output - base_dir = options.base_dir - - DoZip(inputs, output, base_dir) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/aidl.py b/engine/src/flutter/build/android/gyp/aidl.py deleted file mode 100755 index d5aa546770..0000000000 --- a/engine/src/flutter/build/android/gyp/aidl.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/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. - -"""Invokes Android's aidl -""" - -import optparse -import os -import sys - -from util import build_utils - - -def main(argv): - option_parser = optparse.OptionParser() - build_utils.AddDepfileOption(option_parser) - option_parser.add_option('--aidl-path', help='Path to the aidl binary.') - option_parser.add_option('--imports', help='Files to import.') - option_parser.add_option('--includes', - help='Directories to add as import search paths.') - option_parser.add_option('--srcjar', help='Path for srcjar output.') - options, args = option_parser.parse_args(argv[1:]) - - with build_utils.TempDir() as temp_dir: - for f in args: - classname = os.path.splitext(os.path.basename(f))[0] - output = os.path.join(temp_dir, classname + '.java') - aidl_cmd = [options.aidl_path] - aidl_cmd += [ - '-p' + s for s in build_utils.ParseGypList(options.imports) - ] - if options.includes is not None: - aidl_cmd += [ - '-I' + s for s in build_utils.ParseGypList(options.includes) - ] - aidl_cmd += [ - f, - output - ] - build_utils.CheckOutput(aidl_cmd) - - build_utils.ZipDir(options.srcjar, temp_dir) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/gyp/ant.py b/engine/src/flutter/build/android/gyp/ant.py deleted file mode 100755 index 5394b9ec7d..0000000000 --- a/engine/src/flutter/build/android/gyp/ant.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env 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. - -"""An Ant wrapper that suppresses useless Ant output. - -Ant build scripts output "BUILD SUCCESSFUL" and build timing at the end of -every build. In the Android build, this just adds a lot of useless noise to the -build output. This script forwards its arguments to ant, and prints Ant's -output up until the BUILD SUCCESSFUL line. - -Also, when a command fails, this script will re-run that ant command with the -'-verbose' argument so that the failure is easier to debug. -""" - -import optparse -import sys -import traceback - -from util import build_utils - - -def main(argv): - option_parser = optparse.OptionParser() - build_utils.AddDepfileOption(option_parser) - options, args = option_parser.parse_args(argv[1:]) - - try: - stdout = build_utils.CheckOutput(['ant'] + args) - except build_utils.CalledProcessError: - # It is very difficult to diagnose ant failures without the '-verbose' - # argument. So, when an ant command fails, re-run it with '-verbose' so that - # the cause of the failure is easier to identify. - verbose_args = ['-verbose'] + [a for a in args if a != '-quiet'] - try: - stdout = build_utils.CheckOutput(['ant'] + verbose_args) - except build_utils.CalledProcessError: - traceback.print_exc() - sys.exit(1) - - # If this did sys.exit(1), building again would succeed (which would be - # awkward). Instead, just print a big warning. - build_utils.PrintBigWarning( - 'This is unexpected. `ant ' + ' '.join(args) + '` failed.' + - 'But, running `ant ' + ' '.join(verbose_args) + '` passed.') - - stdout = stdout.strip().split('\n') - for line in stdout: - if line.strip() == 'BUILD SUCCESSFUL': - break - print line - - if options.depfile: - assert '-buildfile' in args - ant_buildfile = args[args.index('-buildfile') + 1] - - build_utils.WriteDepfile( - options.depfile, - [ant_buildfile] + build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/gyp/apk_install.py b/engine/src/flutter/build/android/gyp/apk_install.py deleted file mode 100755 index a512e50e3d..0000000000 --- a/engine/src/flutter/build/android/gyp/apk_install.py +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env 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. - -"""Installs an APK. - -""" - -import optparse -import os -import re -import sys - -from util import build_device -from util import build_utils -from util import md5_check - -BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') -sys.path.append(BUILD_ANDROID_DIR) - -from pylib import constants -from pylib.utils import apk_helper - - -def GetNewMetadata(device, apk_package): - """Gets the metadata on the device for the apk_package apk.""" - output = device.RunShellCommand('ls -l /data/app/') - # Matches lines like: - # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ - # org.chromium.chrome.shell.apk - # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ - # org.chromium.chrome.shell-1.apk - apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?(.apk)?$' % apk_package, s) - matches = filter(apk_matcher, output) - return matches[0] if matches else None - -def HasInstallMetadataChanged(device, apk_package, metadata_path): - """Checks if the metadata on the device for apk_package has changed.""" - if not os.path.exists(metadata_path): - return True - - with open(metadata_path, 'r') as expected_file: - return expected_file.read() != device.GetInstallMetadata(apk_package) - - -def RecordInstallMetadata(device, apk_package, metadata_path): - """Records the metadata from the device for apk_package.""" - metadata = GetNewMetadata(device, apk_package) - if not metadata: - raise Exception('APK install failed unexpectedly.') - - with open(metadata_path, 'w') as outfile: - outfile.write(metadata) - - -def main(): - parser = optparse.OptionParser() - parser.add_option('--apk-path', - help='Path to .apk to install.') - parser.add_option('--split-apk-path', - help='Path to .apk splits (can specify multiple times, causes ' - '--install-multiple to be used.', - action='append') - parser.add_option('--android-sdk-tools', - help='Path to the Android SDK build tools folder. ' + - 'Required when using --split-apk-path.') - parser.add_option('--install-record', - help='Path to install record (touched only when APK is installed).') - parser.add_option('--build-device-configuration', - help='Path to build device configuration.') - parser.add_option('--stamp', - help='Path to touch on success.') - parser.add_option('--configuration-name', - help='The build CONFIGURATION_NAME') - options, _ = parser.parse_args() - - device = build_device.GetBuildDeviceFromPath( - options.build_device_configuration) - if not device: - return - - constants.SetBuildType(options.configuration_name) - - serial_number = device.GetSerialNumber() - apk_package = apk_helper.GetPackageName(options.apk_path) - - metadata_path = '%s.%s.device.time.stamp' % (options.apk_path, serial_number) - - # If the APK on the device does not match the one that was last installed by - # the build, then the APK has to be installed (regardless of the md5 record). - force_install = HasInstallMetadataChanged(device, apk_package, metadata_path) - - - def Install(): - if options.split_apk_path: - device.InstallSplitApk(options.apk_path, options.split_apk_path) - else: - device.Install(options.apk_path, reinstall=True) - - RecordInstallMetadata(device, apk_package, metadata_path) - build_utils.Touch(options.install_record) - - - record_path = '%s.%s.md5.stamp' % (options.apk_path, serial_number) - md5_check.CallAndRecordIfStale( - Install, - record_path=record_path, - input_paths=[options.apk_path], - force=force_install) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/apk_obfuscate.py b/engine/src/flutter/build/android/gyp/apk_obfuscate.py deleted file mode 100755 index b075758800..0000000000 --- a/engine/src/flutter/build/android/gyp/apk_obfuscate.py +++ /dev/null @@ -1,147 +0,0 @@ -#!/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. - -"""Generates the obfuscated jar and test jar for an apk. - -If proguard is not enabled or 'Release' is not in the configuration name, -obfuscation will be a no-op. -""" - -import optparse -import os -import sys - -from util import build_utils -from util import proguard_util - - -def ParseArgs(argv): - parser = optparse.OptionParser() - parser.add_option('--android-sdk', help='path to the Android SDK folder') - parser.add_option('--android-sdk-tools', - help='path to the Android SDK build tools folder') - parser.add_option('--android-sdk-jar', - help='path to Android SDK\'s android.jar') - parser.add_option('--proguard-jar-path', - help='Path to proguard.jar in the sdk') - parser.add_option('--input-jars-paths', - help='Path to jars to include in obfuscated jar') - - parser.add_option('--proguard-configs', - help='Paths to proguard config files') - - parser.add_option('--configuration-name', - help='Gyp configuration name (i.e. Debug, Release)') - parser.add_option('--proguard-enabled', action='store_true', - help='Set if proguard is enabled for this target.') - - parser.add_option('--obfuscated-jar-path', - help='Output path for obfuscated jar.') - - parser.add_option('--testapp', action='store_true', - help='Set this if building an instrumentation test apk') - parser.add_option('--tested-apk-obfuscated-jar-path', - help='Path to obfusctated jar of the tested apk') - parser.add_option('--test-jar-path', - help='Output path for jar containing all the test apk\'s ' - 'code.') - - parser.add_option('--stamp', help='File to touch on success') - - (options, args) = parser.parse_args(argv) - - if args: - parser.error('No positional arguments should be given. ' + str(args)) - - # Check that required options have been provided. - required_options = ( - 'android_sdk', - 'android_sdk_tools', - 'android_sdk_jar', - 'proguard_jar_path', - 'input_jars_paths', - 'configuration_name', - 'obfuscated_jar_path', - ) - - if options.testapp: - required_options += ( - 'test_jar_path', - ) - - build_utils.CheckOptions(options, parser, required=required_options) - return options, args - - -def DoProguard(options): - proguard = proguard_util.ProguardCmdBuilder(options.proguard_jar_path) - proguard.outjar(options.obfuscated_jar_path) - - library_classpath = [options.android_sdk_jar] - input_jars = build_utils.ParseGypList(options.input_jars_paths) - - exclude_paths = [] - configs = build_utils.ParseGypList(options.proguard_configs) - if options.tested_apk_obfuscated_jar_path: - # configs should only contain the process_resources.py generated config. - assert len(configs) == 1, ( - 'test apks should not have custom proguard configs: ' + str(configs)) - tested_jar_info = build_utils.ReadJson( - options.tested_apk_obfuscated_jar_path + '.info') - exclude_paths = tested_jar_info['inputs'] - configs = tested_jar_info['configs'] - - proguard.is_test(True) - proguard.mapping(options.tested_apk_obfuscated_jar_path + '.mapping') - library_classpath.append(options.tested_apk_obfuscated_jar_path) - - proguard.libraryjars(library_classpath) - proguard_injars = [p for p in input_jars if p not in exclude_paths] - proguard.injars(proguard_injars) - proguard.configs(configs) - - proguard.CheckOutput() - - this_info = { - 'inputs': proguard_injars, - 'configs': configs - } - - build_utils.WriteJson( - this_info, options.obfuscated_jar_path + '.info') - - -def main(argv): - options, _ = ParseArgs(argv) - - input_jars = build_utils.ParseGypList(options.input_jars_paths) - - if options.testapp: - dependency_class_filters = [ - '*R.class', '*R$*.class', '*Manifest.class', '*BuildConfig.class'] - build_utils.MergeZips( - options.test_jar_path, input_jars, dependency_class_filters) - - if options.configuration_name == 'Release' and options.proguard_enabled: - DoProguard(options) - else: - output_files = [ - options.obfuscated_jar_path, - options.obfuscated_jar_path + '.info', - options.obfuscated_jar_path + '.dump', - options.obfuscated_jar_path + '.seeds', - options.obfuscated_jar_path + '.usage', - options.obfuscated_jar_path + '.mapping'] - for f in output_files: - if os.path.exists(f): - os.remove(f) - build_utils.Touch(f) - - if options.stamp: - build_utils.Touch(options.stamp) - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/copy_ex.py b/engine/src/flutter/build/android/gyp/copy_ex.py deleted file mode 100755 index a474e77065..0000000000 --- a/engine/src/flutter/build/android/gyp/copy_ex.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/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. - -"""Copies files to a directory.""" - -import optparse -import os -import shutil -import sys - -from util import build_utils - - -def _get_all_files(base): - """Returns a list of all the files in |base|. Each entry is relative to the - last path entry of |base|.""" - result = [] - dirname = os.path.dirname(base) - for root, _, files in os.walk(base): - result.extend([os.path.join(root[len(dirname):], f) for f in files]) - return result - - -def main(args): - args = build_utils.ExpandFileArgs(args) - - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--dest', help='Directory to copy files to.') - parser.add_option('--files', action='append', - help='List of files to copy.') - parser.add_option('--clear', action='store_true', - help='If set, the destination directory will be deleted ' - 'before copying files to it. This is highly recommended to ' - 'ensure that no stale files are left in the directory.') - parser.add_option('--stamp', help='Path to touch on success.') - - options, _ = parser.parse_args(args) - - if options.clear: - build_utils.DeleteDirectory(options.dest) - build_utils.MakeDirectory(options.dest) - - files = [] - for file_arg in options.files: - files += build_utils.ParseGypList(file_arg) - - deps = [] - - for f in files: - if os.path.isdir(f): - if not options.clear: - print ('To avoid stale files you must use --clear when copying ' - 'directories') - sys.exit(-1) - shutil.copytree(f, os.path.join(options.dest, os.path.basename(f))) - deps.extend(_get_all_files(f)) - else: - shutil.copy(f, options.dest) - deps.append(f) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - deps + build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) - diff --git a/engine/src/flutter/build/android/gyp/create_device_library_links.py b/engine/src/flutter/build/android/gyp/create_device_library_links.py deleted file mode 100755 index 3e630b67c9..0000000000 --- a/engine/src/flutter/build/android/gyp/create_device_library_links.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env 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. - -"""Creates symlinks to native libraries for an APK. - -The native libraries should have previously been pushed to the device (in -options.target_dir). This script then creates links in an apk's lib/ folder to -those native libraries. -""" - -import optparse -import os -import sys - -from util import build_device -from util import build_utils - -BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') -sys.path.append(BUILD_ANDROID_DIR) - -from pylib import constants -from pylib.utils import apk_helper - -def RunShellCommand(device, cmd): - output = device.RunShellCommand(cmd) - - if output: - raise Exception( - 'Unexpected output running command: ' + cmd + '\n' + - '\n'.join(output)) - - -def CreateSymlinkScript(options): - libraries = build_utils.ParseGypList(options.libraries) - - link_cmd = ( - 'rm $APK_LIBRARIES_DIR/%(lib_basename)s > /dev/null 2>&1 \n' - 'ln -s $STRIPPED_LIBRARIES_DIR/%(lib_basename)s ' - '$APK_LIBRARIES_DIR/%(lib_basename)s \n' - ) - - script = '#!/bin/sh \n' - - for lib in libraries: - script += link_cmd % { 'lib_basename': lib } - - with open(options.script_host_path, 'w') as scriptfile: - scriptfile.write(script) - - -def TriggerSymlinkScript(options): - device = build_device.GetBuildDeviceFromPath( - options.build_device_configuration) - if not device: - return - - apk_package = apk_helper.GetPackageName(options.apk) - apk_libraries_dir = '/data/data/%s/lib' % apk_package - - device_dir = os.path.dirname(options.script_device_path) - mkdir_cmd = ('if [ ! -e %(dir)s ]; then mkdir -p %(dir)s; fi ' % - { 'dir': device_dir }) - RunShellCommand(device, mkdir_cmd) - device.PushChangedFiles([(options.script_host_path, - options.script_device_path)]) - - trigger_cmd = ( - 'APK_LIBRARIES_DIR=%(apk_libraries_dir)s; ' - 'STRIPPED_LIBRARIES_DIR=%(target_dir)s; ' - '. %(script_device_path)s' - ) % { - 'apk_libraries_dir': apk_libraries_dir, - 'target_dir': options.target_dir, - 'script_device_path': options.script_device_path - } - RunShellCommand(device, trigger_cmd) - - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - parser.add_option('--apk', help='Path to the apk.') - parser.add_option('--script-host-path', - help='Path on the host for the symlink script.') - parser.add_option('--script-device-path', - help='Path on the device to push the created symlink script.') - parser.add_option('--libraries', - help='List of native libraries.') - parser.add_option('--target-dir', - help='Device directory that contains the target libraries for symlinks.') - parser.add_option('--stamp', help='Path to touch on success.') - parser.add_option('--build-device-configuration', - help='Path to build device configuration.') - parser.add_option('--configuration-name', - help='The build CONFIGURATION_NAME') - options, _ = parser.parse_args(args) - - required_options = ['apk', 'libraries', 'script_host_path', - 'script_device_path', 'target_dir', 'configuration_name'] - build_utils.CheckOptions(options, parser, required=required_options) - constants.SetBuildType(options.configuration_name) - - CreateSymlinkScript(options) - TriggerSymlinkScript(options) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/create_dist_jar.py b/engine/src/flutter/build/android/gyp/create_dist_jar.py deleted file mode 100755 index 0d31c5db93..0000000000 --- a/engine/src/flutter/build/android/gyp/create_dist_jar.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/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. - -"""Merges a list of jars into a single jar.""" - -import optparse -import sys - -from util import build_utils - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--output', help='Path to output jar.') - parser.add_option('--inputs', action='append', help='List of jar inputs.') - options, _ = parser.parse_args(args) - build_utils.CheckOptions(options, parser, ['output', 'inputs']) - - input_jars = [] - for inputs_arg in options.inputs: - input_jars.extend(build_utils.ParseGypList(inputs_arg)) - - build_utils.MergeZips(options.output, input_jars) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - input_jars + build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/create_flutter_jar.py b/engine/src/flutter/build/android/gyp/create_flutter_jar.py deleted file mode 100644 index c30bae2bd9..0000000000 --- a/engine/src/flutter/build/android/gyp/create_flutter_jar.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2016 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. - -"""Create a JAR incorporating all the components required to build a Flutter application""" - -import optparse -import os -import sys -import zipfile - -from util import build_utils - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--output', help='Path to output jar.') - parser.add_option('--dist_jar', help='Flutter shell Java code jar.') - parser.add_option('--native_lib', action='append', help='Native code library.') - parser.add_option('--android_abi', help='Native code ABI.') - parser.add_option('--asset_dir', help='Path to assets.') - options, _ = parser.parse_args(args) - build_utils.CheckOptions(options, parser, [ - 'output', 'dist_jar', 'native_lib', 'android_abi', 'asset_dir' - ]) - - input_deps = [] - - with zipfile.ZipFile(options.output, 'w', zipfile.ZIP_DEFLATED) as out_zip: - input_deps.append(options.dist_jar) - with zipfile.ZipFile(options.dist_jar, 'r') as dist_zip: - for dist_file in dist_zip.infolist(): - if dist_file.filename.endswith('.class'): - out_zip.writestr(dist_file.filename, dist_zip.read(dist_file.filename)) - - for native_lib in options.native_lib: - input_deps.append(native_lib) - out_zip.write(native_lib, - 'lib/%s/%s' % (options.android_abi, os.path.basename(native_lib))) - - for asset_file in os.listdir(options.asset_dir): - input_deps.append(asset_file) - out_zip.write(os.path.join(options.asset_dir, asset_file), - 'assets/%s' % asset_file) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - input_deps + build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) 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 deleted file mode 100755 index 5de43f2d4a..0000000000 --- a/engine/src/flutter/build/android/gyp/create_java_binary_script.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/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. - -"""Creates a simple script to run a java "binary". - -This creates a script that sets up the java command line for running a java -jar. This includes correctly setting the classpath and the main class. -""" - -import optparse -import os -import sys - -from util import build_utils - -# The java command must be executed in the current directory because there may -# be user-supplied paths in the args. The script receives the classpath relative -# to the directory that the script is written in and then, when run, must -# recalculate the paths relative to the current directory. -script_template = """\ -#!/usr/bin/env python -# -# This file was generated by build/android/gyp/create_java_binary_script.py - -import os -import sys - -self_dir = os.path.dirname(__file__) -classpath = [{classpath}] -if os.getcwd() != self_dir: - offset = os.path.relpath(self_dir, os.getcwd()) - classpath = [os.path.join(offset, p) for p in classpath] -java_args = [ - "java", - "-classpath", ":".join(classpath), - "-enableassertions", - \"{main_class}\"] + sys.argv[1:] -os.execvp("java", java_args) -""" - -def main(argv): - argv = build_utils.ExpandFileArgs(argv) - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--output', help='Output path for executable script.') - parser.add_option('--jar-path', help='Path to the main jar.') - parser.add_option('--main-class', - help='Name of the java class with the "main" entry point.') - parser.add_option('--classpath', action='append', - help='Classpath for running the jar.') - options, _ = parser.parse_args(argv) - - classpath = [options.jar_path] - for cp_arg in options.classpath: - classpath += build_utils.ParseGypList(cp_arg) - - run_dir = os.path.dirname(options.output) - classpath = [os.path.relpath(p, run_dir) for p in classpath] - - with open(options.output, 'w') as script: - script.write(script_template.format( - classpath=('"%s"' % '", "'.join(classpath)), - main_class=options.main_class)) - - os.chmod(options.output, 0750) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/create_placeholder_files.py b/engine/src/flutter/build/android/gyp/create_placeholder_files.py deleted file mode 100755 index 103e1df7f2..0000000000 --- a/engine/src/flutter/build/android/gyp/create_placeholder_files.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/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. - -"""Create placeholder files. -""" - -import optparse -import os -import sys - -from util import build_utils - -def main(): - parser = optparse.OptionParser() - parser.add_option( - '--dest-lib-dir', - help='Destination directory to have placeholder files.') - parser.add_option( - '--stamp', - help='Path to touch on success') - - options, args = parser.parse_args() - - for name in args: - target_path = os.path.join(options.dest_lib_dir, name) - build_utils.Touch(target_path) - - if options.stamp: - build_utils.Touch(options.stamp) - -if __name__ == '__main__': - sys.exit(main()) - diff --git a/engine/src/flutter/build/android/gyp/create_standalone_apk.py b/engine/src/flutter/build/android/gyp/create_standalone_apk.py deleted file mode 100755 index c560599286..0000000000 --- a/engine/src/flutter/build/android/gyp/create_standalone_apk.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env 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. - -"""Combines stripped libraries and incomplete APK into single standalone APK. - -""" - -import optparse -import os -import shutil -import sys -import tempfile - -from util import build_utils -from util import md5_check - -def CreateStandaloneApk(options): - def DoZip(): - with tempfile.NamedTemporaryFile(suffix='.zip') as intermediate_file: - intermediate_path = intermediate_file.name - shutil.copy(options.input_apk_path, intermediate_path) - apk_path_abs = os.path.abspath(intermediate_path) - build_utils.CheckOutput( - ['zip', '-r', '-1', apk_path_abs, 'lib'], - cwd=options.libraries_top_dir) - shutil.copy(intermediate_path, options.output_apk_path) - - input_paths = [options.input_apk_path, options.libraries_top_dir] - record_path = '%s.standalone.stamp' % options.input_apk_path - md5_check.CallAndRecordIfStale( - DoZip, - record_path=record_path, - input_paths=input_paths) - - -def main(): - parser = optparse.OptionParser() - parser.add_option('--libraries-top-dir', - help='Top directory that contains libraries ' - '(i.e. library paths are like ' - 'libraries_top_dir/lib/android_app_abi/foo.so).') - parser.add_option('--input-apk-path', help='Path to incomplete APK.') - parser.add_option('--output-apk-path', help='Path for standalone APK.') - parser.add_option('--stamp', help='Path to touch on success.') - options, _ = parser.parse_args() - - required_options = ['libraries_top_dir', 'input_apk_path', 'output_apk_path'] - build_utils.CheckOptions(options, parser, required=required_options) - - CreateStandaloneApk(options) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main()) 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 deleted file mode 100755 index 247bf20ad5..0000000000 --- a/engine/src/flutter/build/android/gyp/create_test_runner_script.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/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 script to run an android test using build/android/test_runner.py. -""" - -import argparse -import os -import sys - -from util import build_utils - -SCRIPT_TEMPLATE = """\ -#!/usr/bin/env python -# -# This file was generated by build/android/gyp/create_test_runner_script.py - -import logging -import os -import sys - -def main(): - script_directory = os.path.dirname(__file__) - - def ResolvePath(path): - \"\"\"Returns an absolute filepath given a path relative to this script. - \"\"\" - return os.path.abspath(os.path.join(script_directory, path)) - - test_runner_path = ResolvePath('{test_runner_path}') - test_runner_args = {test_runner_args} - test_runner_path_args = {test_runner_path_args} - for arg, path in test_runner_path_args.iteritems(): - test_runner_args.extend([arg, ResolvePath(path)]) - - test_runner_cmd = ' '.join( - [test_runner_path] + test_runner_args + sys.argv[1:]) - logging.critical(test_runner_cmd) - os.system(test_runner_cmd) - -if __name__ == '__main__': - sys.exit(main()) -""" - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('--script-output-path', - help='Output path for executable script.') - parser.add_argument('--depfile', - help='Path to the depfile. This must be specified as ' - "the action's first output.") - # We need to intercept any test runner path arguments and make all - # of the paths relative to the output script directory. - 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): - """Returns the path relative to the output script directory.""" - return os.path.relpath(path, os.path.dirname(args.script_output_path)) - - test_runner_path = os.path.join( - os.path.dirname(__file__), os.path.pardir, 'test_runner.py') - test_runner_path = RelativizePathToScript(test_runner_path) - - test_runner_path_args = {} - if args.output_directory: - test_runner_path_args['--output-directory'] = RelativizePathToScript( - args.output_directory) - 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( - test_runner_path=str(test_runner_path), - test_runner_args=str(test_runner_args), - test_runner_path_args=str(test_runner_path_args))) - - os.chmod(args.script_output_path, 0750) - - if args.depfile: - build_utils.WriteDepfile( - args.depfile, - build_utils.GetPythonDependencies()) - -if __name__ == '__main__': - sys.exit(main()) \ No newline at end of file diff --git a/engine/src/flutter/build/android/gyp/dex.py b/engine/src/flutter/build/android/gyp/dex.py deleted file mode 100755 index c26d23a611..0000000000 --- a/engine/src/flutter/build/android/gyp/dex.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env 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. - -import optparse -import os -import sys - -from util import build_utils -from util import md5_check - - -def DoDex(options, paths): - dx_binary = os.path.join(options.android_sdk_tools, 'dx') - # See http://crbug.com/272064 for context on --force-jumbo. - dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', options.dex_path] - if options.no_locals != '0': - dex_cmd.append('--no-locals') - - dex_cmd += paths - - record_path = '%s.md5.stamp' % options.dex_path - md5_check.CallAndRecordIfStale( - lambda: build_utils.CheckOutput(dex_cmd, print_stderr=False), - record_path=record_path, - input_paths=paths, - input_strings=dex_cmd, - force=not os.path.exists(options.dex_path)) - build_utils.WriteJson( - [os.path.relpath(p, options.output_directory) for p in paths], - options.dex_path + '.inputs') - - -def main(): - args = build_utils.ExpandFileArgs(sys.argv[1:]) - - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - 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.') - parser.add_option('--proguard-enabled', - help='"true" if proguard is enabled.') - parser.add_option('--proguard-enabled-input-path', - help=('Path to dex in Release mode when proguard ' - 'is enabled.')) - parser.add_option('--no-locals', - help='Exclude locals list from the dex file.') - parser.add_option('--inputs', help='A list of additional input paths.') - parser.add_option('--excluded-paths', - help='A list of paths to exclude from the dex file.') - - options, paths = parser.parse_args(args) - - required_options = ('android_sdk_tools',) - build_utils.CheckOptions(options, parser, required=required_options) - - if (options.proguard_enabled == 'true' - and options.configuration_name == 'Release'): - paths = [options.proguard_enabled_input_path] - - if options.inputs: - 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 - os.path.relpath(p, options.output_directory) in exclude_paths] - - DoDex(options, paths) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - paths + build_utils.GetPythonDependencies()) - - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/emma_instr.py b/engine/src/flutter/build/android/gyp/emma_instr.py deleted file mode 100755 index 6f3555a327..0000000000 --- a/engine/src/flutter/build/android/gyp/emma_instr.py +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env 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. - -"""Instruments classes and jar files. - -This script corresponds to the 'emma_instr' action in the java build process. -Depending on whether emma_instrument is set, the 'emma_instr' action will either -call one of the instrument commands, or the copy command. - -Possible commands are: -- instrument_jar: Accepts a jar and instruments it using emma.jar. -- instrument_classes: Accepts a directory containing java classes and - instruments it using emma.jar. -- copy: Called when EMMA coverage is not enabled. This allows us to make - this a required step without necessarily instrumenting on every build. - Also removes any stale coverage files. -""" - -import collections -import json -import os -import shutil -import sys -import tempfile - -sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) -from pylib.utils import command_option_parser - -from util import build_utils - - -def _AddCommonOptions(option_parser): - """Adds common options to |option_parser|.""" - option_parser.add_option('--input-path', - help=('Path to input file(s). Either the classes ' - 'directory, or the path to a jar.')) - option_parser.add_option('--output-path', - help=('Path to output final file(s) to. Either the ' - 'final classes directory, or the directory in ' - 'which to place the instrumented/copied jar.')) - option_parser.add_option('--stamp', help='Path to touch when done.') - option_parser.add_option('--coverage-file', - help='File to create with coverage metadata.') - option_parser.add_option('--sources-file', - help='File to create with the list of sources.') - - -def _AddInstrumentOptions(option_parser): - """Adds options related to instrumentation to |option_parser|.""" - _AddCommonOptions(option_parser) - option_parser.add_option('--sources', - help='Space separated list of sources.') - option_parser.add_option('--src-root', - help='Root of the src repository.') - option_parser.add_option('--emma-jar', - help='Path to emma.jar.') - option_parser.add_option( - '--filter-string', default='', - help=('Filter string consisting of a list of inclusion/exclusion ' - 'patterns separated with whitespace and/or comma.')) - - -def _RunCopyCommand(_command, options, _, option_parser): - """Copies the jar from input to output locations. - - Also removes any old coverage/sources file. - - Args: - command: String indicating the command that was received to trigger - this function. - options: optparse options dictionary. - args: List of extra args from optparse. - option_parser: optparse.OptionParser object. - - Returns: - An exit code. - """ - if not (options.input_path and options.output_path and - options.coverage_file and options.sources_file): - option_parser.error('All arguments are required.') - - coverage_file = os.path.join(os.path.dirname(options.output_path), - options.coverage_file) - sources_file = os.path.join(os.path.dirname(options.output_path), - options.sources_file) - if os.path.exists(coverage_file): - os.remove(coverage_file) - if os.path.exists(sources_file): - os.remove(sources_file) - - if os.path.isdir(options.input_path): - shutil.rmtree(options.output_path, ignore_errors=True) - shutil.copytree(options.input_path, options.output_path) - else: - shutil.copy(options.input_path, options.output_path) - - if options.stamp: - build_utils.Touch(options.stamp) - - -def _CreateSourcesFile(sources_string, sources_file, src_root): - """Adds all normalized source directories to |sources_file|. - - Args: - sources_string: String generated from gyp containing the list of sources. - sources_file: File into which to write the JSON list of sources. - src_root: Root which sources added to the file should be relative to. - - Returns: - An exit code. - """ - src_root = os.path.abspath(src_root) - sources = build_utils.ParseGypList(sources_string) - relative_sources = [] - for s in sources: - abs_source = os.path.abspath(s) - if abs_source[:len(src_root)] != src_root: - print ('Error: found source directory not under repository root: %s %s' - % (abs_source, src_root)) - return 1 - rel_source = os.path.relpath(abs_source, src_root) - - relative_sources.append(rel_source) - - with open(sources_file, 'w') as f: - json.dump(relative_sources, f) - - -def _RunInstrumentCommand(command, options, _, option_parser): - """Instruments the classes/jar files using EMMA. - - Args: - command: 'instrument_jar' or 'instrument_classes'. This distinguishes - whether we copy the output from the created lib/ directory, or classes/ - directory. - options: optparse options dictionary. - args: List of extra args from optparse. - option_parser: optparse.OptionParser object. - - Returns: - An exit code. - """ - if not (options.input_path and options.output_path and - options.coverage_file and options.sources_file and options.sources and - options.src_root and options.emma_jar): - option_parser.error('All arguments are required.') - - coverage_file = os.path.join(os.path.dirname(options.output_path), - options.coverage_file) - sources_file = os.path.join(os.path.dirname(options.output_path), - options.sources_file) - if os.path.exists(coverage_file): - os.remove(coverage_file) - temp_dir = tempfile.mkdtemp() - try: - cmd = ['java', '-cp', options.emma_jar, - 'emma', 'instr', - '-ip', options.input_path, - '-ix', options.filter_string, - '-d', temp_dir, - '-out', coverage_file, - '-m', 'fullcopy'] - build_utils.CheckOutput(cmd) - - if command == 'instrument_jar': - for jar in os.listdir(os.path.join(temp_dir, 'lib')): - shutil.copy(os.path.join(temp_dir, 'lib', jar), - options.output_path) - else: # 'instrument_classes' - if os.path.isdir(options.output_path): - shutil.rmtree(options.output_path, ignore_errors=True) - shutil.copytree(os.path.join(temp_dir, 'classes'), - options.output_path) - finally: - shutil.rmtree(temp_dir) - - _CreateSourcesFile(options.sources, sources_file, options.src_root) - - if options.stamp: - build_utils.Touch(options.stamp) - - return 0 - - -CommandFunctionTuple = collections.namedtuple( - 'CommandFunctionTuple', ['add_options_func', 'run_command_func']) -VALID_COMMANDS = { - 'copy': CommandFunctionTuple(_AddCommonOptions, - _RunCopyCommand), - 'instrument_jar': CommandFunctionTuple(_AddInstrumentOptions, - _RunInstrumentCommand), - 'instrument_classes': CommandFunctionTuple(_AddInstrumentOptions, - _RunInstrumentCommand), -} - - -def main(): - option_parser = command_option_parser.CommandOptionParser( - commands_dict=VALID_COMMANDS) - command_option_parser.ParseAndExecute(option_parser) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/finalize_apk.py b/engine/src/flutter/build/android/gyp/finalize_apk.py deleted file mode 100755 index 0a8003508b..0000000000 --- a/engine/src/flutter/build/android/gyp/finalize_apk.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env 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. -"""Signs and zipaligns APK. - -""" - -import optparse -import shutil -import sys -import tempfile - -from util import build_utils - -def RenameInflateAndAddPageAlignment( - rezip_apk_jar_path, in_zip_file, out_zip_file): - rezip_apk_cmd = [ - 'java', - '-classpath', - rezip_apk_jar_path, - 'RezipApk', - 'renamealign', - in_zip_file, - out_zip_file, - ] - build_utils.CheckOutput(rezip_apk_cmd) - - -def ReorderAndAlignApk(rezip_apk_jar_path, in_zip_file, out_zip_file): - rezip_apk_cmd = [ - 'java', - '-classpath', - rezip_apk_jar_path, - 'RezipApk', - 'reorder', - in_zip_file, - out_zip_file, - ] - build_utils.CheckOutput(rezip_apk_cmd) - - -def JarSigner(key_path, key_name, key_passwd, unsigned_path, signed_path): - shutil.copy(unsigned_path, signed_path) - sign_cmd = [ - 'jarsigner', - '-sigalg', 'MD5withRSA', - '-digestalg', 'SHA1', - '-keystore', key_path, - '-storepass', key_passwd, - signed_path, - key_name, - ] - build_utils.CheckOutput(sign_cmd) - - -def AlignApk(zipalign_path, unaligned_path, final_path): - align_cmd = [ - zipalign_path, - '-f', '4', # 4 bytes - unaligned_path, - final_path, - ] - build_utils.CheckOutput(align_cmd) - - -def main(): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--rezip-apk-jar-path', - help='Path to the RezipApk jar file.') - parser.add_option('--zipalign-path', help='Path to the zipalign tool.') - parser.add_option('--unsigned-apk-path', help='Path to input unsigned APK.') - parser.add_option('--final-apk-path', - help='Path to output signed and aligned APK.') - parser.add_option('--key-path', help='Path to keystore for signing.') - parser.add_option('--key-passwd', help='Keystore password') - parser.add_option('--key-name', help='Keystore name') - parser.add_option('--stamp', help='Path to touch on success.') - parser.add_option('--load-library-from-zip', type='int', - help='If non-zero, build the APK such that the library can be loaded ' + - 'directly from the zip file using the crazy linker. The library ' + - 'will be renamed, uncompressed and page aligned.') - - options, _ = parser.parse_args() - - FinalizeApk(options) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - -def FinalizeApk(options): - with tempfile.NamedTemporaryFile() as signed_apk_path_tmp, \ - tempfile.NamedTemporaryFile() as apk_to_sign_tmp: - - if options.load_library_from_zip: - # We alter the name of the library so that the Android Package Manager - # does not extract it into a separate file. This must be done before - # signing, as the filename is part of the signed manifest. At the same - # time we uncompress the library, which is necessary so that it can be - # loaded directly from the APK. - # Move the library to a page boundary by adding a page alignment file. - apk_to_sign = apk_to_sign_tmp.name - RenameInflateAndAddPageAlignment( - options.rezip_apk_jar_path, options.unsigned_apk_path, apk_to_sign) - else: - apk_to_sign = options.unsigned_apk_path - - signed_apk_path = signed_apk_path_tmp.name - JarSigner(options.key_path, options.key_name, options.key_passwd, - apk_to_sign, signed_apk_path) - - if options.load_library_from_zip: - # Reorder the contents of the APK. This re-establishes the canonical - # order which means the library will be back at its page aligned location. - # This step also aligns uncompressed items to 4 bytes. - ReorderAndAlignApk( - options.rezip_apk_jar_path, signed_apk_path, options.final_apk_path) - else: - # Align uncompressed items to 4 bytes - AlignApk(options.zipalign_path, signed_apk_path, options.final_apk_path) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/finalize_splits.py b/engine/src/flutter/build/android/gyp/finalize_splits.py deleted file mode 100755 index a6796bbe4f..0000000000 --- a/engine/src/flutter/build/android/gyp/finalize_splits.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/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. -"""Signs and zipaligns split APKs. - -This script is require only by GYP (not GN). -""" - -import optparse -import sys - -import finalize_apk -from util import build_utils - -def main(): - parser = optparse.OptionParser() - parser.add_option('--zipalign-path', help='Path to the zipalign tool.') - parser.add_option('--resource-packaged-apk-path', - help='Base path to input .ap_s.') - parser.add_option('--base-output-path', - help='Path to output .apk, minus extension.') - parser.add_option('--key-path', help='Path to keystore for signing.') - parser.add_option('--key-passwd', help='Keystore password') - 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.resource_packaged_apk_path, density)) - options.final_apk_path = ("%s-density-%s.apk" % - (options.base_output_path, density)) - finalize_apk.FinalizeApk(options) - - 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.py b/engine/src/flutter/build/android/gyp/find.py deleted file mode 100755 index a9f1d49855..0000000000 --- a/engine/src/flutter/build/android/gyp/find.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/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. - -"""Finds files in directories. -""" - -import fnmatch -import optparse -import os -import sys - - -def main(argv): - parser = optparse.OptionParser() - parser.add_option('--pattern', default='*', help='File pattern to match.') - options, directories = parser.parse_args(argv) - - for d in directories: - if not os.path.exists(d): - print >> sys.stderr, '%s does not exist' % d - return 1 - for root, _, filenames in os.walk(d): - for f in fnmatch.filter(filenames, options.pattern): - print os.path.join(root, f) - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) 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 deleted file mode 100755 index 2f15a154ab..0000000000 --- a/engine/src/flutter/build/android/gyp/find_sun_tools_jar.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/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/gcc_preprocess.py b/engine/src/flutter/build/android/gyp/gcc_preprocess.py deleted file mode 100755 index 03becf918f..0000000000 --- a/engine/src/flutter/build/android/gyp/gcc_preprocess.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env 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. - -import optparse -import os -import sys - -from util import build_utils - -def DoGcc(options): - build_utils.MakeDirectory(os.path.dirname(options.output)) - - gcc_cmd = [ 'gcc' ] # invoke host gcc. - if options.defines: - gcc_cmd.extend(sum(map(lambda w: ['-D', w], options.defines), [])) - gcc_cmd.extend([ - '-E', # stop after preprocessing. - '-D', 'ANDROID', # Specify ANDROID define for pre-processor. - '-x', 'c-header', # treat sources as C header files - '-P', # disable line markers, i.e. '#line 309' - '-I', options.include_path, - '-o', options.output, - options.template - ]) - - build_utils.CheckOutput(gcc_cmd) - - -def main(args): - args = build_utils.ExpandFileArgs(args) - - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--include-path', help='Include path for gcc.') - parser.add_option('--template', help='Path to template.') - parser.add_option('--output', help='Path for generated file.') - parser.add_option('--stamp', help='Path to touch on success.') - parser.add_option('--defines', help='Pre-defines macros', action='append') - - options, _ = parser.parse_args(args) - - DoGcc(options) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/generate_split_manifest.py b/engine/src/flutter/build/android/gyp/generate_split_manifest.py deleted file mode 100755 index 9cb3bca4b5..0000000000 --- a/engine/src/flutter/build/android/gyp/generate_split_manifest.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/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 an AndroidManifest.xml for an APK split. - -Given the manifest file for the main APK, generates an AndroidManifest.xml with -the value required for a Split APK (package, versionCode, etc). -""" - -import optparse -import xml.etree.ElementTree - -from util import build_utils - -MANIFEST_TEMPLATE = """ - - - - - -""" - -def ParseArgs(): - """Parses command line options. - - Returns: - An options object as from optparse.OptionsParser.parse_args() - """ - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--main-manifest', help='The main manifest of the app') - parser.add_option('--out-manifest', help='The output manifest') - parser.add_option('--split', help='The name of the split') - parser.add_option( - '--has-code', - action='store_true', - default=False, - help='Whether the split will contain a .dex file') - - (options, args) = parser.parse_args() - - if args: - parser.error('No positional arguments should be given.') - - # Check that required options have been provided. - required_options = ('main_manifest', 'out_manifest', 'split') - build_utils.CheckOptions(options, parser, required=required_options) - - return options - - -def Build(main_manifest, split, has_code): - """Builds a split manifest based on the manifest of the main APK. - - Args: - main_manifest: the XML manifest of the main APK as a string - split: the name of the split as a string - has_code: whether this split APK will contain .dex files - - Returns: - The XML split manifest as a string - """ - - doc = xml.etree.ElementTree.fromstring(main_manifest) - package = doc.get('package') - - return MANIFEST_TEMPLATE % { - 'package': package, - 'split': split.replace('-', '_'), - 'has_code': str(has_code).lower() - } - - -def main(): - options = ParseArgs() - main_manifest = file(options.main_manifest).read() - split_manifest = Build( - main_manifest, - options.split, - options.has_code) - - with file(options.out_manifest, 'w') as f: - f.write(split_manifest) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - [options.main_manifest] + build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/android/gyp/generate_v14_compatible_resources.py b/engine/src/flutter/build/android/gyp/generate_v14_compatible_resources.py deleted file mode 100755 index 9c8ff3b4e9..0000000000 --- a/engine/src/flutter/build/android/gyp/generate_v14_compatible_resources.py +++ /dev/null @@ -1,319 +0,0 @@ -#!/usr/bin/env 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. - -"""Convert Android xml resources to API 14 compatible. - -There are two reasons that we cannot just use API 17 attributes, -so we are generating another set of resources by this script. - -1. paddingStart attribute can cause a crash on Galaxy Tab 2. -2. There is a bug that paddingStart does not override paddingLeft on - JB-MR1. This is fixed on JB-MR2. b/8654490 - -Therefore, this resource generation script can be removed when -we drop the support for JB-MR1. - -Please refer to http://crbug.com/235118 for the details. -""" - -import optparse -import os -import re -import shutil -import sys -import xml.dom.minidom as minidom - -from util import build_utils - -# Note that we are assuming 'android:' is an alias of -# the namespace 'http://schemas.android.com/apk/res/android'. - -GRAVITY_ATTRIBUTES = ('android:gravity', 'android:layout_gravity') - -# Almost all the attributes that has "Start" or "End" in -# its name should be mapped. -ATTRIBUTES_TO_MAP = {'paddingStart' : 'paddingLeft', - 'drawableStart' : 'drawableLeft', - 'layout_alignStart' : 'layout_alignLeft', - 'layout_marginStart' : 'layout_marginLeft', - 'layout_alignParentStart' : 'layout_alignParentLeft', - 'layout_toStartOf' : 'layout_toLeftOf', - 'paddingEnd' : 'paddingRight', - 'drawableEnd' : 'drawableRight', - 'layout_alignEnd' : 'layout_alignRight', - 'layout_marginEnd' : 'layout_marginRight', - 'layout_alignParentEnd' : 'layout_alignParentRight', - 'layout_toEndOf' : 'layout_toRightOf'} - -ATTRIBUTES_TO_MAP = dict(['android:' + k, 'android:' + v] for k, v - in ATTRIBUTES_TO_MAP.iteritems()) - -ATTRIBUTES_TO_MAP_REVERSED = dict([v, k] for k, v - in ATTRIBUTES_TO_MAP.iteritems()) - - -def IterateXmlElements(node): - """minidom helper function that iterates all the element nodes. - Iteration order is pre-order depth-first.""" - if node.nodeType == node.ELEMENT_NODE: - yield node - for child_node in node.childNodes: - for child_node_element in IterateXmlElements(child_node): - yield child_node_element - - -def ParseAndReportErrors(filename): - try: - return minidom.parse(filename) - except Exception: - import traceback - traceback.print_exc() - sys.stderr.write('Failed to parse XML file: %s\n' % filename) - sys.exit(1) - - -def AssertNotDeprecatedAttribute(name, value, filename): - """Raises an exception if the given attribute is deprecated.""" - msg = None - if name in ATTRIBUTES_TO_MAP_REVERSED: - msg = '{0} should use {1} instead of {2}'.format(filename, - ATTRIBUTES_TO_MAP_REVERSED[name], name) - elif name in GRAVITY_ATTRIBUTES and ('left' in value or 'right' in value): - msg = '{0} should use start/end instead of left/right for {1}'.format( - filename, name) - - if msg: - msg += ('\nFor background, see: http://android-developers.blogspot.com/' - '2013/03/native-rtl-support-in-android-42.html\n' - 'If you have a legitimate need for this attribute, discuss with ' - 'kkimlabs@chromium.org or newt@chromium.org') - raise Exception(msg) - - -def WriteDomToFile(dom, filename): - """Write the given dom to filename.""" - build_utils.MakeDirectory(os.path.dirname(filename)) - with open(filename, 'w') as f: - dom.writexml(f, '', ' ', '\n', encoding='utf-8') - - -def HasStyleResource(dom): - """Return True if the dom is a style resource, False otherwise.""" - root_node = IterateXmlElements(dom).next() - return bool(root_node.nodeName == 'resources' and - list(root_node.getElementsByTagName('style'))) - - -def ErrorIfStyleResourceExistsInDir(input_dir): - """If a style resource is in input_dir, raises an exception.""" - for input_filename in build_utils.FindInDirectory(input_dir, '*.xml'): - dom = ParseAndReportErrors(input_filename) - if HasStyleResource(dom): - raise Exception('error: style file ' + input_filename + - ' should be under ' + input_dir + - '-v17 directory. Please refer to ' - 'http://crbug.com/243952 for the details.') - - -def GenerateV14LayoutResourceDom(dom, filename, assert_not_deprecated=True): - """Convert layout resource to API 14 compatible layout resource. - - Args: - dom: Parsed minidom object to be modified. - filename: Filename that the DOM was parsed from. - assert_not_deprecated: Whether deprecated attributes (e.g. paddingLeft) will - cause an exception to be thrown. - - Returns: - True if dom is modified, False otherwise. - """ - is_modified = False - - # Iterate all the elements' attributes to find attributes to convert. - for element in IterateXmlElements(dom): - for name, value in list(element.attributes.items()): - # Convert any API 17 Start/End attributes to Left/Right attributes. - # For example, from paddingStart="10dp" to paddingLeft="10dp" - # Note: gravity attributes are not necessary to convert because - # start/end values are backward-compatible. Explained at - # https://plus.sandbox.google.com/+RomanNurik/posts/huuJd8iVVXY?e=Showroom - if name in ATTRIBUTES_TO_MAP: - element.setAttribute(ATTRIBUTES_TO_MAP[name], value) - del element.attributes[name] - is_modified = True - elif assert_not_deprecated: - AssertNotDeprecatedAttribute(name, value, filename) - - return is_modified - - -def GenerateV14StyleResourceDom(dom, filename, assert_not_deprecated=True): - """Convert style resource to API 14 compatible style resource. - - Args: - dom: Parsed minidom object to be modified. - filename: Filename that the DOM was parsed from. - assert_not_deprecated: Whether deprecated attributes (e.g. paddingLeft) will - cause an exception to be thrown. - - Returns: - True if dom is modified, False otherwise. - """ - is_modified = False - - for style_element in dom.getElementsByTagName('style'): - for item_element in style_element.getElementsByTagName('item'): - name = item_element.attributes['name'].value - value = item_element.childNodes[0].nodeValue - if name in ATTRIBUTES_TO_MAP: - item_element.attributes['name'].value = ATTRIBUTES_TO_MAP[name] - is_modified = True - elif assert_not_deprecated: - AssertNotDeprecatedAttribute(name, value, filename) - - return is_modified - - -def GenerateV14LayoutResource(input_filename, output_v14_filename, - output_v17_filename): - """Convert API 17 layout resource to API 14 compatible layout resource. - - It's mostly a simple replacement, s/Start/Left s/End/Right, - on the attribute names. - If the generated resource is identical to the original resource, - don't do anything. If not, write the generated resource to - output_v14_filename, and copy the original resource to output_v17_filename. - """ - dom = ParseAndReportErrors(input_filename) - is_modified = GenerateV14LayoutResourceDom(dom, input_filename) - - if is_modified: - # Write the generated resource. - WriteDomToFile(dom, output_v14_filename) - - # Copy the original resource. - build_utils.MakeDirectory(os.path.dirname(output_v17_filename)) - shutil.copy2(input_filename, output_v17_filename) - - -def GenerateV14StyleResource(input_filename, output_v14_filename): - """Convert API 17 style resources to API 14 compatible style resource. - - Write the generated style resource to output_v14_filename. - It's mostly a simple replacement, s/Start/Left s/End/Right, - on the attribute names. - """ - dom = ParseAndReportErrors(input_filename) - GenerateV14StyleResourceDom(dom, input_filename) - - # Write the generated resource. - WriteDomToFile(dom, output_v14_filename) - - -def GenerateV14LayoutResourcesInDir(input_dir, output_v14_dir, output_v17_dir): - """Convert layout resources to API 14 compatible resources in input_dir.""" - for input_filename in build_utils.FindInDirectory(input_dir, '*.xml'): - rel_filename = os.path.relpath(input_filename, input_dir) - output_v14_filename = os.path.join(output_v14_dir, rel_filename) - output_v17_filename = os.path.join(output_v17_dir, rel_filename) - GenerateV14LayoutResource(input_filename, output_v14_filename, - output_v17_filename) - - -def GenerateV14StyleResourcesInDir(input_dir, output_v14_dir): - """Convert style resources to API 14 compatible resources in input_dir.""" - for input_filename in build_utils.FindInDirectory(input_dir, '*.xml'): - rel_filename = os.path.relpath(input_filename, input_dir) - output_v14_filename = os.path.join(output_v14_dir, rel_filename) - GenerateV14StyleResource(input_filename, output_v14_filename) - - -def ParseArgs(): - """Parses command line options. - - Returns: - An options object as from optparse.OptionsParser.parse_args() - """ - parser = optparse.OptionParser() - parser.add_option('--res-dir', - help='directory containing resources ' - 'used to generate v14 compatible resources') - parser.add_option('--res-v14-compatibility-dir', - help='output directory into which ' - 'v14 compatible resources will be generated') - parser.add_option('--stamp', help='File to touch on success') - - options, args = parser.parse_args() - - if args: - parser.error('No positional arguments should be given.') - - # Check that required options have been provided. - required_options = ('res_dir', 'res_v14_compatibility_dir') - build_utils.CheckOptions(options, parser, required=required_options) - return options - -def GenerateV14Resources(res_dir, res_v14_dir): - for name in os.listdir(res_dir): - if not os.path.isdir(os.path.join(res_dir, name)): - continue - - dir_pieces = name.split('-') - resource_type = dir_pieces[0] - qualifiers = dir_pieces[1:] - - api_level_qualifier_index = -1 - api_level_qualifier = '' - for index, qualifier in enumerate(qualifiers): - if re.match('v[0-9]+$', qualifier): - api_level_qualifier_index = index - api_level_qualifier = qualifier - break - - # Android pre-v17 API doesn't support RTL. Skip. - if 'ldrtl' in qualifiers: - continue - - input_dir = os.path.abspath(os.path.join(res_dir, name)) - - # We also need to copy the original v17 resource to *-v17 directory - # because the generated v14 resource will hide the original resource. - output_v14_dir = os.path.join(res_v14_dir, name) - output_v17_dir = os.path.join(res_v14_dir, name + '-v17') - - # We only convert layout resources under layout*/, xml*/, - # and style resources under values*/. - if resource_type in ('layout', 'xml'): - if not api_level_qualifier: - GenerateV14LayoutResourcesInDir(input_dir, output_v14_dir, - output_v17_dir) - elif resource_type == 'values': - if api_level_qualifier == 'v17': - output_qualifiers = qualifiers[:] - del output_qualifiers[api_level_qualifier_index] - output_v14_dir = os.path.join(res_v14_dir, - '-'.join([resource_type] + - output_qualifiers)) - GenerateV14StyleResourcesInDir(input_dir, output_v14_dir) - elif not api_level_qualifier: - ErrorIfStyleResourceExistsInDir(input_dir) - -def main(): - options = ParseArgs() - - res_v14_dir = options.res_v14_compatibility_dir - - build_utils.DeleteDirectory(res_v14_dir) - build_utils.MakeDirectory(res_v14_dir) - - GenerateV14Resources(options.res_dir, res_v14_dir) - - if options.stamp: - build_utils.Touch(options.stamp) - -if __name__ == '__main__': - sys.exit(main()) - diff --git a/engine/src/flutter/build/android/gyp/get_device_configuration.py b/engine/src/flutter/build/android/gyp/get_device_configuration.py deleted file mode 100755 index 390eb2ffcb..0000000000 --- a/engine/src/flutter/build/android/gyp/get_device_configuration.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env 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. - -"""Gets and writes the configurations of the attached devices. - -This configuration is used by later build steps to determine which devices to -install to and what needs to be installed to those devices. -""" - -import optparse -import sys - -from util import build_utils -from util import build_device - - -def main(argv): - parser = optparse.OptionParser() - parser.add_option('--stamp', action='store') - parser.add_option('--output', action='store') - options, _ = parser.parse_args(argv) - - devices = build_device.GetAttachedDevices() - - device_configurations = [] - for d in devices: - configuration, is_online, has_root = ( - build_device.GetConfigurationForDevice(d)) - - if not is_online: - build_utils.PrintBigWarning( - '%s is not online. Skipping managed install for this device. ' - 'Try rebooting the device to fix this warning.' % d) - continue - - if not has_root: - build_utils.PrintBigWarning( - '"adb root" failed on device: %s\n' - 'Skipping managed install for this device.' - % configuration['description']) - continue - - device_configurations.append(configuration) - - if len(device_configurations) == 0: - build_utils.PrintBigWarning( - 'No valid devices attached. Skipping managed install steps.') - elif len(devices) > 1: - # Note that this checks len(devices) and not len(device_configurations). - # This way, any time there are multiple devices attached it is - # explicitly stated which device we will install things to even if all but - # one device were rejected for other reasons (e.g. two devices attached, - # one w/o root). - build_utils.PrintBigWarning( - 'Multiple devices attached. ' - 'Installing to the preferred device: ' - '%(id)s (%(description)s)' % (device_configurations[0])) - - - build_device.WriteConfigurations(device_configurations, options.output) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/gyp/insert_chromium_version.py b/engine/src/flutter/build/android/gyp/insert_chromium_version.py deleted file mode 100755 index 171f9d41b8..0000000000 --- a/engine/src/flutter/build/android/gyp/insert_chromium_version.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/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. - -"""Insert a version string into a library as a section '.chromium.version'. -""" - -import optparse -import os -import sys -import tempfile - -from util import build_utils - -def InsertChromiumVersion(android_objcopy, - library_path, - version_string): - # Remove existing .chromium.version section from .so - objcopy_command = [android_objcopy, - '--remove-section=.chromium.version', - library_path] - build_utils.CheckOutput(objcopy_command) - - # Add a .chromium.version section. - with tempfile.NamedTemporaryFile() as stream: - stream.write(version_string) - stream.flush() - objcopy_command = [android_objcopy, - '--add-section', '.chromium.version=%s' % stream.name, - library_path] - build_utils.CheckOutput(objcopy_command) - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - - parser.add_option('--android-objcopy', - help='Path to the toolchain\'s objcopy binary') - parser.add_option('--stripped-libraries-dir', - help='Directory of native libraries') - parser.add_option('--libraries', - help='List of libraries') - parser.add_option('--version-string', - help='Version string to be inserted') - parser.add_option('--stamp', help='Path to touch on success') - - options, _ = parser.parse_args(args) - libraries = build_utils.ParseGypList(options.libraries) - - for library in libraries: - library_path = os.path.join(options.stripped_libraries_dir, library) - - InsertChromiumVersion(options.android_objcopy, - library_path, - options.version_string) - - if options.stamp: - build_utils.Touch(options.stamp) - - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/jar.py b/engine/src/flutter/build/android/gyp/jar.py deleted file mode 100755 index 48abf5edb7..0000000000 --- a/engine/src/flutter/build/android/gyp/jar.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env 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. - -import fnmatch -import optparse -import os -import sys - -from util import build_utils -from util import md5_check - - -def Jar(class_files, classes_dir, jar_path, manifest_file=None): - jar_path = os.path.abspath(jar_path) - - # The paths of the files in the jar will be the same as they are passed in to - # the command. Because of this, the command should be run in - # options.classes_dir so the .class file paths in the jar are correct. - jar_cwd = classes_dir - class_files_rel = [os.path.relpath(f, jar_cwd) for f in class_files] - jar_cmd = ['jar', 'cf0', jar_path] - if manifest_file: - jar_cmd[1] += 'm' - jar_cmd.append(os.path.abspath(manifest_file)) - jar_cmd.extend(class_files_rel) - - with build_utils.TempDir() as temp_dir: - empty_file = os.path.join(temp_dir, '.empty') - build_utils.Touch(empty_file) - jar_cmd.append(os.path.relpath(empty_file, jar_cwd)) - record_path = '%s.md5.stamp' % jar_path - md5_check.CallAndRecordIfStale( - lambda: build_utils.CheckOutput(jar_cmd, cwd=jar_cwd), - record_path=record_path, - input_paths=class_files, - input_strings=jar_cmd, - force=not os.path.exists(jar_path), - ) - - build_utils.Touch(jar_path, fail_if_missing=True) - - -def JarDirectory(classes_dir, excluded_classes, jar_path, manifest_file=None): - class_files = build_utils.FindInDirectory(classes_dir, '*.class') - for exclude in excluded_classes: - class_files = filter( - lambda f: not fnmatch.fnmatch(f, exclude), class_files) - - Jar(class_files, classes_dir, jar_path, manifest_file=manifest_file) - - -def main(): - parser = optparse.OptionParser() - parser.add_option('--classes-dir', help='Directory containing .class files.') - parser.add_option('--jar-path', help='Jar output path.') - parser.add_option('--excluded-classes', - help='List of .class file patterns to exclude from the jar.') - parser.add_option('--stamp', help='Path to touch on success.') - - options, _ = parser.parse_args() - - if options.excluded_classes: - excluded_classes = build_utils.ParseGypList(options.excluded_classes) - else: - excluded_classes = [] - JarDirectory(options.classes_dir, - excluded_classes, - options.jar_path) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main()) - diff --git a/engine/src/flutter/build/android/gyp/jar_toc.py b/engine/src/flutter/build/android/gyp/jar_toc.py deleted file mode 100755 index 00d97d211f..0000000000 --- a/engine/src/flutter/build/android/gyp/jar_toc.py +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env 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. - -"""Creates a TOC file from a Java jar. - -The TOC file contains the non-package API of the jar. This includes all -public/protected/package classes/functions/members and the values of static -final variables (members with package access are kept because in some cases we -have multiple libraries with the same package, particularly test+non-test). Some -other information (major/minor javac version) is also included. - -This TOC file then can be used to determine if a dependent library should be -rebuilt when this jar changes. I.e. any change to the jar that would require a -rebuild, will have a corresponding change in the TOC file. -""" - -import optparse -import os -import re -import sys -import zipfile - -from util import build_utils -from util import md5_check - - -def GetClassesInZipFile(zip_file): - classes = [] - files = zip_file.namelist() - for f in files: - if f.endswith('.class'): - # f is of the form org/chromium/base/Class$Inner.class - classes.append(f.replace('/', '.')[:-6]) - return classes - - -def CallJavap(classpath, classes): - 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): - # javap output is structured by indent (2-space) levels. - good_patterns = [ - '^[^ ]', # This includes all class/function/member signatures. - '^ SourceFile:', - '^ minor version:', - '^ major version:', - '^ Constant value:', - ] - bad_patterns = [ - '^const #', # Matches the constant pool (i.e. literals used in the class). - ] - - def JavapFilter(line): - return (re.match('|'.join(good_patterns), line) and - not re.match('|'.join(bad_patterns), line)) - toc = filter(JavapFilter, disassembled_classes.split('\n')) - - return '\n'.join(toc) - - -def UpdateToc(jar_path, toc_path): - classes = GetClassesInZipFile(zipfile.ZipFile(jar_path)) - toc = [] - - limit = 1000 # Split into multiple calls to stay under command size limit - for i in xrange(0, len(classes), limit): - javap_output = CallJavap(classpath=jar_path, classes=classes[i:i+limit]) - toc.append(ExtractToc(javap_output)) - - with open(toc_path, 'w') as tocfile: - tocfile.write(''.join(toc)) - - -def DoJarToc(options): - jar_path = options.jar_path - toc_path = options.toc_path - record_path = '%s.md5.stamp' % toc_path - md5_check.CallAndRecordIfStale( - lambda: UpdateToc(jar_path, toc_path), - record_path=record_path, - input_paths=[jar_path], - force=not os.path.exists(toc_path), - ) - build_utils.Touch(toc_path, fail_if_missing=True) - - -def main(): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--jar-path', help='Input .jar path.') - parser.add_option('--toc-path', help='Output .jar.TOC path.') - parser.add_option('--stamp', help='Path to touch on success.') - - options, _ = parser.parse_args() - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - DoJarToc(options) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/gyp/java_cpp_enum.py b/engine/src/flutter/build/android/gyp/java_cpp_enum.py deleted file mode 100755 index c2f1764b1b..0000000000 --- a/engine/src/flutter/build/android/gyp/java_cpp_enum.py +++ /dev/null @@ -1,340 +0,0 @@ -#!/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. - -import collections -import re -import optparse -import os -from string import Template -import sys - -from util import build_utils - -# List of C++ types that are compatible with the Java code generated by this -# script. -# -# This script can parse .idl files however, at present it ignores special -# rules such as [cpp_enum_prefix_override="ax_attr"]. -ENUM_FIXED_TYPE_WHITELIST = ['char', 'unsigned char', - 'short', 'unsigned short', - 'int', 'int8_t', 'int16_t', 'int32_t', 'uint8_t', 'uint16_t'] - -class EnumDefinition(object): - def __init__(self, original_enum_name=None, class_name_override=None, - enum_package=None, entries=None, fixed_type=None): - self.original_enum_name = original_enum_name - self.class_name_override = class_name_override - self.enum_package = enum_package - self.entries = collections.OrderedDict(entries or []) - self.prefix_to_strip = None - self.fixed_type = fixed_type - - def AppendEntry(self, key, value): - if key in self.entries: - raise Exception('Multiple definitions of key %s found.' % key) - self.entries[key] = value - - @property - def class_name(self): - return self.class_name_override or self.original_enum_name - - def Finalize(self): - self._Validate() - self._AssignEntryIndices() - self._StripPrefix() - - def _Validate(self): - assert self.class_name - assert self.enum_package - assert self.entries - if self.fixed_type and self.fixed_type not in ENUM_FIXED_TYPE_WHITELIST: - raise Exception('Fixed type %s for enum %s not whitelisted.' % - (self.fixed_type, self.class_name)) - - def _AssignEntryIndices(self): - # Enums, if given no value, are given the value of the previous enum + 1. - if not all(self.entries.values()): - prev_enum_value = -1 - for key, value in self.entries.iteritems(): - if not value: - self.entries[key] = prev_enum_value + 1 - elif value in self.entries: - self.entries[key] = self.entries[value] - else: - try: - self.entries[key] = int(value) - except ValueError: - raise Exception('Could not interpret integer from enum value "%s" ' - 'for key %s.' % (value, key)) - prev_enum_value = self.entries[key] - - - def _StripPrefix(self): - prefix_to_strip = self.prefix_to_strip - if not prefix_to_strip: - prefix_to_strip = self.original_enum_name - prefix_to_strip = re.sub('(?!^)([A-Z]+)', r'_\1', prefix_to_strip).upper() - prefix_to_strip += '_' - if not all([w.startswith(prefix_to_strip) for w in self.entries.keys()]): - prefix_to_strip = '' - - entries = collections.OrderedDict() - for (k, v) in self.entries.iteritems(): - stripped_key = k.replace(prefix_to_strip, '', 1) - if isinstance(v, basestring): - stripped_value = v.replace(prefix_to_strip, '', 1) - else: - stripped_value = v - entries[stripped_key] = stripped_value - - self.entries = entries - -class DirectiveSet(object): - class_name_override_key = 'CLASS_NAME_OVERRIDE' - enum_package_key = 'ENUM_PACKAGE' - prefix_to_strip_key = 'PREFIX_TO_STRIP' - - known_keys = [class_name_override_key, enum_package_key, prefix_to_strip_key] - - def __init__(self): - self._directives = {} - - def Update(self, key, value): - if key not in DirectiveSet.known_keys: - raise Exception("Unknown directive: " + key) - self._directives[key] = value - - @property - def empty(self): - return len(self._directives) == 0 - - def UpdateDefinition(self, definition): - definition.class_name_override = self._directives.get( - DirectiveSet.class_name_override_key, '') - definition.enum_package = self._directives.get( - DirectiveSet.enum_package_key) - definition.prefix_to_strip = self._directives.get( - DirectiveSet.prefix_to_strip_key) - - -class HeaderParser(object): - single_line_comment_re = re.compile(r'\s*//') - multi_line_comment_start_re = re.compile(r'\s*/\*') - enum_line_re = re.compile(r'^\s*(\w+)(\s*\=\s*([^,\n]+))?,?') - enum_end_re = re.compile(r'^\s*}\s*;\.*$') - generator_directive_re = re.compile( - r'^\s*//\s+GENERATED_JAVA_(\w+)\s*:\s*([\.\w]+)$') - multi_line_generator_directive_start_re = re.compile( - r'^\s*//\s+GENERATED_JAVA_(\w+)\s*:\s*\(([\.\w]*)$') - multi_line_directive_continuation_re = re.compile( - r'^\s*//\s+([\.\w]+)$') - multi_line_directive_end_re = re.compile( - r'^\s*//\s+([\.\w]*)\)$') - - optional_class_or_struct_re = r'(class|struct)?' - enum_name_re = r'(\w+)' - optional_fixed_type_re = r'(\:\s*(\w+\s*\w+?))?' - enum_start_re = re.compile(r'^\s*(?:\[cpp.*\])?\s*enum\s+' + - optional_class_or_struct_re + '\s*' + enum_name_re + '\s*' + - optional_fixed_type_re + '\s*{\s*$') - - def __init__(self, lines, path=None): - self._lines = lines - self._path = path - self._enum_definitions = [] - self._in_enum = False - self._current_definition = None - self._generator_directives = DirectiveSet() - self._multi_line_generator_directive = None - - def _ApplyGeneratorDirectives(self): - self._generator_directives.UpdateDefinition(self._current_definition) - self._generator_directives = DirectiveSet() - - def ParseDefinitions(self): - for line in self._lines: - self._ParseLine(line) - return self._enum_definitions - - def _ParseLine(self, line): - if self._multi_line_generator_directive: - self._ParseMultiLineDirectiveLine(line) - elif not self._in_enum: - self._ParseRegularLine(line) - else: - self._ParseEnumLine(line) - - def _ParseEnumLine(self, line): - if HeaderParser.single_line_comment_re.match(line): - return - if HeaderParser.multi_line_comment_start_re.match(line): - raise Exception('Multi-line comments in enums are not supported in ' + - self._path) - enum_end = HeaderParser.enum_end_re.match(line) - enum_entry = HeaderParser.enum_line_re.match(line) - if enum_end: - self._ApplyGeneratorDirectives() - self._current_definition.Finalize() - self._enum_definitions.append(self._current_definition) - self._in_enum = False - elif enum_entry: - enum_key = enum_entry.groups()[0] - enum_value = enum_entry.groups()[2] - self._current_definition.AppendEntry(enum_key, enum_value) - - def _ParseMultiLineDirectiveLine(self, line): - multi_line_directive_continuation = ( - HeaderParser.multi_line_directive_continuation_re.match(line)) - multi_line_directive_end = ( - HeaderParser.multi_line_directive_end_re.match(line)) - - if multi_line_directive_continuation: - value_cont = multi_line_directive_continuation.groups()[0] - self._multi_line_generator_directive[1].append(value_cont) - elif multi_line_directive_end: - directive_name = self._multi_line_generator_directive[0] - directive_value = "".join(self._multi_line_generator_directive[1]) - directive_value += multi_line_directive_end.groups()[0] - self._multi_line_generator_directive = None - self._generator_directives.Update(directive_name, directive_value) - else: - raise Exception('Malformed multi-line directive declaration in ' + - self._path) - - def _ParseRegularLine(self, line): - enum_start = HeaderParser.enum_start_re.match(line) - generator_directive = HeaderParser.generator_directive_re.match(line) - multi_line_generator_directive_start = ( - HeaderParser.multi_line_generator_directive_start_re.match(line)) - - if generator_directive: - directive_name = generator_directive.groups()[0] - directive_value = generator_directive.groups()[1] - self._generator_directives.Update(directive_name, directive_value) - elif multi_line_generator_directive_start: - directive_name = multi_line_generator_directive_start.groups()[0] - directive_value = multi_line_generator_directive_start.groups()[1] - self._multi_line_generator_directive = (directive_name, [directive_value]) - elif enum_start: - if self._generator_directives.empty: - return - self._current_definition = EnumDefinition( - original_enum_name=enum_start.groups()[1], - fixed_type=enum_start.groups()[3]) - self._in_enum = True - -def GetScriptName(): - script_components = os.path.abspath(sys.argv[0]).split(os.path.sep) - build_index = script_components.index('build') - return os.sep.join(script_components[build_index:]) - - -def DoGenerate(output_dir, source_paths, print_output_only=False): - output_paths = [] - for source_path in source_paths: - enum_definitions = DoParseHeaderFile(source_path) - if not enum_definitions: - raise Exception('No enums found in %s\n' - 'Did you forget prefixing enums with ' - '"// GENERATED_JAVA_ENUM_PACKAGE: foo"?' % - source_path) - for enum_definition in enum_definitions: - package_path = enum_definition.enum_package.replace('.', os.path.sep) - file_name = enum_definition.class_name + '.java' - output_path = os.path.join(output_dir, package_path, file_name) - output_paths.append(output_path) - if not print_output_only: - build_utils.MakeDirectory(os.path.dirname(output_path)) - DoWriteOutput(source_path, output_path, enum_definition) - return output_paths - - -def DoParseHeaderFile(path): - with open(path) as f: - return HeaderParser(f.readlines(), path).ParseDefinitions() - - -def GenerateOutput(source_path, enum_definition): - template = Template(""" -// 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 file is autogenerated by -// ${SCRIPT_NAME} -// From -// ${SOURCE_PATH} - -package ${PACKAGE}; - -public class ${CLASS_NAME} { -${ENUM_ENTRIES} -} -""") - - enum_template = Template(' public static final int ${NAME} = ${VALUE};') - enum_entries_string = [] - for enum_name, enum_value in enum_definition.entries.iteritems(): - values = { - 'NAME': enum_name, - 'VALUE': enum_value, - } - enum_entries_string.append(enum_template.substitute(values)) - enum_entries_string = '\n'.join(enum_entries_string) - - values = { - 'CLASS_NAME': enum_definition.class_name, - 'ENUM_ENTRIES': enum_entries_string, - 'PACKAGE': enum_definition.enum_package, - 'SCRIPT_NAME': GetScriptName(), - 'SOURCE_PATH': source_path, - } - return template.substitute(values) - - -def DoWriteOutput(source_path, output_path, enum_definition): - with open(output_path, 'w') as out_file: - out_file.write(GenerateOutput(source_path, enum_definition)) - -def AssertFilesList(output_paths, assert_files_list): - actual = set(output_paths) - expected = set(assert_files_list) - if not actual == expected: - need_to_add = list(actual - expected) - need_to_remove = list(expected - actual) - raise Exception('Output files list does not match expectations. Please ' - 'add %s and remove %s.' % (need_to_add, need_to_remove)) - -def DoMain(argv): - usage = 'usage: %prog [options] output_dir input_file(s)...' - parser = optparse.OptionParser(usage=usage) - - parser.add_option('--assert_file', action="append", default=[], - dest="assert_files_list", help='Assert that the given ' - 'file is an output. There can be multiple occurrences of ' - 'this flag.') - parser.add_option('--print_output_only', help='Only print output paths.', - action='store_true') - parser.add_option('--verbose', help='Print more information.', - action='store_true') - - options, args = parser.parse_args(argv) - if len(args) < 2: - parser.error('Need to specify output directory and at least one input file') - output_paths = DoGenerate(args[0], args[1:], - print_output_only=options.print_output_only) - - if options.assert_files_list: - AssertFilesList(output_paths, options.assert_files_list) - - if options.verbose: - print 'Output paths:' - print '\n'.join(output_paths) - - return ' '.join(output_paths) - -if __name__ == '__main__': - DoMain(sys.argv[1:]) diff --git a/engine/src/flutter/build/android/gyp/java_cpp_enum_tests.py b/engine/src/flutter/build/android/gyp/java_cpp_enum_tests.py deleted file mode 100755 index 44f9766c82..0000000000 --- a/engine/src/flutter/build/android/gyp/java_cpp_enum_tests.py +++ /dev/null @@ -1,436 +0,0 @@ -#!/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. - -"""Tests for enum_preprocess.py. - -This test suite containss various tests for the C++ -> Java enum generator. -""" - -import collections -import optparse -import os -import sys -import unittest - -import java_cpp_enum -from java_cpp_enum import EnumDefinition, GenerateOutput, GetScriptName -from java_cpp_enum import HeaderParser - -sys.path.append(os.path.join(os.path.dirname(__file__), "gyp")) -from util import build_utils - -class TestPreprocess(unittest.TestCase): - def testOutput(self): - definition = EnumDefinition(original_enum_name='ClassName', - enum_package='some.package', - entries=[('E1', 1), ('E2', '2 << 2')]) - output = GenerateOutput('path/to/file', definition) - expected = """ -// 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 file is autogenerated by -// %s -// From -// path/to/file - -package some.package; - -public class ClassName { - public static final int E1 = 1; - public static final int E2 = 2 << 2; -} -""" - self.assertEqual(expected % GetScriptName(), output) - - def testParseSimpleEnum(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum EnumName { - VALUE_ZERO, - VALUE_ONE, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(1, len(definitions)) - definition = definitions[0] - self.assertEqual('EnumName', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual(collections.OrderedDict([('VALUE_ZERO', 0), - ('VALUE_ONE', 1)]), - definition.entries) - - def testParseBitShifts(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum EnumName { - VALUE_ZERO = 1 << 0, - VALUE_ONE = 1 << 1, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(1, len(definitions)) - definition = definitions[0] - self.assertEqual('EnumName', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual(collections.OrderedDict([('VALUE_ZERO', '1 << 0'), - ('VALUE_ONE', '1 << 1')]), - definition.entries) - - def testParseClassNameOverride(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - // GENERATED_JAVA_CLASS_NAME_OVERRIDE: OverrideName - enum EnumName { - FOO - }; - - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - // GENERATED_JAVA_CLASS_NAME_OVERRIDE: OtherOverride - enum PrefixTest { - PREFIX_TEST_A, - PREFIX_TEST_B, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(2, len(definitions)) - definition = definitions[0] - self.assertEqual('OverrideName', definition.class_name) - - definition = definitions[1] - self.assertEqual('OtherOverride', definition.class_name) - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 1)]), - definition.entries) - - def testParseTwoEnums(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum EnumOne { - ENUM_ONE_A = 1, - // Comment there - ENUM_ONE_B = A, - }; - - enum EnumIgnore { - C, D, E - }; - - // GENERATED_JAVA_ENUM_PACKAGE: other.package - // GENERATED_JAVA_PREFIX_TO_STRIP: P_ - enum EnumTwo { - P_A, - P_B - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(2, len(definitions)) - definition = definitions[0] - self.assertEqual('EnumOne', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual(collections.OrderedDict([('A', '1'), - ('B', 'A')]), - definition.entries) - - definition = definitions[1] - self.assertEqual('EnumTwo', definition.class_name) - self.assertEqual('other.package', definition.enum_package) - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 1)]), - definition.entries) - - def testParseThrowsOnUnknownDirective(self): - test_data = """ - // GENERATED_JAVA_UNKNOWN: Value - enum EnumName { - VALUE_ONE, - }; - """.split('\n') - with self.assertRaises(Exception): - HeaderParser(test_data).ParseDefinitions() - - def testParseReturnsEmptyListWithoutDirectives(self): - test_data = """ - enum EnumName { - VALUE_ONE, - }; - """.split('\n') - self.assertEqual([], HeaderParser(test_data).ParseDefinitions()) - - def testParseEnumClass(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum class Foo { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(1, len(definitions)) - definition = definitions[0] - self.assertEqual('Foo', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual(collections.OrderedDict([('A', 0)]), - definition.entries) - - def testParseEnumStruct(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum struct Foo { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(1, len(definitions)) - definition = definitions[0] - self.assertEqual('Foo', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual(collections.OrderedDict([('A', 0)]), - definition.entries) - - def testParseFixedTypeEnum(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum Foo : int { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(1, len(definitions)) - definition = definitions[0] - self.assertEqual('Foo', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual('int', definition.fixed_type) - self.assertEqual(collections.OrderedDict([('A', 0)]), - definition.entries) - - def testParseFixedTypeEnumClass(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum class Foo: unsigned short { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual(1, len(definitions)) - definition = definitions[0] - self.assertEqual('Foo', definition.class_name) - self.assertEqual('test.namespace', definition.enum_package) - self.assertEqual('unsigned short', definition.fixed_type) - self.assertEqual(collections.OrderedDict([('A', 0)]), - definition.entries) - - def testParseUnknownFixedTypeRaises(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: test.namespace - enum class Foo: foo_type { - FOO_A, - }; - """.split('\n') - with self.assertRaises(Exception): - HeaderParser(test_data).ParseDefinitions() - - def testParseSimpleMultiLineDirective(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: ( - // test.namespace) - // GENERATED_JAVA_CLASS_NAME_OVERRIDE: Bar - enum Foo { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual('test.namespace', definitions[0].enum_package) - self.assertEqual('Bar', definitions[0].class_name) - - def testParseMultiLineDirective(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: (te - // st.name - // space) - enum Foo { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual('test.namespace', definitions[0].enum_package) - - def testParseMultiLineDirectiveWithOtherDirective(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: ( - // test.namespace) - // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ( - // Ba - // r - // ) - enum Foo { - FOO_A, - }; - """.split('\n') - definitions = HeaderParser(test_data).ParseDefinitions() - self.assertEqual('test.namespace', definitions[0].enum_package) - self.assertEqual('Bar', definitions[0].class_name) - - def testParseMalformedMultiLineDirectiveWithOtherDirective(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: ( - // test.name - // space - // GENERATED_JAVA_CLASS_NAME_OVERRIDE: Bar - enum Foo { - FOO_A, - }; - """.split('\n') - with self.assertRaises(Exception): - HeaderParser(test_data).ParseDefinitions() - - def testParseMalformedMultiLineDirective(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: ( - // test.name - // space - enum Foo { - FOO_A, - }; - """.split('\n') - with self.assertRaises(Exception): - HeaderParser(test_data).ParseDefinitions() - - def testParseMalformedMultiLineDirectiveShort(self): - test_data = """ - // GENERATED_JAVA_ENUM_PACKAGE: ( - enum Foo { - FOO_A, - }; - """.split('\n') - with self.assertRaises(Exception): - HeaderParser(test_data).ParseDefinitions() - - def testEnumValueAssignmentNoneDefined(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('A', None) - definition.AppendEntry('B', None) - definition.AppendEntry('C', None) - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 1), - ('C', 2)]), - definition.entries) - - def testEnumValueAssignmentAllDefined(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('A', '1') - definition.AppendEntry('B', '2') - definition.AppendEntry('C', '3') - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', '1'), - ('B', '2'), - ('C', '3')]), - definition.entries) - - def testEnumValueAssignmentReferences(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('A', None) - definition.AppendEntry('B', 'A') - definition.AppendEntry('C', None) - definition.AppendEntry('D', 'C') - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 0), - ('C', 1), - ('D', 1)]), - definition.entries) - - def testEnumValueAssignmentSet(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('A', None) - definition.AppendEntry('B', '2') - definition.AppendEntry('C', None) - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 2), - ('C', 3)]), - definition.entries) - - def testEnumValueAssignmentSetReferences(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('A', None) - definition.AppendEntry('B', 'A') - definition.AppendEntry('C', 'B') - definition.AppendEntry('D', None) - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 0), - ('C', 0), - ('D', 1)]), - definition.entries) - - def testEnumValueAssignmentRaises(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('A', None) - definition.AppendEntry('B', 'foo') - definition.AppendEntry('C', None) - with self.assertRaises(Exception): - definition.Finalize() - - def testExplicitPrefixStripping(self): - definition = EnumDefinition(original_enum_name='c', enum_package='p') - definition.AppendEntry('P_A', None) - definition.AppendEntry('B', None) - definition.AppendEntry('P_C', None) - definition.AppendEntry('P_LAST', 'P_C') - definition.prefix_to_strip = 'P_' - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 1), - ('C', 2), - ('LAST', 2)]), - definition.entries) - - def testImplicitPrefixStripping(self): - definition = EnumDefinition(original_enum_name='ClassName', - enum_package='p') - definition.AppendEntry('CLASS_NAME_A', None) - definition.AppendEntry('CLASS_NAME_B', None) - definition.AppendEntry('CLASS_NAME_C', None) - definition.AppendEntry('CLASS_NAME_LAST', 'CLASS_NAME_C') - definition.Finalize() - self.assertEqual(collections.OrderedDict([('A', 0), - ('B', 1), - ('C', 2), - ('LAST', 2)]), - definition.entries) - - def testImplicitPrefixStrippingRequiresAllConstantsToBePrefixed(self): - definition = EnumDefinition(original_enum_name='Name', - enum_package='p') - definition.AppendEntry('A', None) - definition.AppendEntry('B', None) - definition.AppendEntry('NAME_LAST', None) - definition.Finalize() - self.assertEqual(['A', 'B', 'NAME_LAST'], definition.entries.keys()) - - def testGenerateThrowsOnEmptyInput(self): - with self.assertRaises(Exception): - original_do_parse = java_cpp_enum.DoParseHeaderFile - try: - java_cpp_enum.DoParseHeaderFile = lambda _: [] - java_cpp_enum.DoGenerate('dir', ['file']) - finally: - java_cpp_enum.DoParseHeaderFile = original_do_parse - -def main(argv): - parser = optparse.OptionParser() - parser.add_option("--stamp", help="File to touch on success.") - options, _ = parser.parse_args(argv) - - suite = unittest.TestLoader().loadTestsFromTestCase(TestPreprocess) - unittest.TextTestRunner(verbosity=0).run(suite) - - if options.stamp: - build_utils.Touch(options.stamp) - -if __name__ == '__main__': - main(sys.argv[1:]) diff --git a/engine/src/flutter/build/android/gyp/javac.py b/engine/src/flutter/build/android/gyp/javac.py deleted file mode 100755 index dafe5dff0a..0000000000 --- a/engine/src/flutter/build/android/gyp/javac.py +++ /dev/null @@ -1,321 +0,0 @@ -#!/usr/bin/env 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. - -import fnmatch -import optparse -import os -import shutil -import re -import sys -import textwrap - -from util import build_utils -from util import md5_check - -import jar - -sys.path.append(build_utils.COLORAMA_ROOT) -import colorama - - -def ColorJavacOutput(output): - fileline_prefix = r'(?P(?P[-.\w/\\]+.java):(?P[0-9]+):)' - warning_re = re.compile( - fileline_prefix + r'(?P warning: (?P.*))$') - error_re = re.compile( - fileline_prefix + r'(?P (?P.*))$') - marker_re = re.compile(r'\s*(?P\^)\s*$') - - warning_color = ['full_message', colorama.Fore.YELLOW + colorama.Style.DIM] - error_color = ['full_message', colorama.Fore.MAGENTA + colorama.Style.BRIGHT] - marker_color = ['marker', colorama.Fore.BLUE + colorama.Style.BRIGHT] - - def Colorize(line, regex, color): - match = regex.match(line) - start = match.start(color[0]) - end = match.end(color[0]) - return (line[:start] - + color[1] + line[start:end] - + colorama.Fore.RESET + colorama.Style.RESET_ALL - + line[end:]) - - def ApplyColor(line): - if warning_re.match(line): - line = Colorize(line, warning_re, warning_color) - elif error_re.match(line): - line = Colorize(line, error_re, error_color) - elif marker_re.match(line): - line = Colorize(line, marker_re, marker_color) - return line - - 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( - bootclasspath, classpath, classes_dir, chromium_code, - use_errorprone_path, java_files): - """Runs javac. - - Builds |java_files| with the provided |classpath| and puts the generated - .class files into |classes_dir|. If |chromium_code| is true, extra lint - checking will be enabled. - """ - - jar_inputs = [] - for path in classpath: - if os.path.exists(path + '.TOC'): - jar_inputs.append(path + '.TOC') - else: - jar_inputs.append(path) - - javac_args = [ - '-g', - # Chromium only allows UTF8 source files. Being explicit avoids - # javac pulling a default encoding from the user's environment. - '-encoding', 'UTF-8', - '-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']) - else: - # XDignore.symbol.file makes javac compile against rt.jar instead of - # ct.sym. This means that using a java internal package/class will not - # trigger a compile warning or error. - javac_args.extend(['-XDignore.symbol.file']) - - 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( - javac_cmd, - print_stdout=chromium_code, - stderr_filter=ColorJavacOutput) - - record_path = os.path.join(classes_dir, 'javac.md5.stamp') - md5_check.CallAndRecordIfStale( - Compile, - record_path=record_path, - input_paths=java_files + jar_inputs, - input_strings=javac_cmd) - - -_MAX_MANIFEST_LINE_LEN = 72 - - -def CreateManifest(manifest_path, classpath, main_class=None, - manifest_entries=None): - """Creates a manifest file with the given parameters. - - This generates a manifest file that compiles with the spec found at - http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Manifest - - Args: - manifest_path: The path to the manifest file that should be created. - classpath: The JAR files that should be listed on the manifest file's - classpath. - main_class: If present, the class containing the main() function. - manifest_entries: If present, a list of (key, value) pairs to add to - the manifest. - - """ - output = ['Manifest-Version: 1.0'] - if main_class: - output.append('Main-Class: %s' % main_class) - if manifest_entries: - for k, v in manifest_entries: - output.append('%s: %s' % (k, v)) - if classpath: - sanitized_paths = [] - for path in classpath: - sanitized_paths.append(os.path.basename(path.strip('"'))) - output.append('Class-Path: %s' % ' '.join(sanitized_paths)) - output.append('Created-By: ') - output.append('') - - wrapper = textwrap.TextWrapper(break_long_words=True, - drop_whitespace=False, - subsequent_indent=' ', - width=_MAX_MANIFEST_LINE_LEN - 2) - output = '\r\n'.join(w for l in output for w in wrapper.wrap(l)) - - with open(manifest_path, 'w') as f: - f.write(output) - - -def main(argv): - colorama.init() - - argv = build_utils.ExpandFileArgs(argv) - - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option( - '--src-gendirs', - help='Directories containing generated java files.') - parser.add_option( - '--java-srcjars', - 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', - help='Classpath for javac. If this is specified multiple times, they ' - 'will all be appended to construct the classpath.') - parser.add_option( - '--javac-includes', - help='A list of file patterns. If provided, only java files that match' - 'one of the patterns will be compiled.') - parser.add_option( - '--jar-excluded-classes', - default='', - help='List of .class file patterns to exclude from the jar.') - - parser.add_option( - '--chromium-code', - type='int', - 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.') - parser.add_option('--jar-path', help='Jar output path.') - parser.add_option( - '--main-class', - help='The class containing the main method.') - parser.add_option( - '--manifest-entry', - action='append', - help='Key:value pairs to add to the .jar manifest.') - - parser.add_option('--stamp', help='Path to touch on success.') - - options, args = parser.parse_args(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) - - java_srcjars = [] - for arg in options.java_srcjars: - java_srcjars += build_utils.ParseGypList(arg) - - java_files = args - if options.src_gendirs: - src_gendirs = build_utils.ParseGypList(options.src_gendirs) - java_files += build_utils.FindInDirectories(src_gendirs, '*.java') - - 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) - if java_srcjars: - java_dir = os.path.join(temp_dir, 'java') - os.makedirs(java_dir) - for srcjar in java_srcjars: - build_utils.ExtractAll(srcjar, path=java_dir, pattern='*.java') - java_files += build_utils.FindInDirectory(java_dir, '*.java') - - if options.javac_includes: - javac_includes = build_utils.ParseGypList(options.javac_includes) - filtered_java_files = [] - for f in java_files: - for include in javac_includes: - if fnmatch.fnmatch(f, include): - filtered_java_files.append(f) - break - java_files = filtered_java_files - - if len(java_files) != 0: - DoJavac( - bootclasspath, - classpath, - classes_dir, - options.chromium_code, - options.use_errorprone_path, - java_files) - - if options.jar_path: - if options.main_class or options.manifest_entry: - if options.manifest_entry: - entries = map(lambda e: e.split(":"), options.manifest_entry) - else: - entries = [] - manifest_file = os.path.join(temp_dir, 'manifest') - CreateManifest(manifest_file, classpath, options.main_class, entries) - else: - manifest_file = None - jar.JarDirectory(classes_dir, - build_utils.ParseGypList(options.jar_excluded_classes), - options.jar_path, - manifest_file=manifest_file) - - if options.classes_dir: - # Delete the old classes directory. This ensures that all .class files in - # the output are actually from the input .java files. For example, if a - # .java file is deleted or an inner class is removed, the classes - # directory should not contain the corresponding old .class file after - # running this action. - build_utils.DeleteDirectory(options.classes_dir) - shutil.copytree(classes_dir, options.classes_dir) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - input_files + build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) - - diff --git a/engine/src/flutter/build/android/gyp/jinja_template.py b/engine/src/flutter/build/android/gyp/jinja_template.py deleted file mode 100755 index e7c9a3436a..0000000000 --- a/engine/src/flutter/build/android/gyp/jinja_template.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/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. - -"""Renders one or more template files using the Jinja template engine.""" - -import codecs -import optparse -import os -import sys - -from util import build_utils - -# Import jinja2 from third_party/jinja2 -sys.path.append(os.path.join(os.path.dirname(__file__), '../../../third_party')) -import jinja2 # pylint: disable=F0401 - - -class RecordingFileSystemLoader(jinja2.FileSystemLoader): - '''A FileSystemLoader that stores a list of loaded templates.''' - def __init__(self, searchpath): - jinja2.FileSystemLoader.__init__(self, searchpath) - self.loaded_templates = set() - - def get_source(self, environment, template): - contents, filename, uptodate = jinja2.FileSystemLoader.get_source( - self, environment, template) - self.loaded_templates.add(os.path.relpath(filename)) - return contents, filename, uptodate - - def get_loaded_templates(self): - return list(self.loaded_templates) - - -def ProcessFile(env, input_filename, loader_base_dir, output_filename, - variables): - input_rel_path = os.path.relpath(input_filename, loader_base_dir) - template = env.get_template(input_rel_path) - output = template.render(variables) - with codecs.open(output_filename, 'w', 'utf-8') as output_file: - output_file.write(output) - - -def ProcessFiles(env, input_filenames, loader_base_dir, inputs_base_dir, - outputs_zip, variables): - with build_utils.TempDir() as temp_dir: - for input_filename in input_filenames: - relpath = os.path.relpath(os.path.abspath(input_filename), - os.path.abspath(inputs_base_dir)) - if relpath.startswith(os.pardir): - raise Exception('input file %s is not contained in inputs base dir %s' - % (input_filename, inputs_base_dir)) - - output_filename = os.path.join(temp_dir, relpath) - parent_dir = os.path.dirname(output_filename) - build_utils.MakeDirectory(parent_dir) - ProcessFile(env, input_filename, loader_base_dir, output_filename, - variables) - - build_utils.ZipDir(outputs_zip, temp_dir) - - -def main(): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--inputs', help='The template files to process.') - parser.add_option('--output', help='The output file to generate. Valid ' - 'only if there is a single input.') - parser.add_option('--outputs-zip', help='A zip file containing the processed ' - 'templates. Required if there are multiple inputs.') - parser.add_option('--inputs-base-dir', help='A common ancestor directory of ' - 'the inputs. Each output\'s path in the output zip will ' - 'match the relative path from INPUTS_BASE_DIR to the ' - 'input. Required if --output-zip is given.') - parser.add_option('--loader-base-dir', help='Base path used by the template ' - 'loader. Must be a common ancestor directory of ' - 'the inputs. Defaults to CHROMIUM_SRC.', - default=build_utils.CHROMIUM_SRC) - parser.add_option('--variables', help='Variables to be made available in the ' - 'template processing environment, as a GYP list (e.g. ' - '--variables "channel=beta mstone=39")', default='') - options, args = parser.parse_args() - - build_utils.CheckOptions(options, parser, required=['inputs']) - inputs = build_utils.ParseGypList(options.inputs) - - if (options.output is None) == (options.outputs_zip is None): - parser.error('Exactly one of --output and --output-zip must be given') - if options.output and len(inputs) != 1: - parser.error('--output cannot be used with multiple inputs') - if options.outputs_zip and not options.inputs_base_dir: - parser.error('--inputs-base-dir must be given when --output-zip is used') - if args: - parser.error('No positional arguments should be given.') - - variables = {} - for v in build_utils.ParseGypList(options.variables): - if '=' not in v: - parser.error('--variables argument must contain "=": ' + v) - name, _, value = v.partition('=') - variables[name] = value - - loader = RecordingFileSystemLoader(options.loader_base_dir) - env = jinja2.Environment(loader=loader, undefined=jinja2.StrictUndefined, - line_comment_prefix='##') - if options.output: - ProcessFile(env, inputs[0], options.loader_base_dir, options.output, - variables) - else: - ProcessFiles(env, inputs, options.loader_base_dir, options.inputs_base_dir, - options.outputs_zip, variables) - - if options.depfile: - deps = loader.get_loaded_templates() + build_utils.GetPythonDependencies() - build_utils.WriteDepfile(options.depfile, deps) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/android/gyp/lint.py b/engine/src/flutter/build/android/gyp/lint.py deleted file mode 100755 index 6c4645abea..0000000000 --- a/engine/src/flutter/build/android/gyp/lint.py +++ /dev/null @@ -1,214 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -"""Runs Android's lint tool.""" - - -import optparse -import os -import sys -from xml.dom import minidom - -from util import build_utils - - -_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): - - def _RelativizePath(path): - """Returns relative path to top-level src dir. - - Args: - path: A path relative to cwd. - """ - return os.path.relpath(os.path.abspath(path), _SRC_ROOT) - - def _ProcessConfigFile(): - if not build_utils.IsTimeStale(processed_config_path, [config_path]): - return - - with open(config_path, 'rb') as f: - content = f.read().replace( - 'PRODUCT_DIR', _RelativizePath(product_dir)) - - with open(processed_config_path, 'wb') as f: - f.write(content) - - def _ProcessResultFile(): - with open(result_path, 'rb') as f: - content = f.read().replace( - _RelativizePath(product_dir), 'PRODUCT_DIR') - - with open(result_path, 'wb') as f: - f.write(content) - - def _ParseAndShowResultFile(): - dom = minidom.parse(result_path) - issues = dom.getElementsByTagName('issue') - print >> sys.stderr - for issue in issues: - issue_id = issue.attributes['id'].value - message = issue.attributes['message'].value - location_elem = issue.getElementsByTagName('location')[0] - path = location_elem.attributes['file'].value - line = location_elem.getAttribute('line') - if line: - error = '%s:%s %s: %s [warning]' % (path, line, message, issue_id) - else: - # Issues in class files don't have a line number. - error = '%s %s: %s [warning]' % (path, message, issue_id) - print >> sys.stderr, error - for attr in ['errorLine1', 'errorLine2']: - error_line = issue.getAttribute(attr) - if error_line: - print >> sys.stderr, error_line - return len(issues) - - with build_utils.TempDir() as temp_dir: - _ProcessConfigFile() - - cmd = [ - _RelativizePath(lint_path), '-Werror', '--exitcode', '--showall', - '--config', _RelativizePath(processed_config_path), - '--classpath', _RelativizePath(jar_path), - '--xml', _RelativizePath(result_path), - ] - if resource_dir: - cmd.extend(['--resources', _RelativizePath(resource_dir)]) - - # There may be multiple source files with the same basename (but in - # different directories). It is difficult to determine what part of the path - # corresponds to the java package, and so instead just link the source files - # into temporary directories (creating a new one whenever there is a name - # conflict). - src_dirs = [] - def NewSourceDir(): - new_dir = os.path.join(temp_dir, str(len(src_dirs))) - os.mkdir(new_dir) - src_dirs.append(new_dir) - cmd.extend(['--sources', _RelativizePath(new_dir)]) - return new_dir - - def PathInDir(d, src): - return os.path.join(d, os.path.basename(src)) - - for src in sources: - src_dir = None - for d in src_dirs: - if not os.path.exists(PathInDir(d, src)): - src_dir = d - break - if not src_dir: - src_dir = NewSourceDir() - os.symlink(os.path.abspath(src), PathInDir(src_dir, src)) - - cmd.append(_RelativizePath(os.path.join(manifest_path, os.pardir))) - - if os.path.exists(result_path): - os.remove(result_path) - - try: - build_utils.CheckOutput(cmd, cwd=_SRC_ROOT) - except build_utils.CalledProcessError as e: - # There is a problem with lint usage - if not os.path.exists(result_path): - print 'Something is wrong:' - print e - return 1 - - # There are actual lint issues - else: - try: - num_issues = _ParseAndShowResultFile() - except Exception: - print 'Lint created unparseable xml file...' - print 'File contents:' - with open(result_path) as f: - print f.read() - return 1 - - _ProcessResultFile() - msg = ('\nLint found %d new issues.\n' - ' - For full explanation refer to %s\n' - ' - Wanna suppress these issues?\n' - ' 1. Read comment in %s\n' - ' 2. Run "python %s %s"\n' % - (num_issues, - _RelativizePath(result_path), - _RelativizePath(config_path), - _RelativizePath(os.path.join(_SRC_ROOT, 'build', 'android', - 'lint', 'suppress.py')), - _RelativizePath(result_path))) - print >> sys.stderr, msg - return 1 - - return 0 - - -def main(): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--lint-path', help='Path to lint executable.') - parser.add_option('--config-path', help='Path to lint suppressions file.') - parser.add_option('--processed-config-path', - help='Path to processed lint suppressions file.') - parser.add_option('--manifest-path', help='Path to AndroidManifest.xml') - parser.add_option('--result-path', help='Path to XML lint result file.') - parser.add_option('--product-dir', help='Path to product dir.') - parser.add_option('--src-dirs', help='Directories containing java files.') - parser.add_option('--java-files', help='Paths to java files.') - parser.add_option('--jar-path', help='Jar file containing class files.') - parser.add_option('--resource-dir', help='Path to resource dir.') - parser.add_option('--can-fail-build', action='store_true', - help='If set, script will exit with nonzero exit status' - ' if lint errors are present') - parser.add_option('--stamp', help='Path to touch on success.') - parser.add_option('--enable', action='store_true', - help='Run lint instead of just touching stamp.') - - options, _ = parser.parse_args() - - build_utils.CheckOptions( - options, parser, required=['lint_path', 'config_path', - 'processed_config_path', 'manifest_path', - 'result_path', 'product_dir', - 'jar_path']) - - rc = 0 - - if options.enable: - sources = [] - if options.src_dirs: - src_dirs = build_utils.ParseGypList(options.src_dirs) - sources = build_utils.FindInDirectories(src_dirs, '*.java') - elif options.java_files: - sources = build_utils.ParseGypList(options.java_files) - else: - print 'One of --src-dirs or --java-files must be specified.' - return 1 - rc = _RunLint(options.lint_path, options.config_path, - options.processed_config_path, - options.manifest_path, options.result_path, - options.product_dir, sources, options.jar_path, - options.resource_dir) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - if options.stamp and not rc: - build_utils.Touch(options.stamp) - - return rc if options.can_fail_build else 0 - - -if __name__ == '__main__': - sys.exit(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 deleted file mode 100755 index 84c4a37ba9..0000000000 --- a/engine/src/flutter/build/android/gyp/locale_pak_resources.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/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_relocations.py b/engine/src/flutter/build/android/gyp/pack_relocations.py deleted file mode 100755 index 02e4499993..0000000000 --- a/engine/src/flutter/build/android/gyp/pack_relocations.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/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. - -"""Pack relocations in a library (or copy unchanged). - -If --enable-packing and --configuration-name=='Release', invoke the -relocation_packer tool to pack the .rel.dyn or .rela.dyn section in the given -library files. This step is inserted after the libraries are stripped. - -If --enable-packing is zero, the script copies files verbatim, with no -attempt to pack relocations. - -Any library listed in --exclude-packing-list is also copied verbatim, -irrespective of any --enable-packing setting. Typically this would be -'libchromium_android_linker.so'. -""" - -import optparse -import os -import shlex -import shutil -import sys -import tempfile - -from util import build_utils - -def PackLibraryRelocations(android_pack_relocations, library_path, output_path): - shutil.copy(library_path, output_path) - pack_command = [android_pack_relocations, output_path] - build_utils.CheckOutput(pack_command) - - -def CopyLibraryUnchanged(library_path, output_path): - shutil.copy(library_path, output_path) - - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--clear-dir', action='store_true', - help='If set, the destination directory will be deleted ' - 'before copying files to it. This is highly recommended to ' - 'ensure that no stale files are left in the directory.') - - parser.add_option('--configuration-name', - default='Release', - help='Gyp configuration name (i.e. Debug, Release)') - parser.add_option('--enable-packing', - choices=['0', '1'], - help=('Pack relocations if 1 and configuration name is \'Release\',' - ' otherwise plain file copy')) - parser.add_option('--exclude-packing-list', - default='', - help='Names of any libraries explicitly not packed') - parser.add_option('--android-pack-relocations', - help='Path to the relocations packer binary') - parser.add_option('--stripped-libraries-dir', - help='Directory for stripped libraries') - parser.add_option('--packed-libraries-dir', - help='Directory for packed libraries') - parser.add_option('--libraries', action='append', - help='List of libraries') - parser.add_option('--stamp', help='Path to touch on success') - - options, _ = parser.parse_args(args) - enable_packing = (options.enable_packing == '1' and - options.configuration_name == 'Release') - exclude_packing_set = set(shlex.split(options.exclude_packing_list)) - - libraries = [] - for libs_arg in options.libraries: - libraries += build_utils.ParseGypList(libs_arg) - - if options.clear_dir: - build_utils.DeleteDirectory(options.packed_libraries_dir) - - build_utils.MakeDirectory(options.packed_libraries_dir) - - for library in libraries: - library_path = os.path.join(options.stripped_libraries_dir, library) - output_path = os.path.join( - options.packed_libraries_dir, os.path.basename(library)) - - if enable_packing and library not in exclude_packing_set: - PackLibraryRelocations(options.android_pack_relocations, - library_path, - output_path) - else: - CopyLibraryUnchanged(library_path, output_path) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - libraries + build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/package_resources.py b/engine/src/flutter/build/android/gyp/package_resources.py deleted file mode 100755 index d17d1fe2f9..0000000000 --- a/engine/src/flutter/build/android/gyp/package_resources.py +++ /dev/null @@ -1,270 +0,0 @@ -#!/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. - -# pylint: disable=C0301 -"""Package resources into an apk. - -See https://android.googlesource.com/platform/tools/base/+/master/legacy/ant-tasks/src/main/java/com/android/ant/AaptExecTask.java -and -https://android.googlesource.com/platform/sdk/+/master/files/ant/build.xml -""" -# pylint: enable=C0301 - -import optparse -import os -import re -import shutil -import zipfile - -from util import build_utils - - -# List is generated from the chrome_apk.apk_intermediates.ap_ via: -# unzip -l $FILE_AP_ | cut -c31- | grep res/draw | cut -d'/' -f 2 | sort \ -# | uniq | grep -- -tvdpi- | cut -c10- -# and then manually sorted. -# Note that we can't just do a cross-product of dimentions because the filenames -# become too big and aapt fails to create the files. -# This leaves all default drawables (mdpi) in the main apk. Android gets upset -# though if any drawables are missing from the default drawables/ directory. -DENSITY_SPLITS = { - 'hdpi': ( - 'hdpi-v4', # Order matters for output file names. - 'ldrtl-hdpi-v4', - 'sw600dp-hdpi-v13', - 'ldrtl-hdpi-v17', - 'ldrtl-sw600dp-hdpi-v17', - 'hdpi-v21', - ), - 'xhdpi': ( - 'xhdpi-v4', - 'ldrtl-xhdpi-v4', - 'sw600dp-xhdpi-v13', - 'ldrtl-xhdpi-v17', - 'ldrtl-sw600dp-xhdpi-v17', - 'xhdpi-v21', - ), - 'xxhdpi': ( - 'xxhdpi-v4', - 'ldrtl-xxhdpi-v4', - 'sw600dp-xxhdpi-v13', - 'ldrtl-xxhdpi-v17', - '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', - 'ldrtl-sw600dp-tvdpi-v17', - ), -} - - -def ParseArgs(): - """Parses command line options. - - Returns: - An options object as from optparse.OptionsParser.parse_args() - """ - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--android-sdk', help='path to the Android SDK folder') - parser.add_option('--aapt-path', - help='path to the Android aapt tool') - - parser.add_option('--configuration-name', - help='Gyp\'s configuration name (Debug or Release).') - - parser.add_option('--android-manifest', help='AndroidManifest.xml path') - parser.add_option('--version-code', help='Version code for apk.') - parser.add_option('--version-name', help='Version name for apk.') - parser.add_option( - '--shared-resources', - action='store_true', - help='Make a resource package that can be loaded by a different' - 'application at runtime to access the package\'s resources.') - parser.add_option('--resource-zips', - help='zip files containing resources to be packaged') - parser.add_option('--asset-dir', - help='directories containing assets to be packaged') - parser.add_option('--no-compress', help='disables compression for the ' - 'given comma separated list of extensions') - parser.add_option( - '--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.') - - (options, args) = parser.parse_args() - - if args: - parser.error('No positional arguments should be given.') - - # Check that required options have been provided. - required_options = ('android_sdk', 'aapt_path', 'configuration_name', - 'android_manifest', 'version_code', 'version_name', - 'apk_path') - - build_utils.CheckOptions(options, parser, required=required_options) - - return options - - -def MoveImagesToNonMdpiFolders(res_root): - """Move images from drawable-*-mdpi-* folders to drawable-* folders. - - Why? http://crbug.com/289843 - """ - for src_dir_name in os.listdir(res_root): - src_components = src_dir_name.split('-') - if src_components[0] != 'drawable' or 'mdpi' not in src_components: - continue - src_dir = os.path.join(res_root, src_dir_name) - if not os.path.isdir(src_dir): - continue - dst_components = [c for c in src_components if c != 'mdpi'] - assert dst_components != src_components - dst_dir_name = '-'.join(dst_components) - dst_dir = os.path.join(res_root, dst_dir_name) - build_utils.MakeDirectory(dst_dir) - for src_file_name in os.listdir(src_dir): - if not src_file_name.endswith('.png'): - continue - src_file = os.path.join(src_dir, src_file_name) - dst_file = os.path.join(dst_dir, src_file_name) - assert not os.path.lexists(dst_file) - shutil.move(src_file, dst_file) - - -def PackageArgsForExtractedZip(d): - """Returns the aapt args for an extracted resources zip. - - A resources zip either contains the resources for a single target or for - multiple targets. If it is multiple targets merged into one, the actual - resource directories will be contained in the subdirectories 0, 1, 2, ... - """ - subdirs = [os.path.join(d, s) for s in os.listdir(d)] - subdirs = [s for s in subdirs if os.path.isdir(s)] - is_multi = '0' in [os.path.basename(s) for s in subdirs] - if is_multi: - res_dirs = sorted(subdirs, key=lambda p : int(os.path.basename(p))) - else: - res_dirs = [d] - package_command = [] - for d in res_dirs: - MoveImagesToNonMdpiFolders(d) - package_command += ['-S', d] - return package_command - - -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 src_path != dst_path: - if os.path.exists(dst_path): - os.unlink(dst_path) - os.rename(src_path, dst_path) - - -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.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 (trigger=%s)') % (name, trigger.pattern)) - - -def main(): - options = ParseArgs() - android_jar = os.path.join(options.android_sdk, 'android.jar') - aapt = options.aapt_path - - with build_utils.TempDir() as temp_dir: - package_command = [aapt, - 'package', - '--version-code', options.version_code, - '--version-name', options.version_name, - '-M', options.android_manifest, - '--no-crunch', - '-f', - '--auto-add-overlay', - '-I', android_jar, - '-F', options.apk_path, - '--ignore-assets', build_utils.AAPT_IGNORE_PATTERN, - ] - - if options.no_compress: - for ext in options.no_compress.split(','): - package_command += ['-0', ext] - if options.shared_resources: - package_command.append('--shared-lib') - - if options.asset_dir and os.path.exists(options.asset_dir): - package_command += ['-A', options.asset_dir] - - if options.resource_zips: - dep_zips = build_utils.ParseGypList(options.resource_zips) - for z in dep_zips: - subdir = os.path.join(temp_dir, os.path.basename(z)) - if os.path.exists(subdir): - raise Exception('Resource zip name conflict: ' + os.path.basename(z)) - build_utils.ExtractAll(z, path=subdir) - package_command += PackageArgsForExtractedZip(subdir) - - if options.create_density_splits: - 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: - RenameDensitySplits(options.apk_path) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/android/gyp/process_resources.py b/engine/src/flutter/build/android/gyp/process_resources.py deleted file mode 100755 index d227954ae9..0000000000 --- a/engine/src/flutter/build/android/gyp/process_resources.py +++ /dev/null @@ -1,420 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""Process Android resources to generate R.java, and prepare for packaging. - -This will crunch images and generate v14 compatible resources -(see generate_v14_compatible_resources.py). -""" - -import codecs -import optparse -import os -import re -import shutil -import sys -import zipfile - -import generate_v14_compatible_resources - -from util import build_utils - -# Import jinja2 from third_party/jinja2 -sys.path.insert(1, - os.path.join(os.path.dirname(__file__), '../../../third_party')) -from jinja2 import Template # pylint: disable=F0401 - - -def ParseArgs(args): - """Parses command line options. - - Returns: - An options object as from optparse.OptionsParser.parse_args() - """ - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--android-sdk', help='path to the Android SDK folder') - parser.add_option('--aapt-path', - help='path to the Android aapt tool') - parser.add_option('--non-constant-id', action='store_true') - - parser.add_option('--android-manifest', help='AndroidManifest.xml path') - parser.add_option('--custom-package', help='Java package for R.java') - parser.add_option( - '--shared-resources', - action='store_true', - help='Make a resource package that can be loaded by a different' - 'application at runtime to access the package\'s resources.') - - parser.add_option('--resource-dirs', - help='Directories containing resources of this target.') - parser.add_option('--dependencies-res-zips', - help='Resources from dependents.') - - parser.add_option('--resource-zip-out', - help='Path for output zipped resources.') - - parser.add_option('--R-dir', - help='directory to hold generated R.java.') - parser.add_option('--srcjar-out', - help='Path to srcjar to contain generated R.java.') - parser.add_option('--r-text-out', - help='Path to store the R.txt file generated by appt.') - - parser.add_option('--proguard-file', - help='Path to proguard.txt generated file') - - parser.add_option( - '--v14-skip', - action="store_true", - help='Do not generate nor verify v14 resources') - - parser.add_option( - '--extra-res-packages', - help='Additional package names to generate R.java files for') - parser.add_option( - '--extra-r-text-files', - help='For each additional package, the R.txt file should contain a ' - 'list of resources to be included in the R.java file in the format ' - 'generated by aapt') - parser.add_option( - '--include-all-resources', - action='store_true', - help='Include every resource ID in every generated R.java file ' - '(ignoring R.txt).') - - parser.add_option( - '--all-resources-zip-out', - help='Path for output of all resources. This includes resources in ' - 'dependencies.') - - parser.add_option('--stamp', help='File to touch on success') - - (options, args) = parser.parse_args(args) - - if args: - parser.error('No positional arguments should be given.') - - # Check that required options have been provided. - required_options = ( - 'android_sdk', - 'aapt_path', - 'android_manifest', - 'dependencies_res_zips', - 'resource_dirs', - 'resource_zip_out', - ) - build_utils.CheckOptions(options, parser, required=required_options) - - if (options.R_dir is None) == (options.srcjar_out is None): - raise Exception('Exactly one of --R-dir or --srcjar-out must be specified.') - - return options - - -def CreateExtraRJavaFiles( - r_dir, extra_packages, extra_r_text_files, shared_resources, include_all): - if include_all: - java_files = build_utils.FindInDirectory(r_dir, "R.java") - if len(java_files) != 1: - return - r_java_file = java_files[0] - r_java_contents = codecs.open(r_java_file, encoding='utf-8').read() - - for package in extra_packages: - package_r_java_dir = os.path.join(r_dir, *package.split('.')) - build_utils.MakeDirectory(package_r_java_dir) - package_r_java_path = os.path.join(package_r_java_dir, 'R.java') - new_r_java = re.sub(r'package [.\w]*;', u'package %s;' % package, - r_java_contents) - codecs.open(package_r_java_path, 'w', encoding='utf-8').write(new_r_java) - else: - if len(extra_packages) != len(extra_r_text_files): - raise Exception('Need one R.txt file per extra package') - - all_resources = {} - r_txt_file = os.path.join(r_dir, 'R.txt') - if not os.path.exists(r_txt_file): - return - with open(r_txt_file) as f: - for line in f: - m = re.match(r'(int(?:\[\])?) (\w+) (\w+) (.+)$', line) - if not m: - raise Exception('Unexpected line in R.txt: %s' % line) - java_type, resource_type, name, value = m.groups() - all_resources[(resource_type, name)] = (java_type, value) - - for package, r_text_file in zip(extra_packages, extra_r_text_files): - if os.path.exists(r_text_file): - package_r_java_dir = os.path.join(r_dir, *package.split('.')) - build_utils.MakeDirectory(package_r_java_dir) - package_r_java_path = os.path.join(package_r_java_dir, 'R.java') - CreateExtraRJavaFile( - package, package_r_java_path, r_text_file, all_resources, - shared_resources) - - -def CreateExtraRJavaFile( - package, r_java_path, r_text_file, all_resources, shared_resources): - resources = {} - with open(r_text_file) as f: - for line in f: - m = re.match(r'int(?:\[\])? (\w+) (\w+) ', line) - if not m: - raise Exception('Unexpected line in R.txt: %s' % line) - resource_type, name = m.groups() - java_type, value = all_resources[(resource_type, name)] - if resource_type not in resources: - resources[resource_type] = [] - resources[resource_type].append((name, java_type, value)) - - template = Template("""/* AUTO-GENERATED FILE. DO NOT MODIFY. */ - -package {{ package }}; - -public final class R { - {% for resource_type in resources %} - public static final class {{ resource_type }} { - {% for name, java_type, value in resources[resource_type] %} - {% if shared_resources %} - public static {{ java_type }} {{ name }} = {{ value }}; - {% else %} - public static final {{ java_type }} {{ name }} = {{ value }}; - {% endif %} - {% endfor %} - } - {% endfor %} - {% if shared_resources %} - public static void onResourcesLoaded(int packageId) { - {% for resource_type in resources %} - {% for name, java_type, value in resources[resource_type] %} - {% if java_type == 'int[]' %} - for(int i = 0; i < {{ resource_type }}.{{ name }}.length; ++i) { - {{ resource_type }}.{{ name }}[i] = - ({{ resource_type }}.{{ name }}[i] & 0x00ffffff) - | (packageId << 24); - } - {% else %} - {{ resource_type }}.{{ name }} = - ({{ resource_type }}.{{ name }} & 0x00ffffff) - | (packageId << 24); - {% endif %} - {% endfor %} - {% endfor %} - } - {% endif %} -} -""", trim_blocks=True, lstrip_blocks=True) - - output = template.render(package=package, resources=resources, - shared_resources=shared_resources) - with open(r_java_path, 'w') as f: - f.write(output) - - -def CrunchDirectory(aapt, input_dir, output_dir): - """Crunches the images in input_dir and its subdirectories into output_dir. - - If an image is already optimized, crunching often increases image size. In - this case, the crunched image is overwritten with the original image. - """ - aapt_cmd = [aapt, - 'crunch', - '-C', output_dir, - '-S', input_dir, - '--ignore-assets', build_utils.AAPT_IGNORE_PATTERN] - build_utils.CheckOutput(aapt_cmd, stderr_filter=FilterCrunchStderr, - fail_func=DidCrunchFail) - - # Check for images whose size increased during crunching and replace them - # with their originals (except for 9-patches, which must be crunched). - for dir_, _, files in os.walk(output_dir): - for crunched in files: - if crunched.endswith('.9.png'): - continue - if not crunched.endswith('.png'): - raise Exception('Unexpected file in crunched dir: ' + crunched) - crunched = os.path.join(dir_, crunched) - original = os.path.join(input_dir, os.path.relpath(crunched, output_dir)) - original_size = os.path.getsize(original) - crunched_size = os.path.getsize(crunched) - if original_size < crunched_size: - shutil.copyfile(original, crunched) - - -def FilterCrunchStderr(stderr): - """Filters out lines from aapt crunch's stderr that can safely be ignored.""" - filtered_lines = [] - for line in stderr.splitlines(True): - # Ignore this libpng warning, which is a known non-error condition. - # http://crbug.com/364355 - if ('libpng warning: iCCP: Not recognizing known sRGB profile that has ' - + 'been edited' in line): - continue - filtered_lines.append(line) - return ''.join(filtered_lines) - - -def DidCrunchFail(returncode, stderr): - """Determines whether aapt crunch failed from its return code and output. - - Because aapt's return code cannot be trusted, any output to stderr is - an indication that aapt has failed (http://crbug.com/314885). - """ - return returncode != 0 or stderr - - -def ZipResources(resource_dirs, zip_path): - # Python zipfile does not provide a way to replace a file (it just writes - # another file with the same name). So, first collect all the files to put - # in the zip (with proper overriding), and then zip them. - files_to_zip = dict() - for d in resource_dirs: - for root, _, files in os.walk(d): - for f in files: - archive_path = os.path.join(os.path.relpath(root, d), f) - path = os.path.join(root, f) - files_to_zip[archive_path] = path - with zipfile.ZipFile(zip_path, 'w') as outzip: - for archive_path, path in files_to_zip.iteritems(): - outzip.write(path, archive_path) - - -def CombineZips(zip_files, output_path): - # When packaging resources, if the top-level directories in the zip file are - # of the form 0, 1, ..., then each subdirectory will be passed to aapt as a - # resources directory. While some resources just clobber others (image files, - # etc), other resources (particularly .xml files) need to be more - # intelligently merged. That merging is left up to aapt. - with zipfile.ZipFile(output_path, 'w') as outzip: - for i, z in enumerate(zip_files): - with zipfile.ZipFile(z, 'r') as inzip: - for name in inzip.namelist(): - new_name = '%d/%s' % (i, name) - outzip.writestr(new_name, inzip.read(name)) - - -def main(): - args = build_utils.ExpandFileArgs(sys.argv[1:]) - - options = ParseArgs(args) - android_jar = os.path.join(options.android_sdk, 'android.jar') - aapt = options.aapt_path - - input_files = [] - - with build_utils.TempDir() as temp_dir: - deps_dir = os.path.join(temp_dir, 'deps') - build_utils.MakeDirectory(deps_dir) - v14_dir = os.path.join(temp_dir, 'v14') - build_utils.MakeDirectory(v14_dir) - - gen_dir = os.path.join(temp_dir, 'gen') - build_utils.MakeDirectory(gen_dir) - - input_resource_dirs = build_utils.ParseGypList(options.resource_dirs) - - if not options.v14_skip: - for resource_dir in input_resource_dirs: - generate_v14_compatible_resources.GenerateV14Resources( - resource_dir, - v14_dir) - - dep_zips = build_utils.ParseGypList(options.dependencies_res_zips) - input_files += dep_zips - dep_subdirs = [] - for z in dep_zips: - subdir = os.path.join(deps_dir, os.path.basename(z)) - if os.path.exists(subdir): - raise Exception('Resource zip name conflict: ' + os.path.basename(z)) - build_utils.ExtractAll(z, path=subdir) - dep_subdirs.append(subdir) - - # Generate R.java. This R.java contains non-final constants and is used only - # while compiling the library jar (e.g. chromium_content.jar). When building - # an apk, a new R.java file with the correct resource -> ID mappings will be - # generated by merging the resources from all libraries and the main apk - # project. - package_command = [aapt, - 'package', - '-m', - '-M', options.android_manifest, - '--auto-add-overlay', - '-I', android_jar, - '--output-text-symbols', gen_dir, - '-J', gen_dir, - '--ignore-assets', build_utils.AAPT_IGNORE_PATTERN] - - for d in input_resource_dirs: - package_command += ['-S', d] - - for d in dep_subdirs: - package_command += ['-S', d] - - if options.non_constant_id: - package_command.append('--non-constant-id') - if options.custom_package: - package_command += ['--custom-package', options.custom_package] - if options.proguard_file: - package_command += ['-G', options.proguard_file] - if options.shared_resources: - package_command.append('--shared-lib') - build_utils.CheckOutput(package_command, print_stderr=False) - - if options.extra_res_packages: - CreateExtraRJavaFiles( - gen_dir, - build_utils.ParseGypList(options.extra_res_packages), - build_utils.ParseGypList(options.extra_r_text_files), - options.shared_resources, - options.include_all_resources) - - # This is the list of directories with resources to put in the final .zip - # file. The order of these is important so that crunched/v14 resources - # override the normal ones. - zip_resource_dirs = input_resource_dirs + [v14_dir] - - base_crunch_dir = os.path.join(temp_dir, 'crunch') - - # Crunch image resources. This shrinks png files and is necessary for - # 9-patch images to display correctly. 'aapt crunch' accepts only a single - # directory at a time and deletes everything in the output directory. - for idx, input_dir in enumerate(input_resource_dirs): - crunch_dir = os.path.join(base_crunch_dir, str(idx)) - build_utils.MakeDirectory(crunch_dir) - zip_resource_dirs.append(crunch_dir) - CrunchDirectory(aapt, input_dir, crunch_dir) - - ZipResources(zip_resource_dirs, options.resource_zip_out) - - if options.all_resources_zip_out: - CombineZips([options.resource_zip_out] + dep_zips, - options.all_resources_zip_out) - - if options.R_dir: - build_utils.DeleteDirectory(options.R_dir) - shutil.copytree(gen_dir, options.R_dir) - else: - build_utils.ZipDir(options.srcjar_out, gen_dir) - - if options.r_text_out: - r_text_path = os.path.join(gen_dir, 'R.txt') - if os.path.exists(r_text_path): - shutil.copyfile(r_text_path, options.r_text_out) - else: - open(options.r_text_out, 'w').close() - - if options.depfile: - input_files += build_utils.GetPythonDependencies() - build_utils.WriteDepfile(options.depfile, input_files) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/android/gyp/proguard.py b/engine/src/flutter/build/android/gyp/proguard.py deleted file mode 100755 index 5127100a89..0000000000 --- a/engine/src/flutter/build/android/gyp/proguard.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env 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. - -import optparse -import sys - -from util import build_utils -from util import proguard_util - -def DoProguard(options): - proguard = proguard_util.ProguardCmdBuilder(options.proguard_path) - proguard.injars(build_utils.ParseGypList(options.input_paths)) - proguard.configs(build_utils.ParseGypList(options.proguard_configs)) - proguard.outjar(options.output_path) - - if options.mapping: - proguard.mapping(options.mapping) - - if options.is_test: - proguard.is_test(True) - - classpath = [] - for arg in options.classpath: - classpath += build_utils.ParseGypList(arg) - classpath = list(set(classpath)) - proguard.libraryjars(classpath) - - proguard.CheckOutput() - - return proguard.GetInputs() - - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--proguard-path', - help='Path to the proguard executable.') - parser.add_option('--input-paths', - help='Paths to the .jar files proguard should run on.') - parser.add_option('--output-path', help='Path to the generated .jar file.') - parser.add_option('--proguard-configs', - help='Paths to proguard configuration files.') - parser.add_option('--mapping', help='Path to proguard mapping to apply.') - parser.add_option('--is-test', action='store_true', - help='If true, extra proguard options for instrumentation tests will be ' - 'added.') - parser.add_option('--classpath', action='append', - help='Classpath for proguard.') - parser.add_option('--stamp', help='Path to touch on success.') - - options, _ = parser.parse_args(args) - - inputs = DoProguard(options) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - inputs + build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/push_libraries.py b/engine/src/flutter/build/android/gyp/push_libraries.py deleted file mode 100755 index 6b31a2e19d..0000000000 --- a/engine/src/flutter/build/android/gyp/push_libraries.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env 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. - -"""Pushes native libraries to a device. - -""" - -import optparse -import os -import sys - -BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), os.pardir) -sys.path.append(BUILD_ANDROID_DIR) - -from pylib import constants - -from util import build_device -from util import build_utils -from util import md5_check - -def DoPush(options): - libraries = build_utils.ParseGypList(options.libraries) - - device = build_device.GetBuildDeviceFromPath( - options.build_device_configuration) - if not device: - return - - serial_number = device.GetSerialNumber() - # A list so that it is modifiable in Push below. - needs_directory = [True] - for lib in libraries: - device_path = os.path.join(options.device_dir, lib) - host_path = os.path.join(options.libraries_dir, lib) - - def Push(): - if needs_directory: - device.RunShellCommand('mkdir -p ' + options.device_dir) - needs_directory[:] = [] # = False - device.PushChangedFiles([(host_path, device_path)]) - - record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number) - md5_check.CallAndRecordIfStale( - Push, - record_path=record_path, - input_paths=[host_path], - input_strings=[device_path]) - - -def main(args): - args = build_utils.ExpandFileArgs(args) - parser = optparse.OptionParser() - parser.add_option('--libraries-dir', - help='Directory that contains stripped libraries.') - parser.add_option('--device-dir', - help='Device directory to push the libraries to.') - parser.add_option('--libraries', - help='List of native libraries.') - parser.add_option('--stamp', help='Path to touch on success.') - parser.add_option('--build-device-configuration', - help='Path to build device configuration.') - parser.add_option('--configuration-name', - help='The build CONFIGURATION_NAME') - options, _ = parser.parse_args(args) - - required_options = ['libraries', 'device_dir', 'libraries'] - build_utils.CheckOptions(options, parser, required=required_options) - constants.SetBuildType(options.configuration_name) - - DoPush(options) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/strip_library_for_device.py b/engine/src/flutter/build/android/gyp/strip_library_for_device.py deleted file mode 100755 index 9e2daae33a..0000000000 --- a/engine/src/flutter/build/android/gyp/strip_library_for_device.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env 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. - -import optparse -import os -import sys - -from util import build_utils - - -def StripLibrary(android_strip, android_strip_args, library_path, output_path): - if build_utils.IsTimeStale(output_path, [library_path]): - strip_cmd = ([android_strip] + - android_strip_args + - ['-o', output_path, library_path]) - build_utils.CheckOutput(strip_cmd) - - -def main(args): - args = build_utils.ExpandFileArgs(args) - - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--android-strip', - help='Path to the toolchain\'s strip binary') - parser.add_option('--android-strip-arg', action='append', - help='Argument to be passed to strip') - parser.add_option('--libraries-dir', - help='Directory for un-stripped libraries') - parser.add_option('--stripped-libraries-dir', - help='Directory for stripped libraries') - parser.add_option('--libraries', - help='List of libraries to strip') - parser.add_option('--stamp', help='Path to touch on success') - - options, _ = parser.parse_args(args) - - libraries = build_utils.ParseGypList(options.libraries) - - build_utils.MakeDirectory(options.stripped_libraries_dir) - - for library in libraries: - for base_path in options.libraries_dir.split(','): - library_path = os.path.join(base_path, library) - if (os.path.exists(library_path)): - break - stripped_library_path = os.path.join( - options.stripped_libraries_dir, library) - StripLibrary(options.android_strip, options.android_strip_arg, library_path, - stripped_library_path) - - if options.stamp: - build_utils.Touch(options.stamp) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/test/BUILD.gn b/engine/src/flutter/build/android/gyp/test/BUILD.gn deleted file mode 100644 index 2deac1d56f..0000000000 --- a/engine/src/flutter/build/android/gyp/test/BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ -import("//build/config/android/rules.gni") - -java_library("hello_world_java") { - java_files = [ "java/org/chromium/helloworld/HelloWorldPrinter.java" ] -} - -java_binary("hello_world") { - deps = [ - ":hello_world_java", - ] - java_files = [ "java/org/chromium/helloworld/HelloWorldMain.java" ] - main_class = "org.chromium.helloworld.HelloWorldMain" -} diff --git a/engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldMain.java b/engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldMain.java deleted file mode 100644 index 10860d8332..0000000000 --- a/engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldMain.java +++ /dev/null @@ -1,15 +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.helloworld; - -public class HelloWorldMain { - public static void main(String[] args) { - if (args.length > 0) { - System.exit(Integer.parseInt(args[0])); - } - HelloWorldPrinter.print(); - } -} - diff --git a/engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldPrinter.java b/engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldPrinter.java deleted file mode 100644 index b09673e21f..0000000000 --- a/engine/src/flutter/build/android/gyp/test/java/org/chromium/helloworld/HelloWorldPrinter.java +++ /dev/null @@ -1,12 +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.helloworld; - -public class HelloWorldPrinter { - public static void print() { - System.out.println("Hello, world!"); - } -} - diff --git a/engine/src/flutter/build/android/gyp/touch.py b/engine/src/flutter/build/android/gyp/touch.py deleted file mode 100755 index 7b4375e40a..0000000000 --- a/engine/src/flutter/build/android/gyp/touch.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/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. - -import sys - -from util import build_utils - -def main(argv): - for f in argv[1:]: - build_utils.Touch(f) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/gyp/util/__init__.py b/engine/src/flutter/build/android/gyp/util/__init__.py deleted file mode 100644 index 727e987e6b..0000000000 --- a/engine/src/flutter/build/android/gyp/util/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2012 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. - diff --git a/engine/src/flutter/build/android/gyp/util/build_device.py b/engine/src/flutter/build/android/gyp/util/build_device.py deleted file mode 100644 index 8ab11124f7..0000000000 --- a/engine/src/flutter/build/android/gyp/util/build_device.py +++ /dev/null @@ -1,108 +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. - -""" A simple device interface for build steps. - -""" - -import logging -import os -import re -import sys - -from util import build_utils - -BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..', '..') -sys.path.append(BUILD_ANDROID_DIR) - -from pylib import android_commands -from pylib.device import device_errors -from pylib.device import device_utils - -GetAttachedDevices = android_commands.GetAttachedDevices - - -class BuildDevice(object): - def __init__(self, configuration): - self.id = configuration['id'] - self.description = configuration['description'] - self.install_metadata = configuration['install_metadata'] - self.device = device_utils.DeviceUtils(self.id) - - def RunShellCommand(self, *args, **kwargs): - return self.device.RunShellCommand(*args, **kwargs) - - def PushChangedFiles(self, *args, **kwargs): - return self.device.PushChangedFiles(*args, **kwargs) - - def GetSerialNumber(self): - return self.id - - 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: - # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ - # org.chromium.chrome.shell.apk - # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ - # org.chromium.chrome.shell-1.apk - apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?.apk$' % apk_package, s) - matches = filter(apk_matcher, self.install_metadata) - return matches[0] if matches else None - - -def GetConfigurationForDevice(device_id): - device = device_utils.DeviceUtils(device_id) - configuration = None - has_root = False - is_online = device.IsOnline() - if is_online: - cmd = 'ls -l /data/app; getprop ro.build.description' - cmd_output = device.RunShellCommand(cmd) - has_root = not 'Permission denied' in cmd_output[0] - if not has_root: - # Disable warning log messages from EnableRoot() - logging.getLogger().disabled = True - try: - device.EnableRoot() - has_root = True - except device_errors.CommandFailedError: - has_root = False - finally: - logging.getLogger().disabled = False - cmd_output = device.RunShellCommand(cmd) - - configuration = { - 'id': device_id, - 'description': cmd_output[-1], - 'install_metadata': cmd_output[:-1], - } - return configuration, is_online, has_root - - -def WriteConfigurations(configurations, path): - # Currently we only support installing to the first device. - build_utils.WriteJson(configurations[:1], path, only_if_changed=True) - - -def ReadConfigurations(path): - return build_utils.ReadJson(path) - - -def GetBuildDevice(configurations): - assert len(configurations) == 1 - return BuildDevice(configurations[0]) - - -def GetBuildDeviceFromPath(path): - configurations = ReadConfigurations(path) - if len(configurations) > 0: - return GetBuildDevice(ReadConfigurations(path)) - return None - diff --git a/engine/src/flutter/build/android/gyp/util/build_utils.py b/engine/src/flutter/build/android/gyp/util/build_utils.py deleted file mode 100644 index 65b1a643c2..0000000000 --- a/engine/src/flutter/build/android/gyp/util/build_utils.py +++ /dev/null @@ -1,376 +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. - -import ast -import contextlib -import fnmatch -import json -import os -import pipes -import re -import shlex -import shutil -import subprocess -import sys -import tempfile -import zipfile - - -CHROMIUM_SRC = os.path.normpath( - os.path.join(os.path.dirname(__file__), - os.pardir, os.pardir, os.pardir, os.pardir)) -COLORAMA_ROOT = os.path.join(CHROMIUM_SRC, - 'third_party', 'colorama', 'src') -# aapt should ignore OWNERS files in addition the default ignore pattern. -AAPT_IGNORE_PATTERN = ('!OWNERS:!.svn:!.git:!.ds_store:!*.scc:.*:_*:' + - '!CVS:!thumbs.db:!picasa.ini:!*~:!*.d.stamp') - - -@contextlib.contextmanager -def TempDir(): - dirname = tempfile.mkdtemp() - try: - yield dirname - finally: - shutil.rmtree(dirname) - - -def MakeDirectory(dir_path): - try: - os.makedirs(dir_path) - except OSError: - pass - - -def DeleteDirectory(dir_path): - if os.path.exists(dir_path): - shutil.rmtree(dir_path) - - -def Touch(path, fail_if_missing=False): - if fail_if_missing and not os.path.exists(path): - raise Exception(path + ' doesn\'t exist.') - - MakeDirectory(os.path.dirname(path)) - with open(path, 'a'): - os.utime(path, None) - - -def FindInDirectory(directory, filename_filter): - files = [] - for root, _dirnames, filenames in os.walk(directory): - matched_files = fnmatch.filter(filenames, filename_filter) - files.extend((os.path.join(root, f) for f in matched_files)) - return files - - -def FindInDirectories(directories, filename_filter): - all_files = [] - for directory in directories: - all_files.extend(FindInDirectory(directory, filename_filter)) - return all_files - - -def ParseGnList(gn_string): - return ast.literal_eval(gn_string) - - -def ParseGypList(gyp_string): - # The ninja generator doesn't support $ in strings, so use ## to - # represent $. - # TODO(cjhopman): Remove when - # https://code.google.com/p/gyp/issues/detail?id=327 - # is addressed. - gyp_string = gyp_string.replace('##', '$') - - if gyp_string.startswith('['): - return ParseGnList(gyp_string) - return shlex.split(gyp_string) - - -def CheckOptions(options, parser, required=None): - if not required: - return - for option_name in required: - if getattr(options, option_name) is None: - parser.error('--%s is required' % option_name.replace('_', '-')) - - -def WriteJson(obj, path, only_if_changed=False): - old_dump = None - if os.path.exists(path): - with open(path, 'r') as oldfile: - old_dump = oldfile.read() - - new_dump = json.dumps(obj, sort_keys=True, indent=2, separators=(',', ': ')) - - if not only_if_changed or old_dump != new_dump: - with open(path, 'w') as outfile: - outfile.write(new_dump) - - -def ReadJson(path): - with open(path, 'r') as jsonfile: - return json.load(jsonfile) - - -class CalledProcessError(Exception): - """This exception is raised when the process run by CheckOutput - exits with a non-zero exit code.""" - - def __init__(self, cwd, args, output): - super(CalledProcessError, self).__init__() - self.cwd = cwd - self.args = args - self.output = output - - def __str__(self): - # A user should be able to simply copy and paste the command that failed - # into their shell. - copyable_command = '( cd {}; {} )'.format(os.path.abspath(self.cwd), - ' '.join(map(pipes.quote, self.args))) - return 'Command failed: {}\n{}'.format(copyable_command, self.output) - - -# This can be used in most cases like subprocess.check_output(). The output, -# particularly when the command fails, better highlights the command's failure. -# If the command fails, raises a build_utils.CalledProcessError. -def CheckOutput(args, cwd=None, - print_stdout=False, print_stderr=True, - stdout_filter=None, - stderr_filter=None, - fail_func=lambda returncode, stderr: returncode != 0): - if not cwd: - cwd = os.getcwd() - - child = subprocess.Popen(args, - stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd) - stdout, stderr = child.communicate() - - if stdout_filter is not None: - stdout = stdout_filter(stdout) - - if stderr_filter is not None: - stderr = stderr_filter(stderr) - - if fail_func(child.returncode, stderr): - raise CalledProcessError(cwd, args, stdout + stderr) - - if print_stdout: - sys.stdout.write(stdout) - if print_stderr: - sys.stderr.write(stderr) - - return stdout - - -def GetModifiedTime(path): - # For a symlink, the modified time should be the greater of the link's - # modified time and the modified time of the target. - return max(os.lstat(path).st_mtime, os.stat(path).st_mtime) - - -def IsTimeStale(output, inputs): - if not os.path.exists(output): - return True - - output_time = GetModifiedTime(output) - for i in inputs: - if GetModifiedTime(i) > output_time: - return True - return False - - -def IsDeviceReady(): - device_state = CheckOutput(['adb', 'get-state']) - return device_state.strip() == 'device' - - -def CheckZipPath(name): - if os.path.normpath(name) != name: - raise Exception('Non-canonical zip path: %s' % name) - if os.path.isabs(name): - raise Exception('Absolute zip path: %s' % name) - - -def ExtractAll(zip_path, path=None, no_clobber=True, pattern=None): - if path is None: - path = os.getcwd() - elif not os.path.exists(path): - MakeDirectory(path) - - with zipfile.ZipFile(zip_path) as z: - for name in z.namelist(): - if name.endswith('/'): - continue - if pattern is not None: - if not fnmatch.fnmatch(name, pattern): - continue - CheckZipPath(name) - if no_clobber: - output_path = os.path.join(path, name) - if os.path.exists(output_path): - raise Exception( - 'Path already exists from zip: %s %s %s' - % (zip_path, name, output_path)) - - z.extractall(path=path) - - -def DoZip(inputs, output, base_dir): - with zipfile.ZipFile(output, 'w') as outfile: - for f in inputs: - CheckZipPath(os.path.relpath(f, base_dir)) - outfile.write(f, os.path.relpath(f, base_dir)) - - -def ZipDir(output, base_dir): - with zipfile.ZipFile(output, 'w') as outfile: - for root, _, files in os.walk(base_dir): - for f in files: - path = os.path.join(root, f) - archive_path = os.path.relpath(path, base_dir) - CheckZipPath(archive_path) - outfile.write(path, archive_path) - - -def MergeZips(output, inputs, exclude_patterns=None): - added_names = set() - def Allow(name): - if exclude_patterns is not None: - for p in exclude_patterns: - if fnmatch.fnmatch(name, p): - return False - return True - - with zipfile.ZipFile(output, 'w') as out_zip: - for in_file in inputs: - with zipfile.ZipFile(in_file, 'r') as in_zip: - for name in in_zip.namelist(): - if name not in added_names and Allow(name): - out_zip.writestr(name, in_zip.read(name)) - added_names.add(name) - - -def PrintWarning(message): - print 'WARNING: ' + message - - -def PrintBigWarning(message): - print '***** ' * 8 - PrintWarning(message) - print '***** ' * 8 - - -def GetSortedTransitiveDependencies(top, deps_func): - """Gets the list of all transitive dependencies in sorted order. - - There should be no cycles in the dependency graph. - - Args: - top: a list of the top level nodes - deps_func: A function that takes a node and returns its direct dependencies. - Returns: - A list of all transitive dependencies of nodes in top, in order (a node will - appear in the list at a higher index than all of its dependencies). - """ - def Node(dep): - return (dep, deps_func(dep)) - - # First: find all deps - unchecked_deps = list(top) - all_deps = set(top) - while unchecked_deps: - dep = unchecked_deps.pop() - new_deps = deps_func(dep).difference(all_deps) - unchecked_deps.extend(new_deps) - all_deps = all_deps.union(new_deps) - - # Then: simple, slow topological sort. - sorted_deps = [] - unsorted_deps = dict(map(Node, all_deps)) - while unsorted_deps: - for library, dependencies in unsorted_deps.items(): - if not dependencies.intersection(unsorted_deps.keys()): - sorted_deps.append(library) - del unsorted_deps[library] - - return sorted_deps - - -def GetPythonDependencies(): - """Gets the paths of imported non-system python modules. - - A path is assumed to be a "system" import if it is outside of chromium's - src/. The paths will be relative to the current directory. - """ - module_paths = (m.__file__ for m in sys.modules.itervalues() - if m is not None and hasattr(m, '__file__')) - - abs_module_paths = map(os.path.abspath, module_paths) - - non_system_module_paths = [ - p for p in abs_module_paths if p.startswith(CHROMIUM_SRC)] - def ConvertPycToPy(s): - if s.endswith('.pyc'): - return s[:-1] - return s - - non_system_module_paths = map(ConvertPycToPy, non_system_module_paths) - non_system_module_paths = map(os.path.relpath, non_system_module_paths) - return sorted(set(non_system_module_paths)) - - -def AddDepfileOption(parser): - parser.add_option('--depfile', - help='Path to depfile. This must be specified as the ' - 'action\'s first output.') - - -def WriteDepfile(path, dependencies): - with open(path, 'w') as depfile: - depfile.write(path) - depfile.write(': ') - depfile.write(' '.join(dependencies)) - depfile.write('\n') - - -def ExpandFileArgs(args): - """Replaces file-arg placeholders in args. - - These placeholders have the form: - @FileArg(filename:key1:key2:...:keyn) - - The value of such a placeholder is calculated by reading 'filename' as json. - And then extracting the value at [key1][key2]...[keyn]. - - Note: This intentionally does not return the list of files that appear in such - placeholders. An action that uses file-args *must* know the paths of those - files prior to the parsing of the arguments (typically by explicitly listing - them in the action's inputs in build files). - """ - new_args = list(args) - file_jsons = dict() - r = re.compile('@FileArg\((.*?)\)') - for i, arg in enumerate(args): - match = r.search(arg) - if not match: - continue - - if match.end() != len(arg): - raise Exception('Unexpected characters after FileArg: ' + arg) - - lookup_path = match.group(1).split(':') - file_path = lookup_path[0] - if not file_path in file_jsons: - file_jsons[file_path] = ReadJson(file_path) - - expansion = file_jsons[file_path] - for k in lookup_path[1:]: - expansion = expansion[k] - - new_args[i] = arg[:match.start()] + str(expansion) - - return new_args - diff --git a/engine/src/flutter/build/android/gyp/util/md5_check.py b/engine/src/flutter/build/android/gyp/util/md5_check.py deleted file mode 100644 index 9f365aa081..0000000000 --- a/engine/src/flutter/build/android/gyp/util/md5_check.py +++ /dev/null @@ -1,86 +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. - -import hashlib -import os - - -def CallAndRecordIfStale( - function, record_path=None, input_paths=None, input_strings=None, - force=False): - """Calls function if the md5sum of the input paths/strings has changed. - - The md5sum of the inputs is compared with the one stored in record_path. If - this has changed (or the record doesn't exist), function will be called and - the new md5sum will be recorded. - - If force is True, the function will be called regardless of whether the - md5sum is out of date. - """ - if not input_paths: - input_paths = [] - if not input_strings: - input_strings = [] - md5_checker = _Md5Checker( - record_path=record_path, - input_paths=input_paths, - input_strings=input_strings) - if force or md5_checker.IsStale(): - function() - md5_checker.Write() - - -def _UpdateMd5ForFile(md5, path, block_size=2**16): - with open(path, 'rb') as infile: - while True: - data = infile.read(block_size) - if not data: - break - md5.update(data) - - -def _UpdateMd5ForDirectory(md5, dir_path): - for root, _, files in os.walk(dir_path): - for f in files: - _UpdateMd5ForFile(md5, os.path.join(root, f)) - - -def _UpdateMd5ForPath(md5, path): - if os.path.isdir(path): - _UpdateMd5ForDirectory(md5, path) - else: - _UpdateMd5ForFile(md5, path) - - -class _Md5Checker(object): - def __init__(self, record_path=None, input_paths=None, input_strings=None): - if not input_paths: - input_paths = [] - if not input_strings: - input_strings = [] - - assert record_path.endswith('.stamp'), ( - 'record paths must end in \'.stamp\' so that they are easy to find ' - 'and delete') - - self.record_path = record_path - - md5 = hashlib.md5() - for i in sorted(input_paths): - _UpdateMd5ForPath(md5, i) - for s in input_strings: - md5.update(s) - self.new_digest = md5.hexdigest() - - self.old_digest = '' - if os.path.exists(self.record_path): - with open(self.record_path, 'r') as old_record: - self.old_digest = old_record.read() - - def IsStale(self): - return self.old_digest != self.new_digest - - def Write(self): - with open(self.record_path, 'w') as new_record: - new_record.write(self.new_digest) diff --git a/engine/src/flutter/build/android/gyp/util/md5_check_test.py b/engine/src/flutter/build/android/gyp/util/md5_check_test.py deleted file mode 100644 index 4f89fc2be8..0000000000 --- a/engine/src/flutter/build/android/gyp/util/md5_check_test.py +++ /dev/null @@ -1,72 +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. - -import tempfile -import unittest - -import md5_check # pylint: disable=W0403 - - -class TestMd5Check(unittest.TestCase): - def setUp(self): - self.called = False - - def testCallAndRecordIfStale(self): - input_strings = ['string1', 'string2'] - input_file1 = tempfile.NamedTemporaryFile() - input_file2 = tempfile.NamedTemporaryFile() - file1_contents = 'input file 1' - file2_contents = 'input file 2' - input_file1.write(file1_contents) - input_file1.flush() - input_file2.write(file2_contents) - input_file2.flush() - input_files = [input_file1.name, input_file2.name] - - record_path = tempfile.NamedTemporaryFile(suffix='.stamp') - - def CheckCallAndRecord(should_call, message, force=False): - self.called = False - def MarkCalled(): - self.called = True - md5_check.CallAndRecordIfStale( - MarkCalled, - record_path=record_path.name, - input_paths=input_files, - input_strings=input_strings, - force=force) - self.failUnlessEqual(should_call, self.called, message) - - CheckCallAndRecord(True, 'should call when record doesn\'t exist') - CheckCallAndRecord(False, 'should not call when nothing changed') - CheckCallAndRecord(True, force=True, message='should call when forced') - - input_file1.write('some more input') - input_file1.flush() - CheckCallAndRecord(True, 'changed input file should trigger call') - - input_files = input_files[::-1] - CheckCallAndRecord(False, 'reordering of inputs shouldn\'t trigger call') - - input_files = input_files[:1] - CheckCallAndRecord(True, 'removing file should trigger call') - - input_files.append(input_file2.name) - CheckCallAndRecord(True, 'added input file should trigger call') - - input_strings[0] = input_strings[0] + ' a bit longer' - CheckCallAndRecord(True, 'changed input string should trigger call') - - input_strings = input_strings[::-1] - CheckCallAndRecord(True, 'reordering of string inputs should trigger call') - - input_strings = input_strings[:1] - CheckCallAndRecord(True, 'removing a string should trigger call') - - input_strings.append('a brand new string') - CheckCallAndRecord(True, 'added input string should trigger call') - - -if __name__ == '__main__': - unittest.main() diff --git a/engine/src/flutter/build/android/gyp/util/proguard_util.py b/engine/src/flutter/build/android/gyp/util/proguard_util.py deleted file mode 100644 index 901cd9f2a8..0000000000 --- a/engine/src/flutter/build/android/gyp/util/proguard_util.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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 os -from util import build_utils - -def FilterProguardOutput(output): - '''ProGuard outputs boring stuff to stdout (proguard version, jar path, etc) - as well as interesting stuff (notes, warnings, etc). If stdout is entirely - boring, this method suppresses the output. - ''' - ignore_patterns = [ - 'ProGuard, version ', - 'Reading program jar [', - 'Reading library jar [', - 'Preparing output jar [', - ' Copying resources from program jar [', - ] - for line in output.splitlines(): - for pattern in ignore_patterns: - if line.startswith(pattern): - break - else: - # line doesn't match any of the patterns; it's probably something worth - # printing out. - return output - return '' - - -class ProguardCmdBuilder(object): - def __init__(self, proguard_jar): - assert os.path.exists(proguard_jar) - self._proguard_jar_path = proguard_jar - self._test = None - self._mapping = None - self._libraries = None - self._injars = None - self._configs = None - self._outjar = None - - def outjar(self, path): - assert self._outjar is None - self._outjar = path - - def is_test(self, enable): - assert self._test is None - self._test = enable - - def mapping(self, path): - assert self._mapping is None - assert os.path.exists(path), path - self._mapping = path - - def libraryjars(self, paths): - assert self._libraries is None - for p in paths: - assert os.path.exists(p), p - self._libraries = paths - - def injars(self, paths): - assert self._injars is None - for p in paths: - assert os.path.exists(p), p - self._injars = paths - - def configs(self, paths): - assert self._configs is None - for p in paths: - assert os.path.exists(p), p - self._configs = paths - - def build(self): - assert self._injars is not None - assert self._outjar is not None - assert self._configs is not None - cmd = [ - 'java', '-jar', self._proguard_jar_path, - '-forceprocessing', - ] - if self._test: - cmd += [ - '-dontobfuscate', - '-dontoptimize', - '-dontshrink', - '-dontskipnonpubliclibraryclassmembers', - ] - - if self._mapping: - cmd += [ - '-applymapping', self._mapping, - ] - - if self._libraries: - cmd += [ - '-libraryjars', ':'.join(self._libraries), - ] - - cmd += [ - '-injars', ':'.join(self._injars) - ] - - for config_file in self._configs: - cmd += ['-include', config_file] - - # The output jar must be specified after inputs. - cmd += [ - '-outjars', self._outjar, - '-dump', self._outjar + '.dump', - '-printseeds', self._outjar + '.seeds', - '-printusage', self._outjar + '.usage', - '-printmapping', self._outjar + '.mapping', - ] - return cmd - - def GetInputs(self): - inputs = [self._proguard_jar_path] + self._configs + self._injars - if self._mapping: - inputs.append(self._mapping) - if self._libraries: - inputs += self._libraries - return inputs - - - def CheckOutput(self): - build_utils.CheckOutput(self.build(), print_stdout=True, - stdout_filter=FilterProguardOutput) - diff --git a/engine/src/flutter/build/android/gyp/write_build_config.py b/engine/src/flutter/build/android/gyp/write_build_config.py deleted file mode 100755 index 3773e98bc7..0000000000 --- a/engine/src/flutter/build/android/gyp/write_build_config.py +++ /dev/null @@ -1,357 +0,0 @@ -#!/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. - -"""Writes a build_config file. - -The build_config file for a target is a json file containing information about -how to build that target based on the target's dependencies. This includes -things like: the javac classpath, the list of android resources dependencies, -etc. It also includes the information needed to create the build_config for -other targets that depend on that one. - -Android build scripts should not refer to the build_config directly, and the -build specification should instead pass information in using the special -file-arg syntax (see build_utils.py:ExpandFileArgs). That syntax allows passing -of values in a json dict in a file and looks like this: - --python-arg=@FileArg(build_config_path:javac:classpath) - -Note: If paths to input files are passed in this way, it is important that: - 1. inputs/deps of the action ensure that the files are available the first - time the action runs. - 2. Either (a) or (b) - a. inputs/deps ensure that the action runs whenever one of the files changes - b. the files are added to the action's depfile -""" - -import optparse -import os -import sys -import xml.dom.minidom - -from util import build_utils - -import write_ordered_libraries - -class AndroidManifest(object): - def __init__(self, path): - self.path = path - dom = xml.dom.minidom.parse(path) - manifests = dom.getElementsByTagName('manifest') - assert len(manifests) == 1 - self.manifest = manifests[0] - - def GetInstrumentation(self): - instrumentation_els = self.manifest.getElementsByTagName('instrumentation') - if len(instrumentation_els) == 0: - return None - if len(instrumentation_els) != 1: - raise Exception( - 'More than one element found in %s' % self.path) - return instrumentation_els[0] - - def CheckInstrumentation(self, expected_package): - instr = self.GetInstrumentation() - if not instr: - raise Exception('No elements found in %s' % self.path) - instrumented_package = instr.getAttributeNS( - 'http://schemas.android.com/apk/res/android', 'targetPackage') - if instrumented_package != expected_package: - raise Exception( - 'Wrong instrumented package. Expected %s, got %s' - % (expected_package, instrumented_package)) - - def GetPackageName(self): - return self.manifest.getAttribute('package') - - -dep_config_cache = {} -def GetDepConfig(path): - if not path in dep_config_cache: - dep_config_cache[path] = build_utils.ReadJson(path)['deps_info'] - return dep_config_cache[path] - - -def DepsOfType(wanted_type, configs): - return [c for c in configs if c['type'] == wanted_type] - - -def GetAllDepsConfigsInOrder(deps_config_paths): - def GetDeps(path): - return set(GetDepConfig(path)['deps_configs']) - return build_utils.GetSortedTransitiveDependencies(deps_config_paths, GetDeps) - - -class Deps(object): - def __init__(self, direct_deps_config_paths): - self.all_deps_config_paths = GetAllDepsConfigsInOrder( - direct_deps_config_paths) - self.direct_deps_configs = [ - GetDepConfig(p) for p in direct_deps_config_paths] - self.all_deps_configs = [ - GetDepConfig(p) for p in self.all_deps_config_paths] - - def All(self, wanted_type=None): - if type is None: - return self.all_deps_configs - return DepsOfType(wanted_type, self.all_deps_configs) - - def Direct(self, wanted_type=None): - if wanted_type is None: - return self.direct_deps_configs - return DepsOfType(wanted_type, self.direct_deps_configs) - - def AllConfigPaths(self): - return self.all_deps_config_paths - - -def main(argv): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option('--build-config', help='Path to build_config output.') - parser.add_option( - '--type', - help='Type of this target (e.g. android_library).') - parser.add_option( - '--possible-deps-configs', - help='List of paths for dependency\'s build_config files. Some ' - 'dependencies may not write build_config files. Missing build_config ' - 'files are handled differently based on the type of this target.') - - # android_resources options - parser.add_option('--srcjar', help='Path to target\'s resources srcjar.') - parser.add_option('--resources-zip', help='Path to target\'s resources zip.') - parser.add_option('--r-text', help='Path to target\'s R.txt file.') - parser.add_option('--package-name', - help='Java package name for these resources.') - parser.add_option('--android-manifest', help='Path to android manifest.') - - # java library options - parser.add_option('--jar-path', help='Path to target\'s jar output.') - parser.add_option('--supports-android', action='store_true', - help='Whether this library supports running on the Android platform.') - parser.add_option('--requires-android', action='store_true', - help='Whether this library requires running on the Android platform.') - parser.add_option('--bypass-platform-checks', action='store_true', - help='Bypass checks for support/require Android platform.') - - # android library options - parser.add_option('--dex-path', help='Path to target\'s dex output.') - - # native library options - parser.add_option('--native-libs', help='List of top-level native libs.') - parser.add_option('--readelf-path', help='Path to toolchain\'s readelf.') - - parser.add_option('--tested-apk-config', - help='Path to the build config of the tested apk (for an instrumentation ' - 'test apk).') - - options, args = parser.parse_args(argv) - - if args: - parser.error('No positional arguments should be given.') - - - if not options.type in [ - 'java_library', 'android_resources', 'android_apk', 'deps_dex']: - raise Exception('Unknown type: <%s>' % options.type) - - required_options = ['build_config'] + { - 'java_library': ['jar_path'], - 'android_resources': ['resources_zip'], - 'android_apk': ['jar_path', 'dex_path', 'resources_zip'], - 'deps_dex': ['dex_path'] - }[options.type] - - if options.native_libs: - required_options.append('readelf_path') - - build_utils.CheckOptions(options, parser, required_options) - - if options.type == 'java_library': - if options.supports_android and not options.dex_path: - raise Exception('java_library that supports Android requires a dex path.') - - if options.requires_android and not options.supports_android: - raise Exception( - '--supports-android is required when using --requires-android') - - possible_deps_config_paths = build_utils.ParseGypList( - options.possible_deps_configs) - - 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: - raise Exception('Unknown deps: ' + str(unknown_deps)) - - direct_deps_config_paths = [ - c for c in possible_deps_config_paths if not c in unknown_deps] - - deps = Deps(direct_deps_config_paths) - direct_library_deps = deps.Direct('java_library') - all_library_deps = deps.All('java_library') - - direct_resources_deps = deps.Direct('android_resources') - all_resources_deps = deps.All('android_resources') - # Resources should be ordered with the highest-level dependency first so that - # overrides are done correctly. - all_resources_deps.reverse() - - if options.type == 'android_apk' and options.tested_apk_config: - tested_apk_deps = Deps([options.tested_apk_config]) - tested_apk_resources_deps = tested_apk_deps.All('android_resources') - all_resources_deps = [ - d for d in all_resources_deps if not d in tested_apk_resources_deps] - - # Initialize some common config. - config = { - 'deps_info': { - 'name': os.path.basename(options.build_config), - 'path': options.build_config, - 'type': options.type, - 'deps_configs': direct_deps_config_paths, - } - } - deps_info = config['deps_info'] - - if options.type == 'java_library' and not options.bypass_platform_checks: - deps_info['requires_android'] = options.requires_android - deps_info['supports_android'] = options.supports_android - - deps_require_android = (all_resources_deps + - [d['name'] for d in all_library_deps if d['requires_android']]) - deps_not_support_android = ( - [d['name'] for d in all_library_deps if not d['supports_android']]) - - if deps_require_android and not options.requires_android: - raise Exception('Some deps require building for the Android platform: ' + - str(deps_require_android)) - - if deps_not_support_android and options.supports_android: - raise Exception('Not all deps support the Android platform: ' + - str(deps_not_support_android)) - - if options.type in ['java_library', 'android_apk']: - javac_classpath = [c['jar_path'] for c in direct_library_deps] - java_full_classpath = [c['jar_path'] for c in all_library_deps] - deps_info['resources_deps'] = [c['path'] for c in all_resources_deps] - deps_info['jar_path'] = options.jar_path - if options.type == 'android_apk' or options.supports_android: - deps_info['dex_path'] = options.dex_path - config['javac'] = { - 'classpath': javac_classpath, - } - config['java'] = { - 'full_classpath': java_full_classpath - } - - if options.type == 'java_library': - # Only resources might have srcjars (normal srcjar targets are listed in - # srcjar_deps). A resource's srcjar contains the R.java file for those - # resources, and (like Android's default build system) we allow a library to - # refer to the resources in any of its dependents. - config['javac']['srcjars'] = [ - c['srcjar'] for c in direct_resources_deps if 'srcjar' in c] - - if options.type == 'android_apk': - # Apks will get their resources srcjar explicitly passed to the java step. - config['javac']['srcjars'] = [] - - if options.type == 'android_resources': - deps_info['resources_zip'] = options.resources_zip - if options.srcjar: - deps_info['srcjar'] = options.srcjar - if options.android_manifest: - manifest = AndroidManifest(options.android_manifest) - deps_info['package_name'] = manifest.GetPackageName() - if options.package_name: - deps_info['package_name'] = options.package_name - if options.r_text: - deps_info['r_text'] = options.r_text - - if options.type == 'android_resources' or options.type == 'android_apk': - config['resources'] = {} - config['resources']['dependency_zips'] = [ - c['resources_zip'] for c in all_resources_deps] - config['resources']['extra_package_names'] = [] - config['resources']['extra_r_text_files'] = [] - - if options.type == 'android_apk': - config['resources']['extra_package_names'] = [ - c['package_name'] for c in all_resources_deps if 'package_name' in c] - config['resources']['extra_r_text_files'] = [ - c['r_text'] for c in all_resources_deps if 'r_text' in c] - - if options.type in ['android_apk', 'deps_dex']: - deps_dex_files = [c['dex_path'] for c in all_library_deps] - - # An instrumentation test apk should exclude the dex files that are in the apk - # under test. - if options.type == 'android_apk' and options.tested_apk_config: - tested_apk_deps = Deps([options.tested_apk_config]) - tested_apk_library_deps = tested_apk_deps.All('java_library') - tested_apk_deps_dex_files = [c['dex_path'] for c in tested_apk_library_deps] - deps_dex_files = [ - p for p in deps_dex_files if not p in tested_apk_deps_dex_files] - - tested_apk_config = GetDepConfig(options.tested_apk_config) - expected_tested_package = tested_apk_config['package_name'] - AndroidManifest(options.android_manifest).CheckInstrumentation( - expected_tested_package) - - # Dependencies for the final dex file of an apk or a 'deps_dex'. - if options.type in ['android_apk', 'deps_dex']: - config['final_dex'] = {} - dex_config = config['final_dex'] - # TODO(cjhopman): proguard version - dex_config['dependency_dex_files'] = deps_dex_files - - if options.type == 'android_apk': - config['dist_jar'] = { - 'dependency_jars': [ - c['jar_path'] for c in all_library_deps - ] - } - manifest = AndroidManifest(options.android_manifest) - deps_info['package_name'] = manifest.GetPackageName() - if not options.tested_apk_config and manifest.GetInstrumentation(): - # This must then have instrumentation only for itself. - manifest.CheckInstrumentation(manifest.GetPackageName()) - - library_paths = [] - java_libraries_list = [] - if options.native_libs: - libraries = build_utils.ParseGypList(options.native_libs) - if libraries: - libraries_dir = os.path.dirname(libraries[0]) - write_ordered_libraries.SetReadelfPath(options.readelf_path) - write_ordered_libraries.SetLibraryDirs([libraries_dir]) - all_native_library_deps = ( - write_ordered_libraries.GetSortedTransitiveDependenciesForBinaries( - libraries)) - # Create a java literal array with the "base" library names: - # e.g. libfoo.so -> foo - java_libraries_list = '{%s}' % ','.join( - ['"%s"' % s[3:-3] for s in all_native_library_deps]) - library_paths = map( - write_ordered_libraries.FullLibraryPath, all_native_library_deps) - - config['native'] = { - 'libraries': library_paths, - 'java_libraries_list': java_libraries_list - } - - build_utils.WriteJson(config, options.build_config, only_if_changed=True) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - deps.AllConfigPaths() + build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/android/gyp/write_ordered_libraries.py b/engine/src/flutter/build/android/gyp/write_ordered_libraries.py deleted file mode 100755 index 0fc9a8ca3e..0000000000 --- a/engine/src/flutter/build/android/gyp/write_ordered_libraries.py +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env 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. - -"""Writes dependency ordered list of native libraries. - -The list excludes any Android system libraries, as those are not bundled with -the APK. - -This list of libraries is used for several steps of building an APK. -In the component build, the --input-libraries only needs to be the top-level -library (i.e. libcontent_shell_content_view). This will then use readelf to -inspect the shared libraries and determine the full list of (non-system) -libraries that should be included in the APK. -""" - -# TODO(cjhopman): See if we can expose the list of library dependencies from -# gyp, rather than calculating it ourselves. -# http://crbug.com/225558 - -import optparse -import os -import re -import sys - -from util import build_utils - -_readelf = None -_library_dirs = None - -_library_re = re.compile( - '.*NEEDED.*Shared library: \[(?P.+)\]') - - -def SetReadelfPath(path): - global _readelf - _readelf = path - - -def SetLibraryDirs(dirs): - global _library_dirs - _library_dirs = dirs - - -def FullLibraryPath(library_name): - assert _library_dirs is not None - for directory in _library_dirs: - path = '%s/%s' % (directory, library_name) - if os.path.exists(path): - return path - return library_name - - -def IsSystemLibrary(library_name): - # If the library doesn't exist in the libraries directory, assume that it is - # an Android system library. - return not os.path.exists(FullLibraryPath(library_name)) - - -def CallReadElf(library_or_executable): - assert _readelf is not None - readelf_cmd = [_readelf, - '-d', - FullLibraryPath(library_or_executable)] - return build_utils.CheckOutput(readelf_cmd) - - -def GetDependencies(library_or_executable): - elf = CallReadElf(library_or_executable) - return set(_library_re.findall(elf)) - - -def GetNonSystemDependencies(library_name): - all_deps = GetDependencies(library_name) - return set((lib for lib in all_deps if not IsSystemLibrary(lib))) - - -def GetSortedTransitiveDependencies(libraries): - """Returns all transitive library dependencies in dependency order.""" - return build_utils.GetSortedTransitiveDependencies( - libraries, GetNonSystemDependencies) - - -def GetSortedTransitiveDependenciesForBinaries(binaries): - if binaries[0].endswith('.so'): - libraries = [os.path.basename(lib) for lib in binaries] - else: - assert len(binaries) == 1 - all_deps = GetDependencies(binaries[0]) - libraries = [lib for lib in all_deps if not IsSystemLibrary(lib)] - - return GetSortedTransitiveDependencies(libraries) - - -def main(): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - - parser.add_option('--input-libraries', - help='A list of top-level input libraries.') - parser.add_option('--libraries-dir', - help='The directory which contains shared libraries.') - parser.add_option('--readelf', help='Path to the readelf binary.') - parser.add_option('--output', help='Path to the generated .json file.') - parser.add_option('--stamp', help='Path to touch on success.') - - options, _ = parser.parse_args() - - SetReadelfPath(options.readelf) - SetLibraryDirs(options.libraries_dir.split(',')) - - libraries = build_utils.ParseGypList(options.input_libraries) - if len(libraries): - libraries = GetSortedTransitiveDependenciesForBinaries(libraries) - - # Convert to "base" library names: e.g. libfoo.so -> foo - 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( - out_json, - options.output, - only_if_changed=True) - - if options.stamp: - build_utils.Touch(options.stamp) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - libraries + build_utils.GetPythonDependencies()) - - -if __name__ == '__main__': - sys.exit(main()) - - diff --git a/engine/src/flutter/build/android/gyp/zip.py b/engine/src/flutter/build/android/gyp/zip.py deleted file mode 100755 index 51322dfd5b..0000000000 --- a/engine/src/flutter/build/android/gyp/zip.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/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. - -"""Archives a set of files. -""" - -import optparse -import sys - -from util import build_utils - -def main(): - parser = optparse.OptionParser() - parser.add_option('--input-dir', help='Directory of files to archive.') - parser.add_option('--output', help='Path to output archive.') - options, _ = parser.parse_args() - - inputs = build_utils.FindInDirectory(options.input_dir, '*') - build_utils.DoZip(inputs, options.output, options.input_dir) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/host_heartbeat.py b/engine/src/flutter/build/android/host_heartbeat.py deleted file mode 100755 index 6a7cdd1d8e..0000000000 --- a/engine/src/flutter/build/android/host_heartbeat.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -"""Sends a heart beat pulse to the currently online Android devices. -This heart beat lets the devices know that they are connected to a host. -""" -# pylint: disable=W0702 - -import sys -import time - -from pylib.device import device_utils - -PULSE_PERIOD = 20 - -def main(): - while True: - try: - devices = device_utils.DeviceUtils.HealthyDevices() - for d in devices: - d.RunShellCommand(['touch', '/sdcard/host_heartbeat'], - check_return=True) - except: - # Keep the heatbeat running bypassing all errors. - pass - time.sleep(PULSE_PERIOD) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/install_emulator_deps.py b/engine/src/flutter/build/android/install_emulator_deps.py deleted file mode 100755 index 82d1c75137..0000000000 --- a/engine/src/flutter/build/android/install_emulator_deps.py +++ /dev/null @@ -1,277 +0,0 @@ -#!/usr/bin/env python -# 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. - -"""Installs deps for using SDK emulator for testing. - -The script will download the SDK and system images, if they are not present, and -install and enable KVM, if virtualization has been enabled in the BIOS. -""" - - -import logging -import optparse -import os -import re -import shutil -import sys - -from pylib import cmd_helper -from pylib import constants -from pylib import pexpect -from pylib.utils import run_tests_helper - -# Android API level -DEFAULT_ANDROID_API_LEVEL = constants.ANDROID_SDK_VERSION - -# From the Android Developer's website. -# Keep this up to date; the user can install older API levels as necessary. -SDK_BASE_URL = 'http://dl.google.com/android/adt' -SDK_ZIP = 'adt-bundle-linux-x86_64-20131030.zip' - -# pylint: disable=line-too-long -# Android x86 system image from the Intel website: -# http://software.intel.com/en-us/articles/intel-eula-x86-android-4-2-jelly-bean-bin -# These don't exist prior to Android-15. -# As of 08 Nov 2013, Android-19 is not yet available either. -X86_IMG_URLS = { - 15: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-15_r01.zip', - 16: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-16_r01.zip', - 17: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-17_r01.zip', - 18: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-18_r01.zip', - 19: 'https://software.intel.com/sites/landingpage/android/sysimg_x86-19_r01.zip'} -#pylint: enable=line-too-long - -def CheckSDK(): - """Check if SDK is already installed. - - Returns: - True if the emulator SDK directory (src/android_emulator_sdk/) exists. - """ - return os.path.exists(constants.EMULATOR_SDK_ROOT) - - -def CheckSDKPlatform(api_level=DEFAULT_ANDROID_API_LEVEL): - """Check if the "SDK Platform" for the specified API level is installed. - This is necessary in order for the emulator to run when the target - is specified. - - Args: - api_level: the Android API level to check; defaults to the latest API. - - Returns: - True if the platform is already installed. - """ - android_binary = os.path.join(constants.EMULATOR_SDK_ROOT, - 'sdk', 'tools', 'android') - pattern = re.compile('id: [0-9]+ or "android-%d"' % api_level) - try: - exit_code, stdout = cmd_helper.GetCmdStatusAndOutput( - [android_binary, 'list']) - if exit_code != 0: - raise Exception('\'android list\' command failed') - for line in stdout.split('\n'): - if pattern.match(line): - return True - return False - except OSError: - logging.exception('Unable to execute \'android list\'') - return False - - -def CheckX86Image(api_level=DEFAULT_ANDROID_API_LEVEL): - """Check if Android system images have been installed. - - Args: - api_level: the Android API level to check for; defaults to the latest API. - - Returns: - True if sdk/system-images/android-/x86 exists inside - EMULATOR_SDK_ROOT. - """ - api_target = 'android-%d' % api_level - return os.path.exists(os.path.join(constants.EMULATOR_SDK_ROOT, - 'sdk', 'system-images', - api_target, 'x86')) - - -def CheckKVM(): - """Quickly check whether KVM is enabled. - - Returns: - True iff /dev/kvm exists (Linux only). - """ - return os.path.exists('/dev/kvm') - - -def RunKvmOk(): - """Run kvm-ok as root to check that KVM is properly enabled after installation - of the required packages. - - Returns: - True iff KVM is enabled (/dev/kvm exists). On failure, returns False - but also print detailed information explaining why KVM isn't enabled - (e.g. CPU doesn't support it, or BIOS disabled it). - """ - try: - # Note: kvm-ok is in /usr/sbin, so always use 'sudo' to run it. - return not cmd_helper.RunCmd(['sudo', 'kvm-ok']) - except OSError: - logging.info('kvm-ok not installed') - return False - - -def GetSDK(): - """Download the SDK and unzip it into EMULATOR_SDK_ROOT.""" - logging.info('Download Android SDK.') - sdk_url = '%s/%s' % (SDK_BASE_URL, SDK_ZIP) - try: - cmd_helper.RunCmd(['curl', '-o', '/tmp/sdk.zip', sdk_url]) - print 'curled unzipping...' - rc = cmd_helper.RunCmd(['unzip', '-o', '/tmp/sdk.zip', '-d', '/tmp/']) - if rc: - raise Exception('ERROR: could not download/unzip Android SDK.') - # Get the name of the sub-directory that everything will be extracted to. - dirname, _ = os.path.splitext(SDK_ZIP) - zip_dir = '/tmp/%s' % dirname - # Move the extracted directory to EMULATOR_SDK_ROOT - shutil.move(zip_dir, constants.EMULATOR_SDK_ROOT) - finally: - os.unlink('/tmp/sdk.zip') - - -def InstallKVM(): - """Installs KVM packages.""" - rc = cmd_helper.RunCmd(['sudo', 'apt-get', 'install', 'kvm']) - if rc: - logging.critical('ERROR: Did not install KVM. Make sure hardware ' - 'virtualization is enabled in BIOS (i.e. Intel VT-x or ' - 'AMD SVM).') - # TODO(navabi): Use modprobe kvm-amd on AMD processors. - rc = cmd_helper.RunCmd(['sudo', 'modprobe', 'kvm-intel']) - if rc: - logging.critical('ERROR: Did not add KVM module to Linux Kernel. Make sure ' - 'hardware virtualization is enabled in BIOS.') - # Now check to ensure KVM acceleration can be used. - if not RunKvmOk(): - logging.critical('ERROR: Can not use KVM acceleration. Make sure hardware ' - 'virtualization is enabled in BIOS (i.e. Intel VT-x or ' - 'AMD SVM).') - - -def GetX86Image(api_level=DEFAULT_ANDROID_API_LEVEL): - """Download x86 system image from Intel's website. - - Args: - api_level: the Android API level to download for. - """ - logging.info('Download x86 system image directory into sdk directory.') - # TODO(andrewhayden): Use python tempfile lib instead - temp_file = '/tmp/x86_img_android-%d.zip' % api_level - if api_level not in X86_IMG_URLS: - raise Exception('ERROR: no URL known for x86 image for android-%s' % - api_level) - try: - cmd_helper.RunCmd(['curl', '-o', temp_file, X86_IMG_URLS[api_level]]) - rc = cmd_helper.RunCmd(['unzip', '-o', temp_file, '-d', '/tmp/']) - if rc: - raise Exception('ERROR: Could not download/unzip image zip.') - api_target = 'android-%d' % api_level - sys_imgs = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk', - 'system-images', api_target, 'x86') - logging.info('Deploying system image to %s' % sys_imgs) - shutil.move('/tmp/x86', sys_imgs) - finally: - os.unlink(temp_file) - - -def GetSDKPlatform(api_level=DEFAULT_ANDROID_API_LEVEL): - """Update the SDK to include the platform specified. - - Args: - api_level: the Android API level to download - """ - android_binary = os.path.join(constants.EMULATOR_SDK_ROOT, - 'sdk', 'tools', 'android') - pattern = re.compile( - r'\s*([0-9]+)- SDK Platform Android [\.,0-9]+, API %d.*' % api_level) - # Example: - # 2- SDK Platform Android 4.3, API 18, revision 2 - exit_code, stdout = cmd_helper.GetCmdStatusAndOutput( - [android_binary, 'list', 'sdk']) - if exit_code != 0: - raise Exception('\'android list sdk\' command return %d' % exit_code) - for line in stdout.split('\n'): - match = pattern.match(line) - if match: - index = match.group(1) - print 'package %s corresponds to platform level %d' % (index, api_level) - # update sdk --no-ui --filter $INDEX - update_command = [android_binary, - 'update', 'sdk', '--no-ui', '--filter', index] - update_command_str = ' '.join(update_command) - logging.info('running update command: %s' % update_command_str) - update_process = pexpect.spawn(update_command_str) - # TODO(andrewhayden): Do we need to bug the user about this? - if update_process.expect('Do you accept the license') != 0: - raise Exception('License agreement check failed') - update_process.sendline('y') - if update_process.expect('Done. 1 package installed.') == 0: - print 'Successfully installed platform for API level %d' % api_level - return - else: - raise Exception('Failed to install platform update') - raise Exception('Could not find android-%d update for the SDK!' % api_level) - - -def main(argv): - opt_parser = optparse.OptionParser( - description='Install dependencies for running the Android emulator') - opt_parser.add_option('--api-level', dest='api_level', - help='The API level (e.g., 19 for Android 4.4) to ensure is available', - type='int', default=DEFAULT_ANDROID_API_LEVEL) - opt_parser.add_option('-v', dest='verbose', action='store_true', - help='enable verbose logging') - options, _ = opt_parser.parse_args(argv[1:]) - - # run_tests_helper will set logging to INFO or DEBUG - # We achieve verbose output by configuring it with 2 (==DEBUG) - verbosity = 1 - if options.verbose: - verbosity = 2 - logging.basicConfig(level=logging.INFO, - format='# %(asctime)-15s: %(message)s') - run_tests_helper.SetLogLevel(verbose_count=verbosity) - - # Calls below will download emulator SDK and/or system images only if needed. - if CheckSDK(): - logging.info('android_emulator_sdk/ already exists, skipping download.') - else: - GetSDK() - - # Check target. The target has to be installed in order to run the emulator. - if CheckSDKPlatform(options.api_level): - logging.info('SDK platform android-%d already present, skipping.' % - options.api_level) - else: - logging.info('SDK platform android-%d not present, installing.' % - options.api_level) - GetSDKPlatform(options.api_level) - - # Download the x86 system image only if needed. - if CheckX86Image(options.api_level): - logging.info('x86 image for android-%d already present, skipping.' % - options.api_level) - else: - GetX86Image(options.api_level) - - # Make sure KVM packages are installed and enabled. - if CheckKVM(): - logging.info('KVM already installed and enabled.') - else: - InstallKVM() - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/lighttpd_server.py b/engine/src/flutter/build/android/lighttpd_server.py deleted file mode 100755 index a5195ac815..0000000000 --- a/engine/src/flutter/build/android/lighttpd_server.py +++ /dev/null @@ -1,256 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2012 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. - -"""Provides a convenient wrapper for spawning a test lighttpd instance. - -Usage: - lighttpd_server PATH_TO_DOC_ROOT -""" - -import codecs -import contextlib -import httplib -import os -import random -import shutil -import socket -import subprocess -import sys -import tempfile -import time - -from pylib import constants -from pylib import pexpect - -class LighttpdServer(object): - """Wraps lighttpd server, providing robust startup. - - Args: - document_root: Path to root of this server's hosted files. - port: TCP port on the _host_ machine that the server will listen on. If - ommitted it will attempt to use 9000, or if unavailable it will find - a free port from 8001 - 8999. - lighttpd_path, lighttpd_module_path: Optional paths to lighttpd binaries. - base_config_path: If supplied this file will replace the built-in default - lighttpd config file. - extra_config_contents: If specified, this string will be appended to the - base config (default built-in, or from base_config_path). - config_path, error_log, access_log: Optional paths where the class should - place temprary files for this session. - """ - - def __init__(self, document_root, port=None, - lighttpd_path=None, lighttpd_module_path=None, - base_config_path=None, extra_config_contents=None, - config_path=None, error_log=None, access_log=None): - self.temp_dir = tempfile.mkdtemp(prefix='lighttpd_for_chrome_android') - self.document_root = os.path.abspath(document_root) - self.fixed_port = port - self.port = port or constants.LIGHTTPD_DEFAULT_PORT - self.server_tag = 'LightTPD ' + str(random.randint(111111, 999999)) - self.lighttpd_path = lighttpd_path or '/usr/sbin/lighttpd' - self.lighttpd_module_path = lighttpd_module_path or '/usr/lib/lighttpd' - self.base_config_path = base_config_path - self.extra_config_contents = extra_config_contents - self.config_path = config_path or self._Mktmp('config') - self.error_log = error_log or self._Mktmp('error_log') - self.access_log = access_log or self._Mktmp('access_log') - self.pid_file = self._Mktmp('pid_file') - self.process = None - - def _Mktmp(self, name): - return os.path.join(self.temp_dir, name) - - @staticmethod - def _GetRandomPort(): - # The ports of test server is arranged in constants.py. - return random.randint(constants.LIGHTTPD_RANDOM_PORT_FIRST, - constants.LIGHTTPD_RANDOM_PORT_LAST) - - def StartupHttpServer(self): - """Starts up a http server with specified document root and port.""" - # If we want a specific port, make sure no one else is listening on it. - if self.fixed_port: - self._KillProcessListeningOnPort(self.fixed_port) - while True: - if self.base_config_path: - # Read the config - with codecs.open(self.base_config_path, 'r', 'utf-8') as f: - config_contents = f.read() - else: - config_contents = self._GetDefaultBaseConfig() - if self.extra_config_contents: - config_contents += self.extra_config_contents - # Write out the config, filling in placeholders from the members of |self| - with codecs.open(self.config_path, 'w', 'utf-8') as f: - f.write(config_contents % self.__dict__) - if (not os.path.exists(self.lighttpd_path) or - not os.access(self.lighttpd_path, os.X_OK)): - raise EnvironmentError( - 'Could not find lighttpd at %s.\n' - 'It may need to be installed (e.g. sudo apt-get install lighttpd)' - % self.lighttpd_path) - self.process = pexpect.spawn(self.lighttpd_path, - ['-D', '-f', self.config_path, - '-m', self.lighttpd_module_path], - cwd=self.temp_dir) - client_error, server_error = self._TestServerConnection() - if not client_error: - assert int(open(self.pid_file, 'r').read()) == self.process.pid - break - self.process.close() - - if self.fixed_port or not 'in use' in server_error: - print 'Client error:', client_error - print 'Server error:', server_error - return False - self.port = self._GetRandomPort() - return True - - def ShutdownHttpServer(self): - """Shuts down our lighttpd processes.""" - if self.process: - self.process.terminate() - shutil.rmtree(self.temp_dir, ignore_errors=True) - - def _TestServerConnection(self): - # Wait for server to start - server_msg = '' - for timeout in xrange(1, 5): - client_error = None - try: - with contextlib.closing(httplib.HTTPConnection( - '127.0.0.1', self.port, timeout=timeout)) as http: - http.set_debuglevel(timeout > 3) - http.request('HEAD', '/') - r = http.getresponse() - r.read() - if (r.status == 200 and r.reason == 'OK' and - r.getheader('Server') == self.server_tag): - return (None, server_msg) - client_error = ('Bad response: %s %s version %s\n ' % - (r.status, r.reason, r.version) + - '\n '.join([': '.join(h) for h in r.getheaders()])) - except (httplib.HTTPException, socket.error) as client_error: - pass # Probably too quick connecting: try again - # Check for server startup error messages - ix = self.process.expect([pexpect.TIMEOUT, pexpect.EOF, '.+'], - timeout=timeout) - if ix == 2: # stdout spew from the server - server_msg += self.process.match.group(0) - elif ix == 1: # EOF -- server has quit so giveup. - client_error = client_error or 'Server exited' - break - return (client_error or 'Timeout', server_msg) - - @staticmethod - def _KillProcessListeningOnPort(port): - """Checks if there is a process listening on port number |port| and - terminates it if found. - - Args: - port: Port number to check. - """ - if subprocess.call(['fuser', '-kv', '%d/tcp' % port]) == 0: - # Give the process some time to terminate and check that it is gone. - time.sleep(2) - assert subprocess.call(['fuser', '-v', '%d/tcp' % port]) != 0, \ - 'Unable to kill process listening on port %d.' % port - - @staticmethod - def _GetDefaultBaseConfig(): - return """server.tag = "%(server_tag)s" -server.modules = ( "mod_access", - "mod_accesslog", - "mod_alias", - "mod_cgi", - "mod_rewrite" ) - -# default document root required -#server.document-root = "." - -# files to check for if .../ is requested -index-file.names = ( "index.php", "index.pl", "index.cgi", - "index.html", "index.htm", "default.htm" ) -# mimetype mapping -mimetype.assign = ( - ".gif" => "image/gif", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".png" => "image/png", - ".svg" => "image/svg+xml", - ".css" => "text/css", - ".html" => "text/html", - ".htm" => "text/html", - ".xhtml" => "application/xhtml+xml", - ".xhtmlmp" => "application/vnd.wap.xhtml+xml", - ".js" => "application/x-javascript", - ".log" => "text/plain", - ".conf" => "text/plain", - ".text" => "text/plain", - ".txt" => "text/plain", - ".dtd" => "text/xml", - ".xml" => "text/xml", - ".manifest" => "text/cache-manifest", - ) - -# Use the "Content-Type" extended attribute to obtain mime type if possible -mimetype.use-xattr = "enable" - -## -# which extensions should not be handle via static-file transfer -# -# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi -static-file.exclude-extensions = ( ".php", ".pl", ".cgi" ) - -server.bind = "127.0.0.1" -server.port = %(port)s - -## virtual directory listings -dir-listing.activate = "enable" -#dir-listing.encoding = "iso-8859-2" -#dir-listing.external-css = "style/oldstyle.css" - -## enable debugging -#debug.log-request-header = "enable" -#debug.log-response-header = "enable" -#debug.log-request-handling = "enable" -#debug.log-file-not-found = "enable" - -#### SSL engine -#ssl.engine = "enable" -#ssl.pemfile = "server.pem" - -# Autogenerated test-specific config follows. - -cgi.assign = ( ".cgi" => "/usr/bin/env", - ".pl" => "/usr/bin/env", - ".asis" => "/bin/cat", - ".php" => "/usr/bin/php-cgi" ) - -server.errorlog = "%(error_log)s" -accesslog.filename = "%(access_log)s" -server.upload-dirs = ( "/tmp" ) -server.pid-file = "%(pid_file)s" -server.document-root = "%(document_root)s" - -""" - - -def main(argv): - server = LighttpdServer(*argv[1:]) - try: - if server.StartupHttpServer(): - raw_input('Server running at http://127.0.0.1:%s -' - ' press Enter to exit it.' % server.port) - else: - print 'Server exit code:', server.process.exitstatus - finally: - server.ShutdownHttpServer() - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/android/lint/OWNERS b/engine/src/flutter/build/android/lint/OWNERS deleted file mode 100644 index cd396e7e57..0000000000 --- a/engine/src/flutter/build/android/lint/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -newt@chromium.org -aurimas@chromium.org diff --git a/engine/src/flutter/build/android/lint/suppress.py b/engine/src/flutter/build/android/lint/suppress.py deleted file mode 100755 index 52d7579b96..0000000000 --- a/engine/src/flutter/build/android/lint/suppress.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -"""Add all generated lint_result.xml files to suppressions.xml""" - - -import collections -import optparse -import os -import sys -from xml.dom import minidom - -_BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') -sys.path.append(_BUILD_ANDROID_DIR) - -from pylib import constants - - -_THIS_FILE = os.path.abspath(__file__) -_CONFIG_PATH = os.path.join(os.path.dirname(_THIS_FILE), 'suppressions.xml') -_DOC = ( - '\nSTOP! It looks like you want to suppress some lint errors:\n' - '- Have you tried identifing the offending patch?\n' - ' Ask the author for a fix and/or revert the patch.\n' - '- It is preferred to add suppressions in the code instead of\n' - ' sweeping it under the rug here. See:\n\n' - ' http://developer.android.com/tools/debugging/improving-w-lint.html\n' - '\n' - 'Still reading?\n' - '- You can edit this file manually to suppress an issue\n' - ' globally if it is not applicable to the project.\n' - '- You can also automatically add issues found so for in the\n' - ' build process by running:\n\n' - ' ' + os.path.relpath(_THIS_FILE, constants.DIR_SOURCE_ROOT) + '\n\n' - ' which will generate this file (Comments are not preserved).\n' - ' Note: PRODUCT_DIR will be substituted at run-time with actual\n' - ' directory path (e.g. out/Debug)\n' -) - - -_Issue = collections.namedtuple('Issue', ['severity', 'paths']) - - -def _ParseConfigFile(config_path): - print 'Parsing %s' % config_path - issues_dict = {} - dom = minidom.parse(config_path) - for issue in dom.getElementsByTagName('issue'): - issue_id = issue.attributes['id'].value - severity = issue.getAttribute('severity') - paths = set( - [p.attributes['path'].value for p in - issue.getElementsByTagName('ignore')]) - issues_dict[issue_id] = _Issue(severity, paths) - return issues_dict - - -def _ParseAndMergeResultFile(result_path, issues_dict): - print 'Parsing and merging %s' % result_path - dom = minidom.parse(result_path) - for issue in dom.getElementsByTagName('issue'): - issue_id = issue.attributes['id'].value - severity = issue.attributes['severity'].value - path = issue.getElementsByTagName('location')[0].attributes['file'].value - if issue_id not in issues_dict: - issues_dict[issue_id] = _Issue(severity, set()) - issues_dict[issue_id].paths.add(path) - - -def _WriteConfigFile(config_path, issues_dict): - new_dom = minidom.getDOMImplementation().createDocument(None, 'lint', None) - top_element = new_dom.documentElement - top_element.appendChild(new_dom.createComment(_DOC)) - for issue_id in sorted(issues_dict.keys()): - severity = issues_dict[issue_id].severity - paths = issues_dict[issue_id].paths - issue = new_dom.createElement('issue') - issue.attributes['id'] = issue_id - if severity: - issue.attributes['severity'] = severity - if severity == 'ignore': - print 'Warning: [%s] is suppressed globally.' % issue_id - else: - for path in sorted(paths): - ignore = new_dom.createElement('ignore') - ignore.attributes['path'] = path - issue.appendChild(ignore) - top_element.appendChild(issue) - - with open(config_path, 'w') as f: - f.write(new_dom.toprettyxml(indent=' ', encoding='utf-8')) - print 'Updated %s' % config_path - - -def _Suppress(config_path, result_path): - issues_dict = _ParseConfigFile(config_path) - _ParseAndMergeResultFile(result_path, issues_dict) - _WriteConfigFile(config_path, issues_dict) - - -def main(): - parser = optparse.OptionParser(usage='%prog RESULT-FILE') - _, args = parser.parse_args() - - if len(args) != 1 or not os.path.exists(args[0]): - parser.error('Must provide RESULT-FILE') - - _Suppress(_CONFIG_PATH, args[0]) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/android/lint/suppressions.xml b/engine/src/flutter/build/android/lint/suppressions.xml deleted file mode 100644 index cb77c1f1e1..0000000000 --- a/engine/src/flutter/build/android/lint/suppressions.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/engine/src/flutter/build/android/method_count.py b/engine/src/flutter/build/android/method_count.py deleted file mode 100755 index 93250b5c54..0000000000 --- a/engine/src/flutter/build/android/method_count.py +++ /dev/null @@ -1,55 +0,0 @@ -#! /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/ndk.gyp b/engine/src/flutter/build/android/ndk.gyp deleted file mode 100644 index 2838a9857e..0000000000 --- a/engine/src/flutter/build/android/ndk.gyp +++ /dev/null @@ -1,20 +0,0 @@ -# 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. - -{ - 'targets': [ - { - 'target_name': 'cpu_features', - 'type': 'static_library', - 'direct_dependent_settings': { - 'include_dirs': [ - '<(android_ndk_root)/sources/android/cpufeatures', - ], - }, - 'sources': [ - '<(android_ndk_root)/sources/android/cpufeatures/cpu-features.c', - ], - }, - ], -} 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 deleted file mode 100644 index 8b3198be7a..0000000000 --- a/engine/src/flutter/build/android/preprocess_google_play_services.config.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "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 deleted file mode 100755 index 85d239ad30..0000000000 --- a/engine/src/flutter/build/android/preprocess_google_play_services.py +++ /dev/null @@ -1,238 +0,0 @@ -#!/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 deleted file mode 100755 index a5f8fc6723..0000000000 --- a/engine/src/flutter/build/android/provision_devices.py +++ /dev/null @@ -1,349 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -"""Provisions Android devices with settings required for bots. - -Usage: - ./provision_devices.py [-d ] -""" - -import argparse -import json -import logging -import os -import posixpath -import re -import subprocess -import sys -import time - -from pylib import constants -from pylib import device_settings -from pylib.device import battery_utils -from pylib.device import device_blacklist -from pylib.device import device_errors -from pylib.device import device_utils -from pylib.utils import run_tests_helper -from pylib.utils import timeout_retry - -sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, - 'third_party', 'android_testrunner')) -import errors - - -class _DEFAULT_TIMEOUTS(object): - # L can take a while to reboot after a wipe. - LOLLIPOP = 600 - PRE_LOLLIPOP = 180 - - HELP_TEXT = '{}s on L, {}s on pre-L'.format(LOLLIPOP, PRE_LOLLIPOP) - - -class _PHASES(object): - WIPE = 'wipe' - PROPERTIES = 'properties' - FINISH = 'finish' - - ALL = [WIPE, PROPERTIES, FINISH] - - -def ProvisionDevices(options): - devices = device_utils.DeviceUtils.HealthyDevices() - if options.device: - devices = [d for d in devices if d == options.device] - if not devices: - raise device_errors.DeviceUnreachableError(options.device) - - parallel_devices = device_utils.DeviceUtils.parallel(devices) - parallel_devices.pMap(ProvisionDevice, 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 - - -def ProvisionDevice(device, options): - if options.reboot_timeout: - reboot_timeout = options.reboot_timeout - elif (device.build_version_sdk >= - constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP): - reboot_timeout = _DEFAULT_TIMEOUTS.LOLLIPOP - else: - reboot_timeout = _DEFAULT_TIMEOUTS.PRE_LOLLIPOP - - def should_run_phase(phase_name): - return not options.phases or phase_name in options.phases - - def run_phase(phase_func, reboot=True): - 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) - device.adb.WaitForDevice() - - try: - if should_run_phase(_PHASES.WIPE): - run_phase(WipeDevice) - - if should_run_phase(_PHASES.PROPERTIES): - run_phase(SetProperties) - - if should_run_phase(_PHASES.FINISH): - run_phase(FinishProvisioning, reboot=False) - - except (errors.WaitForResponseTimedOutError, - device_errors.CommandTimeoutError): - logging.exception('Timed out waiting for device %s. Adding to blacklist.', - str(device)) - device_blacklist.ExtendBlacklist([str(device)]) - - except device_errors.CommandFailedError: - logging.exception('Failed to provision device %s. Adding to blacklist.', - str(device)) - device_blacklist.ExtendBlacklist([str(device)]) - - -def WipeDevice(device, options): - """Wipes data from device, keeping only the adb_keys for authorization. - - After wiping data on a device that has been authorized, adb can still - communicate with the device, but after reboot the device will need to be - re-authorized because the adb keys file is stored in /data/misc/adb/. - Thus, adb_keys file is rewritten so the device does not need to be - re-authorized. - - Arguments: - device: the device to wipe - """ - if options.skip_wipe: - return - - try: - device.EnableRoot() - device_authorized = device.FileExists(constants.ADB_KEYS_FILE) - if device_authorized: - adb_keys = device.ReadFile(constants.ADB_KEYS_FILE, - as_root=True).splitlines() - device.RunShellCommand(['wipe', 'data'], - as_root=True, check_return=True) - device.adb.WaitForDevice() - - if device_authorized: - adb_keys_set = set(adb_keys) - for adb_key_file in options.adb_key_files or []: - try: - with open(adb_key_file, 'r') as f: - adb_public_keys = f.readlines() - adb_keys_set.update(adb_public_keys) - except IOError: - logging.warning('Unable to find adb keys file %s.' % adb_key_file) - _WriteAdbKeysFile(device, '\n'.join(adb_keys_set)) - except device_errors.CommandFailedError: - logging.exception('Possible failure while wiping the device. ' - 'Attempting to continue.') - - -def _WriteAdbKeysFile(device, adb_keys_string): - dir_path = posixpath.dirname(constants.ADB_KEYS_FILE) - device.RunShellCommand(['mkdir', '-p', dir_path], - as_root=True, check_return=True) - device.RunShellCommand(['restorecon', dir_path], - as_root=True, check_return=True) - device.WriteFile(constants.ADB_KEYS_FILE, adb_keys_string, as_root=True) - device.RunShellCommand(['restorecon', constants.ADB_KEYS_FILE], - as_root=True, check_return=True) - - -def SetProperties(device, options): - try: - device.EnableRoot() - except device_errors.CommandFailedError as e: - logging.warning(str(e)) - - _ConfigureLocalProperties(device, options.enable_java_debug) - device_settings.ConfigureContentSettings( - device, device_settings.DETERMINISTIC_DEVICE_SETTINGS) - if options.disable_location: - device_settings.ConfigureContentSettings( - device, device_settings.DISABLE_LOCATION_SETTINGS) - 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) - -def _ConfigureLocalProperties(device, java_debug=True): - """Set standard readonly testing device properties prior to reboot.""" - local_props = [ - 'persist.sys.usb.config=adb', - 'ro.monkey=1', - 'ro.test_harness=1', - 'ro.audio.silent=1', - 'ro.setupwizard.mode=DISABLED', - ] - if java_debug: - local_props.append( - '%s=all' % device_utils.DeviceUtils.JAVA_ASSERT_PROPERTY) - local_props.append('debug.checkjni=1') - try: - device.WriteFile( - constants.DEVICE_LOCAL_PROPERTIES_PATH, - '\n'.join(local_props), as_root=True) - # Android will not respect the local props file if it is world writable. - device.RunShellCommand( - ['chmod', '644', constants.DEVICE_LOCAL_PROPERTIES_PATH], - as_root=True, check_return=True) - except device_errors.CommandFailedError: - logging.exception('Failed to configure local properties.') - - -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) - props = device.RunShellCommand('getprop', check_return=True) - for prop in props: - logging.info(' %s' % prop) - if options.auto_reconnect: - _PushAndLaunchAdbReboot(device, options.target) - - -def _PushAndLaunchAdbReboot(device, target): - """Pushes and launches the adb_reboot binary on the device. - - Arguments: - device: The DeviceUtils instance for the device to which the adb_reboot - binary should be pushed. - target: The build target (example, Debug or Release) which helps in - locating the adb_reboot binary. - """ - logging.info('Will push and launch adb_reboot on %s' % str(device)) - # Kill if adb_reboot is already running. - device.KillAll('adb_reboot', blocking=True, timeout=2, quiet=True) - # Push adb_reboot - logging.info(' Pushing adb_reboot ...') - adb_reboot = os.path.join(constants.DIR_SOURCE_ROOT, - 'out/%s/adb_reboot' % target) - device.PushChangedFiles([(adb_reboot, '/data/local/tmp/')]) - # Launch adb_reboot - logging.info(' Launching adb_reboot ...') - device.RunShellCommand( - ['/data/local/tmp/adb_reboot'], - check_return=True) - - -def _LaunchHostHeartbeat(): - # Kill if existing host_heartbeat - KillHostHeartbeat() - # Launch a new host_heartbeat - logging.info('Spawning host heartbeat...') - subprocess.Popen([os.path.join(constants.DIR_SOURCE_ROOT, - 'build/android/host_heartbeat.py')]) - - -def KillHostHeartbeat(): - ps = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) - stdout, _ = ps.communicate() - matches = re.findall('\\n.*host_heartbeat.*', stdout) - for match in matches: - logging.info('An instance of host heart beart running... will kill') - pid = re.findall(r'(\S+)', match)[1] - subprocess.call(['kill', str(pid)]) - - -def main(): - # Recommended options on perf bots: - # --disable-network - # TODO(tonyg): We eventually want network on. However, currently radios - # can cause perfbots to drain faster than they charge. - # --min-battery-level 95 - # Some perf bots run benchmarks with USB charging disabled which leads - # to gradual draining of the battery. We must wait for a full charge - # before starting a run in order to keep the devices online. - - parser = argparse.ArgumentParser( - description='Provision Android devices with settings required for bots.') - parser.add_argument('-d', '--device', metavar='SERIAL', - help='the serial number of the device to be provisioned' - ' (the default is to provision all devices attached)') - parser.add_argument('--phase', action='append', choices=_PHASES.ALL, - dest='phases', - help='Phases of provisioning to run. ' - '(If omitted, all phases will be run.)') - parser.add_argument('--skip-wipe', action='store_true', default=False, - help="don't wipe device data during provisioning") - parser.add_argument('--reboot-timeout', metavar='SECS', type=int, - help='when wiping the device, max number of seconds to' - ' wait after each reboot ' - '(default: %s)' % _DEFAULT_TIMEOUTS.HELP_TEXT) - parser.add_argument('--min-battery-level', type=int, metavar='NUM', - help='wait for the device to reach this minimum battery' - ' 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', - dest='enable_java_debug', default=True, - help='disable Java property asserts and JNI checking') - parser.add_argument('-t', '--target', default='Debug', - help='the build target (default: %(default)s)') - parser.add_argument('-r', '--auto-reconnect', action='store_true', - help='push binary which will reboot the device on adb' - ' disconnections') - parser.add_argument('--adb-key-files', type=str, nargs='+', - help='list of adb keys to push to device') - parser.add_argument('-v', '--verbose', action='count', default=1, - 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) - - run_tests_helper.SetLogLevel(args.verbose) - - return ProvisionDevices(args) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/android/pylib/OWNERS b/engine/src/flutter/build/android/pylib/OWNERS deleted file mode 100644 index dbbbba7f27..0000000000 --- a/engine/src/flutter/build/android/pylib/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -jbudorick@chromium.org -klundberg@chromium.org -navabi@chromium.org -skyostil@chromium.org diff --git a/engine/src/flutter/build/android/pylib/__init__.py b/engine/src/flutter/build/android/pylib/__init__.py deleted file mode 100644 index 96196cffb2..0000000000 --- a/engine/src/flutter/build/android/pylib/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (c) 2012 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. diff --git a/engine/src/flutter/build/android/pylib/android_commands.py b/engine/src/flutter/build/android/pylib/android_commands.py deleted file mode 100644 index f7191f7935..0000000000 --- a/engine/src/flutter/build/android/pylib/android_commands.py +++ /dev/null @@ -1,1976 +0,0 @@ -# Copyright (c) 2012 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. - -"""Provides an interface to communicate with the device via the adb command. - -Assumes adb binary is currently on system path. - -Note that this module is deprecated. -""" -# TODO(jbudorick): Delete this file once no clients use it. - -# pylint: skip-file - -import collections -import datetime -import inspect -import logging -import os -import random -import re -import shlex -import signal -import subprocess -import sys -import tempfile -import time - -import cmd_helper -import constants -import system_properties -from utils import host_utils - -try: - from pylib import pexpect -except ImportError: - pexpect = None - -sys.path.append(os.path.join( - constants.DIR_SOURCE_ROOT, 'third_party', 'android_testrunner')) -import adb_interface -import am_instrument_parser -import errors - -from pylib.device import device_blacklist -from pylib.device import device_errors - -# Pattern to search for the next whole line of pexpect output and capture it -# into a match group. We can't use ^ and $ for line start end with pexpect, -# see http://www.noah.org/python/pexpect/#doc for explanation why. -PEXPECT_LINE_RE = re.compile('\n([^\r]*)\r') - -# Set the adb shell prompt to be a unique marker that will [hopefully] not -# appear at the start of any line of a command's output. -SHELL_PROMPT = '~+~PQ\x17RS~+~' - -# Java properties file -LOCAL_PROPERTIES_PATH = constants.DEVICE_LOCAL_PROPERTIES_PATH - -# Property in /data/local.prop that controls Java assertions. -JAVA_ASSERT_PROPERTY = 'dalvik.vm.enableassertions' - -# Keycode "enum" suitable for passing to AndroidCommands.SendKey(). -KEYCODE_HOME = 3 -KEYCODE_BACK = 4 -KEYCODE_DPAD_UP = 19 -KEYCODE_DPAD_DOWN = 20 -KEYCODE_DPAD_RIGHT = 22 -KEYCODE_ENTER = 66 -KEYCODE_MENU = 82 - -MD5SUM_DEVICE_FOLDER = constants.TEST_EXECUTABLE_DIR + '/md5sum/' -MD5SUM_DEVICE_PATH = MD5SUM_DEVICE_FOLDER + 'md5sum_bin' - -PIE_WRAPPER_PATH = constants.TEST_EXECUTABLE_DIR + '/run_pie' - -CONTROL_USB_CHARGING_COMMANDS = [ - { - # Nexus 4 - 'witness_file': '/sys/module/pm8921_charger/parameters/disabled', - 'enable_command': 'echo 0 > /sys/module/pm8921_charger/parameters/disabled', - 'disable_command': - 'echo 1 > /sys/module/pm8921_charger/parameters/disabled', - }, - { - # Nexus 5 - # Setting the HIZ bit of the bq24192 causes the charger to actually ignore - # energy coming from USB. Setting the power_supply offline just updates the - # Android system to reflect that. - 'witness_file': '/sys/kernel/debug/bq24192/INPUT_SRC_CONT', - 'enable_command': ( - 'echo 0x4A > /sys/kernel/debug/bq24192/INPUT_SRC_CONT && ' - 'echo 1 > /sys/class/power_supply/usb/online'), - 'disable_command': ( - 'echo 0xCA > /sys/kernel/debug/bq24192/INPUT_SRC_CONT && ' - 'chmod 644 /sys/class/power_supply/usb/online && ' - 'echo 0 > /sys/class/power_supply/usb/online'), - }, -] - -class DeviceTempFile(object): - def __init__(self, android_commands, prefix='temp_file', suffix=''): - """Find an unused temporary file path in the devices external directory. - - When this object is closed, the file will be deleted on the device. - """ - self.android_commands = android_commands - while True: - # TODO(cjhopman): This could actually return the same file in multiple - # calls if the caller doesn't write to the files immediately. This is - # expected to never happen. - i = random.randint(0, 1000000) - self.name = '%s/%s-%d-%010d%s' % ( - android_commands.GetExternalStorage(), - prefix, int(time.time()), i, suffix) - if not android_commands.FileExistsOnDevice(self.name): - break - - def __enter__(self): - return self - - def __exit__(self, type, value, traceback): - self.close() - - def close(self): - self.android_commands.RunShellCommand('rm ' + self.name) - - -def GetAVDs(): - """Returns a list of AVDs.""" - re_avd = re.compile('^[ ]+Name: ([a-zA-Z0-9_:.-]+)', re.MULTILINE) - avds = re_avd.findall(cmd_helper.GetCmdOutput(['android', 'list', 'avd'])) - return avds - -def ResetBadDevices(): - """Removes the blacklist that keeps track of bad devices for a current - build. - """ - device_blacklist.ResetBlacklist() - -def ExtendBadDevices(devices): - """Adds devices to the blacklist that keeps track of bad devices for a - current build. - - The devices listed in the bad devices file will not be returned by - GetAttachedDevices. - - Args: - devices: list of bad devices to be added to the bad devices file. - """ - device_blacklist.ExtendBlacklist(devices) - - -def GetAttachedDevices(hardware=True, emulator=True, offline=False): - """Returns a list of attached, android devices and emulators. - - If a preferred device has been set with ANDROID_SERIAL, it will be first in - the returned list. The arguments specify what devices to include in the list. - - Example output: - - * daemon not running. starting it now on port 5037 * - * daemon started successfully * - List of devices attached - 027c10494100b4d7 device - emulator-5554 offline - - Args: - hardware: Include attached actual devices that are online. - emulator: Include emulators (i.e. AVD's) currently on host. - offline: Include devices and emulators that are offline. - - Returns: List of devices. - """ - adb_devices_output = cmd_helper.GetCmdOutput([constants.GetAdbPath(), - 'devices']) - - re_device = re.compile('^([a-zA-Z0-9_:.-]+)\tdevice$', re.MULTILINE) - online_devices = re_device.findall(adb_devices_output) - - re_device = re.compile('^(emulator-[0-9]+)\tdevice', re.MULTILINE) - emulator_devices = re_device.findall(adb_devices_output) - - re_device = re.compile('^([a-zA-Z0-9_:.-]+)\t(?:offline|unauthorized)$', - re.MULTILINE) - offline_devices = re_device.findall(adb_devices_output) - - devices = [] - # First determine list of online devices (e.g. hardware and/or emulator). - if hardware and emulator: - devices = online_devices - elif hardware: - devices = [device for device in online_devices - if device not in emulator_devices] - elif emulator: - devices = emulator_devices - - # Now add offline devices if offline is true - if offline: - devices = devices + offline_devices - - # Remove any devices in the blacklist. - blacklist = device_blacklist.ReadBlacklist() - if len(blacklist): - logging.info('Avoiding bad devices %s', ' '.join(blacklist)) - devices = [device for device in devices if device not in blacklist] - - preferred_device = os.environ.get('ANDROID_SERIAL') - if preferred_device in devices: - devices.remove(preferred_device) - devices.insert(0, preferred_device) - return devices - - -def IsDeviceAttached(device): - """Return true if the device is attached and online.""" - return device in GetAttachedDevices() - - -def _GetFilesFromRecursiveLsOutput(path, ls_output, re_file, utc_offset=None): - """Gets a list of files from `ls` command output. - - Python's os.walk isn't used because it doesn't work over adb shell. - - Args: - path: The path to list. - ls_output: A list of lines returned by an `ls -lR` command. - re_file: A compiled regular expression which parses a line into named groups - consisting of at minimum "filename", "date", "time", "size" and - optionally "timezone". - utc_offset: A 5-character string of the form +HHMM or -HHMM, where HH is a - 2-digit string giving the number of UTC offset hours, and MM is a - 2-digit string giving the number of UTC offset minutes. If the input - utc_offset is None, will try to look for the value of "timezone" if it - is specified in re_file. - - Returns: - A dict of {"name": (size, lastmod), ...} where: - name: The file name relative to |path|'s directory. - size: The file size in bytes (0 for directories). - lastmod: The file last modification date in UTC. - """ - re_directory = re.compile('^%s/(?P[^:]+):$' % re.escape(path)) - path_dir = os.path.dirname(path) - - current_dir = '' - files = {} - for line in ls_output: - directory_match = re_directory.match(line) - if directory_match: - current_dir = directory_match.group('dir') - continue - file_match = re_file.match(line) - if file_match: - filename = os.path.join(current_dir, file_match.group('filename')) - if filename.startswith(path_dir): - filename = filename[len(path_dir) + 1:] - lastmod = datetime.datetime.strptime( - file_match.group('date') + ' ' + file_match.group('time')[:5], - '%Y-%m-%d %H:%M') - if not utc_offset and 'timezone' in re_file.groupindex: - utc_offset = file_match.group('timezone') - if isinstance(utc_offset, str) and len(utc_offset) == 5: - utc_delta = datetime.timedelta(hours=int(utc_offset[1:3]), - minutes=int(utc_offset[3:5])) - if utc_offset[0:1] == '-': - utc_delta = -utc_delta - lastmod -= utc_delta - files[filename] = (int(file_match.group('size')), lastmod) - return files - - -def _ParseMd5SumOutput(md5sum_output): - """Returns a list of tuples from the provided md5sum output. - - Args: - md5sum_output: output directly from md5sum binary. - - Returns: - List of namedtuples with attributes |hash| and |path|, where |path| is the - absolute path to the file with an Md5Sum of |hash|. - """ - HashAndPath = collections.namedtuple('HashAndPath', ['hash', 'path']) - split_lines = [line.split(' ') for line in md5sum_output] - return [HashAndPath._make(s) for s in split_lines if len(s) == 2] - - -def _HasAdbPushSucceeded(command_output): - """Returns whether adb push has succeeded from the provided output.""" - # TODO(frankf): We should look at the return code instead of the command - # output for many of the commands in this file. - if not command_output: - return True - # Success looks like this: "3035 KB/s (12512056 bytes in 4.025s)" - # Errors look like this: "failed to copy ... " - if not re.search('^[0-9]', command_output.splitlines()[-1]): - logging.critical('PUSH FAILED: ' + command_output) - return False - return True - - -def GetLogTimestamp(log_line, year): - """Returns the timestamp of the given |log_line| in the given year.""" - try: - return datetime.datetime.strptime('%s-%s' % (year, log_line[:18]), - '%Y-%m-%d %H:%M:%S.%f') - except (ValueError, IndexError): - logging.critical('Error reading timestamp from ' + log_line) - return None - - -class AndroidCommands(object): - """Helper class for communicating with Android device via adb.""" - - def __init__(self, device=None): - """Constructor. - - Args: - device: If given, adb commands are only send to the device of this ID. - Otherwise commands are sent to all attached devices. - """ - self._adb = adb_interface.AdbInterface(constants.GetAdbPath()) - if device: - self._adb.SetTargetSerial(device) - self._device = device - self._logcat = None - self.logcat_process = None - self._logcat_tmpoutfile = None - self._pushed_files = [] - self._device_utc_offset = None - self._potential_push_size = 0 - self._actual_push_size = 0 - self._external_storage = '' - self._util_wrapper = '' - self._system_properties = system_properties.SystemProperties(self.Adb()) - self._push_if_needed_cache = {} - self._control_usb_charging_command = { - 'command': None, - 'cached': False, - } - self._protected_file_access_method_initialized = None - self._privileged_command_runner = None - self._pie_wrapper = None - - @property - def system_properties(self): - return self._system_properties - - def _LogShell(self, cmd): - """Logs the adb shell command.""" - if self._device: - device_repr = self._device[-4:] - else: - device_repr = '????' - logging.info('[%s]> %s', device_repr, cmd) - - def Adb(self): - """Returns our AdbInterface to avoid us wrapping all its methods.""" - # TODO(tonyg): Goal should be to git rid of this method by making this API - # complete and alleviating the need. - return self._adb - - def GetDevice(self): - """Returns the device serial.""" - return self._device - - def IsOnline(self): - """Checks whether the device is online. - - Returns: - True if device is in 'device' mode, False otherwise. - """ - # TODO(aurimas): revert to using adb get-state when android L adb is fixed. - #out = self._adb.SendCommand('get-state') - #return out.strip() == 'device' - - out = self._adb.SendCommand('devices') - for line in out.split('\n'): - if self._device in line and 'device' in line: - return True - return False - - def IsRootEnabled(self): - """Checks if root is enabled on the device.""" - root_test_output = self.RunShellCommand('ls /root') or [''] - return not 'Permission denied' in root_test_output[0] - - def EnableAdbRoot(self): - """Enables adb root on the device. - - Returns: - True: if output from executing adb root was as expected. - False: otherwise. - """ - if self.GetBuildType() == 'user': - logging.warning("Can't enable root in production builds with type user") - return False - else: - return_value = self._adb.EnableAdbRoot() - # EnableAdbRoot inserts a call for wait-for-device only when adb logcat - # output matches what is expected. Just to be safe add a call to - # wait-for-device. - self._adb.SendCommand('wait-for-device') - return return_value - - def GetDeviceYear(self): - """Returns the year information of the date on device.""" - return self.RunShellCommand('date +%Y')[0] - - def GetExternalStorage(self): - if not self._external_storage: - self._external_storage = self.RunShellCommand('echo $EXTERNAL_STORAGE')[0] - if not self._external_storage: - raise device_errors.CommandFailedError( - ['shell', "'echo $EXTERNAL_STORAGE'"], - 'Unable to find $EXTERNAL_STORAGE') - return self._external_storage - - def WaitForDevicePm(self, timeout=120): - """Blocks until the device's package manager is available. - - To workaround http://b/5201039, we restart the shell and retry if the - package manager isn't back after 120 seconds. - - Raises: - errors.WaitForResponseTimedOutError after max retries reached. - """ - last_err = None - retries = 3 - while retries: - try: - self._adb.WaitForDevicePm(wait_time=timeout) - return # Success - except errors.WaitForResponseTimedOutError as e: - last_err = e - logging.warning('Restarting and retrying after timeout: %s', e) - retries -= 1 - self.RestartShell() - raise last_err # Only reached after max retries, re-raise the last error. - - def RestartShell(self): - """Restarts the shell on the device. Does not block for it to return.""" - self.RunShellCommand('stop') - self.RunShellCommand('start') - - def Reboot(self, full_reboot=True): - """Reboots the device and waits for the package manager to return. - - Args: - full_reboot: Whether to fully reboot the device or just restart the shell. - """ - # TODO(torne): hive can't reboot the device either way without breaking the - # connection; work out if we can handle this better - if os.environ.get('USING_HIVE'): - logging.warning('Ignoring reboot request as we are on hive') - return - if full_reboot or not self.IsRootEnabled(): - self._adb.SendCommand('reboot') - self._system_properties = system_properties.SystemProperties(self.Adb()) - timeout = 300 - retries = 1 - # Wait for the device to disappear. - while retries < 10 and self.IsOnline(): - time.sleep(1) - retries += 1 - else: - self.RestartShell() - timeout = 120 - # To run tests we need at least the package manager and the sd card (or - # other external storage) to be ready. - self.WaitForDevicePm(timeout) - self.WaitForSdCardReady(timeout) - - def Shutdown(self): - """Shuts down the device.""" - self._adb.SendCommand('reboot -p') - self._system_properties = system_properties.SystemProperties(self.Adb()) - - def Uninstall(self, package): - """Uninstalls the specified package from the device. - - Args: - package: Name of the package to remove. - - Returns: - A status string returned by adb uninstall - """ - uninstall_command = 'uninstall %s' % package - - self._LogShell(uninstall_command) - return self._adb.SendCommand(uninstall_command, timeout_time=60) - - def Install(self, package_file_path, reinstall=False): - """Installs the specified package to the device. - - Args: - package_file_path: Path to .apk file to install. - reinstall: Reinstall an existing apk, keeping the data. - - Returns: - A status string returned by adb install - """ - assert os.path.isfile(package_file_path), ('<%s> is not file' % - package_file_path) - - install_cmd = ['install'] - - if reinstall: - install_cmd.append('-r') - - install_cmd.append(package_file_path) - install_cmd = ' '.join(install_cmd) - - self._LogShell(install_cmd) - return self._adb.SendCommand(install_cmd, - timeout_time=2 * 60, - retry_count=0) - - def ManagedInstall(self, apk_path, keep_data=False, package_name=None, - reboots_on_timeout=2): - """Installs specified package and reboots device on timeouts. - - If package_name is supplied, checks if the package is already installed and - doesn't reinstall if the apk md5sums match. - - Args: - apk_path: Path to .apk file to install. - keep_data: Reinstalls instead of uninstalling first, preserving the - application data. - package_name: Package name (only needed if keep_data=False). - reboots_on_timeout: number of time to reboot if package manager is frozen. - """ - # Check if package is already installed and up to date. - if package_name: - installed_apk_path = self.GetApplicationPath(package_name) - if (installed_apk_path and - not self.GetFilesChanged(apk_path, installed_apk_path, - ignore_filenames=True)): - logging.info('Skipped install: identical %s APK already installed' % - package_name) - return - # Install. - reboots_left = reboots_on_timeout - while True: - try: - if not keep_data: - assert package_name - self.Uninstall(package_name) - install_status = self.Install(apk_path, reinstall=keep_data) - if 'Success' in install_status: - return - else: - raise Exception('Install failure: %s' % install_status) - except errors.WaitForResponseTimedOutError: - print '@@@STEP_WARNINGS@@@' - logging.info('Timeout on installing %s on device %s', apk_path, - self._device) - - if reboots_left <= 0: - raise Exception('Install timed out') - - # Force a hard reboot on last attempt - self.Reboot(full_reboot=(reboots_left == 1)) - reboots_left -= 1 - - def MakeSystemFolderWritable(self): - """Remounts the /system folder rw.""" - out = self._adb.SendCommand('remount') - if out.strip() != 'remount succeeded': - raise errors.MsgException('Remount failed: %s' % out) - - def RestartAdbdOnDevice(self): - logging.info('Restarting adbd on the device...') - with DeviceTempFile(self, suffix=".sh") as temp_script_file: - host_script_path = os.path.join(constants.DIR_SOURCE_ROOT, - 'build', - 'android', - 'pylib', - 'restart_adbd.sh') - self._adb.Push(host_script_path, temp_script_file.name) - self.RunShellCommand('. %s' % temp_script_file.name) - self._adb.SendCommand('wait-for-device') - - def RestartAdbServer(self): - """Restart the adb server.""" - ret = self.KillAdbServer() - if ret != 0: - raise errors.MsgException('KillAdbServer: %d' % ret) - - ret = self.StartAdbServer() - if ret != 0: - raise errors.MsgException('StartAdbServer: %d' % ret) - - @staticmethod - def KillAdbServer(): - """Kill adb server.""" - adb_cmd = [constants.GetAdbPath(), 'kill-server'] - ret = cmd_helper.RunCmd(adb_cmd) - retry = 0 - while retry < 3: - ret, _ = cmd_helper.GetCmdStatusAndOutput(['pgrep', 'adb']) - if ret != 0: - # pgrep didn't find adb, kill-server succeeded. - return 0 - retry += 1 - time.sleep(retry) - return ret - - def StartAdbServer(self): - """Start adb server.""" - adb_cmd = ['taskset', '-c', '0', constants.GetAdbPath(), 'start-server'] - ret, _ = cmd_helper.GetCmdStatusAndOutput(adb_cmd) - retry = 0 - while retry < 3: - ret, _ = cmd_helper.GetCmdStatusAndOutput(['pgrep', 'adb']) - if ret == 0: - # pgrep found adb, start-server succeeded. - # Waiting for device to reconnect before returning success. - self._adb.SendCommand('wait-for-device') - return 0 - retry += 1 - time.sleep(retry) - return ret - - def WaitForSystemBootCompleted(self, wait_time): - """Waits for targeted system's boot_completed flag to be set. - - Args: - wait_time: time in seconds to wait - - Raises: - WaitForResponseTimedOutError if wait_time elapses and flag still not - set. - """ - logging.info('Waiting for system boot completed...') - self._adb.SendCommand('wait-for-device') - # Now the device is there, but system not boot completed. - # Query the sys.boot_completed flag with a basic command - boot_completed = False - attempts = 0 - wait_period = 5 - while not boot_completed and (attempts * wait_period) < wait_time: - output = self.system_properties['sys.boot_completed'] - output = output.strip() - if output == '1': - boot_completed = True - else: - # If 'error: xxx' returned when querying the flag, it means - # adb server lost the connection to the emulator, so restart the adb - # server. - if 'error:' in output: - self.RestartAdbServer() - time.sleep(wait_period) - attempts += 1 - if not boot_completed: - raise errors.WaitForResponseTimedOutError( - 'sys.boot_completed flag was not set after %s seconds' % wait_time) - - def WaitForSdCardReady(self, timeout_time): - """Wait for the SD card ready before pushing data into it.""" - logging.info('Waiting for SD card ready...') - sdcard_ready = False - attempts = 0 - wait_period = 5 - external_storage = self.GetExternalStorage() - while not sdcard_ready and attempts * wait_period < timeout_time: - output = self.RunShellCommand('ls ' + external_storage) - if output: - sdcard_ready = True - else: - time.sleep(wait_period) - attempts += 1 - if not sdcard_ready: - raise errors.WaitForResponseTimedOutError( - 'SD card not ready after %s seconds' % timeout_time) - - def GetAndroidToolStatusAndOutput(self, command, lib_path=None, *args, **kw): - """Runs a native Android binary, wrapping the command as necessary. - - This is a specialization of GetShellCommandStatusAndOutput, which is meant - for running tools/android/ binaries and handle properly: (1) setting the - lib path (for component=shared_library), (2) using the PIE wrapper on ICS. - See crbug.com/373219 for more context. - - Args: - command: String containing the command to send. - lib_path: (optional) path to the folder containing the dependent libs. - Same other arguments of GetCmdStatusAndOutput. - """ - # The first time this command is run the device is inspected to check - # whether a wrapper for running PIE executable is needed (only Android ICS) - # or not. The results is cached, so the wrapper is pushed only once. - if self._pie_wrapper is None: - # None: did not check; '': did check and not needed; '/path': use /path. - self._pie_wrapper = '' - if self.GetBuildId().startswith('I'): # Ixxxx = Android ICS. - run_pie_dist_path = os.path.join(constants.GetOutDirectory(), 'run_pie') - assert os.path.exists(run_pie_dist_path), 'Please build run_pie' - # The PIE loader must be pushed manually (i.e. no PushIfNeeded) because - # PushIfNeeded requires md5sum and md5sum requires the wrapper as well. - adb_command = 'push %s %s' % (run_pie_dist_path, PIE_WRAPPER_PATH) - assert _HasAdbPushSucceeded(self._adb.SendCommand(adb_command)) - self._pie_wrapper = PIE_WRAPPER_PATH - - if self._pie_wrapper: - command = '%s %s' % (self._pie_wrapper, command) - if lib_path: - command = 'LD_LIBRARY_PATH=%s %s' % (lib_path, command) - return self.GetShellCommandStatusAndOutput(command, *args, **kw) - - # It is tempting to turn this function into a generator, however this is not - # possible without using a private (local) adb_shell instance (to ensure no - # other command interleaves usage of it), which would defeat the main aim of - # being able to reuse the adb shell instance across commands. - def RunShellCommand(self, command, timeout_time=20, log_result=False): - """Send a command to the adb shell and return the result. - - Args: - command: String containing the shell command to send. - timeout_time: Number of seconds to wait for command to respond before - retrying, used by AdbInterface.SendShellCommand. - log_result: Boolean to indicate whether we should log the result of the - shell command. - - Returns: - list containing the lines of output received from running the command - """ - self._LogShell(command) - if "'" in command: - command = command.replace('\'', '\'\\\'\'') - result = self._adb.SendShellCommand( - "'%s'" % command, timeout_time).splitlines() - # TODO(b.kelemen): we should really be able to drop the stderr of the - # command or raise an exception based on what the caller wants. - result = [ l for l in result if not l.startswith('WARNING') ] - if ['error: device not found'] == result: - raise errors.DeviceUnresponsiveError('device not found') - if log_result: - self._LogShell('\n'.join(result)) - return result - - def GetShellCommandStatusAndOutput(self, command, timeout_time=20, - log_result=False): - """See RunShellCommand() above. - - Returns: - The tuple (exit code, list of output lines). - """ - lines = self.RunShellCommand( - command + '; echo %$?', timeout_time, log_result) - last_line = lines[-1] - status_pos = last_line.rfind('%') - assert status_pos >= 0 - status = int(last_line[status_pos + 1:]) - if status_pos == 0: - lines = lines[:-1] - else: - lines = lines[:-1] + [last_line[:status_pos]] - return (status, lines) - - def KillAll(self, process, signum=9, with_su=False): - """Android version of killall, connected via adb. - - Args: - process: name of the process to kill off. - signum: signal to use, 9 (SIGKILL) by default. - with_su: wether or not to use su to kill the processes. - - Returns: - the number of processes killed - """ - pids = self.ExtractPid(process) - if pids: - cmd = 'kill -%d %s' % (signum, ' '.join(pids)) - if with_su: - self.RunShellCommandWithSU(cmd) - else: - self.RunShellCommand(cmd) - return len(pids) - - def KillAllBlocking(self, process, timeout_sec, signum=9, with_su=False): - """Blocking version of killall, connected via adb. - - This waits until no process matching the corresponding name appears in ps' - output anymore. - - Args: - process: name of the process to kill off - timeout_sec: the timeout in seconds - signum: same as |KillAll| - with_su: same as |KillAll| - Returns: - the number of processes killed - """ - processes_killed = self.KillAll(process, signum=signum, with_su=with_su) - if processes_killed: - elapsed = 0 - wait_period = 0.1 - # Note that this doesn't take into account the time spent in ExtractPid(). - while self.ExtractPid(process) and elapsed < timeout_sec: - time.sleep(wait_period) - elapsed += wait_period - if elapsed >= timeout_sec: - return processes_killed - self.ExtractPid(process) - return processes_killed - - @staticmethod - def _GetActivityCommand(package, activity, wait_for_completion, action, - category, data, extras, trace_file_name, force_stop, - flags): - """Creates command to start |package|'s activity on the device. - - Args - as for StartActivity - - Returns: - the command to run on the target to start the activity - """ - cmd = 'am start -a %s' % action - if force_stop: - cmd += ' -S' - if wait_for_completion: - cmd += ' -W' - if category: - cmd += ' -c %s' % category - if package and activity: - cmd += ' -n %s/%s' % (package, activity) - if data: - cmd += ' -d "%s"' % data - if extras: - for key in extras: - value = extras[key] - if isinstance(value, str): - cmd += ' --es' - elif isinstance(value, bool): - cmd += ' --ez' - elif isinstance(value, int): - cmd += ' --ei' - else: - raise NotImplementedError( - 'Need to teach StartActivity how to pass %s extras' % type(value)) - cmd += ' %s %s' % (key, value) - if trace_file_name: - cmd += ' --start-profiler ' + trace_file_name - if flags: - cmd += ' -f %s' % flags - return cmd - - def StartActivity(self, package, activity, wait_for_completion=False, - action='android.intent.action.VIEW', - category=None, data=None, - extras=None, trace_file_name=None, - force_stop=False, flags=None): - """Starts |package|'s activity on the device. - - Args: - package: Name of package to start (e.g. 'com.google.android.apps.chrome'). - activity: Name of activity (e.g. '.Main' or - 'com.google.android.apps.chrome.Main'). - wait_for_completion: wait for the activity to finish launching (-W flag). - action: string (e.g. "android.intent.action.MAIN"). Default is VIEW. - category: string (e.g. "android.intent.category.HOME") - data: Data string to pass to activity (e.g. 'http://www.example.com/'). - extras: Dict of extras to pass to activity. Values are significant. - trace_file_name: If used, turns on and saves the trace to this file name. - force_stop: force stop the target app before starting the activity (-S - flag). - Returns: - The output of the underlying command as a list of lines. - """ - cmd = self._GetActivityCommand(package, activity, wait_for_completion, - action, category, data, extras, - trace_file_name, force_stop, flags) - return self.RunShellCommand(cmd) - - def StartActivityTimed(self, package, activity, wait_for_completion=False, - action='android.intent.action.VIEW', - category=None, data=None, - extras=None, trace_file_name=None, - force_stop=False, flags=None): - """Starts |package|'s activity on the device, returning the start time - - Args - as for StartActivity - - Returns: - A tuple containing: - - the output of the underlying command as a list of lines, and - - a timestamp string for the time at which the activity started - """ - cmd = self._GetActivityCommand(package, activity, wait_for_completion, - action, category, data, extras, - trace_file_name, force_stop, flags) - self.StartMonitoringLogcat() - out = self.RunShellCommand('log starting activity; ' + cmd) - activity_started_re = re.compile('.*starting activity.*') - m = self.WaitForLogMatch(activity_started_re, None) - assert m - start_line = m.group(0) - return (out, GetLogTimestamp(start_line, self.GetDeviceYear())) - - def StartCrashUploadService(self, package): - # TODO(frankf): We really need a python wrapper around Intent - # to be shared with StartActivity/BroadcastIntent. - cmd = ( - 'am startservice -a %s.crash.ACTION_FIND_ALL -n ' - '%s/%s.crash.MinidumpUploadService' % - (constants.PACKAGE_INFO['chrome'].package, - package, - constants.PACKAGE_INFO['chrome'].package)) - am_output = self.RunShellCommandWithSU(cmd) - assert am_output and 'Starting' in am_output[-1], ( - 'Service failed to start: %s' % am_output) - time.sleep(15) - - def BroadcastIntent(self, package, intent, *args): - """Send a broadcast intent. - - Args: - package: Name of package containing the intent. - intent: Name of the intent. - args: Optional extra arguments for the intent. - """ - cmd = 'am broadcast -a %s.%s %s' % (package, intent, ' '.join(args)) - self.RunShellCommand(cmd) - - def GoHome(self): - """Tell the device to return to the home screen. Blocks until completion.""" - self.RunShellCommand('am start -W ' - '-a android.intent.action.MAIN -c android.intent.category.HOME') - - def CloseApplication(self, package): - """Attempt to close down the application, using increasing violence. - - Args: - package: Name of the process to kill off, e.g. - com.google.android.apps.chrome - """ - self.RunShellCommand('am force-stop ' + package) - - def GetApplicationPath(self, package): - """Get the installed apk path on the device for the given package. - - Args: - package: Name of the package. - - Returns: - Path to the apk on the device if it exists, None otherwise. - """ - pm_path_output = self.RunShellCommand('pm path ' + package) - # The path output contains anything if and only if the package - # exists. - if pm_path_output: - # pm_path_output is of the form: "package:/path/to/foo.apk" - return pm_path_output[0].split(':')[1] - else: - return None - - def ClearApplicationState(self, package): - """Closes and clears all state for the given |package|.""" - # Check that the package exists before clearing it. Necessary because - # calling pm clear on a package that doesn't exist may never return. - pm_path_output = self.RunShellCommand('pm path ' + package) - # The path output only contains anything if and only if the package exists. - if pm_path_output: - self.RunShellCommand('pm clear ' + package) - - def SendKeyEvent(self, keycode): - """Sends keycode to the device. - - Args: - keycode: Numeric keycode to send (see "enum" at top of file). - """ - self.RunShellCommand('input keyevent %d' % keycode) - - def _RunMd5Sum(self, host_path, device_path): - """Gets the md5sum of a host path and device path. - - Args: - host_path: Path (file or directory) on the host. - device_path: Path on the device. - - Returns: - A tuple containing lists of the host and device md5sum results as - created by _ParseMd5SumOutput(). - """ - md5sum_dist_path = os.path.join(constants.GetOutDirectory(), - 'md5sum_dist') - assert os.path.exists(md5sum_dist_path), 'Please build md5sum.' - md5sum_dist_mtime = os.stat(md5sum_dist_path).st_mtime - if (md5sum_dist_path not in self._push_if_needed_cache or - self._push_if_needed_cache[md5sum_dist_path] != md5sum_dist_mtime): - command = 'push %s %s' % (md5sum_dist_path, MD5SUM_DEVICE_FOLDER) - assert _HasAdbPushSucceeded(self._adb.SendCommand(command)) - self._push_if_needed_cache[md5sum_dist_path] = md5sum_dist_mtime - - (_, md5_device_output) = self.GetAndroidToolStatusAndOutput( - self._util_wrapper + ' ' + MD5SUM_DEVICE_PATH + ' ' + device_path, - lib_path=MD5SUM_DEVICE_FOLDER, - timeout_time=2 * 60) - device_hash_tuples = _ParseMd5SumOutput(md5_device_output) - assert os.path.exists(host_path), 'Local path not found %s' % host_path - md5sum_output = cmd_helper.GetCmdOutput( - [os.path.join(constants.GetOutDirectory(), 'md5sum_bin_host'), - host_path]) - host_hash_tuples = _ParseMd5SumOutput(md5sum_output.splitlines()) - return (host_hash_tuples, device_hash_tuples) - - def GetFilesChanged(self, host_path, device_path, ignore_filenames=False): - """Compares the md5sum of a host path against a device path. - - Note: Ignores extra files on the device. - - Args: - host_path: Path (file or directory) on the host. - device_path: Path on the device. - ignore_filenames: If True only the file contents are considered when - checking whether a file has changed, otherwise the relative path - must also match. - - Returns: - A list of tuples of the form (host_path, device_path) for files whose - md5sums do not match. - """ - - # Md5Sum resolves symbolic links in path names so the calculation of - # relative path names from its output will need the real path names of the - # base directories. Having calculated these they are used throughout the - # function since this makes us less subject to any future changes to Md5Sum. - real_host_path = os.path.realpath(host_path) - real_device_path = self.RunShellCommand('realpath "%s"' % device_path)[0] - - host_hash_tuples, device_hash_tuples = self._RunMd5Sum( - real_host_path, real_device_path) - - if len(host_hash_tuples) > len(device_hash_tuples): - logging.info('%s files do not exist on the device' % - (len(host_hash_tuples) - len(device_hash_tuples))) - - host_rel = [(os.path.relpath(os.path.normpath(t.path), real_host_path), - t.hash) - for t in host_hash_tuples] - - if os.path.isdir(real_host_path): - def RelToRealPaths(rel_path): - return (os.path.join(real_host_path, rel_path), - os.path.join(real_device_path, rel_path)) - else: - assert len(host_rel) == 1 - def RelToRealPaths(_): - return (real_host_path, real_device_path) - - if ignore_filenames: - # If we are ignoring file names, then we want to push any file for which - # a file with an equivalent MD5 sum does not exist on the device. - device_hashes = set([h.hash for h in device_hash_tuples]) - ShouldPush = lambda p, h: h not in device_hashes - else: - # Otherwise, we want to push any file on the host for which a file with - # an equivalent MD5 sum does not exist at the same relative path on the - # device. - device_rel = dict([(os.path.relpath(os.path.normpath(t.path), - real_device_path), - t.hash) - for t in device_hash_tuples]) - ShouldPush = lambda p, h: p not in device_rel or h != device_rel[p] - - return [RelToRealPaths(path) for path, host_hash in host_rel - if ShouldPush(path, host_hash)] - - def PushIfNeeded(self, host_path, device_path): - """Pushes |host_path| to |device_path|. - - Works for files and directories. This method skips copying any paths in - |test_data_paths| that already exist on the device with the same hash. - - All pushed files can be removed by calling RemovePushedFiles(). - """ - MAX_INDIVIDUAL_PUSHES = 50 - if not os.path.exists(host_path): - raise device_errors.CommandFailedError( - 'Local path not found %s' % host_path, device=str(self)) - - # See if the file on the host changed since the last push (if any) and - # return early if it didn't. Note that this shortcut assumes that the tests - # on the device don't modify the files. - if not os.path.isdir(host_path): - if host_path in self._push_if_needed_cache: - host_path_mtime = self._push_if_needed_cache[host_path] - if host_path_mtime == os.stat(host_path).st_mtime: - return - - size = host_utils.GetRecursiveDiskUsage(host_path) - self._pushed_files.append(device_path) - self._potential_push_size += size - - if os.path.isdir(host_path): - self.RunShellCommand('mkdir -p "%s"' % device_path) - - changed_files = self.GetFilesChanged(host_path, device_path) - logging.info('Found %d files that need to be pushed to %s', - len(changed_files), device_path) - if not changed_files: - return - - def Push(host, device): - # NOTE: We can't use adb_interface.Push() because it hardcodes a timeout - # of 60 seconds which isn't sufficient for a lot of users of this method. - push_command = 'push %s %s' % (host, device) - self._LogShell(push_command) - - # Retry push with increasing backoff if the device is busy. - retry = 0 - while True: - output = self._adb.SendCommand(push_command, timeout_time=30 * 60) - if _HasAdbPushSucceeded(output): - if not os.path.isdir(host_path): - self._push_if_needed_cache[host] = os.stat(host).st_mtime - return - if retry < 3: - retry += 1 - wait_time = 5 * retry - logging.error('Push failed, retrying in %d seconds: %s' % - (wait_time, output)) - time.sleep(wait_time) - else: - raise Exception('Push failed: %s' % output) - - diff_size = 0 - if len(changed_files) <= MAX_INDIVIDUAL_PUSHES: - diff_size = sum(host_utils.GetRecursiveDiskUsage(f[0]) - for f in changed_files) - - # TODO(craigdh): Replace this educated guess with a heuristic that - # approximates the push time for each method. - if len(changed_files) > MAX_INDIVIDUAL_PUSHES or diff_size > 0.5 * size: - self._actual_push_size += size - Push(host_path, device_path) - else: - for f in changed_files: - Push(f[0], f[1]) - self._actual_push_size += diff_size - - def GetPushSizeInfo(self): - """Get total size of pushes to the device done via PushIfNeeded() - - Returns: - A tuple: - 1. Total size of push requests to PushIfNeeded (MB) - 2. Total size that was actually pushed (MB) - """ - return (self._potential_push_size, self._actual_push_size) - - def GetFileContents(self, filename, log_result=False): - """Gets contents from the file specified by |filename|.""" - return self.RunShellCommand('cat "%s" 2>/dev/null' % filename, - log_result=log_result) - - def SetFileContents(self, filename, contents): - """Writes |contents| to the file specified by |filename|.""" - with tempfile.NamedTemporaryFile() as f: - f.write(contents) - f.flush() - self._adb.Push(f.name, filename) - - def RunShellCommandWithSU(self, command, timeout_time=20, log_result=False): - return self.RunShellCommand('su -c %s' % command, timeout_time, log_result) - - def CanAccessProtectedFileContents(self): - """Returns True if Get/SetProtectedFileContents would work via "su" or adb - shell running as root. - - Devices running user builds don't have adb root, but may provide "su" which - can be used for accessing protected files. - """ - return (self._GetProtectedFileCommandRunner() != None) - - def _GetProtectedFileCommandRunner(self): - """Finds the best method to access protected files on the device. - - Returns: - 1. None when privileged files cannot be accessed on the device. - 2. Otherwise: A function taking a single parameter: a string with command - line arguments. Running that function executes the command with - the appropriate method. - """ - if self._protected_file_access_method_initialized: - return self._privileged_command_runner - - self._privileged_command_runner = None - self._protected_file_access_method_initialized = True - - for cmd in [self.RunShellCommand, self.RunShellCommandWithSU]: - # Get contents of the auxv vector for the init(8) process from a small - # binary file that always exists on linux and is always read-protected. - contents = cmd('cat /proc/1/auxv') - # The leading 4 or 8-bytes of auxv vector is a_type. There are not many - # reserved a_type values, hence byte 2 must always be '\0' for a realistic - # auxv. See /usr/include/elf.h. - if len(contents) > 0 and (contents[0][2] == '\0'): - self._privileged_command_runner = cmd - break - return self._privileged_command_runner - - def GetProtectedFileContents(self, filename): - """Gets contents from the protected file specified by |filename|. - - This is potentially less efficient than GetFileContents. - """ - command = 'cat "%s" 2> /dev/null' % filename - command_runner = self._GetProtectedFileCommandRunner() - if command_runner: - return command_runner(command) - else: - logging.warning('Could not access protected file: %s' % filename) - return [] - - def SetProtectedFileContents(self, filename, contents): - """Writes |contents| to the protected file specified by |filename|. - - This is less efficient than SetFileContents. - """ - with DeviceTempFile(self) as temp_file: - with DeviceTempFile(self, suffix=".sh") as temp_script: - # Put the contents in a temporary file - self.SetFileContents(temp_file.name, contents) - # Create a script to copy the file contents to its final destination - self.SetFileContents(temp_script.name, - 'cat %s > %s' % (temp_file.name, filename)) - - command = 'sh %s' % temp_script.name - command_runner = self._GetProtectedFileCommandRunner() - if command_runner: - return command_runner(command) - else: - logging.warning( - 'Could not set contents of protected file: %s' % filename) - - - def RemovePushedFiles(self): - """Removes all files pushed with PushIfNeeded() from the device.""" - for p in self._pushed_files: - self.RunShellCommand('rm -r %s' % p, timeout_time=2 * 60) - - def ListPathContents(self, path): - """Lists files in all subdirectories of |path|. - - Args: - path: The path to list. - - Returns: - A dict of {"name": (size, lastmod), ...}. - """ - # Example output: - # /foo/bar: - # -rw-r----- user group 102 2011-05-12 12:29:54.131623387 +0100 baz.txt - re_file = re.compile('^-(?P[^\s]+)\s+' - '(?P[^\s]+)\s+' - '(?P[^\s]+)\s+' - '(?P[^\s]+)\s+' - '(?P[^\s]+)\s+' - '(?P__.zip. The file will -be extracted in the android_tools/sdk/extras directory on the test bots. This -script will not do anything for developers. - -TODO(navabi): Move this script (crbug.com/459819). -""" - -import json -import os -import shutil -import subprocess -import sys -import zipfile - -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) -CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) -sys.path.insert(0, os.path.join(SCRIPT_DIR, 'android')) -sys.path.insert(1, os.path.join(CHROME_SRC, 'tools')) - -from pylib import constants -import find_depot_tools - -DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() -GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') -SDK_EXTRAS_BUCKET = 'gs://chrome-sdk-extras' -SDK_EXTRAS_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'extras') -SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), - 'android_sdk_extras.json') - - -def clean_and_extract(dir_name, package_name, zip_file): - local_dir = '%s/%s/%s' % (SDK_EXTRAS_PATH, dir_name, package_name) - if os.path.exists(local_dir): - shutil.rmtree(local_dir) - local_zip = '%s/%s' % (SDK_EXTRAS_PATH, zip_file) - with zipfile.ZipFile(local_zip) as z: - z.extractall(path=SDK_EXTRAS_PATH) - - -def main(): - if not os.environ.get('CHROME_HEADLESS'): - # This is not a buildbot checkout. - return 0 - # Update the android_sdk_extras.json file to update downloaded packages. - with open(SDK_EXTRAS_JSON_FILE) as json_file: - packages = json.load(json_file) - for package in packages: - local_zip = '%s/%s' % (SDK_EXTRAS_PATH, package['zip']) - if not os.path.exists(local_zip): - package_zip = '%s/%s' % (SDK_EXTRAS_BUCKET, package['zip']) - try: - subprocess.check_call(['python', GSUTIL_PATH, '--force-version', '4.7', - 'cp', package_zip, local_zip]) - except subprocess.CalledProcessError: - print ('WARNING: Failed to download SDK packages. If this bot compiles ' - 'for Android, it may have errors.') - return 0 - # Always clean dir and extract zip to ensure correct contents. - clean_and_extract(package['dir_name'], package['package'], package['zip']) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/env_dump.py b/engine/src/flutter/build/env_dump.py deleted file mode 100755 index 21edfe633c..0000000000 --- a/engine/src/flutter/build/env_dump.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/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. - -# This script can either source a file and dump the enironment changes done by -# it, or just simply dump the current environment as JSON into a file. - -import json -import optparse -import os -import pipes -import subprocess -import sys - - -def main(): - parser = optparse.OptionParser() - parser.add_option('-f', '--output-json', - help='File to dump the environment as JSON into.') - parser.add_option( - '-d', '--dump-mode', action='store_true', - help='Dump the environment to sys.stdout and exit immediately.') - - parser.disable_interspersed_args() - options, args = parser.parse_args() - if options.dump_mode: - if args or options.output_json: - parser.error('Cannot specify args or --output-json with --dump-mode.') - json.dump(dict(os.environ), sys.stdout) - else: - if not options.output_json: - parser.error('Requires --output-json option.') - - envsetup_cmd = ' '.join(map(pipes.quote, args)) - full_cmd = [ - 'bash', '-c', - '. %s > /dev/null; %s -d' % (envsetup_cmd, os.path.abspath(__file__)) - ] - try: - output = subprocess.check_output(full_cmd) - except Exception as e: - sys.exit('Error running %s and dumping environment.' % envsetup_cmd) - - env_diff = {} - new_env = json.loads(output) - for k, val in new_env.items(): - if k == '_' or (k in os.environ and os.environ[k] == val): - continue - env_diff[k] = val - with open(options.output_json, 'w') as f: - json.dump(env_diff, f) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/extract_from_cab.py b/engine/src/flutter/build/extract_from_cab.py deleted file mode 100755 index 080370ca9a..0000000000 --- a/engine/src/flutter/build/extract_from_cab.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Extracts a single file from a CAB archive.""" - -import os -import shutil -import subprocess -import sys -import tempfile - -def run_quiet(*args): - """Run 'expand' suppressing noisy output. Returns returncode from process.""" - popen = subprocess.Popen(args, stdout=subprocess.PIPE) - out, _ = popen.communicate() - if popen.returncode: - # expand emits errors to stdout, so if we fail, then print that out. - print out - return popen.returncode - -def main(): - if len(sys.argv) != 4: - print 'Usage: extract_from_cab.py cab_path archived_file output_dir' - return 1 - - [cab_path, archived_file, output_dir] = sys.argv[1:] - - # Expand.exe does its work in a fixed-named temporary directory created within - # the given output directory. This is a problem for concurrent extractions, so - # create a unique temp dir within the desired output directory to work around - # this limitation. - temp_dir = tempfile.mkdtemp(dir=output_dir) - - try: - # Invoke the Windows expand utility to extract the file. - level = run_quiet('expand', cab_path, '-F:' + archived_file, temp_dir) - if level == 0: - # Move the output file into place, preserving expand.exe's behavior of - # paving over any preexisting file. - output_file = os.path.join(output_dir, archived_file) - try: - os.remove(output_file) - except OSError: - pass - os.rename(os.path.join(temp_dir, archived_file), output_file) - finally: - shutil.rmtree(temp_dir, True) - - if level != 0: - return level - - # The expand utility preserves the modification date and time of the archived - # file. Touch the extracted file. This helps build systems that compare the - # modification times of input and output files to determine whether to do an - # action. - os.utime(os.path.join(output_dir, archived_file), None) - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/find_isolated_tests.py b/engine/src/flutter/build/find_isolated_tests.py deleted file mode 100755 index c5b3ab77a9..0000000000 --- a/engine/src/flutter/build/find_isolated_tests.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/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. - -"""Scans build output directory for .isolated files, calculates their SHA1 -hashes, stores final list in JSON document and then removes *.isolated files -found (to ensure no stale *.isolated stay around on the next build). - -Used to figure out what tests were build in isolated mode to trigger these -tests to run on swarming. - -For more info see: -https://sites.google.com/a/chromium.org/dev/developers/testing/isolated-testing -""" - -import glob -import hashlib -import json -import optparse -import os -import re -import sys - - -def hash_file(filepath): - """Calculates the hash of a file without reading it all in memory at once.""" - digest = hashlib.sha1() - with open(filepath, 'rb') as f: - while True: - chunk = f.read(1024*1024) - if not chunk: - break - digest.update(chunk) - return digest.hexdigest() - - -def main(): - parser = optparse.OptionParser( - usage='%prog --build-dir --output-json ', - description=sys.modules[__name__].__doc__) - parser.add_option( - '--build-dir', - help='Path to a directory to search for *.isolated files.') - parser.add_option( - '--output-json', - help='File to dump JSON results into.') - - options, _ = parser.parse_args() - if not options.build_dir: - parser.error('--build-dir option is required') - if not options.output_json: - parser.error('--output-json option is required') - - result = {} - - # Get the file hash values and output the pair. - pattern = os.path.join(options.build_dir, '*.isolated') - for filepath in sorted(glob.glob(pattern)): - test_name = os.path.splitext(os.path.basename(filepath))[0] - if re.match(r'^.+?\.\d$', test_name): - # It's a split .isolated file, e.g. foo.0.isolated. Ignore these. - continue - - # TODO(csharp): Remove deletion once the isolate tracked dependencies are - # inputs for the isolated files. - sha1_hash = hash_file(filepath) - os.remove(filepath) - result[test_name] = sha1_hash - - with open(options.output_json, 'wb') as f: - json.dump(result, f) - - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/gdb-add-index b/engine/src/flutter/build/gdb-add-index deleted file mode 100755 index 992ac16159..0000000000 --- a/engine/src/flutter/build/gdb-add-index +++ /dev/null @@ -1,162 +0,0 @@ -#!/bin/bash -# Copyright (c) 2012 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. -# -# Saves the gdb index for a given binary and its shared library dependencies. -# -# This will run gdb index in parallel on a number of binaries using SIGUSR1 -# as the communication mechanism to simulate a semaphore. Because of the -# nature of this technique, using "set -e" is very difficult. The SIGUSR1 -# terminates a "wait" with an error which we need to interpret. -# -# When modifying this code, most of the real logic is in the index_one_file -# function. The rest is cleanup + sempahore plumbing. - -# Cleanup temp directory and ensure all child jobs are dead-dead. -function on_exit { - trap "" EXIT USR1 # Avoid reentrancy. - - local jobs=$(jobs -p) - if [ -n "$jobs" ]; then - echo -n "Killing outstanding index jobs..." - kill -KILL $(jobs -p) - wait - echo "done" - fi - - if [ -f "$DIRECTORY" ]; then - echo -n "Removing temp directory $DIRECTORY..." - rm -rf $DIRECTORY - echo done - fi -} - -# Add index to one binary. -function index_one_file { - local file=$1 - local basename=$(basename "$file") - local should_index="${SHOULD_INDEX}" - - local readelf_out=$(${TOOLCHAIN_PREFIX}readelf -S "$file") - if [[ $readelf_out =~ "gdb_index" ]]; then - if [ "${REMOVE_INDEX}" = 1 ]; then - ${TOOLCHAIN_PREFIX}objcopy --remove-section .gdb_index "$file" - echo "Removed index from $basename." - else - echo "Skipped $basename -- already contains index." - should_index=0 - fi - fi - - if [ "${should_index}" = 1 ]; then - local start=$(date +"%s%N") - echo "Adding index to $basename..." - - ${TOOLCHAIN_PREFIX}gdb -batch "$file" -ex "save gdb-index $DIRECTORY" \ - -ex "quit" - local index_file="$DIRECTORY/$basename.gdb-index" - if [ -f "$index_file" ]; then - ${TOOLCHAIN_PREFIX}objcopy --add-section .gdb_index="$index_file" \ - --set-section-flags .gdb_index=readonly "$file" "$file" - local finish=$(date +"%s%N") - local elapsed=$(((finish - start)/1000000)) - echo " ...$basename indexed. [${elapsed}ms]" - else - echo " ...$basename unindexable." - fi - fi -} - -# Functions that when combined, concurrently index all files in FILES_TO_INDEX -# array. The global FILES_TO_INDEX is declared in the main body of the script. -function async_index { - # Start a background subshell to run the index command. - { - index_one_file $1 - kill -SIGUSR1 $$ # $$ resolves to the parent script. - exit 129 # See comment above wait loop at bottom. - } & -} - -CUR_FILE_NUM=0 -function index_next { - if (( CUR_FILE_NUM >= ${#FILES_TO_INDEX[@]} )); then - return - fi - - async_index "${FILES_TO_INDEX[CUR_FILE_NUM]}" - ((CUR_FILE_NUM += 1)) || true -} - - -######## -### Main body of the script. - -REMOVE_INDEX=0 -SHOULD_INDEX=1 -while getopts ":f:r" opt; do - case $opt in - f) - REMOVE_INDEX=1 - shift - ;; - r) - REMOVE_INDEX=1 - SHOULD_INDEX=0 - shift - ;; - *) - echo "Invalid option: -$OPTARG" >&2 - ;; - esac -done - -if [[ ! $# == 1 ]]; then - echo "Usage: $0 [-f] [-r] path-to-binary" - echo " -f forces replacement of an existing index." - echo " -r removes the index section." - exit 1 -fi - -FILENAME="$1" -if [[ ! -f "$FILENAME" ]]; then - echo "Path $FILENAME does not exist." - exit 1 -fi - -# Ensure we cleanup on on exit. -trap on_exit EXIT - -# We're good to go! Create temp directory for index files. -DIRECTORY=$(mktemp -d) -echo "Made temp directory $DIRECTORY." - -# Create array with the filename and all shared libraries that -# have the same dirname. The dirname is a signal that these -# shared libraries were part of the same build as the binary. -declare -a FILES_TO_INDEX=($FILENAME - $(ldd "$FILENAME" 2>/dev/null \ - | grep $(dirname "$FILENAME") \ - | sed "s/.*[ \t]\(.*\) (.*/\1/") -) - -# Start concurrent indexing. -trap index_next USR1 - -# 4 is an arbitrary default. When changing, remember we are likely IO bound -# so basing this off the number of cores is not sensible. -INDEX_TASKS=${INDEX_TASKS:-4} -for ((i=0;i<${INDEX_TASKS};i++)); do - index_next -done - -# Do a wait loop. Bash waits that terminate due a trap have an exit -# code > 128. We also ensure that our subshell's "normal" exit occurs with -# an exit code > 128. This allows us to do consider a > 128 exit code as -# an indication that the loop should continue. Unfortunately, it also means -# we cannot use set -e since technically the "wait" is failing. -wait -while (( $? > 128 )); do - wait -done diff --git a/engine/src/flutter/build/get_landmines.py b/engine/src/flutter/build/get_landmines.py deleted file mode 100755 index 92f81fe8f0..0000000000 --- a/engine/src/flutter/build/get_landmines.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env 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. - -""" -This file emits the list of reasons why a particular build needs to be clobbered -(or a list of 'landmines'). -""" - -import sys - -import landmine_utils - - -builder = landmine_utils.builder -distributor = landmine_utils.distributor -gyp_defines = landmine_utils.gyp_defines -gyp_msvs_version = landmine_utils.gyp_msvs_version -platform = landmine_utils.platform - - -def print_landmines(): - """ - ALL LANDMINES ARE EMITTED FROM HERE. - """ - # DO NOT add landmines as part of a regular CL. Landmines are a last-effort - # bandaid fix if a CL that got landed has a build dependency bug and all bots - # need to be cleaned up. If you're writing a new CL that causes build - # dependency problems, fix the dependency problems instead of adding a - # landmine. - - print 'Lets start a new landmines file.' - - -def main(): - print_landmines() - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/get_sdk_extras_packages.py b/engine/src/flutter/build/get_sdk_extras_packages.py deleted file mode 100755 index a90b8a8b4a..0000000000 --- a/engine/src/flutter/build/get_sdk_extras_packages.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 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 json -import os -import sys - -SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), - 'android_sdk_extras.json') - -def main(): - with open(SDK_EXTRAS_JSON_FILE) as json_file: - packages = json.load(json_file) - - 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 deleted file mode 100755 index 1cab3fcf48..0000000000 --- a/engine/src/flutter/build/get_syzygy_binaries.py +++ /dev/null @@ -1,487 +0,0 @@ -#!/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. - -"""A utility script for downloading versioned Syzygy binaries.""" - -import hashlib -import errno -import json -import logging -import optparse -import os -import re -import shutil -import stat -import sys -import subprocess -import tempfile -import time -import zipfile - - -_LOGGER = logging.getLogger(os.path.basename(__file__)) - -# 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 -# installed again. -_STATE = '.state' - -# This matches an integer (an SVN revision number) or a SHA1 value (a GIT hash). -# The archive exclusively uses lowercase GIT hashes. -_REVISION_RE = re.compile('^(?:\d+|[a-f0-9]{40})$') - -# This matches an MD5 hash. -_MD5_RE = re.compile('^[a-f0-9]{32}$') - -# List of reources to be downloaded and installed. These are tuples with the -# following format: -# (basename, logging name, relative installation path, extraction filter) -_RESOURCES = [ - ('benchmark.zip', 'benchmark', '', None), - ('binaries.zip', 'binaries', 'exe', None), - ('symbols.zip', 'symbols', 'exe', - lambda x: x.filename.endswith('.dll.pdb'))] - - -def _LoadState(output_dir): - """Loads the contents of the state file for a given |output_dir|, returning - None if it doesn't exist. - """ - path = os.path.join(output_dir, _STATE) - if not os.path.exists(path): - _LOGGER.debug('No state file found.') - return None - with open(path, 'rb') as f: - _LOGGER.debug('Reading state file: %s', path) - try: - return json.load(f) - except ValueError: - _LOGGER.debug('Invalid state file.') - return None - - -def _SaveState(output_dir, state, dry_run=False): - """Saves the |state| dictionary to the given |output_dir| as a JSON file.""" - path = os.path.join(output_dir, _STATE) - _LOGGER.debug('Writing state file: %s', path) - if dry_run: - return - with open(path, 'wb') as f: - f.write(json.dumps(state, sort_keys=True, indent=2)) - - -def _Md5(path): - """Returns the MD5 hash of the file at |path|, which must exist.""" - return hashlib.md5(open(path, 'rb').read()).hexdigest() - - -def _StateIsValid(state): - """Returns true if the given state structure is valid.""" - if not isinstance(state, dict): - _LOGGER.debug('State must be a dict.') - return False - r = state.get('revision', None) - if not isinstance(r, basestring) or not _REVISION_RE.match(r): - _LOGGER.debug('State contains an invalid revision.') - return False - c = state.get('contents', None) - if not isinstance(c, dict): - _LOGGER.debug('State must contain a contents dict.') - return False - for (relpath, md5) in c.iteritems(): - if not isinstance(relpath, basestring) or len(relpath) == 0: - _LOGGER.debug('State contents dict contains an invalid path.') - return False - if not isinstance(md5, basestring) or not _MD5_RE.match(md5): - _LOGGER.debug('State contents dict contains an invalid MD5 digest.') - return False - return True - - -def _BuildActualState(stored, revision, output_dir): - """Builds the actual state using the provided |stored| state as a template. - Only examines files listed in the stored state, causing the script to ignore - files that have been added to the directories locally. |stored| must be a - valid state dictionary. - """ - contents = {} - state = { 'revision': revision, 'contents': contents } - for relpath, md5 in stored['contents'].iteritems(): - abspath = os.path.abspath(os.path.join(output_dir, relpath)) - if os.path.isfile(abspath): - m = _Md5(abspath) - contents[relpath] = m - - return state - - -def _StatesAreConsistent(stored, actual): - """Validates whether two state dictionaries are consistent. Both must be valid - state dictionaries. Additional entries in |actual| are ignored. - """ - if stored['revision'] != actual['revision']: - _LOGGER.debug('Mismatched revision number.') - return False - cont_stored = stored['contents'] - cont_actual = actual['contents'] - for relpath, md5 in cont_stored.iteritems(): - if relpath not in cont_actual: - _LOGGER.debug('Missing content: %s', relpath) - return False - if md5 != cont_actual[relpath]: - _LOGGER.debug('Modified content: %s', relpath) - return False - return True - - -def _GetCurrentState(revision, output_dir): - """Loads the current state and checks to see if it is consistent. Returns - a tuple (state, bool). The returned state will always be valid, even if an - invalid state is present on disk. - """ - stored = _LoadState(output_dir) - if not _StateIsValid(stored): - _LOGGER.debug('State is invalid.') - # Return a valid but empty state. - return ({'revision': '0', 'contents': {}}, False) - actual = _BuildActualState(stored, revision, output_dir) - # If the script has been modified consider the state invalid. - path = os.path.join(output_dir, _STATE) - if os.path.getmtime(__file__) > os.path.getmtime(path): - return (stored, False) - # Otherwise, explicitly validate the state. - if not _StatesAreConsistent(stored, actual): - return (stored, False) - return (stored, True) - - -def _DirIsEmpty(path): - """Returns true if the given directory is empty, false otherwise.""" - for root, dirs, files in os.walk(path): - return not dirs and not files - - -def _RmTreeHandleReadOnly(func, path, exc): - """An error handling function for use with shutil.rmtree. This will - detect failures to remove read-only files, and will change their properties - prior to removing them. This is necessary on Windows as os.remove will return - an access error for read-only files, and git repos contain read-only - pack/index files. - """ - excvalue = exc[1] - if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES: - _LOGGER.debug('Removing read-only path: %s', path) - os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) - func(path) - else: - raise - - -def _RmTree(path): - """A wrapper of shutil.rmtree that handles read-only files.""" - shutil.rmtree(path, ignore_errors=False, onerror=_RmTreeHandleReadOnly) - - -def _CleanState(output_dir, state, dry_run=False): - """Cleans up files/directories in |output_dir| that are referenced by - the given |state|. Raises an error if there are local changes. Returns a - dictionary of files that were deleted. - """ - _LOGGER.debug('Deleting files from previous installation.') - deleted = {} - - # Generate a list of files to delete, relative to |output_dir|. - contents = state['contents'] - files = sorted(contents.keys()) - - # Try to delete the files. Keep track of directories to delete as well. - dirs = {} - for relpath in files: - fullpath = os.path.join(output_dir, relpath) - fulldir = os.path.dirname(fullpath) - dirs[fulldir] = True - if os.path.exists(fullpath): - # If somehow the file has become a directory complain about it. - if os.path.isdir(fullpath): - raise Exception('Directory exists where file expected: %s' % fullpath) - - # Double check that the file doesn't have local changes. If it does - # then refuse to delete it. - if relpath in contents: - stored_md5 = contents[relpath] - actual_md5 = _Md5(fullpath) - if actual_md5 != stored_md5: - raise Exception('File has local changes: %s' % fullpath) - - # The file is unchanged so it can safely be deleted. - _LOGGER.debug('Deleting file "%s".', fullpath) - deleted[relpath] = True - if not dry_run: - os.unlink(fullpath) - - # Sort directories from longest name to shortest. This lets us remove empty - # directories from the most nested paths first. - dirs = sorted(dirs.keys(), key=lambda x: len(x), reverse=True) - for p in dirs: - if os.path.exists(p) and _DirIsEmpty(p): - _LOGGER.debug('Deleting empty directory "%s".', p) - if not dry_run: - _RmTree(p) - - return deleted - - -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={}): - """Installs Syzygy binaries. This assumes that the output directory has - already been cleaned, as it will refuse to overwrite existing files.""" - contents = {} - state = { 'revision': options.revision, 'contents': contents } - archive_path = _SYZYGY_ARCHIVE_PATH % { 'revision': options.revision } - if options.resources: - resources = [(resource, resource, '', None) - for resource in options.resources] - else: - resources = _RESOURCES - for (base, name, subdir, filt) in resources: - # Create the output directory if it doesn't exist. - fulldir = os.path.join(options.output_dir, subdir) - if os.path.isfile(fulldir): - raise Exception('File exists where a directory needs to be created: %s' % - fulldir) - if not os.path.exists(fulldir): - _LOGGER.debug('Creating directory: %s', fulldir) - if not options.dry_run: - os.makedirs(fulldir) - - # 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) - 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) - - _LOGGER.debug('Removing temporary file "%s".', path) - os.remove(path) - - return state - - -def _ParseCommandLine(): - """Parses the command-line and returns an options structure.""" - option_parser = optparse.OptionParser() - option_parser.add_option('--dry-run', action='store_true', default=False, - 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.') - option_parser.add_option('--overwrite', action='store_true', default=False, - help='If specified then the installation will happily delete and rewrite ' - 'the entire output directory, blasting any local changes.') - option_parser.add_option('--revision', type='string', - help='The SVN revision or GIT hash associated with the required version.') - option_parser.add_option('--revision-file', type='string', - help='A text file containing an SVN revision or GIT hash.') - option_parser.add_option('--resource', type='string', action='append', - dest='resources', help='A resource to be downloaded.') - option_parser.add_option('--verbose', dest='log_level', action='store_const', - default=logging.INFO, const=logging.DEBUG, - help='Enables verbose logging.') - option_parser.add_option('--quiet', dest='log_level', action='store_const', - default=logging.INFO, const=logging.ERROR, - help='Disables all output except for errors.') - options, args = option_parser.parse_args() - if args: - option_parser.error('Unexpected arguments: %s' % args) - if not options.output_dir: - option_parser.error('Must specify --output-dir.') - if not options.revision and not options.revision_file: - option_parser.error('Must specify one of --revision or --revision-file.') - if options.revision and options.revision_file: - option_parser.error('Must not specify both --revision and --revision-file.') - - # Configure logging. - logging.basicConfig(level=options.log_level) - - # If a revision file has been specified then read it. - if options.revision_file: - options.revision = open(options.revision_file, 'rb').read().strip() - _LOGGER.debug('Parsed revision "%s" from file "%s".', - options.revision, options.revision_file) - - # Ensure that the specified SVN revision or GIT hash is valid. - if not _REVISION_RE.match(options.revision): - option_parser.error('Must specify a valid SVN or GIT revision.') - - # This just makes output prettier to read. - options.output_dir = os.path.normpath(options.output_dir) - - return options - - -def _RemoveOrphanedFiles(options): - """This is run on non-Windows systems to remove orphaned files that may have - been downloaded by a previous version of this script. - """ - # Reconfigure logging to output info messages. This will allow inspection of - # cleanup status on non-Windows buildbots. - _LOGGER.setLevel(logging.INFO) - - output_dir = os.path.abspath(options.output_dir) - - # We only want to clean up the folder in 'src/third_party/syzygy', and we - # expect to be called with that as an output directory. This is an attempt to - # not start deleting random things if the script is run from an alternate - # location, or not called from the gclient hooks. - expected_syzygy_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), '..', 'third_party', 'syzygy')) - expected_output_dir = os.path.join(expected_syzygy_dir, 'binaries') - if expected_output_dir != output_dir: - _LOGGER.info('Unexpected output directory, skipping cleanup.') - return - - if not os.path.isdir(expected_syzygy_dir): - _LOGGER.info('Output directory does not exist, skipping cleanup.') - return - - def OnError(function, path, excinfo): - """Logs error encountered by shutil.rmtree.""" - _LOGGER.error('Error when running %s(%s)', function, path, exc_info=excinfo) - - _LOGGER.info('Removing orphaned files from %s', expected_syzygy_dir) - if not options.dry_run: - shutil.rmtree(expected_syzygy_dir, True, OnError) - - -def main(): - options = _ParseCommandLine() - - if options.dry_run: - _LOGGER.debug('Performing a dry-run.') - - # We only care about Windows platforms, as the Syzygy binaries aren't used - # elsewhere. However, there was a short period of time where this script - # 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'): - 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. - state, is_consistent = _GetCurrentState(options.revision, options.output_dir) - - # Decide whether or not an install is necessary. - if options.force: - _LOGGER.debug('Forcing reinstall of binaries.') - elif is_consistent: - # Avoid doing any work if the contents of the directory are consistent. - _LOGGER.debug('State unchanged, no reinstall necessary.') - return - - # Under normal logging this is the only only message that will be reported. - _LOGGER.info('Installing revision %s Syzygy binaries.', - options.revision[0:12]) - - # Clean up the old state to begin with. - deleted = [] - if options.overwrite: - if os.path.exists(options.output_dir): - # If overwrite was specified then take a heavy-handed approach. - _LOGGER.debug('Deleting entire installation directory.') - if not options.dry_run: - _RmTree(options.output_dir) - else: - # Otherwise only delete things that the previous installation put in place, - # and take care to preserve any local changes. - deleted = _CleanState(options.output_dir, state, options.dry_run) - - # Install the new binaries. In a dry-run this will actually download the - # archives, but it won't write anything to disk. - state = _InstallBinaries(options, deleted) - - # Build and save the state for the directory. - _SaveState(options.output_dir, state, options.dry_run) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/git-hooks/OWNERS b/engine/src/flutter/build/git-hooks/OWNERS deleted file mode 100644 index 3e327dc711..0000000000 --- a/engine/src/flutter/build/git-hooks/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -set noparent -szager@chromium.org -cmp@chromium.org diff --git a/engine/src/flutter/build/git-hooks/pre-commit b/engine/src/flutter/build/git-hooks/pre-commit deleted file mode 100755 index 41b596344c..0000000000 --- a/engine/src/flutter/build/git-hooks/pre-commit +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -submodule_diff() { - if test -n "$2"; then - git diff-tree -r --ignore-submodules=dirty "$1" "$2" | grep -e '^:160000' -e '^:...... 160000' | xargs - else - git diff-index --cached --ignore-submodules=dirty "$1" | grep -e '^:160000' -e '^:...... 160000' | xargs - fi -} - -if git rev-parse --verify --quiet --no-revs MERGE_HEAD; then - merge_base=$(git merge-base HEAD MERGE_HEAD) - if test -z "$(submodule_diff $merge_base HEAD)"; then - # Most up-to-date submodules are in MERGE_HEAD. - head_ref=MERGE_HEAD - else - # Most up-to-date submodules are in HEAD. - head_ref=HEAD - fi -else - # No merge in progress. Submodules must match HEAD. - head_ref=HEAD -fi - -submods=$(submodule_diff $head_ref) -if test "$submods"; then - echo "You are trying to commit changes to the following submodules:" 1>&2 - echo 1>&2 - echo $submods | cut -d ' ' -f 6 | sed 's/^/ /g' 1>&2 - cat <&2 - -Submodule commits are not allowed. Please run: - - git status --ignore-submodules=dirty - -and/or: - - git diff-index --cached --ignore-submodules=dirty HEAD - -... to see what's in your index. - -If you're really and truly trying to roll the version of a submodule, you should -commit the new version to DEPS, instead. -EOF - exit 1 -fi - -gitmodules_diff() { - git diff-index --cached "$1" .gitmodules -} - -if [ "$(git ls-files .gitmodules)" ] && [ "$(gitmodules_diff $head_ref)" ]; then - cat <&2 -You are trying to commit a change to .gitmodules. That is not allowed. -To make changes to submodule names/paths, edit DEPS. -EOF - exit 1 -fi - -exit 0 diff --git a/engine/src/flutter/build/gn_helpers.py b/engine/src/flutter/build/gn_helpers.py deleted file mode 100644 index 3b0647d9a5..0000000000 --- a/engine/src/flutter/build/gn_helpers.py +++ /dev/null @@ -1,39 +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. - -"""Helper functions useful when writing scripts that are run from GN's -exec_script function.""" - -class GNException(Exception): - pass - - -def ToGNString(value, allow_dicts = True): - """Prints the given value to stdout. - - allow_dicts indicates if this function will allow converting dictionaries - to GN scopes. This is only possible at the top level, you can't nest a - GN scope in a list, so this should be set to False for recursive calls.""" - if isinstance(value, str): - if value.find('\n') >= 0: - raise GNException("Trying to print a string with a newline in it.") - return '"' + value.replace('"', '\\"') + '"' - - if isinstance(value, list): - return '[ %s ]' % ', '.join(ToGNString(v) for v in value) - - if isinstance(value, dict): - if not allow_dicts: - raise GNException("Attempting to recursively print a dictionary.") - result = "" - for key in value: - if not isinstance(key, str): - raise GNException("Dictionary key is not a string.") - result += "%s = %s\n" % (key, ToGNString(value[key], False)) - return result - - if isinstance(value, int): - return str(value) - - raise GNException("Unsupported type when printing to GN.") diff --git a/engine/src/flutter/build/gn_run_binary.py b/engine/src/flutter/build/gn_run_binary.py deleted file mode 100644 index 7d83f6136f..0000000000 --- a/engine/src/flutter/build/gn_run_binary.py +++ /dev/null @@ -1,22 +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. - -"""Helper script for GN to run an arbitrary binary. See compiled_action.gni. - -Run with: - python gn_run_binary.py [args ...] -""" - -import sys -import subprocess - -# This script is designed to run binaries produced by the current build. We -# always prefix it with "./" to avoid picking up system versions that might -# also be on the path. -path = './' + sys.argv[1] - -# The rest of the arguements are passed directly to the executable. -args = [path] + sys.argv[2:] - -sys.exit(subprocess.call(args)) diff --git a/engine/src/flutter/build/gyp_chromium b/engine/src/flutter/build/gyp_chromium deleted file mode 100755 index 9dac8710ff..0000000000 --- a/engine/src/flutter/build/gyp_chromium +++ /dev/null @@ -1,333 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2012 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 is wrapper for Chromium that adds some support for how GYP -# is invoked by Chromium beyond what can be done in the gclient hooks. - -import argparse -import glob -import gyp_environment -import os -import re -import shlex -import subprocess -import string -import sys -import vs_toolchain - -script_dir = os.path.dirname(os.path.realpath(__file__)) -chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) - -sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) -import gyp - -# Assume this file is in a one-level-deep subdirectory of the source root. -SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -# Add paths so that pymod_do_main(...) can import files. -sys.path.insert(1, os.path.join(chrome_src, 'android_webview', 'tools')) -sys.path.insert(1, os.path.join(chrome_src, 'build', 'android', 'gyp')) -sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) -sys.path.insert(1, os.path.join(chrome_src, 'chromecast', 'tools', 'build')) -sys.path.insert(1, os.path.join(chrome_src, 'ios', 'chrome', 'tools', 'build')) -sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) -sys.path.insert(1, os.path.join(chrome_src, 'native_client_sdk', 'src', - 'build_tools')) -sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) -sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'liblouis')) -sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', - 'Source', 'build', 'scripts')) -sys.path.insert(1, os.path.join(chrome_src, 'tools')) -sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) -sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) - -# On Windows, Psyco shortens warm runs of build/gyp_chromium by about -# 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 -# seconds. Conversely, memory usage of build/gyp_chromium with Psyco -# maxes out at about 158 MB vs. 132 MB without it. -# -# Psyco uses native libraries, so we need to load a different -# installation depending on which OS we are running under. It has not -# been tested whether using Psyco on our Mac and Linux builds is worth -# it (the GYP running time is a lot shorter, so the JIT startup cost -# may not be worth it). -if sys.platform == 'win32': - try: - sys.path.insert(0, os.path.join(chrome_src, 'third_party', 'psyco_win32')) - import psyco - except: - psyco = None -else: - psyco = None - - -def GetSupplementalFiles(): - """Returns a list of the supplemental files that are included in all GYP - sources.""" - return glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi')) - - -def ProcessGypDefinesItems(items): - """Converts a list of strings to a list of key-value pairs.""" - result = [] - for item in items: - tokens = item.split('=', 1) - # Some GYP variables have hyphens, which we don't support. - if len(tokens) == 2: - result += [(tokens[0], tokens[1])] - else: - # No value supplied, treat it as a boolean and set it. Note that we - # use the string '1' here so we have a consistent definition whether - # you do 'foo=1' or 'foo'. - result += [(tokens[0], '1')] - return result - - -def GetGypVars(supplemental_files): - """Returns a dictionary of all GYP vars.""" - # Find the .gyp directory in the user's home directory. - home_dot_gyp = os.environ.get('GYP_CONFIG_DIR', None) - if home_dot_gyp: - home_dot_gyp = os.path.expanduser(home_dot_gyp) - if not home_dot_gyp: - home_vars = ['HOME'] - if sys.platform in ('cygwin', 'win32'): - home_vars.append('USERPROFILE') - for home_var in home_vars: - home = os.getenv(home_var) - if home != None: - home_dot_gyp = os.path.join(home, '.gyp') - if not os.path.exists(home_dot_gyp): - home_dot_gyp = None - else: - break - - if home_dot_gyp: - include_gypi = os.path.join(home_dot_gyp, "include.gypi") - if os.path.exists(include_gypi): - supplemental_files += [include_gypi] - - # GYP defines from the supplemental.gypi files. - supp_items = [] - for supplement in supplemental_files: - with open(supplement, 'r') as f: - try: - file_data = eval(f.read(), {'__builtins__': None}, None) - except SyntaxError, e: - e.filename = os.path.abspath(supplement) - raise - variables = file_data.get('variables', []) - for v in variables: - supp_items += [(v, str(variables[v]))] - - # GYP defines from the environment. - env_items = ProcessGypDefinesItems( - shlex.split(os.environ.get('GYP_DEFINES', ''))) - - # GYP defines from the command line. - parser = argparse.ArgumentParser() - parser.add_argument('-D', dest='defines', action='append', default=[]) - cmdline_input_items = parser.parse_known_args()[0].defines - cmdline_items = ProcessGypDefinesItems(cmdline_input_items) - - vars_dict = dict(supp_items + env_items + cmdline_items) - return vars_dict - - -def GetOutputDirectory(): - """Returns the output directory that GYP will use.""" - - # Handle command line generator flags. - parser = argparse.ArgumentParser() - parser.add_argument('-G', dest='genflags', default=[], action='append') - genflags = parser.parse_known_args()[0].genflags - - # Handle generator flags from the environment. - genflags += shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', '')) - - needle = 'output_dir=' - for item in genflags: - if item.startswith(needle): - return item[len(needle):] - - return 'out' - - -def additional_include_files(supplemental_files, args=[]): - """ - Returns a list of additional (.gypi) files to include, without duplicating - ones that are already specified on the command line. The list of supplemental - include files is passed in as an argument. - """ - # Determine the include files specified on the command line. - # This doesn't cover all the different option formats you can use, - # but it's mainly intended to avoid duplicating flags on the automatic - # makefile regeneration which only uses this format. - specified_includes = set() - for arg in args: - if arg.startswith('-I') and len(arg) > 2: - specified_includes.add(os.path.realpath(arg[2:])) - - result = [] - def AddInclude(path): - if os.path.realpath(path) not in specified_includes: - result.append(path) - - if os.environ.get('GYP_INCLUDE_FIRST') != None: - AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_FIRST'))) - - # Always include common.gypi. - AddInclude(os.path.join(script_dir, 'common.gypi')) - - # Optionally add supplemental .gypi files if present. - for supplement in supplemental_files: - AddInclude(supplement) - - if os.environ.get('GYP_INCLUDE_LAST') != None: - AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_LAST'))) - - return result - - -if __name__ == '__main__': - # Disabling garbage collection saves about 1 second out of 16 on a Linux - # z620 workstation. Since this is a short-lived process it's not a problem to - # leak a few cyclyc references in order to spare the CPU cycles for - # scanning the heap. - import gc - gc.disable() - - args = sys.argv[1:] - - use_analyzer = len(args) and args[0] == '--analyzer' - if use_analyzer: - args.pop(0) - os.environ['GYP_GENERATORS'] = 'analyzer' - args.append('-Gconfig_path=' + args.pop(0)) - args.append('-Ganalyzer_output_path=' + args.pop(0)) - - if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): - print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' - sys.exit(0) - - # Use the Psyco JIT if available. - if psyco: - psyco.profile() - print "Enabled Psyco JIT." - - # Fall back on hermetic python if we happen to get run under cygwin. - # TODO(bradnelson): take this out once this issue is fixed: - # http://code.google.com/p/gyp/issues/detail?id=177 - if sys.platform == 'cygwin': - import find_depot_tools - depot_tools_path = find_depot_tools.add_depot_tools_to_path() - python_dir = sorted(glob.glob(os.path.join(depot_tools_path, - 'python2*_bin')))[-1] - env = os.environ.copy() - env['PATH'] = python_dir + os.pathsep + env.get('PATH', '') - cmd = [os.path.join(python_dir, 'python.exe')] + sys.argv - sys.exit(subprocess.call(cmd, env=env)) - - # This could give false positives since it doesn't actually do real option - # parsing. Oh well. - gyp_file_specified = any(arg.endswith('.gyp') for arg in args) - - gyp_environment.SetEnvironment() - - # If we didn't get a file, check an env var, and then fall back to - # assuming 'all.gyp' from the same directory as the script. - if not gyp_file_specified: - gyp_file = os.environ.get('CHROMIUM_GYP_FILE') - if gyp_file: - # Note that CHROMIUM_GYP_FILE values can't have backslashes as - # path separators even on Windows due to the use of shlex.split(). - args.extend(shlex.split(gyp_file)) - else: - args.append(os.path.join(script_dir, 'all.gyp')) - - supplemental_includes = GetSupplementalFiles() - gyp_vars_dict = GetGypVars(supplemental_includes) - # There shouldn't be a circular dependency relationship between .gyp files, - # but in Chromium's .gyp files, on non-Mac platforms, circular relationships - # currently exist. The check for circular dependencies is currently - # bypassed on other platforms, but is left enabled on iOS, where a violation - # of the rule causes Xcode to misbehave badly. - # TODO(mark): Find and kill remaining circular dependencies, and remove this - # option. http://crbug.com/35878. - # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the - # list. - if gyp_vars_dict.get('OS') != 'ios': - args.append('--no-circular-check') - - # libtool on Mac warns about duplicate basenames in static libraries, so - # they're disallowed in general by gyp. We are lax on this point, so disable - # this check other than on Mac. GN does not use static libraries as heavily, - # so over time this restriction will mostly go away anyway, even on Mac. - # https://code.google.com/p/gyp/issues/detail?id=384 - if sys.platform != 'darwin': - args.append('--no-duplicate-basename-check') - - # We explicitly don't support the make gyp generator (crbug.com/348686). Be - # nice and fail here, rather than choking in gyp. - if re.search(r'(^|,|\s)make($|,|\s)', os.environ.get('GYP_GENERATORS', '')): - print 'Error: make gyp generator not supported (check GYP_GENERATORS).' - sys.exit(1) - - # We explicitly don't support the native msvs gyp generator. Be nice and - # fail here, rather than generating broken projects. - if re.search(r'(^|,|\s)msvs($|,|\s)', os.environ.get('GYP_GENERATORS', '')): - print 'Error: msvs gyp generator not supported (check GYP_GENERATORS).' - print 'Did you mean to use the `msvs-ninja` generator?' - sys.exit(1) - - # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check - # to enfore syntax checking. - syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') - if syntax_check and int(syntax_check): - args.append('--check') - - # TODO(dmikurube): Remove these checks and messages after a while. - if ('linux_use_tcmalloc' in gyp_vars_dict or - 'android_use_tcmalloc' in gyp_vars_dict): - print '*****************************************************************' - print '"linux_use_tcmalloc" and "android_use_tcmalloc" are deprecated!' - print '-----------------------------------------------------------------' - print 'You specify "linux_use_tcmalloc" or "android_use_tcmalloc" in' - print 'your GYP_DEFINES. Please switch them into "use_allocator" now.' - print 'See http://crbug.com/345554 for the details.' - print '*****************************************************************' - - # Automatically turn on crosscompile support for platforms that need it. - # (The Chrome OS build sets CC_host / CC_target which implicitly enables - # this mode.) - if all(('ninja' in os.environ.get('GYP_GENERATORS', ''), - gyp_vars_dict.get('OS') in ['android', 'ios'], - 'GYP_CROSSCOMPILE' not in os.environ)): - os.environ['GYP_CROSSCOMPILE'] = '1' - if gyp_vars_dict.get('OS') == 'android': - args.append('--check') - - args.extend( - ['-I' + i for i in additional_include_files(supplemental_includes, args)]) - - args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) - - if not use_analyzer: - print 'Updating projects from gyp files...' - sys.stdout.flush() - - # Off we go... - gyp_rc = gyp.main(args) - - if not use_analyzer: - vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() - if vs2013_runtime_dll_dirs: - x64_runtime, x86_runtime = vs2013_runtime_dll_dirs - vs_toolchain.CopyVsRuntimeDlls( - os.path.join(chrome_src, GetOutputDirectory()), - (x86_runtime, x64_runtime)) - - sys.exit(gyp_rc) diff --git a/engine/src/flutter/build/gyp_chromium.py b/engine/src/flutter/build/gyp_chromium.py deleted file mode 100644 index f9e8ac8ed8..0000000000 --- a/engine/src/flutter/build/gyp_chromium.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2012 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 file is (possibly, depending on python version) imported by -# gyp_chromium when GYP_PARALLEL=1 and it creates sub-processes -# through the multiprocessing library. - -# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for -# imports that don't end in .py (and aren't directories with an -# __init__.py). This wrapper makes "import gyp_chromium" work with -# those old versions and makes it possible to execute gyp_chromium.py -# directly on Windows where the extension is useful. - -import os - -path = os.path.abspath(os.path.split(__file__)[0]) -execfile(os.path.join(path, 'gyp_chromium')) diff --git a/engine/src/flutter/build/gyp_chromium_test.py b/engine/src/flutter/build/gyp_chromium_test.py deleted file mode 100755 index 0c0e479d1c..0000000000 --- a/engine/src/flutter/build/gyp_chromium_test.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/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 os -import sys -import unittest - -SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) -SRC_DIR = os.path.dirname(SCRIPT_DIR) - -sys.path.append(os.path.join(SRC_DIR, 'third_party', 'pymock')) - -import mock - -# TODO(sbc): Make gyp_chromium more testable by putting the code in -# a .py file. -gyp_chromium = __import__('gyp_chromium') - - -class TestGetOutputDirectory(unittest.TestCase): - @mock.patch('os.environ', {}) - @mock.patch('sys.argv', [__file__]) - def testDefaultValue(self): - self.assertEqual(gyp_chromium.GetOutputDirectory(), 'out') - - @mock.patch('os.environ', {'GYP_GENERATOR_FLAGS': 'output_dir=envfoo'}) - @mock.patch('sys.argv', [__file__]) - def testEnvironment(self): - self.assertEqual(gyp_chromium.GetOutputDirectory(), 'envfoo') - - @mock.patch('os.environ', {'GYP_GENERATOR_FLAGS': 'output_dir=envfoo'}) - @mock.patch('sys.argv', [__file__, '-Goutput_dir=cmdfoo']) - def testGFlagOverridesEnv(self): - self.assertEqual(gyp_chromium.GetOutputDirectory(), 'cmdfoo') - - @mock.patch('os.environ', {}) - @mock.patch('sys.argv', [__file__, '-G', 'output_dir=foo']) - def testGFlagWithSpace(self): - self.assertEqual(gyp_chromium.GetOutputDirectory(), 'foo') - - -class TestGetGypVars(unittest.TestCase): - @mock.patch('os.environ', {}) - def testDefault(self): - self.assertEqual(gyp_chromium.GetGypVars([]), {}) - - @mock.patch('os.environ', {}) - @mock.patch('sys.argv', [__file__, '-D', 'foo=bar']) - def testDFlags(self): - self.assertEqual(gyp_chromium.GetGypVars([]), {'foo': 'bar'}) - - @mock.patch('os.environ', {}) - @mock.patch('sys.argv', [__file__, '-D', 'foo']) - def testDFlagsNoValue(self): - self.assertEqual(gyp_chromium.GetGypVars([]), {'foo': '1'}) - - @mock.patch('os.environ', {}) - @mock.patch('sys.argv', [__file__, '-D', 'foo=bar', '-Dbaz']) - def testDFlagMulti(self): - self.assertEqual(gyp_chromium.GetGypVars([]), {'foo': 'bar', 'baz': '1'}) - - -if __name__ == '__main__': - unittest.main() diff --git a/engine/src/flutter/build/gyp_environment.py b/engine/src/flutter/build/gyp_environment.py deleted file mode 100644 index fb50645d56..0000000000 --- a/engine/src/flutter/build/gyp_environment.py +++ /dev/null @@ -1,33 +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. - -""" -Sets up various automatic gyp environment variables. These are used by -gyp_chromium and landmines.py which run at different stages of runhooks. To -make sure settings are consistent between them, all setup should happen here. -""" - -import gyp_helper -import os -import sys -import vs_toolchain - -def SetEnvironment(): - """Sets defaults for GYP_* variables.""" - gyp_helper.apply_chromium_gyp_env() - - # Default to ninja on linux and windows, but only if no generator has - # explicitly been set. - # Also default to ninja on mac, but only when not building chrome/ios. - # . -f / --format has precedence over the env var, no need to check for it - # . set the env var only if it hasn't been set yet - # . chromium.gyp_env has been applied to os.environ at this point already - if sys.platform.startswith(('linux', 'win', 'freebsd')) and \ - not os.environ.get('GYP_GENERATORS'): - os.environ['GYP_GENERATORS'] = 'ninja' - elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ - not 'OS=ios' in os.environ.get('GYP_DEFINES', []): - os.environ['GYP_GENERATORS'] = 'ninja' - - vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() diff --git a/engine/src/flutter/build/gyp_helper.py b/engine/src/flutter/build/gyp_helper.py deleted file mode 100644 index c840f2d6dc..0000000000 --- a/engine/src/flutter/build/gyp_helper.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (c) 2012 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 file helps gyp_chromium and landmines correctly set up the gyp -# environment from chromium.gyp_env on disk - -import os - -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) -CHROME_SRC = os.path.dirname(SCRIPT_DIR) - - -def apply_gyp_environment_from_file(file_path): - """Reads in a *.gyp_env file and applies the valid keys to os.environ.""" - if not os.path.exists(file_path): - return - with open(file_path, 'rU') as f: - file_contents = f.read() - try: - file_data = eval(file_contents, {'__builtins__': None}, None) - except SyntaxError, e: - e.filename = os.path.abspath(file_path) - raise - supported_vars = ( - 'CC', - 'CC_wrapper', - 'CC.host_wrapper', - 'CHROMIUM_GYP_FILE', - 'CHROMIUM_GYP_SYNTAX_CHECK', - 'CXX', - 'CXX_wrapper', - 'CXX.host_wrapper', - 'GYP_DEFINES', - 'GYP_GENERATOR_FLAGS', - 'GYP_CROSSCOMPILE', - 'GYP_GENERATOR_OUTPUT', - 'GYP_GENERATORS', - 'GYP_INCLUDE_FIRST', - 'GYP_INCLUDE_LAST', - 'GYP_MSVS_VERSION', - ) - for var in supported_vars: - file_val = file_data.get(var) - if file_val: - if var in os.environ: - behavior = 'replaces' - if var == 'GYP_DEFINES': - result = file_val + ' ' + os.environ[var] - behavior = 'merges with, and individual components override,' - else: - result = os.environ[var] - print 'INFO: Environment value for "%s" %s value in %s' % ( - var, behavior, os.path.abspath(file_path) - ) - string_padding = max(len(var), len(file_path), len('result')) - print ' %s: %s' % (var.rjust(string_padding), os.environ[var]) - print ' %s: %s' % (file_path.rjust(string_padding), file_val) - os.environ[var] = result - else: - os.environ[var] = file_val - - -def apply_chromium_gyp_env(): - if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ: - # Update the environment based on chromium.gyp_env - path = os.path.join(os.path.dirname(CHROME_SRC), 'chromium.gyp_env') - apply_gyp_environment_from_file(path) diff --git a/engine/src/flutter/build/gypi_to_gn.py b/engine/src/flutter/build/gypi_to_gn.py deleted file mode 100644 index a107f94fca..0000000000 --- a/engine/src/flutter/build/gypi_to_gn.py +++ /dev/null @@ -1,167 +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. - -"""Converts a given gypi file to a python scope and writes the result to stdout. - -It is assumed that the file contains a toplevel dictionary, and this script -will return that dictionary as a GN "scope" (see example below). This script -does not know anything about GYP and it will not expand variables or execute -conditions. - -It will strip conditions blocks. - -A variables block at the top level will be flattened so that the variables -appear in the root dictionary. This way they can be returned to the GN code. - -Say your_file.gypi looked like this: - { - 'sources': [ 'a.cc', 'b.cc' ], - 'defines': [ 'ENABLE_DOOM_MELON' ], - } - -You would call it like this: - gypi_values = exec_script("//build/gypi_to_gn.py", - [ rebase_path("your_file.gypi") ], - "scope", - [ "your_file.gypi" ]) - -Notes: - - The rebase_path call converts the gypi file from being relative to the - current build file to being system absolute for calling the script, which - will have a different current directory than this file. - - - The "scope" parameter tells GN to interpret the result as a series of GN - variable assignments. - - - The last file argument to exec_script tells GN that the given file is a - dependency of the build so Ninja can automatically re-run GN if the file - changes. - -Read the values into a target like this: - component("mycomponent") { - sources = gypi_values.sources - defines = gypi_values.defines - } - -Sometimes your .gypi file will include paths relative to a different -directory than the current .gn file. In this case, you can rebase them to -be relative to the current directory. - sources = rebase_path(gypi_values.sources, ".", - "//path/gypi/input/values/are/relative/to") - -This script will tolerate a 'variables' in the toplevel dictionary or not. If -the toplevel dictionary just contains one item called 'variables', it will be -collapsed away and the result will be the contents of that dictinoary. Some -.gypi files are written with or without this, depending on how they expect to -be embedded into a .gyp file. - -This script also has the ability to replace certain substrings in the input. -Generally this is used to emulate GYP variable expansion. If you passed the -argument "--replace=<(foo)=bar" then all instances of "<(foo)" in strings in -the input will be replaced with "bar": - - gypi_values = exec_script("//build/gypi_to_gn.py", - [ rebase_path("your_file.gypi"), - "--replace=<(foo)=bar"], - "scope", - [ "your_file.gypi" ]) - -""" - -import gn_helpers -from optparse import OptionParser -import sys - -def LoadPythonDictionary(path): - file_string = open(path).read() - try: - file_data = eval(file_string, {'__builtins__': None}, None) - except SyntaxError, e: - e.filename = path - raise - except Exception, e: - raise Exception("Unexpected error while reading %s: %s" % (path, str(e))) - - assert isinstance(file_data, dict), "%s does not eval to a dictionary" % path - - # Flatten any variables to the top level. - if 'variables' in file_data: - file_data.update(file_data['variables']) - del file_data['variables'] - - # Strip any conditions. - if 'conditions' in file_data: - del file_data['conditions'] - if 'target_conditions' in file_data: - del file_data['target_conditions'] - - # Strip targets in the toplevel, since some files define these and we can't - # slurp them in. - if 'targets' in file_data: - del file_data['targets'] - - return file_data - - -def ReplaceSubstrings(values, search_for, replace_with): - """Recursively replaces substrings in a value. - - Replaces all substrings of the "search_for" with "repace_with" for all - strings occurring in "values". This is done by recursively iterating into - lists as well as the keys and values of dictionaries.""" - if isinstance(values, str): - return values.replace(search_for, replace_with) - - if isinstance(values, list): - return [ReplaceSubstrings(v, search_for, replace_with) for v in values] - - if isinstance(values, dict): - # For dictionaries, do the search for both the key and values. - result = {} - for key, value in values.items(): - new_key = ReplaceSubstrings(key, search_for, replace_with) - new_value = ReplaceSubstrings(value, search_for, replace_with) - result[new_key] = new_value - return result - - # Assume everything else is unchanged. - return values - -def main(): - parser = OptionParser() - parser.add_option("-r", "--replace", action="append", - help="Replaces substrings. If passed a=b, replaces all substrs a with b.") - (options, args) = parser.parse_args() - - if len(args) != 1: - raise Exception("Need one argument which is the .gypi file to read.") - - data = LoadPythonDictionary(args[0]) - if options.replace: - # Do replacements for all specified patterns. - for replace in options.replace: - split = replace.split('=') - # Allow "foo=" to replace with nothing. - if len(split) == 1: - split.append('') - assert len(split) == 2, "Replacement must be of the form 'key=value'." - data = ReplaceSubstrings(data, split[0], split[1]) - - # Sometimes .gypi files use the GYP syntax with percents at the end of the - # variable name (to indicate not to overwrite a previously-defined value): - # 'foo%': 'bar', - # Convert these to regular variables. - for key in data: - if len(key) > 1 and key[len(key) - 1] == '%': - data[key[:-1]] = data[key] - del data[key] - - print gn_helpers.ToGNString(data) - -if __name__ == '__main__': - try: - main() - except Exception, e: - print str(e) - sys.exit(1) diff --git a/engine/src/flutter/build/install-android-sdks.sh b/engine/src/flutter/build/install-android-sdks.sh deleted file mode 100755 index 1119b7d7fd..0000000000 --- a/engine/src/flutter/build/install-android-sdks.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -e - -# Copyright (c) 2012 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 SDKs needed to build chromium on android. -# See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions - -echo 'checking for sdk packages install' -# Use absolute path to call 'android' so script can be run from any directory. -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)" -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-android.sh b/engine/src/flutter/build/install-build-deps-android.sh deleted file mode 100755 index cf87381113..0000000000 --- a/engine/src/flutter/build/install-build-deps-android.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -e - -# Copyright (c) 2012 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 everything needed to build chromium on android, including -# items requiring sudo privileges. -# See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions - -# This script installs the sun-java6 packages (bin, jre and jdk). Sun requires -# a license agreement, so upon installation it will prompt the user. To get -# past the curses-based dialog press TAB TAB to agree. - -args="$@" -if test "$1" = "--skip-sdk-packages"; then - skip_inst_sdk_packages=1 - args="${@:2}" -else - skip_inst_sdk_packages=0 -fi - -if ! uname -m | egrep -q "i686|x86_64"; then - echo "Only x86 architectures are currently supported" >&2 - exit -fi - -# Install first the default Linux build deps. -"$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \ - --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}" - -lsb_release=$(lsb_release --codename --short) - -# The temporary directory used to store output of update-java-alternatives -TEMPDIR=$(mktemp -d) -cleanup() { - local status=${?} - trap - EXIT - rm -rf "${TEMPDIR}" - exit ${status} -} -trap cleanup EXIT - -# Fix deps -sudo apt-get -f install - -# Install deps -# This step differs depending on what Ubuntu release we are running -# on since the package names are different, and Sun's Java must -# be installed manually on late-model versions. - -# common -sudo apt-get -y install lighttpd python-pexpect xvfb x11-utils - -# Some binaries in the Android SDK require 32-bit libraries on the host. -# See https://developer.android.com/sdk/installing/index.html?pkg=tools -if [[ $lsb_release == "precise" ]]; then - sudo apt-get -y install ia32-libs -else - sudo apt-get -y install libncurses5:i386 libstdc++6:i386 zlib1g:i386 -fi - -sudo apt-get -y install ant - -# Install openjdk and openjre 7 stuff -sudo apt-get -y install openjdk-7-jre openjdk-7-jdk - -# Switch version of Java to openjdk 7. -# Some Java plugins (e.g. for firefox, mozilla) are not required to build, and -# thus are treated only as warnings. Any errors in updating java alternatives -# which are not '*-javaplugin.so' will cause errors and stop the script from -# completing successfully. -if ! sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 \ - >& "${TEMPDIR}"/update-java-alternatives.out -then - # Check that there are the expected javaplugin.so errors for the update - if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \ - /dev/null - then - # Print as warnings all the javaplugin.so errors - echo 'WARNING: java-6-sun has no alternatives for the following plugins:' - grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out - fi - # Check if there are any errors that are not javaplugin.so - if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ - >& /dev/null - then - # If there are non-javaplugin.so errors, treat as errors and exit - echo 'ERRORS: Failed to update alternatives for java-6-sun:' - grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out - exit 1 - fi -fi - -# Install SDK packages for android -if test "$skip_inst_sdk_packages" != 1; then - "$(dirname "${BASH_SOURCE[0]}")/install-android-sdks.sh" -fi - -echo "install-build-deps-android.sh complete." diff --git a/engine/src/flutter/build/install-build-deps.py b/engine/src/flutter/build/install-build-deps.py deleted file mode 100755 index 7cc3760df7..0000000000 --- a/engine/src/flutter/build/install-build-deps.py +++ /dev/null @@ -1,430 +0,0 @@ -#!/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-build-deps.sh b/engine/src/flutter/build/install-build-deps.sh deleted file mode 100755 index 57f7216096..0000000000 --- a/engine/src/flutter/build/install-build-deps.sh +++ /dev/null @@ -1,477 +0,0 @@ -#!/bin/bash -e - -# Copyright (c) 2012 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 everything needed to build chromium (well, ideally, anyway) -# See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions -# and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit - -usage() { - echo "Usage: $0 [--options]" - echo "Options:" - echo "--[no-]syms: enable or disable installation of debugging symbols" - echo "--lib32: enable installation of 32-bit libraries, e.g. for V8 snapshot" - echo "--[no-]arm: enable or disable installation of arm cross toolchain" - echo "--[no-]chromeos-fonts: enable or disable installation of Chrome OS"\ - "fonts" - echo "--[no-]nacl: enable or disable installation of prerequisites for"\ - "building standalone NaCl and all its toolchains" - echo "--no-prompt: silently select standard options/defaults" - echo "--quick-check: quickly try to determine if dependencies are installed" - echo " (this avoids interactive prompts and sudo commands," - echo " so might not be 100% accurate)" - echo "--unsupported: attempt installation even on unsupported systems" - echo "Script will prompt interactively if options not given." - exit 1 -} - -# Checks whether a particular package is available in the repos. -# USAGE: $ package_exists -package_exists() { - apt-cache pkgnames | grep -x "$1" > /dev/null 2>&1 -} - -# These default to on because (some) bots need them and it keeps things -# simple for the bot setup if all bots just run the script in its default -# mode. Developers who don't want stuff they don't need installed on their -# own workstations can pass --no-arm --no-nacl when running the script. -do_inst_arm=1 -do_inst_nacl=1 - -while test "$1" != "" -do - case "$1" in - --syms) do_inst_syms=1;; - --no-syms) do_inst_syms=0;; - --lib32) do_inst_lib32=1;; - --arm) do_inst_arm=1;; - --no-arm) do_inst_arm=0;; - --chromeos-fonts) do_inst_chromeos_fonts=1;; - --no-chromeos-fonts) do_inst_chromeos_fonts=0;; - --nacl) do_inst_nacl=1;; - --no-nacl) do_inst_nacl=0;; - --no-prompt) do_default=1 - do_quietly="-qq --assume-yes" - ;; - --quick-check) do_quick_check=1;; - --unsupported) do_unsupported=1;; - *) usage;; - esac - shift -done - -if test "$do_inst_arm" = "1"; then - do_inst_lib32=1 -fi - -# Check for lsb_release command in $PATH -if ! which lsb_release > /dev/null; then - echo "ERROR: lsb_release not found in \$PATH" >&2 - exit 1; -fi - -distro=$(lsb_release --id --short) -codename=$(lsb_release --codename --short) -ubuntu_codenames="(precise|trusty|utopic|vivid)" -debian_codenames="(stretch)" -if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then - if [[ ! $codename =~ $ubuntu_codenames && ! $codename =~ $debian_codenames ]]; then - echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ - "14.10 (utopic) and 15.04 (vivid), and Debian Testing (stretch) are currently supported" >&2 - exit 1 - fi - - if ! uname -m | egrep -q "i686|x86_64"; then - echo "Only x86 architectures are currently supported" >&2 - exit - fi -fi - -if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then - echo "Running as non-root user." - echo "You might have to enter your password one or more times for 'sudo'." - echo -fi - -# Packages needed for chromeos only -chromeos_dev_list="libbluetooth-dev libxkbcommon-dev realpath" - -# Packages needed for development -if [[ $distro = Debian ]] ; then - # Debian-specific package names - dev_list="apache2-bin fonts-indic fonts-lyx" -else - # Ubuntu-specific package names - dev_list="apache2.2-bin ttf-indic-fonts xfonts-mathml language-pack-da - language-pack-fr language-pack-he language-pack-zh-hant" -fi -dev_list="$dev_list bison cdbs curl dpkg-dev elfutils devscripts fakeroot - flex fonts-thai-tlwg g++ git-core git-svn gperf libapache2-mod-php5 - libasound2-dev libbrlapi-dev libav-tools - 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-kochi-gothic ttf-kochi-mincho wdiff zip - $chromeos_dev_list" - -# 64-bit systems need a minimum set of 32-bit compat packages for the pre-built -# NaCl binaries. -if file /sbin/init | grep -q 'ELF 64-bit'; then - dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" -fi - -# Run-time libraries required by chromeos only -chromeos_lib_list="libpulse0 libbz2-1.0" - -# Full list of required run-time libraries -lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libcap2 libcups2 libexpat1 - libexif12 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0 - libgtk2.0-0 libpam0g libpango1.0-0 libpci3 libpcre3 libpixman-1-0 - libpng12-0 libspeechd2 libstdc++6 libsqlite3-0 libx11-6 - libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 - libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 - libxtst6 zlib1g $chromeos_lib_list" - -# Debugging symbols for all of the run-time libraries -dbg_list="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" - -# Find the proper version of libstdc++6-4.x-dbg. -if [ "x$codename" = "xprecise" ]; then - dbg_list="${dbg_list} libstdc++6-4.6-dbg" -elif [ "x$codename" = "xtrusty" ]; then - dbg_list="${dbg_list} libstdc++6-4.8-dbg" -else - dbg_list="${dbg_list} libstdc++6-4.9-dbg" -fi - -# 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf -lib32_list="linux-libc-dev:i386" - -# arm cross toolchain packages needed to build chrome on armhf -arm_list="libc6-dev-armhf-cross - linux-libc-dev-armhf-cross" - -# Work around for dependency issue Debian/Stretch -if [ "x$codename" = "xstretch" ]; then - arm_list+=" g++-5-arm-linux-gnueabihf" -else - arm_list+=" g++-arm-linux-gnueabihf" -fi - -# Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 -if [ "x$codename" = "xtrusty" ]; then - arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf - gcc-4.8-multilib-arm-linux-gnueabihf" -fi - -# Packages to build NaCl, its toolchains, and its ports. -naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" -nacl_list="g++-mingw-w64-i686 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 lib32ncurses5-dev - 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 - ${naclports_list}" - -# 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"; do - if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ - grep -q " ok installed"); then - mesa_variant="${variant}" - fi -done -dev_list="${dev_list} libgbm-dev${mesa_variant} - libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} - mesa-common-dev${mesa_variant}" -nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" - -# Some package names have changed over time -if package_exists ttf-mscorefonts-installer; then - dev_list="${dev_list} ttf-mscorefonts-installer" -else - dev_list="${dev_list} msttcorefonts" -fi -if package_exists libnspr4-dbg; then - dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" - lib_list="${lib_list} libnspr4 libnss3" -else - dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg" - lib_list="${lib_list} libnspr4-0d libnss3-1d" -fi -if package_exists libjpeg-dev; then - dev_list="${dev_list} libjpeg-dev" -else - dev_list="${dev_list} libjpeg62-dev" -fi -if package_exists libudev1; then - dev_list="${dev_list} libudev1" - nacl_list="${nacl_list} libudev1:i386" -else - dev_list="${dev_list} libudev0" - nacl_list="${nacl_list} libudev0:i386" -fi -if package_exists libbrlapi0.6; then - dev_list="${dev_list} libbrlapi0.6" -else - dev_list="${dev_list} libbrlapi0.5" -fi - - -# Some packages are only needed if the distribution actually supports -# installing them. -if package_exists appmenu-gtk; then - lib_list="$lib_list appmenu-gtk" -fi - -# 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. -if file /sbin/init | grep -q 'ELF 64-bit'; then - # 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. - multilib_package=$(apt-cache depends g++-multilib --important | \ - grep -E --color=never --only-matching '\bg\+\+-[0-9.]+-multilib\b') - lib32_list="$lib32_list $multilib_package" -fi - -# Waits for the user to press 'Y' or 'N'. Either uppercase of lowercase is -# accepted. Returns 0 for 'Y' and 1 for 'N'. If an optional parameter has -# been provided to yes_no(), the function also accepts RETURN as a user input. -# The parameter specifies the exit code that should be returned in that case. -# The function will echo the user's selection followed by a newline character. -# Users can abort the function by pressing CTRL-C. This will call "exit 1". -yes_no() { - if [ 0 -ne "${do_default-0}" ] ; then - [ $1 -eq 0 ] && echo "Y" || echo "N" - return $1 - fi - local c - while :; do - c="$(trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT - stty -echo iuclc -icanon 2>/dev/null - dd count=1 bs=1 2>/dev/null | od -An -tx1)" - case "$c" in - " 0a") if [ -n "$1" ]; then - [ $1 -eq 0 ] && echo "Y" || echo "N" - return $1 - fi - ;; - " 79") echo "Y" - return 0 - ;; - " 6e") echo "N" - return 1 - ;; - "") echo "Aborted" >&2 - exit 1 - ;; - *) # The user pressed an unrecognized key. As we are not echoing - # any incorrect user input, alert the user by ringing the bell. - (tput bel) 2>/dev/null - ;; - esac - done -} - -if test "$do_inst_syms" = "" && test 0 -eq ${do_quick_check-0} -then - echo "This script installs all tools and libraries needed to build Chromium." - echo "" - echo "For most of the libraries, it can also install debugging symbols, which" - echo "will allow you to debug code in the system libraries. Most developers" - echo "won't need these symbols." - echo -n "Do you want me to install them for you (y/N) " - if yes_no 1; then - do_inst_syms=1 - fi -fi -if test "$do_inst_syms" = "1"; then - echo "Including debugging symbols." -else - echo "Skipping debugging symbols." - dbg_list= -fi - -if test "$do_inst_lib32" = "1" ; then - echo "Including 32-bit libraries for ARM/Android." -else - echo "Skipping 32-bit libraries for ARM/Android." - lib32_list= -fi - -if test "$do_inst_arm" = "1" ; then - echo "Including ARM cross toolchain." -else - echo "Skipping ARM cross toolchain." - arm_list= -fi - -if test "$do_inst_nacl" = "1"; then - echo "Including NaCl, NaCl toolchain, NaCl ports dependencies." -else - echo "Skipping NaCl, NaCl toolchain, NaCl ports dependencies." - nacl_list= -fi - -# The `sort -r -s -t: -k2` sorts all the :i386 packages to the front, to avoid -# confusing dpkg-query (crbug.com/446172). -packages="$( - echo "${dev_list} ${lib_list} ${dbg_list} ${lib32_list} ${arm_list}"\ - "${nacl_list}" | tr " " "\n" | sort -u | sort -r -s -t: -k2 | tr "\n" " " -)" - -if [ 1 -eq "${do_quick_check-0}" ] ; then - failed_check="$(dpkg-query -W -f '${PackageSpec}:${Status}\n' \ - ${packages} 2>&1 | grep -v "ok installed" || :)" - if [ -n "${failed_check}" ]; then - echo - nomatch="$(echo "${failed_check}" | \ - sed -e "s/^No packages found matching \(.*\).$/\1/;t;d")" - missing="$(echo "${failed_check}" | \ - sed -e "/^No packages found matching/d;s/^\(.*\):.*$/\1/")" - if [ "$nomatch" ]; then - # Distinguish between packages that actually aren't available to the - # system (i.e. not in any repo) and packages that just aren't known to - # dpkg (i.e. managed by apt). - unknown="" - for p in ${nomatch}; do - if apt-cache show ${p} > /dev/null 2>&1; then - missing="${p}\n${missing}" - else - unknown="${p}\n${unknown}" - fi - done - if [ -n "${unknown}" ]; then - echo "WARNING: The following packages are unknown to your system" - echo "(maybe missing a repo or need to 'sudo apt-get update'):" - echo -e "${unknown}" | sed -e "s/^/ /" - fi - fi - if [ -n "${missing}" ]; then - echo "WARNING: The following packages are not installed:" - echo -e "${missing}" | sed -e "s/^/ /" - fi - exit 1 - fi - exit 0 -fi - -if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then - if [[ ! $codename =~ (precise) ]]; then - sudo dpkg --add-architecture i386 - fi -fi -sudo apt-get update - -# We initially run "apt-get" with the --reinstall option and parse its output. -# This way, we can find all the packages that need to be newly installed -# without accidentally promoting any packages from "auto" to "manual". -# We then re-run "apt-get" with just the list of missing packages. -echo "Finding missing packages..." -# Intentionally leaving $packages unquoted so it's more readable. -echo "Packages required: " $packages -echo -new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" -if new_list="$(yes n | LANGUAGE=en LANG=C $new_list_cmd)"; then - # We probably never hit this following line. - echo "No missing packages, and the packages are up-to-date." -elif [ $? -eq 1 ]; then - # We expect apt-get to have exit status of 1. - # This indicates that we cancelled the install with "yes n|". - new_list=$(echo "$new_list" | - sed -e '1,/The following NEW packages will be installed:/d;s/^ //;t;d') - new_list=$(echo "$new_list" | sed 's/ *$//') - if [ -z "$new_list" ] ; then - echo "No missing packages, and the packages are up-to-date." - else - echo "Installing missing packages: $new_list." - sudo apt-get install ${do_quietly-} ${new_list} - fi - echo -else - # An apt-get exit status of 100 indicates that a real error has occurred. - - # I am intentionally leaving out the '"'s around new_list_cmd, - # as this makes it easier to cut and paste the output - echo "The following command failed: " ${new_list_cmd} - echo - echo "It produces the following output:" - yes n | $new_list_cmd || true - echo - echo "You will have to install the above packages yourself." - echo - exit 100 -fi - -# Install the Chrome OS default fonts. This must go after running -# apt-get, since install-chromeos-fonts depends on curl. -if test "$do_inst_chromeos_fonts" != "0"; then - echo - echo "Installing Chrome OS fonts." - dir=`echo $0 | sed -r -e 's/\/[^/]+$//'` - if ! sudo $dir/linux/install-chromeos-fonts.py; then - echo "ERROR: The installation of the Chrome OS default fonts failed." - if [ `stat -f -c %T $dir` == "nfs" ]; then - echo "The reason is that your repo is installed on a remote file system." - else - echo "This is expected if your repo is installed on a remote file system." - fi - echo "It is recommended to install your repo on a local file system." - echo "You can skip the installation of the Chrome OS default founts with" - echo "the command line option: --no-chromeos-fonts." - exit 1 - fi -else - echo "Skipping installation of Chrome OS fonts." -fi - -# $1 - target name -# $2 - link name -create_library_symlink() { - target=$1 - linkname=$2 - if [ -L $linkname ]; then - if [ "$(basename $(readlink $linkname))" != "$(basename $target)" ]; then - sudo rm $linkname - fi - fi - if [ ! -r $linkname ]; then - echo "Creating link: $linkname" - sudo ln -fs $target $linkname - fi -} - -if test "$do_inst_nacl" = "1"; then - echo "Installing symbolic links for NaCl." - # naclports needs to cross build python for i386, but libssl1.0.0:i386 - # only contains libcrypto.so.1.0.0 and not the symlink needed for - # linking (libcrypto.so). - create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ - /usr/lib/i386-linux-gnu/libcrypto.so - - create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ - /usr/lib/i386-linux-gnu/libssl.so -else - echo "Skipping symbolic links for NaCl." -fi diff --git a/engine/src/flutter/build/install-chroot.sh b/engine/src/flutter/build/install-chroot.sh deleted file mode 100755 index 99451ed7ea..0000000000 --- a/engine/src/flutter/build/install-chroot.sh +++ /dev/null @@ -1,888 +0,0 @@ -#!/bin/bash -e - -# Copyright (c) 2012 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 installs Debian-derived distributions in a chroot environment. -# It can for example be used to have an accurate 32bit build and test -# environment when otherwise working on a 64bit machine. -# N. B. it is unlikely that this script will ever work on anything other than a -# Debian-derived system. - -# Older Debian based systems had both "admin" and "adm" groups, with "admin" -# apparently being used in more places. Newer distributions have standardized -# on just the "adm" group. Check /etc/group for the preferred name of the -# administrator group. -admin=$(grep '^admin:' /etc/group >&/dev/null && echo admin || echo adm) - -usage() { - echo "usage: ${0##*/} [-m mirror] [-g group,...] [-s] [-c]" - echo "-b dir additional directories that should be bind mounted," - echo ' or "NONE".' - echo " Default: if local filesystems present, ask user for help" - echo "-g group,... groups that can use the chroot unauthenticated" - echo " Default: '${admin}' and current user's group ('$(id -gn)')" - echo "-l List all installed chroot environments" - echo "-m mirror an alternate repository mirror for package downloads" - echo "-s configure default deb-srcs" - echo "-c always copy 64bit helper binaries to 32bit chroot" - echo "-h this help message" -} - -process_opts() { - local OPTNAME OPTIND OPTERR OPTARG - while getopts ":b:g:lm:sch" OPTNAME; do - case "$OPTNAME" in - b) - if [ "${OPTARG}" = "NONE" -a -z "${bind_mounts}" ]; then - bind_mounts="${OPTARG}" - else - if [ "${bind_mounts}" = "NONE" -o "${OPTARG}" = "${OPTARG#/}" -o \ - ! -d "${OPTARG}" ]; then - echo "Invalid -b option(s)" - usage - exit 1 - fi - bind_mounts="${bind_mounts} -${OPTARG} ${OPTARG} none rw,bind 0 0" - fi - ;; - g) - [ -n "${OPTARG}" ] && - chroot_groups="${chroot_groups}${chroot_groups:+,}${OPTARG}" - ;; - l) - list_all_chroots - exit - ;; - m) - if [ -n "${mirror}" ]; then - echo "You can only specify exactly one mirror location" - usage - exit 1 - fi - mirror="$OPTARG" - ;; - s) - add_srcs="y" - ;; - c) - copy_64="y" - ;; - h) - usage - exit 0 - ;; - \:) - echo "'-$OPTARG' needs an argument." - usage - exit 1 - ;; - *) - echo "invalid command-line option: $OPTARG" - usage - exit 1 - ;; - esac - done - - if [ $# -ge ${OPTIND} ]; then - eval echo "Unexpected command line argument: \${${OPTIND}}" - usage - exit 1 - fi -} - -list_all_chroots() { - for i in /var/lib/chroot/*; do - i="${i##*/}" - [ "${i}" = "*" ] && continue - [ -x "/usr/local/bin/${i%bit}" ] || continue - grep -qs "^\[${i%bit}\]\$" /etc/schroot/schroot.conf || continue - [ -r "/etc/schroot/script-${i}" -a \ - -r "/etc/schroot/mount-${i}" ] || continue - echo "${i%bit}" - done -} - -getkey() { - ( - trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT HUP - stty -echo iuclc -icanon 2>/dev/null - dd count=1 bs=1 2>/dev/null - ) -} - -chr() { - printf "\\$(printf '%03o' "$1")" -} - -ord() { - printf '%d' $(printf '%c' "$1" | od -tu1 -An) -} - -is_network_drive() { - stat -c %T -f "$1/" 2>/dev/null | - egrep -qs '^nfs|cifs|smbfs' -} - -# Check that we are running as a regular user -[ "$(id -nu)" = root ] && { - echo "Run this script as a regular user and provide your \"sudo\"" \ - "password if requested" >&2 - exit 1 -} - -process_opts "$@" - -echo "This script will help you through the process of installing a" -echo "Debian or Ubuntu distribution in a chroot environment. You will" -echo "have to provide your \"sudo\" password when requested." -echo - -# Error handler -trap 'exit 1' INT TERM QUIT HUP -trap 'sudo apt-get clean; tput bel; echo; echo Failed' EXIT - -# Install any missing applications that this script relies on. If these packages -# are already installed, don't force another "apt-get install". That would -# prevent them from being auto-removed, if they ever become eligible for that. -# And as this script only needs the packages once, there is no good reason to -# introduce a hard dependency on things such as dchroot and debootstrap. -dep= -for i in dchroot debootstrap libwww-perl; do - [ -d /usr/share/doc/"$i" ] || dep="$dep $i" -done -[ -n "$dep" ] && sudo apt-get -y install $dep -sudo apt-get -y install schroot - -# Create directory for chroot -sudo mkdir -p /var/lib/chroot - -# Find chroot environments that can be installed with debootstrap -targets="$(cd /usr/share/debootstrap/scripts - ls | grep '^[a-z]*$')" - -# Ask user to pick one of the available targets -echo "The following targets are available to be installed in a chroot:" -j=1; for i in $targets; do - printf '%4d: %s\n' "$j" "$i" - j=$(($j+1)) -done -while :; do - printf "Which target would you like to install: " - read n - [ "$n" -gt 0 -a "$n" -lt "$j" ] >&/dev/null && break -done -j=1; for i in $targets; do - [ "$j" -eq "$n" ] && { distname="$i"; break; } - j=$(($j+1)) -done -echo - -# On x86-64, ask whether the user wants to install x86-32 or x86-64 -archflag= -arch= -if [ "$(uname -m)" = x86_64 ]; then - while :; do - echo "You are running a 64bit kernel. This allows you to install either a" - printf "32bit or a 64bit chroot environment. %s" \ - "Which one do you want (32, 64) " - read arch - [ "${arch}" == 32 -o "${arch}" == 64 ] && break - done - [ "${arch}" == 32 ] && archflag="--arch i386" || archflag="--arch amd64" - arch="${arch}bit" - echo -fi -target="${distname}${arch}" - -# Don't accidentally overwrite an existing installation -[ -d /var/lib/chroot/"${target}" ] && { - while :; do - echo "This chroot already exists on your machine." - if schroot -l --all-sessions 2>&1 | - sed 's/^session://' | - grep -qs "^${target%bit}-"; then - echo "And it appears to be in active use. Terminate all programs that" - echo "are currently using the chroot environment and then re-run this" - echo "script." - echo "If you still get an error message, you might have stale mounts" - echo "that you forgot to delete. You can always clean up mounts by" - echo "executing \"${target%bit} -c\"." - exit 1 - fi - echo "I can abort installation, I can overwrite the existing chroot," - echo "or I can delete the old one and then exit. What would you like to" - printf "do (a/o/d)? " - read choice - case "${choice}" in - a|A) exit 1;; - o|O) sudo rm -rf "/var/lib/chroot/${target}"; break;; - d|D) sudo rm -rf "/var/lib/chroot/${target}" \ - "/usr/local/bin/${target%bit}" \ - "/etc/schroot/mount-${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" - trap '' INT TERM QUIT HUP - trap '' EXIT - echo "Deleted!" - exit 0;; - esac - done - echo -} -sudo mkdir -p /var/lib/chroot/"${target}" - -# Offer to include additional standard repositories for Ubuntu-based chroots. -alt_repos= -grep -qs ubuntu.com /usr/share/debootstrap/scripts/"${distname}" && { - while :; do - echo "Would you like to add ${distname}-updates and ${distname}-security " - printf "to the chroot's sources.list (y/n)? " - read alt_repos - case "${alt_repos}" in - y|Y) - alt_repos="y" - break - ;; - n|N) - break - ;; - esac - done - echo -} - -# Check for non-standard file system mount points and ask the user whether -# they should be imported into the chroot environment -# We limit to the first 26 mount points that much some basic heuristics, -# because a) that allows us to enumerate choices with a single character, -# and b) if we find more than 26 mount points, then these are probably -# false-positives and something is very unusual about the system's -# configuration. No need to spam the user with even more information that -# is likely completely irrelevant. -if [ -z "${bind_mounts}" ]; then - mounts="$(awk '$2 != "/" && $2 !~ "^/boot" && $2 !~ "^/home" && - $2 !~ "^/media" && $2 !~ "^/run" && - ($3 ~ "ext[2-4]" || $3 == "reiserfs" || $3 == "btrfs" || - $3 == "xfs" || $3 == "jfs" || $3 == "u?msdos" || - $3 == "v?fat" || $3 == "hfs" || $3 == "ntfs" || - $3 ~ "nfs[4-9]?" || $3 == "smbfs" || $3 == "cifs") { - print $2 - }' /proc/mounts | - head -n26)" - if [ -n "${mounts}" ]; then - echo "You appear to have non-standard mount points that you" - echo "might want to import into the chroot environment:" - echo - sel= - while :; do - # Print a menu, listing all non-default mounts of local or network - # file systems. - j=1; for m in ${mounts}; do - c="$(printf $(printf '\\%03o' $((64+$j))))" - echo "$sel" | grep -qs $c && - state="mounted in chroot" || state="$(tput el)" - printf " $c) %-40s${state}\n" "$m" - j=$(($j+1)) - done - # Allow user to interactively (de-)select any of the entries - echo - printf "Select mount points that you want to be included or press %s" \ - "SPACE to continue" - c="$(getkey | tr a-z A-Z)" - [ "$c" == " " ] && { echo; echo; break; } - if [ -z "$c" ] || - [ "$c" '<' 'A' -o $(ord "$c") -gt $((64 + $(ord "$j"))) ]; then - # Invalid input, ring the console bell - tput bel - else - # Toggle the selection for the given entry - if echo "$sel" | grep -qs $c; then - sel="$(printf "$sel" | sed "s/$c//")" - else - sel="$sel$c" - fi - fi - # Reposition cursor to the top of the list of entries - tput cuu $(($j + 1)) - echo - done - fi - j=1; for m in ${mounts}; do - c="$(chr $(($j + 64)))" - if echo "$sel" | grep -qs $c; then - bind_mounts="${bind_mounts}$m $m none rw,bind 0 0 -" - fi - j=$(($j+1)) - done -fi - -# Remove stale entry from /etc/schroot/schroot.conf. Entries start -# with the target name in square brackets, followed by an arbitrary -# number of lines. The entry stops when either the end of file has -# been reached, or when the beginning of a new target is encountered. -# This means, we cannot easily match for a range of lines in -# "sed". Instead, we actually have to iterate over each line and check -# whether it is the beginning of a new entry. -sudo sed -ni '/^[[]'"${target%bit}"']$/,${:1;n;/^[[]/b2;b1;:2;p;n;b2};p' \ - /etc/schroot/schroot.conf - -# Download base system. This takes some time -if [ -z "${mirror}" ]; then - grep -qs ubuntu.com /usr/share/debootstrap/scripts/"${distname}" && - mirror="http://archive.ubuntu.com/ubuntu" || - mirror="http://ftp.us.debian.org/debian" -fi - -sudo ${http_proxy:+http_proxy="${http_proxy}"} debootstrap ${archflag} \ - "${distname}" "/var/lib/chroot/${target}" "$mirror" - -# Add new entry to /etc/schroot/schroot.conf -grep -qs ubuntu.com /usr/share/debootstrap/scripts/"${distname}" && - brand="Ubuntu" || brand="Debian" -if [ -z "${chroot_groups}" ]; then - chroot_groups="${admin},$(id -gn)" -fi - -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/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 >>'"${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' "${fstab}"; then - echo '/media /media none rw,rbind 0 0' | - sudo sh -c 'cat >>'"${fstab}" -fi - -# Share /dev/shm, /run and /run/shm. -grep -qs '^/dev/shm' "${fstab}" || - echo '/dev/shm /dev/shm none rw,bind 0 0' | - sudo sh -c 'cat >>'"${fstab}" -if [ ! -d "/var/lib/chroot/${target}/run" ] && - ! grep -qs '^/run' "${fstab}"; then - echo '/run /run none rw,bind 0 0' | - sudo sh -c 'cat >>'"${fstab}" -fi -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 >>'"${fstab}" -fi - -# Set up a special directory that changes contents depending on the target -# that is executing. -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 >>'"${target}" -mkdir -p "${s}" - -# Install a helper script to launch commands in the chroot -sudo sh -c 'cat >/usr/local/bin/'"${target%bit}" <<'EOF' -#!/bin/bash - -chroot="${0##*/}" - -wrap() { - # Word-wrap the text passed-in on stdin. Optionally, on continuation lines - # insert the same number of spaces as the number of characters in the - # parameter(s) passed to this function. - # If the "fold" program cannot be found, or if the actual width of the - # terminal cannot be determined, this function doesn't attempt to do any - # wrapping. - local f="$(type -P fold)" - [ -z "${f}" ] && { cat; return; } - local c="$(stty -a /dev/null | - sed 's/.*columns[[:space:]]*\([0-9]*\).*/\1/;t;d')" - [ -z "${c}" ] && { cat; return; } - local i="$(echo "$*"|sed 's/./ /g')" - local j="$(printf %s "${i}"|wc -c)" - if [ "${c}" -gt "${j}" ]; then - dd bs=1 count="${j}" 2>/dev/null - "${f}" -sw "$((${c}-${j}))" | sed '2,$s/^/'"${i}"'/' - else - "${f}" -sw "${c}" - fi -} - -help() { - echo "Usage ${0##*/} [-h|--help] [-c|--clean] [-C|--clean-all] [-l|--list] [--] args" | wrap "Usage ${0##*/} " - echo " help: print this message" | wrap " " - echo " list: list all known chroot environments" | wrap " " - echo " clean: remove all old chroot sessions for \"${chroot}\"" | wrap " " - echo " clean-all: remove all old chroot sessions for all environments" | wrap " " - exit 0 -} - -clean() { - local s t rc - rc=0 - for s in $(schroot -l --all-sessions); do - if [ -n "$1" ]; then - t="${s#session:}" - [ "${t#${chroot}-}" == "${t}" ] && continue - fi - if ls -l /proc/*/{cwd,fd} 2>/dev/null | - fgrep -qs "/var/lib/schroot/mount/${t}"; then - echo "Session \"${t}\" still has active users, not cleaning up" | wrap - rc=1 - continue - fi - sudo schroot -c "${s}" -e || rc=1 - done - exit ${rc} -} - -list() { - for e in $(schroot -l); do - e="${e#chroot:}" - [ -x "/usr/local/bin/${e}" ] || continue - if schroot -l --all-sessions 2>/dev/null | - sed 's/^session://' | - grep -qs "^${e}-"; then - echo "${e} is currently active" - else - echo "${e}" - fi - done - exit 0 -} - -while [ "$#" -ne 0 ]; do - case "$1" in - --) shift; break;; - -h|--help) shift; help;; - -l|--list) shift; list;; - -c|--clean) shift; clean "${chroot}";; - -C|--clean-all) shift; clean;; - *) break;; - esac -done - -# Start a new chroot session and keep track of the session id. We inject this -# id into all processes that run inside the chroot. Unless they go out of their -# way to clear their environment, we can then later identify our child and -# grand-child processes by scanning their environment. -session="$(schroot -c "${chroot}" -b)" -export CHROOT_SESSION_ID="${session}" - -# Set GOMA_TMP_DIR for better handling of goma inside chroot. -export GOMA_TMP_DIR="/tmp/goma_tmp_$CHROOT_SESSION_ID" -mkdir -p "$GOMA_TMP_DIR" - -if [ $# -eq 0 ]; then - # Run an interactive shell session - schroot -c "${session}" -r -p -else - # Run a command inside of the chroot environment - p="$1"; shift - schroot -c "${session}" -r -p "$p" -- "$@" -fi -rc=$? - -# Compute the inode of the root directory inside of the chroot environment. -i=$(schroot -c "${session}" -r -p ls -- -id /proc/self/root/. | - awk '{ print $1 }') 2>/dev/null -other_pids= -while [ -n "$i" ]; do - # Identify processes by the inode number of their root directory. Then - # remove all processes that we know belong to other sessions. We use - # "sort | uniq -u" to do what amounts to a "set substraction operation". - pids=$({ ls -id1 /proc/*/root/. 2>/dev/null | - sed -e 's,^[^0-9]*'$i'.*/\([1-9][0-9]*\)/.*$,\1, - t - d'; - echo "${other_pids}"; - echo "${other_pids}"; } | sort | uniq -u) >/dev/null 2>&1 - # Kill all processes that are still left running in the session. This is - # typically an assortment of daemon processes that were started - # automatically. They result in us being unable to tear down the session - # cleanly. - [ -z "${pids}" ] && break - for j in $pids; do - # Unfortunately, the way that schroot sets up sessions has the - # side-effect of being unable to tell one session apart from another. - # This can result in us attempting to kill processes in other sessions. - # We make a best-effort to avoid doing so. - k="$( ( xargs -0 -n1 /dev/null | - sed 's/^CHROOT_SESSION_ID=/x/;t1;d;:1;q')" - if [ -n "${k}" -a "${k#x}" != "${session}" ]; then - other_pids="${other_pids} -${j}" - continue - fi - kill -9 $pids - done -done -# End the chroot session. This should clean up all temporary files. But if we -# earlier failed to terminate all (daemon) processes inside of the session, -# deleting the session could fail. When that happens, the user has to manually -# clean up the stale files by invoking us with "--clean" after having killed -# all running processes. -schroot -c "${session}" -e -# Since no goma processes are running, we can remove goma directory. -rm -rf "$GOMA_TMP_DIR" -exit $rc -EOF -sudo chown root:root /usr/local/bin/"${target%bit}" -sudo chmod 755 /usr/local/bin/"${target%bit}" - -# Add the standard Ubuntu update repositories if requested. -[ "${alt_repos}" = "y" -a \ - -r "/var/lib/chroot/${target}/etc/apt/sources.list" ] && -sudo sed -i '/^deb .* [^ -]\+ main$/p - s/^\(deb .* [^ -]\+\) main/\1-security main/ - p - t1 - d - :1;s/-security main/-updates main/ - t - d' "/var/lib/chroot/${target}/etc/apt/sources.list" - -# Add a few more repositories to the chroot -[ -r "/var/lib/chroot/${target}/etc/apt/sources.list" ] && -sudo sed -i 's/ main$/ main restricted universe multiverse/' \ - "/var/lib/chroot/${target}/etc/apt/sources.list" - -# Add the Ubuntu "partner" repository, if available -if [ -r "/var/lib/chroot/${target}/etc/apt/sources.list" ] && - HEAD "http://archive.canonical.com/ubuntu/dists/${distname}/partner" \ - >&/dev/null; then - sudo sh -c ' - echo "deb http://archive.canonical.com/ubuntu" \ - "'"${distname}"' partner" \ - >>"/var/lib/chroot/'"${target}"'/etc/apt/sources.list"' -fi - -# Add source repositories, if the user requested we do so -[ "${add_srcs}" = "y" -a \ - -r "/var/lib/chroot/${target}/etc/apt/sources.list" ] && -sudo sed -i '/^deb[^-]/p - s/^deb\([^-]\)/deb-src\1/' \ - "/var/lib/chroot/${target}/etc/apt/sources.list" - -# Set apt proxy if host has set http_proxy -if [ -n "${http_proxy}" ]; then - sudo sh -c ' - echo "Acquire::http::proxy \"'"${http_proxy}"'\";" \ - >>"/var/lib/chroot/'"${target}"'/etc/apt/apt.conf"' -fi - -# Update packages -sudo "/usr/local/bin/${target%bit}" /bin/sh -c ' - apt-get update; apt-get -y dist-upgrade' || : - -# Install a couple of missing packages -for i in debian-keyring ubuntu-keyring locales sudo; do - [ -d "/var/lib/chroot/${target}/usr/share/doc/$i" ] || - sudo "/usr/local/bin/${target%bit}" apt-get -y install "$i" || : -done - -# Configure locales -sudo "/usr/local/bin/${target%bit}" /bin/sh -c ' - l='"${LANG:-en_US}"'; l="${l%%.*}" - [ -r /etc/locale.gen ] && - sed -i "s/^# \($l\)/\1/" /etc/locale.gen - locale-gen $LANG en_US en_US.UTF-8' || : - -# Enable multi-arch support, if available -sudo "/usr/local/bin/${target%bit}" dpkg --assert-multi-arch >&/dev/null && - [ -r "/var/lib/chroot/${target}/etc/apt/sources.list" ] && { - sudo sed -i 's/ / [arch=amd64,i386] /' \ - "/var/lib/chroot/${target}/etc/apt/sources.list" - [ -d /var/lib/chroot/${target}/etc/dpkg/dpkg.cfg.d/ ] && - sudo "/usr/local/bin/${target%bit}" dpkg --add-architecture \ - $([ "${arch}" = "32bit" ] && echo amd64 || echo i386) >&/dev/null || - echo foreign-architecture \ - $([ "${arch}" = "32bit" ] && echo amd64 || echo i386) | - sudo sh -c \ - "cat >'/var/lib/chroot/${target}/etc/dpkg/dpkg.cfg.d/multiarch'" -} - -# Configure "sudo" package -sudo "/usr/local/bin/${target%bit}" /bin/sh -c ' - egrep -qs '"'^$(id -nu) '"' /etc/sudoers || - echo '"'$(id -nu) ALL=(ALL) ALL'"' >>/etc/sudoers' - -# Install a few more commonly used packages -sudo "/usr/local/bin/${target%bit}" apt-get -y install \ - autoconf automake1.9 dpkg-dev g++-multilib gcc-multilib gdb less libtool \ - lsof strace - -# If running a 32bit environment on a 64bit machine, install a few binaries -# as 64bit. This is only done automatically if the chroot distro is the same as -# the host, otherwise there might be incompatibilities in build settings or -# runtime dependencies. The user can force it with the '-c' flag. -host_distro=$(grep -s DISTRIB_CODENAME /etc/lsb-release | \ - cut -d "=" -f 2) -if [ "${copy_64}" = "y" -o \ - "${host_distro}" = "${distname}" -a "${arch}" = 32bit ] && \ - file /bin/bash 2>/dev/null | grep -q x86-64; then - readlinepkg=$(sudo "/usr/local/bin/${target%bit}" sh -c \ - 'apt-cache search "lib64readline.\$" | sort | tail -n 1 | cut -d " " -f 1') - sudo "/usr/local/bin/${target%bit}" apt-get -y install \ - lib64expat1 lib64ncurses5 ${readlinepkg} lib64z1 lib64stdc++6 - dep= - for i in binutils gdb; do - [ -d /usr/share/doc/"$i" ] || dep="$dep $i" - done - [ -n "$dep" ] && sudo apt-get -y install $dep - sudo mkdir -p "/var/lib/chroot/${target}/usr/local/lib/amd64" - for i in libbfd libpython; do - lib="$({ ldd /usr/bin/ld; ldd /usr/bin/gdb; } | - grep -s "$i" | awk '{ print $3 }')" - if [ -n "$lib" -a -r "$lib" ]; then - sudo cp "$lib" "/var/lib/chroot/${target}/usr/local/lib/amd64" - fi - done - for lib in libssl libcrypt; do - for path in /usr/lib /usr/lib/x86_64-linux-gnu; do - sudo cp $path/$lib* \ - "/var/lib/chroot/${target}/usr/local/lib/amd64/" >&/dev/null || : - done - done - for i in gdb ld; do - sudo cp /usr/bin/$i "/var/lib/chroot/${target}/usr/local/lib/amd64/" - sudo sh -c "cat >'/var/lib/chroot/${target}/usr/local/bin/$i'" <&/dev/null; then - tmp_script="/tmp/${script##*/}" - cp "${script}" "${tmp_script}" - fi - # Some distributions automatically start an instance of the system- - # wide dbus daemon, cron daemon or of the logging daemon, when - # 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}; - rc=$?; - /etc/init.d/cron stop >/dev/null 2>&1 || :; - /etc/init.d/rsyslog stop >/dev/null 2>&1 || :; - /etc/init.d/dbus stop >/dev/null 2>&1 || :; - exit $rc" - rc=$? - [ -n "${tmp_script}" ] && rm -f "${tmp_script}" - [ $rc -ne 0 ] && exit $rc - break - ;; - n|N) - break - ;; - esac - done - echo -fi - -# Check whether ~/chroot is on a (slow) network file system and offer to -# relocate it. Also offer relocation, if the user appears to have multiple -# spindles (as indicated by "${bind_mount}" being non-empty). -# We only offer this option, if it doesn't look as if a chroot environment -# is currently active. Otherwise, relocation is unlikely to work and it -# can be difficult for the user to recover from the failed attempt to relocate -# the ~/chroot directory. -# We don't aim to solve this problem for every configuration, -# but try to help with the common cases. For more advanced configuration -# options, the user can always manually adjust things. -mkdir -p "${HOME}/chroot/" -if [ ! -h "${HOME}/chroot" ] && - ! egrep -qs '^[^[:space:]]*/chroot' /etc/fstab && - { [ -n "${bind_mounts}" -a "${bind_mounts}" != "NONE" ] || - is_network_drive "${HOME}/chroot"; } && - ! egrep -qs '/var/lib/[^/]*chroot/.*/chroot' /proc/mounts; then - echo "${HOME}/chroot is currently located on the same device as your" - echo "home directory." - echo "This might not be what you want. Do you want me to move it somewhere" - echo "else?" - # If the computer has multiple spindles, many users configure all or part of - # the secondary hard disk to be writable by the primary user of this machine. - # Make some reasonable effort to detect this type of configuration and - # then offer a good location for where to put the ~/chroot directory. - suggest= - for i in $(echo "${bind_mounts}"|cut -d ' ' -f 1); do - if [ -d "$i" -a -w "$i" -a \( ! -a "$i/chroot" -o -w "$i/chroot/." \) ] && - ! is_network_drive "$i"; then - suggest="$i" - else - for j in "$i/"*; do - if [ -d "$j" -a -w "$j" -a \ - \( ! -a "$j/chroot" -o -w "$j/chroot/." \) ] && - ! is_network_drive "$j"; then - suggest="$j" - else - for k in "$j/"*; do - if [ -d "$k" -a -w "$k" -a \ - \( ! -a "$k/chroot" -o -w "$k/chroot/." \) ] && - ! is_network_drive "$k"; then - suggest="$k" - break - fi - done - fi - [ -n "${suggest}" ] && break - done - fi - [ -n "${suggest}" ] && break - done - def_suggest="${HOME}" - if [ -n "${suggest}" ]; then - # For home directories that reside on network drives, make our suggestion - # the default option. For home directories that reside on a local drive, - # require that the user manually enters the new location. - if is_network_drive "${HOME}"; then - def_suggest="${suggest}" - else - echo "A good location would probably be in \"${suggest}\"" - fi - fi - while :; do - printf "Physical location [${def_suggest}]: " - read dir - [ -z "${dir}" ] && dir="${def_suggest}" - [ "${dir%%/}" == "${HOME%%/}" ] && break - if ! [ -d "${dir}" -a -w "${dir}" ] || - [ -a "${dir}/chroot" -a ! -w "${dir}/chroot/." ]; then - echo "Cannot write to ${dir}/chroot. Please try again" - else - mv "${HOME}/chroot" "${dir}/chroot" - ln -s "${dir}/chroot" "${HOME}/chroot" - for i in $(list_all_chroots); do - sudo "$i" mkdir -p "${dir}/chroot" - done - sudo sed -i "s,${HOME}/chroot,${dir}/chroot,g" /etc/schroot/mount-* - break - fi - done -fi - -# Clean up package files -sudo schroot -c "${target%bit}" -p -- apt-get clean -sudo apt-get clean - -trap '' INT TERM QUIT HUP -trap '' EXIT - -# Let the user know what we did -cat < 0) - - add_to_path = []; - first_entry = argv[0]; - if first_entry.startswith('ADD_TO_PATH='): - argv = argv[1:]; - add_to_path = first_entry.replace('ADD_TO_PATH=', '', 1).split(':') - - # Still need something to run. - assert(len(argv) > 0) - - clean_env = {} - - # Pull over the whitelisted keys. - for key in env_key_whitelist: - val = os.environ.get(key, None) - if not val is None: - clean_env[key] = val - - # Collect the developer dir as set via Xcode, defaulting it. - dev_prefix = os.environ.get('DEVELOPER_DIR', '/Developer/') - if dev_prefix[-1:] != '/': - dev_prefix += '/' - - # Now pull in PATH, but remove anything Xcode might have added. - initial_path = os.environ.get('PATH', '') - filtered_chunks = \ - [x for x in initial_path.split(':') if not x.startswith(dev_prefix)] - if filtered_chunks: - clean_env['PATH'] = ':'.join(add_to_path + filtered_chunks) - - # Add any KEY=VALUE args before the command to the cleaned environment. - args = argv[:] - while '=' in args[0]: - (key, val) = args[0].split('=', 1) - clean_env[key] = val - args = args[1:] - - # Still need something to run. - assert(len(args) > 0) - - # Off it goes... - os.execvpe(args[0], args, clean_env) - # Should never get here, so return a distinctive, non-zero status code. - return 66 - -if __name__ == '__main__': - sys.exit(Main(sys.argv[1:])) diff --git a/engine/src/flutter/build/ios/grit_whitelist.txt b/engine/src/flutter/build/ios/grit_whitelist.txt deleted file mode 100644 index a976daf16b..0000000000 --- a/engine/src/flutter/build/ios/grit_whitelist.txt +++ /dev/null @@ -1,1155 +0,0 @@ -IDR_ABOUT_DOM_DISTILLER_CSS -IDR_ABOUT_DOM_DISTILLER_HTML -IDR_ABOUT_DOM_DISTILLER_JS -IDR_ABOUT_STATS_HTML -IDR_ABOUT_STATS_JS -IDR_ABOUT_VERSION_CSS -IDR_ABOUT_VERSION_HTML -IDR_ABOUT_VERSION_JS -IDR_CONTEXTUAL_SEARCH_PROMO_HTML -IDR_CONTROLLED_SETTING_MANDATORY -IDR_CRASHES_HTML -IDR_CRASHES_JS -IDR_CREDITS_HTML -IDR_CREDITS_JS -IDR_CREDIT_CARD_CVC_HINT -IDR_CREDIT_CARD_CVC_HINT_AMEX -IDR_DATA_REDUCTION_PROXY_INTERSTITIAL_HTML -IDR_DEFAULT_FAVICON -IDR_DEFAULT_FAVICON_32 -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 -IDR_EXTRACT_PAGE_FEATURES_JS -IDR_FLAGS_FAVICON -IDR_FLAGS_HTML -IDR_FLAGS_JS -IDR_GCM_INTERNALS_CSS -IDR_GCM_INTERNALS_HTML -IDR_GCM_INTERNALS_JS -IDR_HISTORY_FAVICON -IDR_HISTORY_HTML -IDR_HISTORY_JS -IDR_INCOGNITO_TAB_HTML -IDR_INFOBAR_AUTOFILL_CC -IDR_INFOBAR_AUTOLOGIN -IDR_INFOBAR_RESTORE_SESSION -IDR_INFOBAR_SAVE_PASSWORD -IDR_INFOBAR_TRANSLATE_IOS -IDR_INFOBAR_WARNING -IDR_IS_DISTILLABLE_JS -IDR_LOCATION_BAR_HTTP -IDR_NET_ERROR_HTML -IDR_NET_EXPORT_HTML -IDR_NET_EXPORT_JS -IDR_NET_INTERNALS_INDEX_HTML -IDR_NET_INTERNALS_INDEX_JS -IDR_OMAHA_HTML -IDR_OMAHA_JS -IDR_OMNIBOX_CALCULATOR -IDR_OMNIBOX_CLEAR_IOS -IDR_OMNIBOX_CLEAR_OTR_IOS -IDR_OMNIBOX_CLEAR_OTR_PRESSED_IOS -IDR_OMNIBOX_CLEAR_PRESSED_IOS -IDR_OMNIBOX_EXTENSION_APP -IDR_OMNIBOX_HISTORY -IDR_OMNIBOX_HISTORY_INCOGNITO -IDR_OMNIBOX_HTTP -IDR_OMNIBOX_HTTPS_INVALID -IDR_OMNIBOX_HTTPS_POLICY_WARNING -IDR_OMNIBOX_HTTPS_VALID -IDR_OMNIBOX_HTTPS_WARNING -IDR_OMNIBOX_HTTP_INCOGNITO -IDR_OMNIBOX_KEYBOARD_VIEW_APPEND -IDR_OMNIBOX_KEYBOARD_VIEW_APPEND_HIGHLIGHTED -IDR_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO -IDR_OMNIBOX_KEYBOARD_VIEW_APPEND_INCOGNITO_HIGHLIGHTED -IDR_OMNIBOX_SEARCH -IDR_OMNIBOX_SEARCH_INCOGNITO -IDR_OMNIBOX_SEARCH_SECURED -IDR_OMNIBOX_STAR -IDR_OMNIBOX_STAR_INCOGNITO -IDR_OTHER_DEVICES_JS -IDR_PAGEINFO_BAD -IDR_PAGEINFO_GOOD -IDR_PAGEINFO_INFO -IDR_PAGEINFO_WARNING_MAJOR -IDR_PAGEINFO_WARNING_MINOR -IDR_POLICY_CSS -IDR_POLICY_HTML -IDR_POLICY_JS -IDR_PRINTER_FAVICON -IDR_SAD_FAVICON -IDR_SAD_TAB -IDR_SECURITY_INTERSTITIAL_HTML -IDR_SIGNIN_INTERNALS_INDEX_HTML -IDR_SIGNIN_INTERNALS_INDEX_JS -IDR_SYNC_INTERNALS_ABOUT_JS -IDR_SYNC_INTERNALS_CHROME_SYNC_JS -IDR_SYNC_INTERNALS_DATA_JS -IDR_SYNC_INTERNALS_EVENTS_JS -IDR_SYNC_INTERNALS_INDEX_HTML -IDR_SYNC_INTERNALS_INDEX_JS -IDR_SYNC_INTERNALS_SEARCH_JS -IDR_SYNC_INTERNALS_SYNC_LOG_JS -IDR_SYNC_INTERNALS_SYNC_NODE_BROWSER_JS -IDR_SYNC_INTERNALS_SYNC_SEARCH_JS -IDR_SYNC_INTERNALS_TYPES_JS -IDR_TOOLBAR_SHADOW_FULL_BLEED -IDR_TRANSLATE_JS -IDR_UBER_UTILS_JS -IDR_WEBUI_CSS_TEXT_DEFAULTS -IDR_WEBUI_I18N_TEMPLATE_JS -IDR_WEBUI_JSTEMPLATE_JS -IDR_WEBUI_JS_LOAD_TIME_DATA -IDS_ABOUT_MAC -IDS_ABOUT_VERSION_COMMAND_LINE -IDS_ABOUT_VERSION_COMPANY_NAME -IDS_ABOUT_VERSION_COPYRIGHT -IDS_ABOUT_VERSION_EXECUTABLE_PATH -IDS_ABOUT_VERSION_OFFICIAL -IDS_ABOUT_VERSION_OS -IDS_ABOUT_VERSION_PATH_NOTFOUND -IDS_ABOUT_VERSION_PROFILE_PATH -IDS_ABOUT_VERSION_REVISION -IDS_ABOUT_VERSION_TITLE -IDS_ABOUT_VERSION_UNOFFICIAL -IDS_ABOUT_VERSION_USER_AGENT -IDS_ABOUT_VERSION_VARIATIONS -IDS_ACCEPT_LANGUAGES -IDS_ACCNAME_BACK -IDS_ACCNAME_CLEAR_TEXT -IDS_ACCNAME_FORWARD -IDS_ACCNAME_LOCATION -IDS_ACCNAME_VOICE_SEARCH -IDS_ALLOW_INSECURE_CONTENT_BUTTON -IDS_ALTERNATE_NAV_URL_VIEW_LABEL -IDS_ANNOTATED_SUGGESTION -IDS_APP_CANCEL -IDS_APP_OK -IDS_APP_UNTITLED_SHORTCUT_FILE_NAME -IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION -IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR -IDS_AUTOFILL_ADDRESS_SUMMARY_SEPARATOR -IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_NETWORK -IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_PERMANENT -IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN -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_CC_AMEX -IDS_AUTOFILL_CC_AMEX_SHORT -IDS_AUTOFILL_CC_DINERS -IDS_AUTOFILL_CC_DISCOVER -IDS_AUTOFILL_CC_GENERIC -IDS_AUTOFILL_CC_INFOBAR_ACCEPT -IDS_AUTOFILL_CC_INFOBAR_DENY -IDS_AUTOFILL_CC_INFOBAR_TEXT -IDS_AUTOFILL_CC_JCB -IDS_AUTOFILL_CC_MASTERCARD -IDS_AUTOFILL_CC_UNION_PAY -IDS_AUTOFILL_CC_VISA -IDS_AUTOFILL_CLEAR_FORM_MENU_ITEM -IDS_AUTOFILL_DELETE_AUTOCOMPLETE_SUGGESTION_CONFIRMATION_BODY -IDS_AUTOFILL_DELETE_CREDIT_CARD_SUGGESTION_CONFIRMATION_BODY -IDS_AUTOFILL_DELETE_PROFILE_SUGGESTION_CONFIRMATION_BODY -IDS_AUTOFILL_DIALOG_PRIVACY_POLICY_LINK -IDS_AUTOFILL_FIELD_LABEL_AREA -IDS_AUTOFILL_FIELD_LABEL_COUNTY -IDS_AUTOFILL_FIELD_LABEL_DEPARTMENT -IDS_AUTOFILL_FIELD_LABEL_DISTRICT -IDS_AUTOFILL_FIELD_LABEL_EMIRATE -IDS_AUTOFILL_FIELD_LABEL_ISLAND -IDS_AUTOFILL_FIELD_LABEL_PARISH -IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE -IDS_AUTOFILL_FIELD_LABEL_PREFECTURE -IDS_AUTOFILL_FIELD_LABEL_PROVINCE -IDS_AUTOFILL_FIELD_LABEL_STATE -IDS_AUTOFILL_FIELD_LABEL_ZIP_CODE -IDS_AUTOFILL_OPTIONS_POPUP -IDS_AUTOFILL_PASSWORD_FIELD_SUGGESTIONS_TITLE -IDS_AUTOFILL_SCAN_CREDIT_CARD -IDS_AUTOFILL_WARNING_FORM_DISABLED -IDS_AUTOFILL_WARNING_INSECURE_CONNECTION -IDS_AUTOLOGIN_INFOBAR_CANCEL_BUTTON -IDS_AUTOLOGIN_INFOBAR_MESSAGE -IDS_AUTOLOGIN_INFOBAR_OK_BUTTON -IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT -IDS_BLOCK_INSECURE_CONTENT_BUTTON -IDS_BOOKMARK_ADD_EDITOR_TITLE -IDS_BOOKMARK_ALL_TABS_DIALOG_TITLE -IDS_BOOKMARK_BAR_FOLDER_NAME -IDS_BOOKMARK_BAR_MANAGED_FOLDER_DEFAULT_NAME -IDS_BOOKMARK_BAR_MANAGED_FOLDER_DOMAIN_NAME -IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME -IDS_BOOKMARK_BAR_OTHER_FOLDER_NAME -IDS_BOOKMARK_BAR_REDO -IDS_BOOKMARK_BAR_REDO_ADD -IDS_BOOKMARK_BAR_REDO_DELETE -IDS_BOOKMARK_BAR_REDO_EDIT -IDS_BOOKMARK_BAR_REDO_MOVE -IDS_BOOKMARK_BAR_REDO_REORDER -IDS_BOOKMARK_BAR_SUPERVISED_FOLDER_DEFAULT_NAME -IDS_BOOKMARK_BAR_UNDO -IDS_BOOKMARK_BAR_UNDO_ADD -IDS_BOOKMARK_BAR_UNDO_DELETE -IDS_BOOKMARK_BAR_UNDO_EDIT -IDS_BOOKMARK_BAR_UNDO_MOVE -IDS_BOOKMARK_BAR_UNDO_REORDER -IDS_BOOKMARK_BUBBLE_CHOOSER_ANOTHER_FOLDER -IDS_BOOKMARK_BUBBLE_REMOVE_BOOKMARK -IDS_BOOKMARK_EDITOR_CONFIRM_DELETE -IDS_BOOKMARK_EDITOR_NEW_FOLDER_NAME -IDS_BOOKMARK_EDITOR_TITLE -IDS_BOOKMARK_FOLDER_CHOOSER_TITLE -IDS_BOOKMARK_FOLDER_EDITOR_TITLE -IDS_BOOKMARK_FOLDER_EDITOR_WINDOW_TITLE -IDS_BOOKMARK_FOLDER_EDITOR_WINDOW_TITLE_NEW -IDS_BOOKMARK_MANAGER_FOLDER_SECTION -IDS_BOOKMARK_MANAGER_FOLDER_TITLE -IDS_BOOKMARK_MANAGER_NAME_INPUT_PLACE_HOLDER -IDS_BOOKMARK_MANAGER_REMOVE_TITLE -IDS_BOOKMARK_MANAGER_URL_INPUT_PLACE_HOLDER -IDS_BOOKMARK_NEW_FOLDER_BUTTON_TITLE -IDS_CANCEL -IDS_CERT_ERROR_AUTHORITY_INVALID_DESCRIPTION -IDS_CERT_ERROR_AUTHORITY_INVALID_DETAILS -IDS_CERT_ERROR_AUTHORITY_INVALID_EXTRA_INFO_2 -IDS_CERT_ERROR_AUTHORITY_INVALID_TITLE -IDS_CERT_ERROR_CHAIN_EXPIRED_DESCRIPTION -IDS_CERT_ERROR_CHAIN_EXPIRED_DETAILS -IDS_CERT_ERROR_COMMON_NAME_INVALID_DESCRIPTION -IDS_CERT_ERROR_COMMON_NAME_INVALID_DETAILS -IDS_CERT_ERROR_COMMON_NAME_INVALID_EXTRA_INFO_2 -IDS_CERT_ERROR_COMMON_NAME_INVALID_TITLE -IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION -IDS_CERT_ERROR_CONTAINS_ERRORS_DETAILS -IDS_CERT_ERROR_CONTAINS_ERRORS_EXTRA_INFO_2 -IDS_CERT_ERROR_CONTAINS_ERRORS_TITLE -IDS_CERT_ERROR_EXPIRED_DESCRIPTION -IDS_CERT_ERROR_EXPIRED_DETAILS -IDS_CERT_ERROR_EXPIRED_DETAILS_EXTRA_INFO_2 -IDS_CERT_ERROR_EXPIRED_TITLE -IDS_CERT_ERROR_EXTRA_INFO_1 -IDS_CERT_ERROR_EXTRA_INFO_TITLE -IDS_CERT_ERROR_INVALID_CERT_DESCRIPTION -IDS_CERT_ERROR_INVALID_CERT_DETAILS -IDS_CERT_ERROR_INVALID_CERT_EXTRA_INFO_2 -IDS_CERT_ERROR_INVALID_CERT_TITLE -IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DESCRIPTION -IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DETAILS -IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_TITLE -IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION -IDS_CERT_ERROR_NOT_YET_VALID_DETAILS -IDS_CERT_ERROR_NOT_YET_VALID_DETAILS_EXTRA_INFO_2 -IDS_CERT_ERROR_NOT_YET_VALID_TITLE -IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DESCRIPTION -IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_DETAILS -IDS_CERT_ERROR_NO_REVOCATION_MECHANISM_TITLE -IDS_CERT_ERROR_REVOKED_CERT_DESCRIPTION -IDS_CERT_ERROR_REVOKED_CERT_DETAILS -IDS_CERT_ERROR_REVOKED_CERT_EXTRA_INFO_2 -IDS_CERT_ERROR_REVOKED_CERT_TITLE -IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DESCRIPTION -IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_DETAILS -IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_TITLE -IDS_CERT_ERROR_UNKNOWN_ERROR_DESCRIPTION -IDS_CERT_ERROR_UNKNOWN_ERROR_DETAILS -IDS_CERT_ERROR_UNKNOWN_ERROR_TITLE -IDS_CERT_ERROR_WEAK_KEY_DESCRIPTION -IDS_CERT_ERROR_WEAK_KEY_DETAILS -IDS_CERT_ERROR_WEAK_KEY_EXTRA_INFO_2 -IDS_CERT_ERROR_WEAK_KEY_TITLE -IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DESCRIPTION -IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_DETAILS -IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_EXTRA_INFO_2 -IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_TITLE -IDS_CHROME_TO_DEVICE_PRINT_TO_PHONE -IDS_CHROME_TO_DEVICE_SNAPSHOTS -IDS_CLOSE -IDS_CONTEXTUAL_SEARCH_HEADER -IDS_CONTEXTUAL_SEARCH_PROMO_DESCRIPTION_1 -IDS_CONTEXTUAL_SEARCH_PROMO_DESCRIPTION_2 -IDS_CONTEXTUAL_SEARCH_PROMO_FEATURE_NAME -IDS_CONTEXTUAL_SEARCH_PROMO_OPTIN -IDS_CONTEXTUAL_SEARCH_PROMO_OPTOUT -IDS_COULDNT_OPEN_PROFILE_ERROR -IDS_CRASHES_BUG_LINK_LABEL -IDS_CRASHES_CRASH_COUNT_BANNER_FORMAT -IDS_CRASHES_CRASH_HEADER_FORMAT -IDS_CRASHES_CRASH_TIME_FORMAT -IDS_CRASHES_DISABLED_HEADER -IDS_CRASHES_DISABLED_MESSAGE -IDS_CRASHES_NO_CRASHES_MESSAGE -IDS_CRASHES_TITLE -IDS_CRASHES_UPLOAD_MESSAGE -IDS_DATA_REDUCTION_PROXY_BACK_BUTTON -IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_HEADING -IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_PRIMARY_PARAGRAPH -IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_SECONDARY_PARAGRAPH -IDS_DATA_REDUCTION_PROXY_CONTINUE_BUTTON -IDS_DATA_REDUCTION_PROXY_TITLE -IDS_DEFAULT_AVATAR_NAME_10 -IDS_DEFAULT_AVATAR_NAME_11 -IDS_DEFAULT_AVATAR_NAME_12 -IDS_DEFAULT_AVATAR_NAME_13 -IDS_DEFAULT_AVATAR_NAME_14 -IDS_DEFAULT_AVATAR_NAME_15 -IDS_DEFAULT_AVATAR_NAME_16 -IDS_DEFAULT_AVATAR_NAME_17 -IDS_DEFAULT_AVATAR_NAME_18 -IDS_DEFAULT_AVATAR_NAME_19 -IDS_DEFAULT_AVATAR_NAME_20 -IDS_DEFAULT_AVATAR_NAME_21 -IDS_DEFAULT_AVATAR_NAME_22 -IDS_DEFAULT_AVATAR_NAME_23 -IDS_DEFAULT_AVATAR_NAME_24 -IDS_DEFAULT_AVATAR_NAME_25 -IDS_DEFAULT_AVATAR_NAME_26 -IDS_DEFAULT_AVATAR_NAME_8 -IDS_DEFAULT_AVATAR_NAME_9 -IDS_DEFAULT_ENCODING -IDS_DEFAULT_PROFILE_NAME -IDS_DEFAULT_TAB_TITLE -IDS_DELETE -IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION -IDS_DISABLE_TOUCH_ADJUSTMENT_NAME -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 -IDS_DOM_DISTILLER_VIEWER_LOADING_TITLE -IDS_DOM_DISTILLER_VIEWER_NO_DATA_CONTENT -IDS_DOM_DISTILLER_VIEWER_NO_DATA_TITLE -IDS_DOM_DISTILLER_VIEWER_VIEW_ORIGINAL -IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD -IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD_FAILED -IDS_DOM_DISTILLER_WEBUI_ENTRY_URL -IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES -IDS_DOM_DISTILLER_WEBUI_REFRESH -IDS_DOM_DISTILLER_WEBUI_TITLE -IDS_DOM_DISTILLER_WEBUI_VIEW_URL -IDS_DOM_DISTILLER_WEBUI_VIEW_URL_FAILED -IDS_DONE -IDS_EASY_UNLOCK_SCREENLOCK_USER_POD_AUTH_VALUE -IDS_EDIT_FIND_MAC -IDS_EMPTY_KEYWORD_VALUE -IDS_ERRORPAGES_BUTTON_LESS -IDS_ERRORPAGES_BUTTON_MORE -IDS_ERRORPAGES_BUTTON_RELOAD -IDS_ERRORPAGES_BUTTON_SHOW_SAVED_COPY -IDS_ERRORPAGES_BUTTON_SHOW_SAVED_COPY_HELP -IDS_ERRORPAGES_DETAILS_ADDRESS_UNREACHABLE -IDS_ERRORPAGES_DETAILS_BAD_GATEWAY -IDS_ERRORPAGES_DETAILS_BAD_SSL_CLIENT_AUTH_CERT -IDS_ERRORPAGES_DETAILS_BLOCKED -IDS_ERRORPAGES_DETAILS_BLOCKED_BY_ADMINISTRATOR -IDS_ERRORPAGES_DETAILS_BLOCKED_ENROLLMENT_CHECK_PENDING -IDS_ERRORPAGES_DETAILS_CACHE_MISS -IDS_ERRORPAGES_DETAILS_CACHE_READ_FAILURE -IDS_ERRORPAGES_DETAILS_CONNECTION_CLOSED -IDS_ERRORPAGES_DETAILS_CONNECTION_FAILED -IDS_ERRORPAGES_DETAILS_CONNECTION_REFUSED -IDS_ERRORPAGES_DETAILS_CONNECTION_RESET -IDS_ERRORPAGES_DETAILS_DNS_PROBE_RUNNING -IDS_ERRORPAGES_DETAILS_DOWNLOAD_FILE_TYPE_ERROR -IDS_ERRORPAGES_DETAILS_EMPTY_RESPONSE -IDS_ERRORPAGES_DETAILS_FILE_ACCESS_DENIED -IDS_ERRORPAGES_DETAILS_FILE_NOT_FOUND -IDS_ERRORPAGES_DETAILS_FORBIDDEN -IDS_ERRORPAGES_DETAILS_GATEWAY_TIMEOUT -IDS_ERRORPAGES_DETAILS_GONE -IDS_ERRORPAGES_DETAILS_HTTP_VERSION_NOT_SUPPORTED -IDS_ERRORPAGES_DETAILS_ICANN_NAME_COLLISION -IDS_ERRORPAGES_DETAILS_INTERNAL_SERVER_ERROR -IDS_ERRORPAGES_DETAILS_INTERNET_DISCONNECTED -IDS_ERRORPAGES_DETAILS_NAME_NOT_RESOLVED -IDS_ERRORPAGES_DETAILS_NETWORK_ACCESS_DENIED -IDS_ERRORPAGES_DETAILS_NETWORK_CHANGED -IDS_ERRORPAGES_DETAILS_NETWORK_IO_SUSPENDED -IDS_ERRORPAGES_DETAILS_NOT_IMPLEMENTED -IDS_ERRORPAGES_DETAILS_PINNING_FAILURE -IDS_ERRORPAGES_DETAILS_PROXY_CONNECTION_FAILED -IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION -IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH -IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_LOCATION -IDS_ERRORPAGES_DETAILS_SERVICE_UNAVAILABLE -IDS_ERRORPAGES_DETAILS_SSL_FALLBACK_BEYOND_MINIMUM_VERSION -IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR -IDS_ERRORPAGES_DETAILS_SSL_VERSION_OR_CIPHER_MISMATCH -IDS_ERRORPAGES_DETAILS_TEMPORARILY_THROTTLED -IDS_ERRORPAGES_DETAILS_TIMED_OUT -IDS_ERRORPAGES_DETAILS_TOO_MANY_REDIRECTS -IDS_ERRORPAGES_DETAILS_UNKNOWN -IDS_ERRORPAGES_ERROR_CODE -IDS_ERRORPAGES_HEADING_ACCESS_DENIED -IDS_ERRORPAGES_HEADING_BAD_SSL_CLIENT_AUTH_CERT -IDS_ERRORPAGES_HEADING_BLOCKED -IDS_ERRORPAGES_HEADING_BLOCKED_BY_ADMINISTRATOR -IDS_ERRORPAGES_HEADING_CACHE_MISS -IDS_ERRORPAGES_HEADING_CACHE_READ_FAILURE -IDS_ERRORPAGES_HEADING_DOWNLOAD_FILE_TYPE_ERROR -IDS_ERRORPAGES_HEADING_DUPLICATE_HEADERS -IDS_ERRORPAGES_HEADING_EMPTY_RESPONSE -IDS_ERRORPAGES_HEADING_FILE_ACCESS_DENIED -IDS_ERRORPAGES_HEADING_HTTP_SERVER_ERROR -IDS_ERRORPAGES_HEADING_INTERNET_DISCONNECTED -IDS_ERRORPAGES_HEADING_NETWORK_ACCESS_DENIED -IDS_ERRORPAGES_HEADING_NETWORK_IO_SUSPENDED -IDS_ERRORPAGES_HEADING_NOT_AVAILABLE -IDS_ERRORPAGES_HEADING_NOT_FOUND -IDS_ERRORPAGES_HEADING_PINNING_FAILURE -IDS_ERRORPAGES_HEADING_PROXY_CONNECTION_FAILED -IDS_ERRORPAGES_HEADING_SSL_FALLBACK_BEYOND_MINIMUM_VERSION -IDS_ERRORPAGES_HEADING_SSL_PROTOCOL_ERROR -IDS_ERRORPAGES_HEADING_SSL_VERSION_OR_CIPHER_MISMATCH -IDS_ERRORPAGES_HEADING_TOO_MANY_REDIRECTS -IDS_ERRORPAGES_HEADING_WEAK_SERVER_EPHEMERAL_DH_KEY -IDS_ERRORPAGES_HTTP_POST_WARNING -IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY -IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER -IDS_ERRORPAGES_SUGGESTION_CONTACT_ADMINISTRATOR -IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG -IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG -IDS_ERRORPAGES_SUGGESTION_GOOGLE_SEARCH -IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY -IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION -IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG -IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM -IDS_ERRORPAGES_SUGGESTION_RELOAD -IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_BODY -IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_HEADER -IDS_ERRORPAGES_SUGGESTION_VIEW_POLICIES -IDS_ERRORPAGES_SUMMARY_ADDRESS_UNREACHABLE -IDS_ERRORPAGES_SUMMARY_BAD_GATEWAY -IDS_ERRORPAGES_SUMMARY_BAD_SSL_CLIENT_AUTH_CERT -IDS_ERRORPAGES_SUMMARY_BLOCKED -IDS_ERRORPAGES_SUMMARY_BLOCKED_BY_ADMINISTRATOR -IDS_ERRORPAGES_SUMMARY_BLOCKED_ENROLLMENT_CHECK_PENDING -IDS_ERRORPAGES_SUMMARY_CACHE_MISS -IDS_ERRORPAGES_SUMMARY_CACHE_READ_FAILURE -IDS_ERRORPAGES_SUMMARY_CONNECTION_REFUSED -IDS_ERRORPAGES_SUMMARY_CONNECTION_RESET -IDS_ERRORPAGES_SUMMARY_DNS_PROBE_RUNNING -IDS_ERRORPAGES_SUMMARY_DOWNLOAD_FILE_TYPE_ERROR -IDS_ERRORPAGES_SUMMARY_DUPLICATE_HEADERS -IDS_ERRORPAGES_SUMMARY_EMPTY_RESPONSE -IDS_ERRORPAGES_SUMMARY_FILE_ACCESS_DENIED -IDS_ERRORPAGES_SUMMARY_FORBIDDEN -IDS_ERRORPAGES_SUMMARY_GATEWAY_TIMEOUT -IDS_ERRORPAGES_SUMMARY_GONE -IDS_ERRORPAGES_SUMMARY_ICANN_NAME_COLLISION -IDS_ERRORPAGES_SUMMARY_INTERNAL_SERVER_ERROR -IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED -IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_INSTRUCTIONS_TEMPLATE -IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM -IDS_ERRORPAGES_SUMMARY_NAME_NOT_RESOLVED -IDS_ERRORPAGES_SUMMARY_NETWORK_ACCESS_DENIED -IDS_ERRORPAGES_SUMMARY_NETWORK_CHANGED -IDS_ERRORPAGES_SUMMARY_NETWORK_IO_SUSPENDED -IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE -IDS_ERRORPAGES_SUMMARY_NOT_FOUND -IDS_ERRORPAGES_SUMMARY_PINNING_FAILURE -IDS_ERRORPAGES_SUMMARY_PROXY_CONNECTION_FAILED -IDS_ERRORPAGES_SUMMARY_SERVICE_UNAVAILABLE -IDS_ERRORPAGES_SUMMARY_SSL_FALLBACK_BEYOND_MINIMUM_VERSION -IDS_ERRORPAGES_SUMMARY_SSL_PROTOCOL_ERROR -IDS_ERRORPAGES_SUMMARY_SSL_VERSION_OR_CIPHER_MISMATCH -IDS_ERRORPAGES_SUMMARY_TEMPORARILY_THROTTLED -IDS_ERRORPAGES_SUMMARY_TIMED_OUT -IDS_ERRORPAGES_SUMMARY_TOO_MANY_REDIRECTS -IDS_ERRORPAGES_SUMMARY_WEAK_SERVER_EPHEMERAL_DH_KEY -IDS_ERRORPAGES_SUMMARY_WEBSITE_CANNOT_HANDLE -IDS_ERRORPAGES_TITLE_ACCESS_DENIED -IDS_ERRORPAGES_TITLE_BLOCKED -IDS_ERRORPAGES_TITLE_LOAD_FAILED -IDS_ERRORPAGES_TITLE_NOT_AVAILABLE -IDS_ERRORPAGES_TITLE_NOT_FOUND -IDS_ERRORPAGE_NET_BUTTON_DETAILS -IDS_ERRORPAGE_NET_BUTTON_HIDE_DETAILS -IDS_EXTENSION_KEYWORD_COMMAND -IDS_FEEDBACK_REPORT_PAGE_TITLE -IDS_FEEDBACK_REPORT_URL_LABEL -IDS_FEEDBACK_SEND_REPORT -IDS_FEEDBACK_USER_EMAIL_LABEL -IDS_FIND_IN_PAGE_CLOSE_TOOLTIP -IDS_FIND_IN_PAGE_COUNT -IDS_FIND_IN_PAGE_NEXT_TOOLTIP -IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP -IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION -IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME -IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION -IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME -IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION -IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME -IDS_FLAGS_COMPOSITED_LAYER_BORDERS -IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION -IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION -IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI -IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME -IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION -IDS_FLAGS_CONFLICTS_CHECK_NAME -IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION -IDS_FLAGS_DEBUG_PACKED_APP_NAME -IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION -IDS_FLAGS_DEBUG_SHORTCUTS_NAME -IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION -IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE -IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME -IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT -IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL -IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI -IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION -IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE -IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME -IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT -IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL -IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI -IDS_FLAGS_DISABLE -IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION -IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME -IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION -IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME -IDS_FLAGS_DISABLE_BOOT_ANIMATION -IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION -IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION -IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME -IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION -IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME -IDS_FLAGS_DISABLE_PNACL_DESCRIPTION -IDS_FLAGS_DISABLE_PNACL_NAME -IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION -IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME -IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION -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_DEVTOOLS_EXPERIMENTS_DESCRIPTION -IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME -IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION -IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME -IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION -IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME -IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION -IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME -IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION -IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME -IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION -IDS_FLAGS_ENABLE_ICON_NTP_NAME -IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION -IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME -IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION -IDS_FLAGS_ENABLE_NACL_DEBUG_NAME -IDS_FLAGS_ENABLE_NACL_DESCRIPTION -IDS_FLAGS_ENABLE_NACL_NAME -IDS_FLAGS_ENABLE_PANELS_DESCRIPTION -IDS_FLAGS_ENABLE_PANELS_NAME -IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION -IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME -IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION -IDS_FLAGS_ENABLE_PINCH_SCALE_NAME -IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION -IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME -IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION -IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME -IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION -IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME -IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION -IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME -IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION -IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME -IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION -IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME -IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION -IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME -IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION -IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME -IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION -IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME -IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION -IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME -IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION -IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME -IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION -IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME -IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION -IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME -IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION -IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME -IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION -IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME -IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION -IDS_FLAGS_FORCE_HIGH_DPI_NAME -IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION -IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME -IDS_FLAGS_LONG_TITLE -IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION -IDS_FLAGS_NACL_DEBUG_MASK_NAME -IDS_FLAGS_NOT_AVAILABLE -IDS_FLAGS_NO_EXPERIMENTS_AVAILABLE -IDS_FLAGS_NO_UNSUPPORTED_EXPERIMENTS -IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION -IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME -IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION -IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME -IDS_FLAGS_RELAUNCH_BUTTON -IDS_FLAGS_RELAUNCH_NOTICE -IDS_FLAGS_RESET_ALL_BUTTON -IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION -IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME -IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION -IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME -IDS_FLAGS_SHOW_FPS_COUNTER -IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION -IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION -IDS_FLAGS_SHOW_TOUCH_HUD_NAME -IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION -IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME -IDS_FLAGS_SPELLCHECK_AUTOCORRECT -IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION -IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION -IDS_FLAGS_STACKED_TAB_STRIP_NAME -IDS_FLAGS_TABLE_TITLE -IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION -IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME -IDS_FLAGS_TOUCH_SCROLLING_MODE_ABSORB_TOUCHMOVE -IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION -IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME -IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE -IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL -IDS_FLAGS_UNSUPPORTED_TABLE_TITLE -IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION -IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME -IDS_FLAGS_WARNING_HEADER -IDS_FLAGS_WARNING_TEXT -IDS_FULLSCREEN -IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC -IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT -IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED -IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED -IDS_GROUP_BY_DOMAIN_LABEL -IDS_GUEST_PROFILE_NAME -IDS_HARMFUL_V3_EXPLANATION_PARAGRAPH -IDS_HARMFUL_V3_HEADING -IDS_HARMFUL_V3_PRIMARY_PARAGRAPH -IDS_HARMFUL_V3_PROCEED_PARAGRAPH -IDS_HISTORY_ACTION_MENU_DESCRIPTION -IDS_HISTORY_BLOCKED_VISIT_TEXT -IDS_HISTORY_BROWSERESULTS -IDS_HISTORY_CONTINUED -IDS_HISTORY_DATE_WITH_RELATIVE_TIME -IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON -IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING -IDS_HISTORY_FILTER_ALLOWED -IDS_HISTORY_FILTER_ALLOW_ITEMS -IDS_HISTORY_FILTER_BLOCKED -IDS_HISTORY_FILTER_BLOCK_ITEMS -IDS_HISTORY_HAS_SYNCED_RESULTS -IDS_HISTORY_INTERVAL -IDS_HISTORY_IN_CONTENT_PACK -IDS_HISTORY_LOADING -IDS_HISTORY_LOCK_BUTTON -IDS_HISTORY_MORE_FROM_SITE -IDS_HISTORY_NEWER -IDS_HISTORY_NEWEST -IDS_HISTORY_NO_RESULTS -IDS_HISTORY_NO_SEARCH_RESULTS -IDS_HISTORY_NO_SYNCED_RESULTS -IDS_HISTORY_NUMBER_VISITS -IDS_HISTORY_OLDER -IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG -IDS_HISTORY_OTHER_SESSIONS_COLLAPSE_SESSION -IDS_HISTORY_OTHER_SESSIONS_EXPAND_SESSION -IDS_HISTORY_OTHER_SESSIONS_OPEN_ALL -IDS_HISTORY_RANGE_ALL_TIME -IDS_HISTORY_RANGE_LABEL -IDS_HISTORY_RANGE_MONTH -IDS_HISTORY_RANGE_NEXT -IDS_HISTORY_RANGE_PREVIOUS -IDS_HISTORY_RANGE_TODAY -IDS_HISTORY_RANGE_WEEK -IDS_HISTORY_REMOVE_BOOKMARK -IDS_HISTORY_REMOVE_PAGE -IDS_HISTORY_REMOVE_SELECTED_ITEMS -IDS_HISTORY_SEARCHRESULTSFOR -IDS_HISTORY_SEARCH_BUTTON -IDS_HISTORY_TITLE -IDS_HISTORY_UNKNOWN_DEVICE -IDS_HISTORY_UNLOCK_BUTTON -IDS_HTTP_POST_WARNING -IDS_HTTP_POST_WARNING_RESEND -IDS_HTTP_POST_WARNING_TITLE -IDS_IMPORT_FROM_FIREFOX -IDS_IMPORT_FROM_ICEWEASEL -IDS_JAVASCRIPT_ALERT_DEFAULT_TITLE -IDS_JAVASCRIPT_ALERT_TITLE -IDS_JAVASCRIPT_MESSAGEBOX_DEFAULT_TITLE -IDS_JAVASCRIPT_MESSAGEBOX_TITLE -IDS_KEYWORD_SEARCH -IDS_LEARN_MORE -IDS_LEGACY_DEFAULT_PROFILE_NAME -IDS_LIBADDRESSINPUT_ADDRESS_LINE_1_LABEL -IDS_LIBADDRESSINPUT_AREA -IDS_LIBADDRESSINPUT_COUNTRY_OR_REGION_LABEL -IDS_LIBADDRESSINPUT_COUNTY -IDS_LIBADDRESSINPUT_DEPARTMENT -IDS_LIBADDRESSINPUT_DISTRICT -IDS_LIBADDRESSINPUT_DO_SI -IDS_LIBADDRESSINPUT_EMIRATE -IDS_LIBADDRESSINPUT_ISLAND -IDS_LIBADDRESSINPUT_LOCALITY_LABEL -IDS_LIBADDRESSINPUT_MISMATCHING_VALUE_POSTAL_CODE -IDS_LIBADDRESSINPUT_MISMATCHING_VALUE_POSTAL_CODE_URL -IDS_LIBADDRESSINPUT_MISMATCHING_VALUE_ZIP -IDS_LIBADDRESSINPUT_MISMATCHING_VALUE_ZIP_URL -IDS_LIBADDRESSINPUT_MISSING_REQUIRED_FIELD -IDS_LIBADDRESSINPUT_MISSING_REQUIRED_POSTAL_CODE_EXAMPLE -IDS_LIBADDRESSINPUT_MISSING_REQUIRED_POSTAL_CODE_EXAMPLE_AND_URL -IDS_LIBADDRESSINPUT_MISSING_REQUIRED_ZIP_CODE_EXAMPLE -IDS_LIBADDRESSINPUT_MISSING_REQUIRED_ZIP_CODE_EXAMPLE_AND_URL -IDS_LIBADDRESSINPUT_NEIGHBORHOOD -IDS_LIBADDRESSINPUT_OBLAST -IDS_LIBADDRESSINPUT_ORGANIZATION_LABEL -IDS_LIBADDRESSINPUT_PARISH -IDS_LIBADDRESSINPUT_PIN_CODE_LABEL -IDS_LIBADDRESSINPUT_POSTAL_CODE_LABEL -IDS_LIBADDRESSINPUT_POST_TOWN -IDS_LIBADDRESSINPUT_PO_BOX_FORBIDDEN_VALUE -IDS_LIBADDRESSINPUT_PREFECTURE -IDS_LIBADDRESSINPUT_PROVINCE -IDS_LIBADDRESSINPUT_RECIPIENT_LABEL -IDS_LIBADDRESSINPUT_STATE -IDS_LIBADDRESSINPUT_SUBURB -IDS_LIBADDRESSINPUT_UNKNOWN_VALUE -IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_POSTAL_CODE -IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_POSTAL_CODE_EXAMPLE -IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_POSTAL_CODE_EXAMPLE_AND_URL -IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_ZIP -IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_ZIP_CODE_EXAMPLE -IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_ZIP_CODE_EXAMPLE_AND_URL -IDS_LIBADDRESSINPUT_VILLAGE_TOWNSHIP -IDS_LIBADDRESSINPUT_ZIP_CODE_LABEL -IDS_LINK_FROM_CLIPBOARD -IDS_LOGIN_DIALOG_OK_BUTTON_LABEL -IDS_LOGIN_DIALOG_PASSWORD_FIELD -IDS_LOGIN_DIALOG_TITLE -IDS_LOGIN_DIALOG_USERNAME_FIELD -IDS_MALWARE_V3_ADVICE_HEADING -IDS_MALWARE_V3_EXPLANATION_PARAGRAPH -IDS_MALWARE_V3_EXPLANATION_PARAGRAPH_ADVICE -IDS_MALWARE_V3_EXPLANATION_PARAGRAPH_HISTORY -IDS_MALWARE_V3_EXPLANATION_PARAGRAPH_SUBRESOURCE -IDS_MALWARE_V3_EXPLANATION_PARAGRAPH_SUBRESOURCE_ADVICE -IDS_MALWARE_V3_EXPLANATION_PARAGRAPH_SUBRESOURCE_HISTORY -IDS_MALWARE_V3_HEADING -IDS_MALWARE_V3_PRIMARY_PARAGRAPH -IDS_MALWARE_V3_PROCEED_PARAGRAPH -IDS_MALWARE_V3_PROCEED_PARAGRAPH_NOT_RECOMMEND -IDS_MALWARE_V3_PROCEED_PARAGRAPH_SOCIAL -IDS_MANAGED_USER_AVATAR_LABEL -IDS_MIDI_SYSEX_INFOBAR_QUESTION -IDS_MIDI_SYSEX_PERMISSION_FRAGMENT -IDS_MOBILE_WELCOME_URL -IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL -IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL -IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG -IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION -IDS_NET_EXPORT_NO_EMAIL_ACCOUNTS_ALERT_MESSAGE -IDS_NET_EXPORT_NO_EMAIL_ACCOUNTS_ALERT_TITLE -IDS_NEW_INCOGNITO_WINDOW_MAC -IDS_NEW_NUMBERED_PROFILE_NAME -IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE -IDS_NEW_TAB_MOST_VISITED -IDS_NEW_TAB_RECENTLY_CLOSED -IDS_NEW_TAB_RESTORE_THUMBNAILS_SHORT_LINK -IDS_NEW_TAB_THUMBNAIL_REMOVED_NOTIFICATION -IDS_NEW_TAB_TITLE -IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE -IDS_NUMBERED_PROFILE_NAME -IDS_OK -IDS_OMNIBOX_EMPTY_HINT -IDS_ONE_CLICK_SIGNIN_CONFIRM_EMAIL_DIALOG_CANCEL_BUTTON -IDS_OPEN_TABS_NOTYETSYNCED -IDS_OPEN_TABS_PROMOCOMPUTER -IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY -IDS_OPTIONS_DISABLE_WEB_SERVICES -IDS_OPTIONS_ENABLE_LOGGING -IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE -IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON -IDS_OTHER_DEVICES_X_MORE -IDS_PAGEINFO_ADDRESS -IDS_PAGEINFO_CERT_INFO_BUTTON -IDS_PAGEINFO_PARTIAL_ADDRESS -IDS_PAGE_INFO_HELP_CENTER_LINK -IDS_PAGE_INFO_INTERNAL_PAGE -IDS_PAGE_INFO_SECURITY_BUTTON_ACCESSIBILITY_LABEL -IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM -IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT -IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR -IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING -IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK -IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS -IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS_AEAD -IDS_PAGE_INFO_SECURITY_TAB_FALLBACK_MESSAGE -IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY -IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY -IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME -IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT -IDS_PAGE_INFO_SECURITY_TAB_NO_REVOCATION_MECHANISM -IDS_PAGE_INFO_SECURITY_TAB_RENEGOTIATION_MESSAGE -IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_NO_CT -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_WEAK_ENCRYPTION_CONNECTION_TEXT -IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE -IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE -IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON -IDS_PASSWORD_MANAGER_EMPTY_LOGIN -IDS_PASSWORD_MANAGER_SAVE_BUTTON -IDS_PASSWORD_MANAGER_SAVE_PASSWORD_PROMPT -IDS_PAST_TIME_TODAY -IDS_PAST_TIME_YESTERDAY -IDS_PDF_INFOBAR_ALWAYS_USE_READER_BUTTON -IDS_PERMISSION_ALLOW -IDS_PERMISSION_DENY -IDS_PHISHING_V3_EXPLANATION_PARAGRAPH -IDS_PHISHING_V3_HEADING -IDS_PHISHING_V3_PRIMARY_PARAGRAPH -IDS_PHISHING_V3_PROCEED_PARAGRAPH -IDS_PLATFORM_LABEL -IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_ACCEPT_BUTTON -IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE -IDS_PLUGIN_NOT_SUPPORTED -IDS_POLICY_ASSOCIATION_STATE_ACTIVE -IDS_POLICY_ASSOCIATION_STATE_DEPROVISIONED -IDS_POLICY_ASSOCIATION_STATE_UNMANAGED -IDS_POLICY_DEFAULT_SEARCH_DISABLED -IDS_POLICY_DEPRECATED -IDS_POLICY_DM_STATUS_HTTP_STATUS_ERROR -IDS_POLICY_DM_STATUS_REQUEST_FAILED -IDS_POLICY_DM_STATUS_REQUEST_INVALID -IDS_POLICY_DM_STATUS_RESPONSE_DECODING_ERROR -IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING -IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED -IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT -IDS_POLICY_DM_STATUS_SERVICE_DEVICE_NOT_FOUND -IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH -IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER -IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED -IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID -IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES -IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND -IDS_POLICY_DM_STATUS_SUCCESS -IDS_POLICY_DM_STATUS_TEMPORARY_UNAVAILABLE -IDS_POLICY_DM_STATUS_UNKNOWN_ERROR -IDS_POLICY_FILTER_PLACEHOLDER -IDS_POLICY_HEADER_LEVEL -IDS_POLICY_HEADER_NAME -IDS_POLICY_HEADER_SCOPE -IDS_POLICY_HEADER_STATUS -IDS_POLICY_HEADER_VALUE -IDS_POLICY_HIDE_EXPANDED_VALUE -IDS_POLICY_INVALID_BOOKMARK -IDS_POLICY_INVALID_PROXY_MODE_ERROR -IDS_POLICY_INVALID_SEARCH_URL_ERROR -IDS_POLICY_LABEL_ASSET_ID -IDS_POLICY_LABEL_CLIENT_ID -IDS_POLICY_LABEL_DIRECTORY_API_ID -IDS_POLICY_LABEL_DOMAIN -IDS_POLICY_LABEL_LOCATION -IDS_POLICY_LABEL_REFRESH_INTERVAL -IDS_POLICY_LABEL_STATUS -IDS_POLICY_LABEL_TIME_SINCE_LAST_REFRESH -IDS_POLICY_LABEL_USERNAME -IDS_POLICY_LEVEL_ERROR -IDS_POLICY_LEVEL_MANDATORY -IDS_POLICY_LEVEL_RECOMMENDED -IDS_POLICY_LIST_ENTRY_ERROR -IDS_POLICY_NEVER_FETCHED -IDS_POLICY_NOT_SPECIFIED -IDS_POLICY_NOT_SPECIFIED_ERROR -IDS_POLICY_NO_POLICIES_SET -IDS_POLICY_OK -IDS_POLICY_OUT_OF_RANGE_ERROR -IDS_POLICY_OVERRIDDEN -IDS_POLICY_PROXY_BOTH_SPECIFIED_ERROR -IDS_POLICY_PROXY_MODE_AUTO_DETECT_ERROR -IDS_POLICY_PROXY_MODE_DISABLED_ERROR -IDS_POLICY_PROXY_MODE_FIXED_SERVERS_ERROR -IDS_POLICY_PROXY_MODE_PAC_URL_ERROR -IDS_POLICY_PROXY_MODE_SYSTEM_ERROR -IDS_POLICY_PROXY_NEITHER_SPECIFIED_ERROR -IDS_POLICY_RELOAD_POLICIES -IDS_POLICY_SCHEMA_VALIDATION_ERROR -IDS_POLICY_SCOPE_DEVICE -IDS_POLICY_SCOPE_USER -IDS_POLICY_SHOW_EXPANDED_VALUE -IDS_POLICY_SHOW_UNSET -IDS_POLICY_STATUS -IDS_POLICY_STATUS_DEVICE -IDS_POLICY_STATUS_USER -IDS_POLICY_STORE_STATUS_BAD_STATE -IDS_POLICY_STORE_STATUS_LOAD_ERROR -IDS_POLICY_STORE_STATUS_OK -IDS_POLICY_STORE_STATUS_PARSE_ERROR -IDS_POLICY_STORE_STATUS_SERIALIZE_ERROR -IDS_POLICY_STORE_STATUS_STORE_ERROR -IDS_POLICY_STORE_STATUS_UNKNOWN_ERROR -IDS_POLICY_STORE_STATUS_VALIDATION_ERROR -IDS_POLICY_SUBKEY_ERROR -IDS_POLICY_TITLE -IDS_POLICY_TYPE_ERROR -IDS_POLICY_UNKNOWN -IDS_POLICY_UNSET -IDS_POLICY_VALIDATION_BAD_INITIAL_SIGNATURE -IDS_POLICY_VALIDATION_BAD_KEY_VERIFICATION_SIGNATURE -IDS_POLICY_VALIDATION_BAD_SIGNATURE -IDS_POLICY_VALIDATION_BAD_TIMESTAMP -IDS_POLICY_VALIDATION_BAD_USERNAME -IDS_POLICY_VALIDATION_ERROR_CODE_PRESENT -IDS_POLICY_VALIDATION_OK -IDS_POLICY_VALIDATION_PAYLOAD_PARSE_ERROR -IDS_POLICY_VALIDATION_POLICY_PARSE_ERROR -IDS_POLICY_VALIDATION_UNKNOWN_ERROR -IDS_POLICY_VALIDATION_WRONG_POLICY_TYPE -IDS_POLICY_VALIDATION_WRONG_SETTINGS_ENTITY_ID -IDS_POLICY_VALIDATION_WRONG_TOKEN -IDS_PREFERENCES_CORRUPT_ERROR -IDS_PREFERENCES_UNREADABLE_ERROR -IDS_PRINT -IDS_PRIVACY_POLICY_URL -IDS_PRODUCT_NAME -IDS_PROFILES_GUEST_PROFILE_NAME -IDS_PROFILES_LOCAL_PROFILE_STATE -IDS_PROFILE_TOO_NEW_ERROR -IDS_PUSH_MESSAGES_BUBBLE_FRAGMENT -IDS_PUSH_MESSAGES_BUBBLE_TEXT -IDS_PUSH_MESSAGES_PERMISSION_QUESTION -IDS_RECENT_TABS_MENU -IDS_SAD_TAB_MESSAGE -IDS_SAD_TAB_RELOAD_LABEL -IDS_SAD_TAB_TITLE -IDS_SAFEBROWSING_OVERRIDABLE_SAFETY_BUTTON -IDS_SAFEBROWSING_V3_CLOSE_DETAILS_BUTTON -IDS_SAFEBROWSING_V3_OPEN_DETAILS_BUTTON -IDS_SAFEBROWSING_V3_TITLE -IDS_SAFE_BROWSING_MALWARE_BACK_BUTTON -IDS_SAFE_BROWSING_MALWARE_BACK_HEADLINE -IDS_SAFE_BROWSING_MALWARE_COLLAB_HEADLINE -IDS_SAFE_BROWSING_MALWARE_DIAGNOSTIC_PAGE -IDS_SAFE_BROWSING_MALWARE_FEAR_HEADLINE -IDS_SAFE_BROWSING_MALWARE_HEADLINE -IDS_SAFE_BROWSING_MALWARE_LABEL -IDS_SAFE_BROWSING_MALWARE_QUESTION_HEADLINE -IDS_SAFE_BROWSING_MALWARE_REPORTING_AGREE -IDS_SAFE_BROWSING_MALWARE_TITLE -IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION1 -IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION1_SUBRESOURCE -IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION2 -IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION2_SUBRESOURCE -IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION3 -IDS_SAFE_BROWSING_MALWARE_V2_DETAILS -IDS_SAFE_BROWSING_MALWARE_V2_DETAILS_SUBRESOURCE -IDS_SAFE_BROWSING_MALWARE_V2_HEADLINE -IDS_SAFE_BROWSING_MALWARE_V2_HEADLINE_SUBRESOURCE -IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE -IDS_SAFE_BROWSING_MALWARE_V2_PROCEED_LINK -IDS_SAFE_BROWSING_MALWARE_V2_REPORTING_AGREE -IDS_SAFE_BROWSING_MALWARE_V2_SEE_MORE -IDS_SAFE_BROWSING_MALWARE_V2_TITLE -IDS_SAFE_BROWSING_MULTI_MALWARE_DESCRIPTION1 -IDS_SAFE_BROWSING_MULTI_MALWARE_DESCRIPTION2 -IDS_SAFE_BROWSING_MULTI_MALWARE_DESCRIPTION3 -IDS_SAFE_BROWSING_MULTI_MALWARE_DESCRIPTION_AGREE -IDS_SAFE_BROWSING_MULTI_MALWARE_PROCEED_BUTTON -IDS_SAFE_BROWSING_MULTI_PHISHING_DESCRIPTION1 -IDS_SAFE_BROWSING_MULTI_THREAT_DESCRIPTION1 -IDS_SAFE_BROWSING_MULTI_THREAT_DESCRIPTION2 -IDS_SAFE_BROWSING_MULTI_THREAT_TITLE -IDS_SAFE_BROWSING_PHISHING_BACK_HEADLINE -IDS_SAFE_BROWSING_PHISHING_COLLAB_HEADLINE -IDS_SAFE_BROWSING_PHISHING_FEAR_HEADLINE -IDS_SAFE_BROWSING_PHISHING_HEADLINE -IDS_SAFE_BROWSING_PHISHING_LABEL -IDS_SAFE_BROWSING_PHISHING_QUESTION_HEADLINE -IDS_SAFE_BROWSING_PHISHING_REPORT_ERROR -IDS_SAFE_BROWSING_PHISHING_TITLE -IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION1 -IDS_SAFE_BROWSING_PHISHING_V2_DESCRIPTION2 -IDS_SAFE_BROWSING_PHISHING_V2_HEADLINE -IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR -IDS_SAFE_BROWSING_PHISHING_V2_TITLE -IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE -IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE_V2 -IDS_SAFE_BROWSING_PRIVACY_POLICY_URL -IDS_SAVE -IDS_SEARCH_BOX_EMPTY_HINT -IDS_SECURE_CONNECTION_EV -IDS_SESSION_CRASHED_VIEW_MESSAGE -IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON -IDS_SETTINGS_SHOW_ADVANCED_SETTINGS -IDS_SHORT_PRODUCT_NAME -IDS_SHOW_HISTORY -IDS_SIGNED_IN_WITH_SYNC_DISABLED -IDS_SIGNED_IN_WITH_SYNC_SUPPRESSED -IDS_SIGNIN_ERROR_BUBBLE_VIEW_TITLE -IDS_SINGLE_PROFILE_DISPLAY_NAME -IDS_SSL_CLOCK_ERROR -IDS_SSL_CLOCK_ERROR_EXPLANATION -IDS_SSL_NONOVERRIDABLE_HSTS -IDS_SSL_NONOVERRIDABLE_INVALID -IDS_SSL_NONOVERRIDABLE_MORE -IDS_SSL_NONOVERRIDABLE_MORE_INVALID_SP3 -IDS_SSL_NONOVERRIDABLE_PINNED -IDS_SSL_NONOVERRIDABLE_REVOKED -IDS_SSL_OVERRIDABLE_PRIMARY_PARAGRAPH -IDS_SSL_OVERRIDABLE_PROCEED_LINK_TEXT -IDS_SSL_OVERRIDABLE_PROCEED_PARAGRAPH -IDS_SSL_OVERRIDABLE_SAFETY_BUTTON -IDS_SSL_OVERRIDABLE_TITLE -IDS_SSL_RELOAD -IDS_SSL_V2_CLOCK_AHEAD_HEADING -IDS_SSL_V2_CLOCK_BEHIND_HEADING -IDS_SSL_V2_CLOCK_PRIMARY_PARAGRAPH -IDS_SSL_V2_CLOCK_TITLE -IDS_SSL_V2_CLOCK_UPDATE_DATE_AND_TIME -IDS_SSL_V2_CLOSE_DETAILS_BUTTON -IDS_SSL_V2_HEADING -IDS_SSL_V2_OPEN_DETAILS_BUTTON -IDS_SSL_V2_PRIMARY_PARAGRAPH -IDS_SSL_V2_TITLE -IDS_STARS_PROMO_LABEL_IOS -IDS_SUPERVISED_USER_AVATAR_LABEL -IDS_SUPERVISED_USER_NEW_AVATAR_LABEL -IDS_SYNC_ACCOUNT_DETAILS_NOT_ENTERED -IDS_SYNC_ACCOUNT_SYNCING_TO_USER -IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK -IDS_SYNC_AUTHENTICATING_LABEL -IDS_SYNC_BASIC_ENCRYPTION_DATA -IDS_SYNC_CLEAR_USER_DATA -IDS_SYNC_CONFIGURE_ENCRYPTION -IDS_SYNC_DATATYPE_AUTOFILL -IDS_SYNC_DATATYPE_BOOKMARKS -IDS_SYNC_DATATYPE_PASSWORDS -IDS_SYNC_DATATYPE_PREFERENCES -IDS_SYNC_DATATYPE_TABS -IDS_SYNC_DATATYPE_TYPED_URLS -IDS_SYNC_EMPTY_PASSPHRASE_ERROR -IDS_SYNC_ENABLE_SYNC_ON_ACCOUNT -IDS_SYNC_ENCRYPTION_SECTION_TITLE -IDS_SYNC_ENTER_GOOGLE_PASSPHRASE_BODY -IDS_SYNC_ENTER_PASSPHRASE_BODY -IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE -IDS_SYNC_ENTER_PASSPHRASE_TITLE -IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE -IDS_SYNC_ERROR_SIGNING_IN -IDS_SYNC_FULL_ENCRYPTION_DATA -IDS_SYNC_INVALID_USER_CREDENTIALS -IDS_SYNC_LOGIN_INFO_OUT_OF_DATE -IDS_SYNC_LOGIN_SETTING_UP -IDS_SYNC_MENU_PRE_SYNCED_LABEL -IDS_SYNC_MENU_SYNCED_LABEL -IDS_SYNC_NTP_PASSWORD_ENABLE -IDS_SYNC_NTP_PASSWORD_PROMO -IDS_SYNC_NTP_PASSWORD_PROMO, -IDS_SYNC_NTP_SETUP_IN_PROGRESS -IDS_SYNC_OPTIONS_GROUP_NAME -IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE -IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_ACCEPT -IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE -IDS_SYNC_PASSPHRASE_ERROR_WRENCH_MENU_ITEM -IDS_SYNC_PASSPHRASE_LABEL -IDS_SYNC_PASSPHRASE_MISMATCH_ERROR -IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_POSTFIX -IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_PREFIX -IDS_SYNC_PASSWORD_SYNC_ATTENTION -IDS_SYNC_PROMO_NTP_BUBBLE_MESSAGE -IDS_SYNC_PROMO_TAB_TITLE -IDS_SYNC_RELOGIN_LINK_LABEL -IDS_SYNC_SERVER_IS_UNREACHABLE -IDS_SYNC_SERVICE_UNAVAILABLE -IDS_SYNC_SETUP_ERROR -IDS_SYNC_SIGN_IN_ERROR_BUBBLE_VIEW_ACCEPT -IDS_SYNC_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE -IDS_SYNC_SIGN_IN_ERROR_WRENCH_MENU_ITEM -IDS_SYNC_START_SYNC_BUTTON_LABEL -IDS_SYNC_STATUS_UNRECOVERABLE_ERROR -IDS_SYNC_STOP_AND_RESTART_SYNC -IDS_SYNC_TIME_JUST_NOW -IDS_SYNC_TIME_NEVER -IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_ACCEPT -IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE -IDS_SYNC_UNRECOVERABLE_ERROR_HELP_URL -IDS_SYNC_UPGRADE_CLIENT -IDS_SYSTEM_FLAGS_OWNER_ONLY -IDS_TERMS_HTML -IDS_TIME_DAYS -IDS_TIME_DAYS_1ST -IDS_TIME_ELAPSED_DAYS -IDS_TIME_ELAPSED_HOURS -IDS_TIME_ELAPSED_MINS -IDS_TIME_ELAPSED_SECS -IDS_TIME_HOURS -IDS_TIME_HOURS_1ST -IDS_TIME_HOURS_2ND -IDS_TIME_LONG_MINS -IDS_TIME_LONG_MINS_1ST -IDS_TIME_LONG_MINS_2ND -IDS_TIME_LONG_SECS -IDS_TIME_LONG_SECS_2ND -IDS_TIME_MINS -IDS_TIME_REMAINING_DAYS -IDS_TIME_REMAINING_HOURS -IDS_TIME_REMAINING_LONG_MINS -IDS_TIME_REMAINING_LONG_SECS -IDS_TIME_REMAINING_MINS -IDS_TIME_REMAINING_SECS -IDS_TIME_SECS -IDS_TOOLTIP_STAR -IDS_TOUCH_EVENTS_DESCRIPTION -IDS_TOUCH_EVENTS_NAME -IDS_TRANSLATE_INFOBAR_ACCEPT -IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE -IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE_AUTODETERMINED_SOURCE_LANGUAGE -IDS_TRANSLATE_INFOBAR_ALWAYS_TRANSLATE -IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE -IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE_IOS -IDS_TRANSLATE_INFOBAR_DENY -IDS_TRANSLATE_INFOBAR_ERROR_CANT_CONNECT -IDS_TRANSLATE_INFOBAR_ERROR_CANT_TRANSLATE -IDS_TRANSLATE_INFOBAR_ERROR_SAME_LANGUAGE -IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS -IDS_TRANSLATE_INFOBAR_NEVER_TRANSLATE -IDS_TRANSLATE_INFOBAR_OPTIONS_ABOUT -IDS_TRANSLATE_INFOBAR_OPTIONS_ALWAYS -IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_LANG -IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_SITE -IDS_TRANSLATE_INFOBAR_OPTIONS_REPORT_ERROR -IDS_TRANSLATE_INFOBAR_RETRY -IDS_TRANSLATE_INFOBAR_REVERT -IDS_TRANSLATE_INFOBAR_TRANSLATING_TO -IDS_TRANSLATE_INFOBAR_UNKNOWN_PAGE_LANGUAGE -IDS_TRANSLATE_INFOBAR_UNSUPPORTED_PAGE_LANGUAGE -IDS_UPGRADE_AVAILABLE -IDS_UPGRADE_AVAILABLE_BUTTON -IDS_WEB_FONT_FAMILY -IDS_WEB_FONT_SIZE diff --git a/engine/src/flutter/build/json_schema_api.gni b/engine/src/flutter/build/json_schema_api.gni deleted file mode 100644 index e1c2d33409..0000000000 --- a/engine/src/flutter/build/json_schema_api.gni +++ /dev/null @@ -1,242 +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. - -# Defines a static library corresponding to the output of schema compiler tools -# over a set of extensions API schemas (IDL or JSON format.) The library target -# has implicit hard dependencies on all schema files listed by the invoker and -# is itself a hard dependency. -# -# Invocations of this template may use the following variables: -# -# sources [required] A list of schema files to be compiled. -# -# root_namespace [required] -# A Python string substituion pattern used to generate the C++ -# namespace for each API. Use %(namespace)s to replace with the API -# namespace, like "toplevel::%(namespace)s_api". -# -# schema_include_rules [optional] -# A list of paths to include when searching for referenced objects, -# with the namespace separated by a :. -# Example: -# [ '/foo/bar:Foo::Bar::%(namespace)s' ] -# -# schemas [optional, default = false] -# Boolean indicating if the schema files should be generated. -# -# bundle [optional, default = false] -# Boolean indicating if the schema bundle files should be generated. -# -# bundle_registration [optional, default = false] -# Boolean indicating if the API registration bundle files should be generated. -# -# impl_dir [required if bundle_registration = true, otherwise unused] -# The path containing C++ implementations of API functions. This path is -# used as the root path when looking for {schema}/{schema}_api.h headers -# when generating API registration bundles. Such headers, if found, are -# automatically included by the generated code. -# -# uncompiled_sources [optional, only used when bundle = true or -# bundle_registration = true] -# A list of schema files which should not be compiled, but which should still -# be processed for API bundle generation. -# -# deps [optional] -# If any deps are specified they will be inherited by the static library -# target. -# -# generate_static_library [optional, defaults to false] -# Produces a static library instead of a source_set. -# -# The generated library target also inherits the visibility and output_name -# of its invoker. - -template("json_schema_api") { - assert(defined(invoker.sources), - "\"sources\" must be defined for the $target_name template.") - assert(defined(invoker.root_namespace), - "\"root_namespace\" must be defined for the $target_name template.") - - schemas = defined(invoker.schemas) && invoker.schemas - bundle = defined(invoker.bundle) && invoker.bundle - bundle_registration = - defined(invoker.bundle_registration) && invoker.bundle_registration - - schema_include_rules = "" - if (defined(invoker.schema_include_rules)) { - schema_include_rules = invoker.schema_include_rules - } - - # Keep a copy of the target_name here since it will be trampled - # in nested targets. - target_visibility = [ ":$target_name" ] - - generated_config_name = target_name + "_generated_config" - config(generated_config_name) { - include_dirs = [ root_gen_dir ] - visibility = target_visibility - } - - root_namespace = invoker.root_namespace - - compiler_root = "//tools/json_schema_compiler" - compiler_script = "$compiler_root/compiler.py" - compiler_sources = [ - "$compiler_root/cc_generator.py", - "$compiler_root/code.py", - "$compiler_root/compiler.py", - "$compiler_root/cpp_generator.py", - "$compiler_root/cpp_type_generator.py", - "$compiler_root/cpp_util.py", - "$compiler_root/h_generator.py", - "$compiler_root/idl_schema.py", - "$compiler_root/model.py", - "$compiler_root/util_cc_helper.py", - ] - - if (schemas) { - schema_generator_name = target_name + "_schema_generator" - action_foreach(schema_generator_name) { - script = compiler_script - sources = invoker.sources - inputs = compiler_sources - outputs = [ - "$target_gen_dir/{{source_name_part}}.cc", - "$target_gen_dir/{{source_name_part}}.h", - ] - args = [ - "{{source}}", - "--root=" + rebase_path("//", root_build_dir), - "--destdir=" + rebase_path(root_gen_dir, root_build_dir), - "--namespace=$root_namespace", - "--generator=cpp", - "--include-rules=$schema_include_rules", - ] - - if (defined(invoker.visibility)) { - # If visibility is restricted, add our own target to it. - visibility = invoker.visibility + target_visibility - } - } - } - - if (bundle) { - uncompiled_sources = [] - if (defined(invoker.uncompiled_sources)) { - uncompiled_sources = invoker.uncompiled_sources - } - - bundle_generator_schema_name = target_name + "_bundle_generator_schema" - action(bundle_generator_schema_name) { - script = compiler_script - inputs = compiler_sources + invoker.sources + uncompiled_sources - outputs = [ - "$target_gen_dir/generated_schemas.cc", - "$target_gen_dir/generated_schemas.h", - ] - args = [ - "--root=" + rebase_path("//", root_build_dir), - "--destdir=" + rebase_path(root_gen_dir, root_build_dir), - "--namespace=$root_namespace", - "--generator=cpp-bundle-schema", - "--include-rules=$schema_include_rules", - ] + rebase_path(invoker.sources, root_build_dir) + - rebase_path(uncompiled_sources, root_build_dir) - } - } - - if (bundle_registration) { - uncompiled_sources = [] - if (defined(invoker.uncompiled_sources)) { - uncompiled_sources = invoker.uncompiled_sources - } - - assert(defined(invoker.impl_dir), - "\"impl_dir\" must be defined for the $target_name template.") - - # Child directory inside the generated file tree. - gen_child_dir = rebase_path(invoker.impl_dir, "//") - - bundle_generator_registration_name = - target_name + "_bundle_generator_registration" - action(bundle_generator_registration_name) { - script = compiler_script - inputs = compiler_sources + invoker.sources + uncompiled_sources - outputs = [ - "$root_gen_dir/$gen_child_dir/generated_api_registration.cc", - "$root_gen_dir/$gen_child_dir/generated_api_registration.h", - ] - args = [ - "--root=" + rebase_path("//", root_build_dir), - "--destdir=" + rebase_path(root_gen_dir, root_build_dir), - "--namespace=$root_namespace", - "--generator=cpp-bundle-registration", - "--impl-dir=$gen_child_dir", - "--include-rules=$schema_include_rules", - ] + rebase_path(invoker.sources, root_build_dir) + - rebase_path(uncompiled_sources, root_build_dir) - } - } - - # Compute the contents of the library/source set. - lib_sources = invoker.sources - lib_deps = [] - lib_public_deps = [] - lib_extra_configs = [] - - if (schemas) { - lib_sources += get_target_outputs(":$schema_generator_name") - lib_public_deps += [ ":$schema_generator_name" ] - lib_deps += [ "//tools/json_schema_compiler:generated_api_util" ] - lib_extra_configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - } - - if (bundle) { - lib_sources += get_target_outputs(":$bundle_generator_schema_name") - lib_deps += [ ":$bundle_generator_schema_name" ] - } - - if (bundle_registration) { - lib_sources += get_target_outputs(":$bundle_generator_registration_name") - lib_deps += [ ":$bundle_generator_registration_name" ] - } - - if (defined(invoker.deps)) { - lib_deps += invoker.deps - } - - # Generate either a static library or a source set. - if (defined(invoker.generate_static_library) && - invoker.generate_static_library) { - static_library(target_name) { - sources = lib_sources - deps = lib_deps - public_deps = lib_public_deps - configs += lib_extra_configs - public_configs = [ ":$generated_config_name" ] - - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - if (defined(invoker.output_name)) { - output_name = invoker.output_name - } - } - } else { - source_set(target_name) { - sources = lib_sources - deps = lib_deps - public_deps = lib_public_deps - configs += lib_extra_configs - public_configs = [ ":$generated_config_name" ] - - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - if (defined(invoker.output_name)) { - output_name = invoker.output_name - } - } - } -} diff --git a/engine/src/flutter/build/landmine_utils.py b/engine/src/flutter/build/landmine_utils.py deleted file mode 100644 index 6d18b6d0f3..0000000000 --- a/engine/src/flutter/build/landmine_utils.py +++ /dev/null @@ -1,120 +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. - - -import functools -import logging -import os -import shlex -import sys - - -def memoize(default=None): - """This decorator caches the return value of a parameterless pure function""" - def memoizer(func): - val = [] - @functools.wraps(func) - def inner(): - if not val: - ret = func() - val.append(ret if ret is not None else default) - if logging.getLogger().isEnabledFor(logging.INFO): - print '%s -> %r' % (func.__name__, val[0]) - return val[0] - return inner - return memoizer - - -@memoize() -def IsWindows(): - return sys.platform in ['win32', 'cygwin'] - - -@memoize() -def IsLinux(): - return sys.platform.startswith(('linux', 'freebsd', 'openbsd')) - - -@memoize() -def IsMac(): - return sys.platform == 'darwin' - - -@memoize() -def gyp_defines(): - """Parses and returns GYP_DEFINES env var as a dictionary.""" - return dict(arg.split('=', 1) - for arg in shlex.split(os.environ.get('GYP_DEFINES', ''))) - -@memoize() -def gyp_generator_flags(): - """Parses and returns GYP_GENERATOR_FLAGS env var as a dictionary.""" - return dict(arg.split('=', 1) - for arg in shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', ''))) - -@memoize() -def gyp_msvs_version(): - return os.environ.get('GYP_MSVS_VERSION', '') - -@memoize() -def distributor(): - """ - Returns a string which is the distributed build engine in use (if any). - Possible values: 'goma', 'ib', '' - """ - if 'goma' in gyp_defines(): - return 'goma' - elif IsWindows(): - if 'CHROME_HEADLESS' in os.environ: - return 'ib' # use (win and !goma and headless) as approximation of ib - - -@memoize() -def platform(): - """ - Returns a string representing the platform this build is targetted for. - Possible values: 'win', 'mac', 'linux', 'ios', 'android' - """ - if 'OS' in gyp_defines(): - if 'android' in gyp_defines()['OS']: - return 'android' - else: - return gyp_defines()['OS'] - elif IsWindows(): - return 'win' - elif IsLinux(): - return 'linux' - else: - return 'mac' - - -@memoize() -def builder(): - """ - Returns a string representing the build engine (not compiler) to use. - Possible values: 'make', 'ninja', 'xcode', 'msvs', 'scons' - """ - if 'GYP_GENERATORS' in os.environ: - # for simplicity, only support the first explicit generator - generator = os.environ['GYP_GENERATORS'].split(',')[0] - if generator.endswith('-android'): - return generator.split('-')[0] - elif generator.endswith('-ninja'): - return 'ninja' - else: - return generator - else: - if platform() == 'android': - # Good enough for now? Do any android bots use make? - return 'ninja' - elif platform() == 'ios': - return 'xcode' - elif IsWindows(): - return 'ninja' - elif IsLinux(): - return 'ninja' - elif IsMac(): - return 'ninja' - else: - assert False, 'Don\'t know what builder we\'re using!' diff --git a/engine/src/flutter/build/landmines.py b/engine/src/flutter/build/landmines.py deleted file mode 100755 index 0ea2b64058..0000000000 --- a/engine/src/flutter/build/landmines.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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 runs every build as the first hook (See DEPS). If it detects that -the build should be clobbered, it will delete the contents of the build -directory. - -A landmine is tripped when a builder checks out a different revision, and the -diff between the new landmines and the old ones is non-null. At this point, the -build is clobbered. -""" - -import difflib -import errno -import logging -import optparse -import os -import sys -import subprocess -import time - -import clobber -import landmine_utils - - -SRC_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) - - -def get_build_dir(build_tool, is_iphone=False): - """ - Returns output directory absolute path dependent on build and targets. - Examples: - r'c:\b\build\slave\win\build\src\out' - '/mnt/data/b/build/slave/linux/build/src/out' - '/b/build/slave/ios_rel_device/build/src/xcodebuild' - - Keep this function in sync with tools/build/scripts/slave/compile.py - """ - ret = None - if build_tool == 'xcode': - ret = os.path.join(SRC_DIR, 'xcodebuild') - elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios. - if 'CHROMIUM_OUT_DIR' in os.environ: - output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip() - if not output_dir: - raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!') - else: - output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out') - ret = os.path.join(SRC_DIR, output_dir) - else: - raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool) - return os.path.abspath(ret) - - -def clobber_if_necessary(new_landmines): - """Does the work of setting, planting, and triggering landmines.""" - out_dir = get_build_dir(landmine_utils.builder()) - landmines_path = os.path.normpath(os.path.join(out_dir, '..', '.landmines')) - try: - os.makedirs(out_dir) - except OSError as e: - if e.errno == errno.EEXIST: - pass - - if os.path.exists(landmines_path): - with open(landmines_path, 'r') as f: - old_landmines = f.readlines() - if old_landmines != new_landmines: - old_date = time.ctime(os.stat(landmines_path).st_ctime) - diff = difflib.unified_diff(old_landmines, new_landmines, - fromfile='old_landmines', tofile='new_landmines', - fromfiledate=old_date, tofiledate=time.ctime(), n=0) - sys.stdout.write('Clobbering due to:\n') - sys.stdout.writelines(diff) - - clobber.clobber(out_dir) - - # Save current set of landmines for next time. - with open(landmines_path, 'w') as f: - f.writelines(new_landmines) - - -def process_options(): - """Returns a list of landmine emitting scripts.""" - parser = optparse.OptionParser() - parser.add_option( - '-s', '--landmine-scripts', action='append', - default=[os.path.join(SRC_DIR, 'build', 'get_landmines.py')], - help='Path to the script which emits landmines to stdout. The target ' - 'is passed to this script via option -t. Note that an extra ' - 'script can be specified via an env var EXTRA_LANDMINES_SCRIPT.') - parser.add_option('-v', '--verbose', action='store_true', - default=('LANDMINES_VERBOSE' in os.environ), - help=('Emit some extra debugging information (default off). This option ' - 'is also enabled by the presence of a LANDMINES_VERBOSE environment ' - 'variable.')) - - options, args = parser.parse_args() - - if args: - parser.error('Unknown arguments %s' % args) - - logging.basicConfig( - level=logging.DEBUG if options.verbose else logging.ERROR) - - extra_script = os.environ.get('EXTRA_LANDMINES_SCRIPT') - if extra_script: - return options.landmine_scripts + [extra_script] - else: - return options.landmine_scripts - - -def main(): - landmine_scripts = process_options() - - if landmine_utils.builder() in ('dump_dependency_json', 'eclipse'): - return 0 - - - landmines = [] - for s in landmine_scripts: - proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE) - output, _ = proc.communicate() - landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()]) - clobber_if_necessary(landmines) - - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/ls.py b/engine/src/flutter/build/ls.py deleted file mode 100755 index 638c3bdeb7..0000000000 --- a/engine/src/flutter/build/ls.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/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. - -"""Recursively list files of the target directory. Ignores dot files.""" - -import argparse -import os -import sys - -def main(target_directory): - for root, dirs, files in os.walk(target_directory): - files = [f for f in files if not f[0] == '.'] - dirs[:] = [d for d in dirs if not d[0] == '.'] - for f in files: - path = os.path.join(root, f) - print path - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="Recursively list files of the target directory") - parser.add_argument("--target-directory", - dest="target_directory", - metavar="", - type=str, - required=True, - help="The target directory") - - args = parser.parse_args() - sys.exit(main(args.target_directory)) diff --git a/engine/src/flutter/build/module_args/dart.gni b/engine/src/flutter/build/module_args/dart.gni deleted file mode 100644 index ee6b038767..0000000000 --- a/engine/src/flutter/build/module_args/dart.gni +++ /dev/null @@ -1,6 +0,0 @@ -# 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 variable should point to the Dart SDK. -dart_sdk_root = "//third_party/dart-sdk/dart-sdk" diff --git a/engine/src/flutter/build/module_args/mojo.gni b/engine/src/flutter/build/module_args/mojo.gni deleted file mode 100644 index fee9114a79..0000000000 --- a/engine/src/flutter/build/module_args/mojo.gni +++ /dev/null @@ -1,16 +0,0 @@ -# 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 variable should point to the parent directory of the Mojo SDK. -mojo_sdk_root = "//" - -# To build the Mojo shell from source, set this variable to true. To use the -# prebuilt shell, omit this variable or set it to false. Note that the prebuilt -# shell will be used only on platforms for which it is published (currently -# Linux and Android). -mojo_build_mojo_shell_from_source = true - -# To build the network service from source, set this variable to true. To use -# the prebuilt network service, omit this variable or set it to false. -mojo_build_network_service_from_source = true diff --git a/engine/src/flutter/build/module_args/nacl.gni b/engine/src/flutter/build/module_args/nacl.gni deleted file mode 100644 index 61e0768e13..0000000000 --- a/engine/src/flutter/build/module_args/nacl.gni +++ /dev/null @@ -1,6 +0,0 @@ -# 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 deleted file mode 100644 index 8b5204c68e..0000000000 --- a/engine/src/flutter/build/module_args/v8.gni +++ /dev/null @@ -1,13 +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. - -if (is_android) { - import("//build/config/android/config.gni") -} - -# TODO(sky): nuke this. Temporary while sorting out http://crbug.com/465456. -enable_correct_v8_arch = false - -v8_use_external_startup_data = !(is_chromeos || is_win) -v8_extra_library_files = [] diff --git a/engine/src/flutter/build/output_dll_copy.rules b/engine/src/flutter/build/output_dll_copy.rules deleted file mode 100644 index c6e905131d..0000000000 --- a/engine/src/flutter/build/output_dll_copy.rules +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/engine/src/flutter/build/precompile.cc b/engine/src/flutter/build/precompile.cc deleted file mode 100644 index db1ef6dfe5..0000000000 --- a/engine/src/flutter/build/precompile.cc +++ /dev/null @@ -1,7 +0,0 @@ -// 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. - -// Precompiled header generator for Windows builds. No include is needed -// in this file as the PCH include is forced via the "Forced Include File" -// flag in the projects generated by GYP. diff --git a/engine/src/flutter/build/precompile.h b/engine/src/flutter/build/precompile.h deleted file mode 100644 index 32c2f11059..0000000000 --- a/engine/src/flutter/build/precompile.h +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2012 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. - -// Precompiled header for Chromium project on Windows, not used by -// other build configurations. Using precompiled headers speeds the -// build up significantly, around 1/4th on VS 2010 on an HP Z600 with 12 -// GB of memory. -// -// Numeric comments beside includes are the number of times they were -// included under src/chrome/browser on 2011/8/20, which was used as a -// baseline for deciding what to include in the PCH. Includes without -// a numeric comment are generally included at least 5 times. It may -// be possible to tweak the speed of the build by commenting out or -// removing some of the less frequently used headers. - -#if defined(BUILD_PRECOMPILE_H_) -#error You shouldn't include the precompiled header file more than once. -#endif - -#define BUILD_PRECOMPILE_H_ - -#define _USE_MATH_DEFINES - -// The Windows header needs to come before almost all the other -// Windows-specific headers. -#include -#include -#include -#include // 2 - -// Defines in atlbase.h cause conflicts; if we could figure out how -// this family of headers can be included in the PCH, it might speed -// up the build as several of them are used frequently. -/* -#include -#include -#include -#include // 2 -#include // 2 -#include // 2 -#include // 1 -#include // 1 -#include // 2 -*/ - -// Objbase.h and other files that rely on it bring in [ #define -// interface struct ] which can cause problems in a multi-platform -// build like Chrome's. #undef-ing it does not work as there are -// currently 118 targets that break if we do this, so leaving out of -// the precompiled header for now. -//#include // 2 -//#include // 3 -//#include // 2 -//#include // 2 -//#include // 1 -//#include // 1 -//#include // 2 -//#include // 1 -//#include // 1 -//#include // 2 -//#include // 2 -//#include // 2 -//#include // 1 -//#include // 1 -//#include // 4 -//#include // 2 - -// Caused other conflicts in addition to the 'interface' issue above. -// #include - -#include -#include -#include // 4 -#include -#include // 1 -#include -#include // 1 -#include -#include -#include -#include -#include // 4 - -#include -#include // 3 -#include -#include -#include // 3 -#include // 2 -#include -#include -#include // 3 -#include -#include // 2 -#include // 2 -#include -#include -#include -#include -#include // 2 -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/engine/src/flutter/build/protoc_java.py b/engine/src/flutter/build/protoc_java.py deleted file mode 100755 index 470667c1f4..0000000000 --- a/engine/src/flutter/build/protoc_java.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Generate java source files from protobuf files. - -This is a helper file for the genproto_java action in protoc_java.gypi. - -It performs the following steps: -1. Deletes all old sources (ensures deleted classes are not part of new jars). -2. Creates source directory. -3. Generates Java files using protoc (output into either --java-out-dir or - --srcjar). -4. Creates a new stamp file. -""" - -import os -import optparse -import shutil -import subprocess -import sys - -sys.path.append(os.path.join(os.path.dirname(__file__), "android", "gyp")) -from util import build_utils - -def main(argv): - parser = optparse.OptionParser() - build_utils.AddDepfileOption(parser) - parser.add_option("--protoc", help="Path to protoc binary.") - parser.add_option("--proto-path", help="Path to proto directory.") - parser.add_option("--java-out-dir", - help="Path to output directory for java files.") - parser.add_option("--srcjar", help="Path to output srcjar.") - parser.add_option("--stamp", help="File to touch on success.") - options, args = parser.parse_args(argv) - - build_utils.CheckOptions(options, parser, ['protoc', 'proto_path']) - if not options.java_out_dir and not options.srcjar: - print 'One of --java-out-dir or --srcjar must be specified.' - return 1 - - with build_utils.TempDir() as temp_dir: - # Specify arguments to the generator. - generator_args = ['optional_field_style=reftypes', - 'store_unknown_fields=true'] - out_arg = '--javanano_out=' + ','.join(generator_args) + ':' + temp_dir - # Generate Java files using protoc. - build_utils.CheckOutput( - [options.protoc, '--proto_path', options.proto_path, out_arg] - + args) - - if options.java_out_dir: - build_utils.DeleteDirectory(options.java_out_dir) - shutil.copytree(temp_dir, options.java_out_dir) - else: - build_utils.ZipDir(options.srcjar, temp_dir) - - if options.depfile: - build_utils.WriteDepfile( - options.depfile, - args + [options.protoc] + build_utils.GetPythonDependencies()) - - if options.stamp: - build_utils.Touch(options.stamp) - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/build/rmdir_and_stamp.py b/engine/src/flutter/build/rmdir_and_stamp.py deleted file mode 100755 index 6aa11f85fd..0000000000 --- a/engine/src/flutter/build/rmdir_and_stamp.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Wipes out a directory recursively and then touches a stamp file. - -This odd pairing of operations is used to support build scripts which -slurp up entire directories (e.g. build/android/javac.py when handling -generated sources) as inputs. - -The general pattern of use is: - - - Add a target which generates |gen_sources| into |out_path| from |inputs|. - - Include |stamp_file| as an input for that target or any of its rules which - generate files in |out_path|. - - Add an action which depends on |inputs| and which outputs |stamp_file|; - the action should run this script and pass |out_path| and |stamp_file| as - its arguments. - -The net result is that you will force |out_path| to be wiped and all -|gen_sources| to be regenerated any time any file in |inputs| changes. - -See //third_party/mojo/mojom_bindings_generator.gypi for an example use case. - -""" - -import errno -import os -import shutil -import sys - - -def Main(dst_dir, stamp_file): - try: - shutil.rmtree(os.path.normpath(dst_dir)) - except OSError as e: - # Ignore only "not found" errors. - if e.errno != errno.ENOENT: - raise e - with open(stamp_file, 'a'): - os.utime(stamp_file, None) - -if __name__ == '__main__': - sys.exit(Main(sys.argv[1], sys.argv[2])) diff --git a/engine/src/flutter/build/sanitize-mac-build-log.sed b/engine/src/flutter/build/sanitize-mac-build-log.sed deleted file mode 100644 index b4111c7b82..0000000000 --- a/engine/src/flutter/build/sanitize-mac-build-log.sed +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2012 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. - -# Use this sed script to reduce a Mac build log into something readable. - -# Drop uninformative lines. -/^distcc/d -/^Check dependencies/d -/^ setenv /d -/^ cd /d -/^make: Nothing to be done/d -/^$/d - -# Xcode prints a short "compiling foobar.o" line followed by the lengthy -# full command line. These deletions drop the command line. -\|^ /Developer/usr/bin/|d -\|^ /Developer/Library/PrivateFrameworks/DevToolsCore\.framework/|d -\|^ /Developer/Library/Xcode/Plug-ins/CoreBuildTasks\.xcplugin/|d - -# Drop any goma command lines as well. -\|^ .*/gomacc |d - -# And, if you've overridden something from your own bin directory, remove those -# full command lines, too. -\|^ /Users/[^/]*/bin/|d - -# There's already a nice note for bindings, don't need the command line. -\|^python scripts/rule_binding\.py|d - -# Shorten the "compiling foobar.o" line. -s|^Distributed-CompileC (.*) normal i386 c\+\+ com\.apple\.compilers\.gcc\.4_2| CC \1| -s|^CompileC (.*) normal i386 c\+\+ com\.apple\.compilers\.gcc\.4_2| CC \1| diff --git a/engine/src/flutter/build/sanitize-mac-build-log.sh b/engine/src/flutter/build/sanitize-mac-build-log.sh deleted file mode 100755 index df5a7af29e..0000000000 --- a/engine/src/flutter/build/sanitize-mac-build-log.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Copyright (c) 2010 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. -sed -r -f `dirname "${0}"`/`basename "${0}" sh`sed diff --git a/engine/src/flutter/build/sanitize-win-build-log.sed b/engine/src/flutter/build/sanitize-win-build-log.sed deleted file mode 100644 index c18e664c83..0000000000 --- a/engine/src/flutter/build/sanitize-win-build-log.sed +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2012 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. - -# Use this sed script to reduce a Windows build log into something -# machine-parsable. - -# Drop uninformative lines. -/The operation completed successfully\./d - -# Drop parallelization indicators on lines. -s/^[0-9]+>// - -# Shorten bindings generation lines -s/^.*"python".*idl_compiler\.py".*("[^"]+\.idl").*$/ idl_compiler \1/ diff --git a/engine/src/flutter/build/sanitize-win-build-log.sh b/engine/src/flutter/build/sanitize-win-build-log.sh deleted file mode 100755 index df5a7af29e..0000000000 --- a/engine/src/flutter/build/sanitize-win-build-log.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Copyright (c) 2010 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. -sed -r -f `dirname "${0}"`/`basename "${0}" sh`sed diff --git a/engine/src/flutter/build/sanitizers/BUILD.gn b/engine/src/flutter/build/sanitizers/BUILD.gn deleted file mode 100644 index 4f81f3ebad..0000000000 --- a/engine/src/flutter/build/sanitizers/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -if (is_linux && !is_chromeos) { - # TODO(GYP): Figure out which of these work and are needed on other platforms. - copy("copy_llvm_symbolizer") { - if (is_win) { - sources = [ - "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer.exe", - ] - outputs = [ - "$root_out_dir/llvm-symbolizer.exe", - ] - } else { - sources = [ - "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer", - ] - outputs = [ - "$root_out_dir/llvm-symbolizer", - ] - } - } -} diff --git a/engine/src/flutter/build/sanitizers/OWNERS b/engine/src/flutter/build/sanitizers/OWNERS deleted file mode 100644 index 0be2be890a..0000000000 --- a/engine/src/flutter/build/sanitizers/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -glider@chromium.org -earthdok@chromium.org -per-file tsan_suppressions.cc=* -per-file lsan_suppressions.cc=* diff --git a/engine/src/flutter/build/sanitizers/asan_suppressions.cc b/engine/src/flutter/build/sanitizers/asan_suppressions.cc deleted file mode 100644 index df94bc8950..0000000000 --- a/engine/src/flutter/build/sanitizers/asan_suppressions.cc +++ /dev/null @@ -1,23 +0,0 @@ -// 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 file contains the default suppressions for AddressSanitizer. -// It should only be used under very limited circumstances such as suppressing -// a report caused by an interceptor call in a system-installed library. - -#if defined(ADDRESS_SANITIZER) - -// Please make sure the code below declares a single string variable -// kASanDefaultSuppressions which contains ASan suppressions delimited by -// newlines. -char kASanDefaultSuppressions[] = -// http://crbug.com/178677 -"interceptor_via_lib:libsqlite3.so\n" - -// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. - -// End of suppressions. -; // Please keep this semicolon. - -#endif // ADDRESS_SANITIZER diff --git a/engine/src/flutter/build/sanitizers/lsan_suppressions.cc b/engine/src/flutter/build/sanitizers/lsan_suppressions.cc deleted file mode 100644 index e9a8b7eb47..0000000000 --- a/engine/src/flutter/build/sanitizers/lsan_suppressions.cc +++ /dev/null @@ -1,108 +0,0 @@ -// 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 file contains the default suppressions for LeakSanitizer. -// You can also pass additional suppressions via LSAN_OPTIONS: -// LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to -// http://dev.chromium.org/developers/testing/leaksanitizer for more info. - -#if defined(LEAK_SANITIZER) - -// Please make sure the code below declares a single string variable -// kLSanDefaultSuppressions which contains LSan suppressions delimited by -// newlines. See http://dev.chromium.org/developers/testing/leaksanitizer -// for the instructions on writing suppressions. -char kLSanDefaultSuppressions[] = -// Intentional leak used as sanity test for Valgrind/memcheck. -"leak:base::ToolsSanityTest_MemoryLeak_Test::TestBody\n" - -// ================ Leaks in third-party code ================ - -// False positives in libfontconfig. http://crbug.com/39050 -"leak:libfontconfig\n" - -// Leaks in Nvidia's libGL. -"leak:libGL.so\n" - -// A small leak in V8. http://crbug.com/46571#c9 -"leak:blink::V8GCController::collectGarbage\n" - -// TODO(earthdok): revisit NSS suppressions after the switch to BoringSSL -// NSS leaks in CertDatabaseNSSTest tests. http://crbug.com/51988 -"leak:net::NSSCertDatabase::ImportFromPKCS12\n" -"leak:net::NSSCertDatabase::ListCerts\n" -"leak:net::NSSCertDatabase::DeleteCertAndKey\n" -"leak:crypto::ScopedTestNSSDB::ScopedTestNSSDB\n" -// Another leak due to not shutting down NSS properly. http://crbug.com/124445 -"leak:error_get_my_stack\n" -// The NSS suppressions above will not fire when the fast stack unwinder is -// used, because it can't unwind through NSS libraries. Apply blanket -// suppressions for now. -"leak:libnssutil3\n" -"leak:libnspr4\n" -"leak:libnss3\n" -"leak:libplds4\n" -"leak:libnssckbi\n" - -// XRandR has several one time leaks. -"leak:libxrandr\n" - -// xrandr leak. http://crbug.com/119677 -"leak:XRRFindDisplay\n" - -// Suppressions for objects which can be owned by the V8 heap. This is a -// temporary workaround until LeakSanitizer supports the V8 heap. -// Those should only fire in (browser)tests. If you see one of them in Chrome, -// then it's a real leak. -// http://crbug.com/328552 -"leak:WTF::StringImpl::createUninitialized\n" -"leak:WTF::StringImpl::create8BitIfPossible\n" -"leak:blink::MouseEvent::create\n" -"leak:blink::*::*GetterCallback\n" -"leak:blink::CSSComputedStyleDeclaration::create\n" -"leak:blink::V8PerIsolateData::ensureDomInJSContext\n" -"leak:gin/object_template_builder.h\n" -"leak:gin::internal::Dispatcher\n" -"leak:blink::LocalDOMWindow::getComputedStyle\n" -// This should really be RemoteDOMWindow::create, but symbolization is -// weird in release builds. https://crbug.com/484760 -"leak:blink::RemoteFrame::create\n" -// Likewise, this should really be blink::WindowProxy::initializeIfNeeded. -// https://crbug.com/484760 -"leak:blink::WindowProxy::createContext\n" - -// http://crbug.com/356785 -"leak:content::RenderViewImplTest_DecideNavigationPolicyForWebUI_Test::TestBody\n" - -// ================ Leaks in Chromium code ================ -// PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS. -// Instead, commits that introduce memory leaks should be reverted. Suppressing -// the leak is acceptable in some cases when reverting is impossible, i.e. when -// enabling leak detection for the first time for a test target with -// pre-existing leaks. - -// Small test-only leak in ppapi_unittests. http://crbug.com/258113 -"leak:ppapi::proxy::PPP_Instance_Private_ProxyTest_PPPInstancePrivate_Test\n" - -// http://crbug.com/322671 -"leak:content::SpeechRecognitionBrowserTest::SetUpOnMainThread\n" - -// http://crbug.com/355641 -"leak:TrayAccessibilityTest\n" - -// http://crbug.com/354644 -"leak:CertificateViewerUITest::ShowModalCertificateViewer\n" - -// 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. -; // Please keep this semicolon. - -#endif // LEAK_SANITIZER diff --git a/engine/src/flutter/build/sanitizers/sanitizer_options.cc b/engine/src/flutter/build/sanitizers/sanitizer_options.cc deleted file mode 100644 index a659a22caa..0000000000 --- a/engine/src/flutter/build/sanitizers/sanitizer_options.cc +++ /dev/null @@ -1,164 +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. -// -// This file contains the default options for various compiler-based dynamic -// tools. - -#include "build/build_config.h" - -#if defined(ADDRESS_SANITIZER) && defined(OS_MACOSX) -#include // for _NSGetArgc, _NSGetArgv -#include -#endif // ADDRESS_SANITIZER && OS_MACOSX - -#if defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \ - defined(MEMORY_SANITIZER) || defined(THREAD_SANITIZER) -// Functions returning default options are declared weak in the tools' runtime -// libraries. To make the linker pick the strong replacements for those -// functions from this module, we explicitly force its inclusion by passing -// -Wl,-u_sanitizer_options_link_helper -extern "C" -void _sanitizer_options_link_helper() { } - -// The callbacks we define here will be called from the sanitizer runtime, but -// aren't referenced from the Chrome executable. We must ensure that those -// callbacks are not sanitizer-instrumented, and that they aren't stripped by -// the linker. -#define SANITIZER_HOOK_ATTRIBUTE \ - extern "C" \ - __attribute__((no_sanitize_address)) \ - __attribute__((no_sanitize_memory)) \ - __attribute__((no_sanitize_thread)) \ - __attribute__((visibility("default"))) \ - __attribute__((used)) -#endif - -#if defined(ADDRESS_SANITIZER) -// Default options for AddressSanitizer in various configurations: -// malloc_context_size=5 - limit the size of stack traces collected by ASan -// for each malloc/free by 5 frames. These stack traces tend to accumulate -// very fast in applications using JIT (v8 in Chrome's case), see -// https://code.google.com/p/address-sanitizer/issues/detail?id=177 -// symbolize=false - disable the in-process symbolization, which isn't 100% -// compatible with the existing sandboxes and doesn't make much sense for -// stripped official binaries. -// legacy_pthread_cond=1 - run in the libpthread 2.2.5 compatibility mode to -// work around libGL.so using the obsolete API, see -// http://crbug.com/341805. This may break if pthread_cond_t objects are -// accessed by both instrumented and non-instrumented binaries (e.g. if -// they reside in shared memory). This option is going to be deprecated in -// upstream AddressSanitizer and must not be used anywhere except the -// official builds. -// check_printf=1 - check the memory accesses to printf (and other formatted -// output routines) arguments. -// use_sigaltstack=1 - handle signals on an alternate signal stack. Useful -// for stack overflow detection. -// strip_path_prefix=Release/../../ - prefixes up to and including this -// substring will be stripped from source file paths in symbolized reports -// (if symbolize=true, which is set when running with LeakSanitizer). -// fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder -// to print error reports. V8 doesn't generate debug info for the JIT code, -// so the slow unwinder may not work properly. -// detect_stack_use_after_return=1 - use fake stack to delay the reuse of -// stack allocations and detect stack-use-after-return errors. -#if defined(OS_LINUX) -#if defined(GOOGLE_CHROME_BUILD) -// Default AddressSanitizer options for the official build. These do not affect -// tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official -// Chromium builds. -const char kAsanDefaultOptions[] = - "legacy_pthread_cond=1 malloc_context_size=5 " - "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 " - "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1"; -#else -// Default AddressSanitizer options for buildbots and non-official builds. -const char *kAsanDefaultOptions = - "symbolize=false check_printf=1 use_sigaltstack=1 " - "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " - "detect_stack_use_after_return=1 "; -#endif // GOOGLE_CHROME_BUILD - -#elif defined(OS_MACOSX) -const char *kAsanDefaultOptions = - "check_printf=1 use_sigaltstack=1 " - "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " - "detect_stack_use_after_return=1 detect_odr_violation=0 "; -static const char kNaClDefaultOptions[] = "handle_segv=0"; -static const char kNaClFlag[] = "--type=nacl-loader"; -#endif // OS_LINUX - -#if defined(OS_LINUX) || defined(OS_MACOSX) -SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_options() { -#if defined(OS_MACOSX) - char*** argvp = _NSGetArgv(); - int* argcp = _NSGetArgc(); - if (!argvp || !argcp) return kAsanDefaultOptions; - char** argv = *argvp; - int argc = *argcp; - for (int i = 0; i < argc; ++i) { - if (strcmp(argv[i], kNaClFlag) == 0) { - return kNaClDefaultOptions; - } - } -#endif - return kAsanDefaultOptions; -} - -extern "C" char kASanDefaultSuppressions[]; - -SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_suppressions() { - return kASanDefaultSuppressions; -} -#endif // OS_LINUX || OS_MACOSX -#endif // ADDRESS_SANITIZER - -#if defined(THREAD_SANITIZER) && defined(OS_LINUX) -// Default options for ThreadSanitizer in various configurations: -// detect_deadlocks=1 - enable deadlock (lock inversion) detection. -// second_deadlock_stack=1 - more verbose deadlock reports. -// report_signal_unsafe=0 - do not report async-signal-unsafe functions -// called from signal handlers. -// report_thread_leaks=0 - do not report unjoined threads at the end of -// the program execution. -// print_suppressions=1 - print the list of matched suppressions. -// history_size=7 - make the history buffer proportional to 2^7 (the maximum -// value) to keep more stack traces. -// strip_path_prefix=Release/../../ - prefixes up to and including this -// substring will be stripped from source file paths in symbolized reports. -const char kTsanDefaultOptions[] = - "detect_deadlocks=1 second_deadlock_stack=1 report_signal_unsafe=0 " - "report_thread_leaks=0 print_suppressions=1 history_size=7 " - "strip_path_prefix=Release/../../ "; - -SANITIZER_HOOK_ATTRIBUTE const char *__tsan_default_options() { - return kTsanDefaultOptions; -} - -extern "C" char kTSanDefaultSuppressions[]; - -SANITIZER_HOOK_ATTRIBUTE const char *__tsan_default_suppressions() { - return kTSanDefaultSuppressions; -} - -#endif // THREAD_SANITIZER && OS_LINUX - -#if defined(LEAK_SANITIZER) -// Default options for LeakSanitizer: -// print_suppressions=1 - print the list of matched suppressions. -// strip_path_prefix=Release/../../ - prefixes up to and including this -// substring will be stripped from source file paths in symbolized reports. -const char kLsanDefaultOptions[] = - "print_suppressions=1 strip_path_prefix=Release/../../ "; - -SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_options() { - return kLsanDefaultOptions; -} - -extern "C" char kLSanDefaultSuppressions[]; - -SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() { - return kLSanDefaultSuppressions; -} - -#endif // LEAK_SANITIZER diff --git a/engine/src/flutter/build/sanitizers/sanitizers.gyp b/engine/src/flutter/build/sanitizers/sanitizers.gyp deleted file mode 100644 index 91dab8a238..0000000000 --- a/engine/src/flutter/build/sanitizers/sanitizers.gyp +++ /dev/null @@ -1,92 +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. - -{ - 'targets': [ - { - 'target_name': 'sanitizer_options', - 'type': 'static_library', - 'toolsets': ['host', 'target'], - 'variables': { - # Every target is going to depend on sanitizer_options, so allow - # this one to depend on itself. - 'prune_self_dependency': 1, - # Do not let 'none' targets depend on this one, they don't need to. - 'link_dependency': 1, - }, - 'sources': [ - 'sanitizer_options.cc', - ], - 'include_dirs': [ - '../..', - ], - # Some targets may want to opt-out from ASan, TSan and MSan and link - # without the corresponding runtime libraries. We drop the libc++ - # dependency and omit the compiler flags to avoid bringing instrumented - # code to those targets. - 'conditions': [ - ['use_custom_libcxx==1', { - 'dependencies!': [ - '../../buildtools/third_party/libc++/libc++.gyp:libcxx_proxy', - ], - }], - ['tsan==1', { - 'sources': [ - 'tsan_suppressions.cc', - ], - }], - ['lsan==1', { - 'sources': [ - 'lsan_suppressions.cc', - ], - }], - ['asan==1', { - 'sources': [ - 'asan_suppressions.cc', - ], - }], - ], - 'cflags/': [ - ['exclude', '-fsanitize='], - ['exclude', '-fsanitize-'], - ], - 'direct_dependent_settings': { - 'ldflags': [ - '-Wl,-u_sanitizer_options_link_helper', - ], - 'target_conditions': [ - ['_type=="executable"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-u,__sanitizer_options_link_helper', - ], - }, - }], - ], - }, - }, - { - # Copy llvm-symbolizer to the product dir so that LKGR bots can package it. - 'target_name': 'llvm-symbolizer', - 'type': 'none', - 'variables': { - - # Path is relative to this GYP file. - 'llvm_symbolizer_path': - '../../third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer<(EXECUTABLE_SUFFIX)', - }, - 'conditions': [ - ['clang==1', { - 'copies': [{ - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '<(llvm_symbolizer_path)', - ], - }], - }], - ], - }, - ], -} - diff --git a/engine/src/flutter/build/sanitizers/tsan_suppressions.cc b/engine/src/flutter/build/sanitizers/tsan_suppressions.cc deleted file mode 100644 index fe64dd2c1d..0000000000 --- a/engine/src/flutter/build/sanitizers/tsan_suppressions.cc +++ /dev/null @@ -1,318 +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. - -// This file contains the default suppressions for ThreadSanitizer. -// You can also pass additional suppressions via TSAN_OPTIONS: -// TSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to -// http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2 -// for more info. - -#if defined(THREAD_SANITIZER) - -// Please make sure the code below declares a single string variable -// kTSanDefaultSuppressions contains TSan suppressions delimited by newlines. -// See http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2 -// for the instructions on writing suppressions. -char kTSanDefaultSuppressions[] = -// False positives in libflashplayer.so and libglib.so. Since we don't -// instrument them, we cannot reason about the synchronization in them. -"race:libflashplayer.so\n" -"race:libglib*.so\n" - -// Intentional race in ToolsSanityTest.DataRace in base_unittests. -"race:base/tools_sanity_unittest.cc\n" - -// Data race on WatchdogCounter [test-only]. -"race:base/threading/watchdog_unittest.cc\n" - -// Races in libevent, http://crbug.com/23244. -"race:libevent/event.c\n" - -// http://crbug.com/46840. -"race:base::HistogramSamples::IncreaseSum\n" -"race:base::Histogram::Add\n" -"race:base::HistogramSamples::Add\n" - -// http://crbug.com/84094. -"race:sqlite3StatusSet\n" -"race:pcache1EnforceMaxPage\n" -"race:pcache1AllocPage\n" - -// http://crbug.com/102327. -// Test-only race, won't fix. -"race:tracked_objects::ThreadData::ShutdownSingleThreadedCleanup\n" - -// http://crbug.com/115540 -"race:*GetCurrentThreadIdentifier\n" - -// http://crbug.com/120808 -"race:base/threading/watchdog.cc\n" - -// http://crbug.com/157586 -"race:third_party/libvpx/source/libvpx/vp8/decoder/threading.c\n" - -// http://crbug.com/158718 -"race:third_party/ffmpeg/libavcodec/pthread.c\n" -"race:third_party/ffmpeg/libavcodec/pthread_frame.c\n" -"race:third_party/ffmpeg/libavcodec/vp8.c\n" -"race:third_party/ffmpeg/libavutil/mem.c\n" -"race:*HashFrameForTesting\n" -"race:third_party/ffmpeg/libavcodec/h264pred.c\n" -"race:media::ReleaseData\n" - -// http://crbug.com/158922 -"race:third_party/libvpx/source/libvpx/vp8/encoder/*\n" -"race:third_party/libvpx/source/libvpx/vp9/encoder/*\n" - -// http://crbug.com/189177 -"race:thread_manager\n" -"race:v8::Locker::Initialize\n" - -// http://crbug.com/239359 -"race:media::TestInputCallback::OnData\n" - -// http://crbug.com/244368 -"race:skia::BeginPlatformPaint\n" - -// http://crbug.com/244385 -"race:unixTempFileDir\n" - -// http://crbug.com/244755 -"race:v8::internal::Zone::NewExpand\n" -"race:TooLateToEnableNow\n" -"race:adjust_segment_bytes_allocated\n" - -// http://crbug.com/244774 -"race:webrtc::RTPReceiver::ProcessBitrate\n" -"race:webrtc::RTPSender::ProcessBitrate\n" -"race:webrtc::VideoCodingModuleImpl::Decode\n" -"race:webrtc::RTPSender::SendOutgoingData\n" -"race:webrtc::VP8EncoderImpl::GetEncodedPartitions\n" -"race:webrtc::VP8EncoderImpl::Encode\n" -"race:webrtc::ViEEncoder::DeliverFrame\n" -"race:webrtc::vcm::VideoReceiver::Decode\n" -"race:webrtc::VCMReceiver::FrameForDecoding\n" -"race:*trace_event_unique_catstatic*\n" - -// http://crbug.com/244856 -"race:AutoPulseLock\n" - -// http://crbug.com/246968 -"race:webrtc::VideoCodingModuleImpl::RegisterPacketRequestCallback\n" - -// http://crbug.com/246974 -"race:content::GpuWatchdogThread::CheckArmed\n" - -// http://crbug.com/257396 -"race:base::trace_event::" - "TraceEventTestFixture_TraceSamplingScope_Test::TestBody\n" - -// http://crbug.com/258479 -"race:SamplingStateScope\n" -"race:g_trace_state\n" - -// http://crbug.com/258499 -"race:third_party/skia/include/core/SkRefCnt.h\n" - -// http://crbug.com/268924 -"race:base::g_power_monitor\n" -"race:base::PowerMonitor::PowerMonitor\n" -"race:base::PowerMonitor::AddObserver\n" -"race:base::PowerMonitor::RemoveObserver\n" -"race:base::PowerMonitor::IsOnBatteryPower\n" - -// http://crbug.com/258935 -"race:base::Thread::StopSoon\n" - -// http://crbug.com/268941 -"race:tracked_objects::ThreadData::tls_index_\n" - -// http://crbug.com/272095 -"race:base::g_top_manager\n" - -// http://crbug.com/273047 -"race:base::*::g_lazy_tls_ptr\n" -"race:IPC::SyncChannel::ReceivedSyncMsgQueue::lazy_tls_ptr_\n" - -// http://crbug.com/280466 -"race:content::WebRtcAudioCapturer::SetCapturerSource\n" - -// http://crbug.com/285242 -"race:media::PulseAudioOutputStream::SetVolume\n" - -// http://crbug.com/308590 -"race:CustomThreadWatcher::~CustomThreadWatcher\n" - -// http://crbug.com/310851 -"race:net::ProxyResolverV8Tracing::Job::~Job\n" - -// http://crbug.com/313726 -"race:CallbackWasCalled\n" - -// http://crbug.com/327330 -"race:PrepareTextureMailbox\n" -"race:cc::LayerTreeHost::PaintLayerContents\n" - -// http://crbug.com/476529 -"deadlock:cc::VideoLayerImpl::WillDraw\n" - -// http://crbug.com/328826 -"race:gLCDOrder\n" -"race:gLCDOrientation\n" - -// http://crbug.com/328868 -"race:PR_Lock\n" - -// http://crbug.com/329225 -"race:blink::currentTimeFunction\n" - -// http://crbug.com/329460 -"race:extensions::InfoMap::AddExtension\n" - -// http://crbug.com/333244 -"race:content::" - "VideoCaptureImplTest::MockVideoCaptureImpl::~MockVideoCaptureImpl\n" - -// http://crbug.com/333871 -"race:v8::internal::Interface::NewValue()::value_interface\n" -"race:v8::internal::IsMinusZero(double)::minus_zero\n" -"race:v8::internal::FastCloneShallowObjectStub::InitializeInterfaceDescriptor\n" -"race:v8::internal::KeyedLoadStubCompiler::registers\n" -"race:v8::internal::KeyedStoreStubCompiler::registers()::registers\n" -"race:v8::internal::KeyedLoadFastElementStub::InitializeInterfaceDescriptor\n" -"race:v8::internal::KeyedStoreFastElementStub::InitializeInterfaceDescriptor\n" -"race:v8::internal::LoadStubCompiler::registers\n" -"race:v8::internal::StoreStubCompiler::registers\n" -"race:v8::internal::HValue::LoopWeight\n" - -// http://crbug.com/334140 -"race:CommandLine::HasSwitch\n" -"race:CommandLine::current_process_commandline_\n" -"race:CommandLine::GetSwitchValueASCII\n" - -// http://crbug.com/338675 -"race:blink::s_platform\n" -"race:content::" - "RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl\n" - -// http://crbug.com/345240 -"race:WTF::s_shutdown\n" - -// http://crbug.com/345245 -"race:jingle_glue::JingleThreadWrapper::~JingleThreadWrapper\n" -"race:webrtc::voe::Channel::UpdatePacketDelay\n" -"race:webrtc::voe::Channel::GetDelayEstimate\n" -"race:webrtc::VCMCodecDataBase::DeregisterReceiveCodec\n" -"race:webrtc::GainControlImpl::set_stream_analog_level\n" - -// http://crbug.com/345618 -"race:WebCore::AudioDestinationNode::render\n" - -// http://crbug.com/345624 -"race:media::DataSource::set_host\n" - -// http://crbug.com/347534 -"race:v8::internal::V8::TearDown\n" - -// http://crbug.com/347538 -"race:sctp_timer_start\n" - -// http://crbug.com/347548 -"race:cricket::WebRtcVideoMediaChannel::MaybeResetVieSendCodec\n" -"race:cricket::WebRtcVideoMediaChannel::SetSendCodec\n" - -// http://crbug.com/347553 -"race:blink::WebString::reset\n" - -// http://crbug.com/348511 -"race:webrtc::acm1::AudioCodingModuleImpl::PlayoutData10Ms\n" - -// http://crbug.com/348982 -"race:cricket::P2PTransportChannel::OnConnectionDestroyed\n" -"race:cricket::P2PTransportChannel::AddConnection\n" - -// http://crbug.com/348984 -"race:sctp_express_handle_sack\n" -"race:system_base_info\n" - -// http://crbug.com/363999 -"race:v8::internal::EnterDebugger::*EnterDebugger\n" - -// https://code.google.com/p/v8/issues/detail?id=3143 -"race:v8::internal::FLAG_track_double_fields\n" - -// https://crbug.com/369257 -// TODO(mtklein): annotate properly and remove suppressions. -"race:SandboxIPCHandler::HandleFontMatchRequest\n" -"race:SkFontConfigInterfaceDirect::matchFamilyName\n" -"race:SkFontConfigInterface::GetSingletonDirectInterface\n" -"race:FcStrStaticName\n" - -// http://crbug.com/372807 -"deadlock:net::X509Certificate::CreateCertificateListFromBytes\n" -"deadlock:net::X509Certificate::CreateFromBytes\n" -"deadlock:net::SSLClientSocketNSS::Core::DoHandshakeLoop\n" - -// http://crbug.com/374135 -"race:media::AlsaWrapper::PcmWritei\n" - -// False positive in libc's tzset_internal, http://crbug.com/379738. -"race:tzset_internal\n" - -// http://crbug.com/380554 -"deadlock:g_type_add_interface_static\n" - -// http:://crbug.com/386385 -"race:content::AppCacheStorageImpl::DatabaseTask::CallRunCompleted\n" - -// http://crbug.com/388730 -"race:g_next_user_script_id\n" - -// http://crbug.com/389098 -"race:webrtc::voe::TransmitMixer::EnableStereoChannelSwapping\n" - -// http://crbug.com/397022 -"deadlock:" -"base::trace_event::TraceEventTestFixture_ThreadOnceBlocking_Test::TestBody\n" - -// http://crbug.com/415472 -"deadlock:base::trace_event::TraceLog::GetCategoryGroupEnabled\n" - -// http://crbug.com/490856 -"deadlock:content::TracingControllerImpl::SetEnabledOnFileThread\n" - -// http://crbug.com/417193 -// Suppressing both AudioContext.{cpp,h}. -"race:modules/webaudio/AudioContext\n" - -// https://code.google.com/p/skia/issues/detail?id=3294 -"race:SkBaseMutex::acquire\n" - -// https://crbug.com/430533 -"race:TileTaskGraphRunner::Run\n" - -// https://crbug.com/448203 -"race:blink::RemoteFrame::detach\n" - -// https://crbug.com/454652 -"race:net::NetworkChangeNotifier::SetTestNotificationsOnly\n" - -// https://crbug.com/455638 -"deadlock:dbus::Bus::ShutdownAndBlock\n" - -// 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" - -// https://crbug.com/454655 -"race:content::BrowserTestBase::PostTaskToInProcessRendererAndWait\n" - -// End of suppressions. -; // Please keep this semicolon. - -#endif // THREAD_SANITIZER diff --git a/engine/src/flutter/build/secondary/testing/gmock/BUILD.gn b/engine/src/flutter/build/secondary/testing/gmock/BUILD.gn deleted file mode 100644 index 4ec62245e6..0000000000 --- a/engine/src/flutter/build/secondary/testing/gmock/BUILD.gn +++ /dev/null @@ -1,54 +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. - -config("gmock_config") { - # Gmock headers need to be able to find themselves. - include_dirs = [ "include" ] -} - -static_library("gmock") { - # TODO http://crbug.com/412064 enable this flag all the time. - testonly = !is_component_build - sources = [ - # Sources based on files in r173 of gmock. - "include/gmock/gmock-actions.h", - "include/gmock/gmock-cardinalities.h", - "include/gmock/gmock-generated-actions.h", - "include/gmock/gmock-generated-function-mockers.h", - "include/gmock/gmock-generated-matchers.h", - "include/gmock/gmock-generated-nice-strict.h", - "include/gmock/gmock-matchers.h", - "include/gmock/gmock-spec-builders.h", - "include/gmock/gmock.h", - "include/gmock/internal/gmock-generated-internal-utils.h", - "include/gmock/internal/gmock-internal-utils.h", - "include/gmock/internal/gmock-port.h", - - #"src/gmock-all.cc", # Not needed by our build. - "src/gmock-cardinalities.cc", - "src/gmock-internal-utils.cc", - "src/gmock-matchers.cc", - "src/gmock-spec-builders.cc", - "src/gmock.cc", - ] - - # This project includes some stuff form gtest's guts. - include_dirs = [ "../gtest/include" ] - - public_configs = [ - ":gmock_config", - "//testing/gtest:gtest_config", - ] -} - -static_library("gmock_main") { - # TODO http://crbug.com/412064 enable this flag all the time. - testonly = !is_component_build - sources = [ - "src/gmock_main.cc", - ] - deps = [ - ":gmock", - ] -} diff --git a/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn b/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn deleted file mode 100644 index 073faec562..0000000000 --- a/engine/src/flutter/build/secondary/testing/gtest/BUILD.gn +++ /dev/null @@ -1,135 +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. - -config("gtest_config") { - visibility = [ - ":*", - "//testing/gmock:*", # gmock also shares this config. - ] - - defines = [ - # In order to allow regex matches in gtest to be shared between Windows - # and other systems, we tell gtest to always use it's internal engine. - "GTEST_HAS_POSIX_RE=0", - - # Chrome doesn't support / require C++11, yet. - "GTEST_LANG_CXX11=0", - ] - - # Gtest headers need to be able to find themselves. - include_dirs = [ "include" ] - - if (is_win) { - cflags = [ "/wd4800" ] # Unused variable warning. - } - - if (is_posix) { - defines += [ - # gtest isn't able to figure out when RTTI is disabled for gcc - # versions older than 4.3.2, and assumes it's enabled. Our Mac - # and Linux builds disable RTTI, and cannot guarantee that the - # compiler will be 4.3.2. or newer. The Mac, for example, uses - # 4.2.1 as that is the latest available on that platform. gtest - # must be instructed that RTTI is disabled here, and for any - # direct dependents that might include gtest headers. - "GTEST_HAS_RTTI=0", - ] - } - - if (is_android) { - defines += [ - # We want gtest features that use tr1::tuple, but we currently - # don't support the variadic templates used by libstdc++'s - # implementation. gtest supports this scenario by providing its - # own implementation but we must opt in to it. - "GTEST_USE_OWN_TR1_TUPLE=1", - - # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. - # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 - # automatically on android, so it has to be set explicitly here. - "GTEST_HAS_TR1_TUPLE=1", - ] - } -} - -config("gtest_direct_config") { - visibility = [ ":*" ] - defines = [ "UNIT_TEST" ] -} - -static_library("gtest") { - # TODO http://crbug.com/412064 enable this flag all the time. - testonly = !is_component_build - sources = [ - "include/gtest/gtest-death-test.h", - "include/gtest/gtest-message.h", - "include/gtest/gtest-param-test.h", - "include/gtest/gtest-printers.h", - "include/gtest/gtest-spi.h", - "include/gtest/gtest-test-part.h", - "include/gtest/gtest-typed-test.h", - "include/gtest/gtest.h", - "include/gtest/gtest_pred_impl.h", - "include/gtest/internal/gtest-death-test-internal.h", - "include/gtest/internal/gtest-filepath.h", - "include/gtest/internal/gtest-internal.h", - "include/gtest/internal/gtest-linked_ptr.h", - "include/gtest/internal/gtest-param-util-generated.h", - "include/gtest/internal/gtest-param-util.h", - "include/gtest/internal/gtest-port.h", - "include/gtest/internal/gtest-string.h", - "include/gtest/internal/gtest-tuple.h", - "include/gtest/internal/gtest-type-util.h", - - #"gtest/src/gtest-all.cc", # Not needed by our build. - "../multiprocess_func_list.cc", - "../multiprocess_func_list.h", - "../platform_test.h", - "src/gtest-death-test.cc", - "src/gtest-filepath.cc", - "src/gtest-internal-inl.h", - "src/gtest-port.cc", - "src/gtest-printers.cc", - "src/gtest-test-part.cc", - "src/gtest-typed-test.cc", - "src/gtest.cc", - ] - - if (is_mac) { - sources += [ - "../gtest_mac.h", - "../gtest_mac.mm", - "../platform_test_mac.mm", - ] - } - - include_dirs = [ "." ] - - all_dependent_configs = [ ":gtest_config" ] - public_configs = [ ":gtest_direct_config" ] - - 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") { - # TODO http://crbug.com/412064 enable this flag all the time. - testonly = !is_component_build - sources = [ - "src/gtest_main.cc", - ] - deps = [ - ":gtest", - ] -} 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 deleted file mode 100644 index afafffc1e5..0000000000 --- a/engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn +++ /dev/null @@ -1,104 +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("//build/config/android/rules.gni") - -config("cpu_features_include") { - include_dirs = [ "ndk/sources/android/cpufeatures" ] -} - -# This is the GN version of -# //build/android/ndk.gyp:cpu_features -source_set("cpu_features") { - sources = [ - "ndk/sources/android/cpufeatures/cpu-features.c", - ] - public_configs = [ ":cpu_features_include" ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] -} - -android_java_prebuilt("android_gcm_java") { - jar_path = "$android_sdk_root/extras/google/gcm/gcm-client/dist/gcm.jar" -} - -android_java_prebuilt("uiautomator_java") { - jar_path = "$android_sdk/uiautomator.jar" -} - -android_java_prebuilt("android_support_annotations_javalib") { - jar_path = "$android_sdk_root/extras/android/support/annotations/android-support-annotations.jar" -} - -java_prebuilt("android_support_multidex_java") { - jar_path = "$android_sdk_root/extras/android/support/multidex/library/libs/android-support-multidex.jar" -} - -android_java_prebuilt("android_support_v13_java") { - jar_path = - "$android_sdk_root/extras/android/support/v13/android-support-v13.jar" -} - -android_resources("android_support_v7_appcompat_resources") { - v14_skip = true - resource_dirs = - [ "$android_sdk_root/extras/android/support/v7/appcompat/res" ] - custom_package = "android.support.v7.appcompat" -} - -android_java_prebuilt("android_support_v7_appcompat_java") { - deps = [ - ":android_support_v7_appcompat_resources", - ] - jar_path = "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar" -} - -android_resources("android_support_v7_mediarouter_resources") { - v14_skip = true - resource_dirs = - [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ] - deps = [ - ":android_support_v7_appcompat_resources", - ] - custom_package = "android.support.v7.mediarouter" -} - -android_java_prebuilt("android_support_v7_mediarouter_java") { - deps = [ - ":android_support_v7_mediarouter_resources", - ":android_support_v7_appcompat_java", - ] - jar_path = "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar" -} - -android_resources("android_support_v7_recyclerview_resources") { - v14_skip = true - resource_dirs = - [ "$android_sdk_root/extras/android/support/v7/recyclerview/res" ] - custom_package = "android.support.v7.recyclerview" -} - -android_java_prebuilt("android_support_v7_recyclerview_java") { - deps = [ - ":android_support_v7_appcompat_java", - ":android_support_v7_recyclerview_resources", - ] - jar_path = "$android_sdk_root/extras/android/support/v7/recyclerview/libs/android-support-v7-recyclerview.jar" -} - -android_resources("google_play_services_default_resources") { - v14_skip = true - resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/res" ] - custom_package = "com.google.android.gms" -} -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 = false - jar_path = "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar" -} diff --git a/engine/src/flutter/build/secondary/third_party/libjpeg_turbo/BUILD.gn b/engine/src/flutter/build/secondary/third_party/libjpeg_turbo/BUILD.gn deleted file mode 100644 index 62e60aed0d..0000000000 --- a/engine/src/flutter/build/secondary/third_party/libjpeg_turbo/BUILD.gn +++ /dev/null @@ -1,221 +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. - -# Do not use the targets in this file unless you need a certain libjpeg -# implementation. Use the meta target //third_party:jpeg instead. - -import("//build/config/sanitizers/sanitizers.gni") - -if (current_cpu == "arm") { - import("//build/config/arm.gni") -} - -if (current_cpu == "x86" || current_cpu == "x64") { - import("//third_party/yasm/yasm_assemble.gni") - - yasm_assemble("simd_asm") { - defines = [] - - if (current_cpu == "x86") { - sources = [ - "simd/jccolor-mmx.asm", - "simd/jccolor-sse2.asm", - "simd/jcgray-mmx.asm", - "simd/jcgray-sse2.asm", - "simd/jchuff-sse2.asm", - "simd/jcsample-mmx.asm", - "simd/jcsample-sse2.asm", - "simd/jdcolor-mmx.asm", - "simd/jdcolor-sse2.asm", - "simd/jdmerge-mmx.asm", - "simd/jdmerge-sse2.asm", - "simd/jdsample-mmx.asm", - "simd/jdsample-sse2.asm", - "simd/jfdctflt-3dn.asm", - "simd/jfdctflt-sse.asm", - "simd/jfdctfst-mmx.asm", - "simd/jfdctfst-sse2.asm", - "simd/jfdctint-mmx.asm", - "simd/jfdctint-sse2.asm", - "simd/jidctflt-3dn.asm", - "simd/jidctflt-sse.asm", - "simd/jidctflt-sse2.asm", - "simd/jidctfst-mmx.asm", - "simd/jidctfst-sse2.asm", - "simd/jidctint-mmx.asm", - "simd/jidctint-sse2.asm", - "simd/jidctred-mmx.asm", - "simd/jidctred-sse2.asm", - "simd/jquant-3dn.asm", - "simd/jquant-mmx.asm", - "simd/jquant-sse.asm", - "simd/jquantf-sse2.asm", - "simd/jquanti-sse2.asm", - "simd/jsimdcpu.asm", - ] - defines += [ - "__x86__", - "PIC", - ] - } else if (current_cpu == "x64") { - sources = [ - "simd/jccolor-sse2-64.asm", - "simd/jcgray-sse2-64.asm", - "simd/jchuff-sse2-64.asm", - "simd/jcsample-sse2-64.asm", - "simd/jdcolor-sse2-64.asm", - "simd/jdmerge-sse2-64.asm", - "simd/jdsample-sse2-64.asm", - "simd/jfdctflt-sse-64.asm", - "simd/jfdctfst-sse2-64.asm", - "simd/jfdctint-sse2-64.asm", - "simd/jidctflt-sse2-64.asm", - "simd/jidctfst-sse2-64.asm", - "simd/jidctint-sse2-64.asm", - "simd/jidctred-sse2-64.asm", - "simd/jquantf-sse2-64.asm", - "simd/jquanti-sse2-64.asm", - ] - defines += [ - "__x86_64__", - "PIC", - ] - } - - if (is_win) { - defines += [ "MSVC" ] - include_dirs = [ "win" ] - if (current_cpu == "x86") { - defines += [ "WIN32" ] - } else { - defines += [ "WIN64" ] - } - } else if (is_mac) { - defines += [ "MACHO" ] - include_dirs = [ "mac" ] - } else if (is_linux || is_android) { - defines += [ "ELF" ] - include_dirs = [ "linux" ] - } - } -} - -source_set("simd") { - if (current_cpu == "x86") { - deps = [ - ":simd_asm", - ] - sources = [ - "simd/jsimd_i386.c", - ] - if (is_win) { - cflags = [ "/wd4245" ] - } - } else if (current_cpu == "x64") { - deps = [ - ":simd_asm", - ] - sources = [ - "simd/jsimd_x86_64.c", - ] - } else if (current_cpu == "arm" && arm_version >= 7 && - (arm_use_neon || arm_optionally_use_neon)) { - sources = [ - "simd/jsimd_arm.c", - "simd/jsimd_arm_neon.S", - ] - } else { - sources = [ - "jsimd_none.c", - ] - } - if (is_win) { - cflags = [ "/wd4245" ] - } -} - -config("libjpeg_config") { - include_dirs = [ "." ] -} - -source_set("libjpeg") { - sources = [ - "jcapimin.c", - "jcapistd.c", - "jccoefct.c", - "jccolor.c", - "jcdctmgr.c", - "jchuff.c", - "jchuff.h", - "jcinit.c", - "jcmainct.c", - "jcmarker.c", - "jcmaster.c", - "jcomapi.c", - "jconfig.h", - "jcparam.c", - "jcphuff.c", - "jcprepct.c", - "jcsample.c", - "jdapimin.c", - "jdapistd.c", - "jdatadst.c", - "jdatasrc.c", - "jdcoefct.c", - "jdcolor.c", - "jdct.h", - "jddctmgr.c", - "jdhuff.c", - "jdhuff.h", - "jdinput.c", - "jdmainct.c", - "jdmarker.c", - "jdmaster.c", - "jdmerge.c", - "jdphuff.c", - "jdpostct.c", - "jdsample.c", - "jerror.c", - "jerror.h", - "jfdctflt.c", - "jfdctfst.c", - "jfdctint.c", - "jidctflt.c", - "jidctfst.c", - "jidctint.c", - "jidctred.c", - "jinclude.h", - "jmemmgr.c", - "jmemnobs.c", - "jmemsys.h", - "jmorecfg.h", - "jpegint.h", - "jpeglib.h", - "jpeglibmangler.h", - "jquant1.c", - "jquant2.c", - "jutils.c", - "jversion.h", - ] - - defines = [ - "WITH_SIMD", - "NO_GETENV", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - - public_configs = [ ":libjpeg_config" ] - - # MemorySanitizer doesn't support assembly code, so keep it disabled in - # MSan builds for now. - if (is_msan) { - sources += [ "jsimd_none.c" ] - } else { - deps = [ - ":simd", - ] - } -} diff --git a/engine/src/flutter/build/secondary/third_party/libsrtp/BUILD.gn b/engine/src/flutter/build/secondary/third_party/libsrtp/BUILD.gn deleted file mode 100644 index 7601bea0d6..0000000000 --- a/engine/src/flutter/build/secondary/third_party/libsrtp/BUILD.gn +++ /dev/null @@ -1,391 +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. - -declare_args() { - use_system_libsrtp = false - use_srtp_boringssl = true -} - -config("libsrtp_config") { - defines = [ - "HAVE_CONFIG_H", - "HAVE_STDLIB_H", - "HAVE_STRING_H", - "TESTAPP_SOURCE", - ] - - include_dirs = [ - "config", - "srtp/include", - "srtp/crypto/include", - ] - - if (use_srtp_boringssl) { - defines += [ "OPENSSL" ] - } - - if (is_posix) { - defines += [ - "HAVE_INT16_T", - "HAVE_INT32_T", - "HAVE_INT8_T", - "HAVE_UINT16_T", - "HAVE_UINT32_T", - "HAVE_UINT64_T", - "HAVE_UINT8_T", - "HAVE_STDINT_H", - "HAVE_INTTYPES_H", - "HAVE_NETINET_IN_H", - "HAVE_ARPA_INET_H", - "HAVE_UNISTD_H", - ] - cflags = [ "-Wno-unused-variable" ] - } - - if (is_win) { - defines += [ - "HAVE_BYTESWAP_METHODS_H", - - # All Windows architectures are this way. - "SIZEOF_UNSIGNED_LONG=4", - "SIZEOF_UNSIGNED_LONG_LONG=8", - ] - } - - if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm") { - defines += [ - # TODO(leozwang): CPU_RISC doesn"t work properly on android/arm - # platform for unknown reasons, need to investigate the root cause - # of it. CPU_RISC is used for optimization only, and CPU_CISC should - # just work just fine, it has been tested on android/arm with srtp - # test applications and libjingle. - "CPU_CISC", - ] - } - - if (current_cpu == "mipsel") { - defines += [ "CPU_RISC" ] - } -} - -config("system_libsrtp_config") { - defines = [ "USE_SYSTEM_LIBSRTP" ] - include_dirs = [ "/usr/include/srtp" ] -} - -if (use_system_libsrtp) { - group("libsrtp") { - public_configs = [ - ":libsrtp_config", - ":system_libsrtp_config", - ] - libs = [ "-lsrtp" ] - } -} else { - static_library("libsrtp") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - public_configs = [ ":libsrtp_config" ] - - sources = [ - # includes - "srtp/include/ekt.h", - "srtp/include/getopt_s.h", - "srtp/include/rtp.h", - "srtp/include/rtp_priv.h", - "srtp/include/srtp.h", - "srtp/include/srtp_priv.h", - "srtp/include/ut_sim.h", - - # headers - "srtp/crypto/include/aes.h", - "srtp/crypto/include/aes_cbc.h", - "srtp/crypto/include/aes_icm.h", - "srtp/crypto/include/alloc.h", - "srtp/crypto/include/auth.h", - "srtp/crypto/include/cipher.h", - "srtp/crypto/include/crypto.h", - "srtp/crypto/include/crypto_kernel.h", - "srtp/crypto/include/crypto_math.h", - "srtp/crypto/include/crypto_types.h", - "srtp/crypto/include/cryptoalg.h", - "srtp/crypto/include/datatypes.h", - "srtp/crypto/include/err.h", - "srtp/crypto/include/gf2_8.h", - "srtp/crypto/include/hmac.h", - "srtp/crypto/include/integers.h", - "srtp/crypto/include/kernel_compat.h", - "srtp/crypto/include/key.h", - "srtp/crypto/include/null_auth.h", - "srtp/crypto/include/null_cipher.h", - "srtp/crypto/include/prng.h", - "srtp/crypto/include/rand_source.h", - "srtp/crypto/include/rdb.h", - "srtp/crypto/include/rdbx.h", - "srtp/crypto/include/sha1.h", - "srtp/crypto/include/stat.h", - "srtp/crypto/include/xfm.h", - - # sources - "srtp/crypto/cipher/aes.c", - "srtp/crypto/cipher/aes_cbc.c", - "srtp/crypto/cipher/aes_icm.c", - "srtp/crypto/cipher/cipher.c", - "srtp/crypto/cipher/null_cipher.c", - "srtp/crypto/hash/auth.c", - "srtp/crypto/hash/hmac.c", - "srtp/crypto/hash/null_auth.c", - "srtp/crypto/hash/sha1.c", - "srtp/crypto/kernel/alloc.c", - "srtp/crypto/kernel/crypto_kernel.c", - "srtp/crypto/kernel/err.c", - "srtp/crypto/kernel/key.c", - "srtp/crypto/math/datatypes.c", - "srtp/crypto/math/gf2_8.c", - "srtp/crypto/math/stat.c", - "srtp/crypto/replay/rdb.c", - "srtp/crypto/replay/rdbx.c", - "srtp/crypto/replay/ut_sim.c", - "srtp/crypto/rng/ctr_prng.c", - "srtp/crypto/rng/prng.c", - "srtp/crypto/rng/rand_source.c", - "srtp/srtp/ekt.c", - "srtp/srtp/srtp.c", - ] - - if (is_clang) { - cflags = [ "-Wno-implicit-function-declaration" ] - } - - if (use_srtp_boringssl) { - deps = [ - "//third_party/boringssl:boringssl", - ] - public_deps = [ - "//third_party/boringssl:boringssl", - ] - sources -= [ - "srtp/crypto/cipher/aes_cbc.c", - "srtp/crypto/cipher/aes_icm.c", - "srtp/crypto/hash/hmac.c", - "srtp/crypto/hash/sha1.c", - "srtp/crypto/rng/ctr_prng.c", - "srtp/crypto/rng/prng.c", - ] - sources += [ - "srtp/crypto/cipher/aes_gcm_ossl.c", - "srtp/crypto/cipher/aes_icm_ossl.c", - "srtp/crypto/hash/hmac_ossl.c", - "srtp/crypto/include/aes_gcm_ossl.h", - "srtp/crypto/include/aes_icm_ossl.h", - ] - } - } - - # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're - # not very broken, so could probably be made to work if it's useful. - if (!is_win) { - executable("rdbx_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/include/getopt_s.h", - "srtp/test/getopt_s.c", - "srtp/test/rdbx_driver.c", - ] - } - - executable("srtp_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/include/getopt_s.h", - "srtp/include/srtp_priv.h", - "srtp/test/getopt_s.c", - "srtp/test/srtp_driver.c", - ] - } - - executable("roc_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/include/rdbx.h", - "srtp/include/ut_sim.h", - "srtp/test/roc_driver.c", - ] - } - - executable("replay_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/include/rdbx.h", - "srtp/include/ut_sim.h", - "srtp/test/replay_driver.c", - ] - } - - executable("rtpw") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/include/datatypes.h", - "srtp/include/getopt_s.h", - "srtp/include/rtp.h", - "srtp/include/srtp.h", - "srtp/test/getopt_s.c", - "srtp/test/rtp.c", - "srtp/test/rtpw.c", - ] - if (is_android) { - defines = [ "HAVE_SYS_SOCKET_H" ] - } - if (is_clang) { - cflags = [ "-Wno-implicit-function-declaration" ] - } - } - - executable("srtp_test_cipher_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/cipher_driver.c", - "srtp/include/getopt_s.h", - "srtp/test/getopt_s.c", - ] - } - - executable("srtp_test_datatypes_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/datatypes_driver.c", - ] - } - - executable("srtp_test_stat_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/stat_driver.c", - ] - } - - executable("srtp_test_sha1_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/sha1_driver.c", - ] - } - - executable("srtp_test_kernel_driver") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/kernel_driver.c", - "srtp/include/getopt_s.h", - "srtp/test/getopt_s.c", - ] - } - - executable("srtp_test_aes_calc") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/aes_calc.c", - ] - } - - executable("srtp_test_rand_gen") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/rand_gen.c", - "srtp/include/getopt_s.h", - "srtp/test/getopt_s.c", - ] - } - - executable("srtp_test_rand_gen_soak") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/rand_gen_soak.c", - "srtp/include/getopt_s.h", - "srtp/test/getopt_s.c", - ] - } - - executable("srtp_test_env") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - ":libsrtp", - ] - sources = [ - "srtp/crypto/test/env.c", - ] - } - - group("srtp_runtest") { - deps = [ - ":rdbx_driver", - ":srtp_driver", - ":roc_driver", - ":replay_driver", - ":rtpw", - ":srtp_test_cipher_driver", - ":srtp_test_datatypes_driver", - ":srtp_test_stat_driver", - ":srtp_test_sha1_driver", - ":srtp_test_kernel_driver", - ":srtp_test_aes_calc", - ":srtp_test_rand_gen", - ":srtp_test_rand_gen_soak", - ":srtp_test_env", - ] - } - } -} diff --git a/engine/src/flutter/build/secondary/third_party/nss/BUILD.gn b/engine/src/flutter/build/secondary/third_party/nss/BUILD.gn deleted file mode 100644 index 25d449e14d..0000000000 --- a/engine/src/flutter/build/secondary/third_party/nss/BUILD.gn +++ /dev/null @@ -1,1211 +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("//build/config/linux/pkg_config.gni") - -if (is_linux) { - # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL - # library but the system NSS libraries. Non-Linux platforms using NSS use the - # hermetic one in //third_party/nss. - # - # Generally you should depend on //crypto:platform instead of using this - # config since that will properly pick up NSS or OpenSSL depending on - # platform and build config. - pkg_config("system_nss_no_ssl_config") { - packages = [ "nss" ] - extra_args = [ - "-v", - "-lssl3", - ] - } -} else { - include_nss_root_certs = is_ios - include_nss_libpkix = is_ios - - config("nspr_config") { - defines = [ "NO_NSPR_10_SUPPORT" ] - include_dirs = [ - "nspr/pr/include", - "nspr/lib/ds", - "nspr/lib/libc/include", - ] - - if (component_mode != "shared_library") { - defines += [ "NSPR_STATIC" ] - } - } - - component("nspr") { - output_name = "crnspr" - sources = [ - "nspr/lib/ds/plarena.c", - "nspr/lib/ds/plarena.h", - "nspr/lib/ds/plarenas.h", - "nspr/lib/ds/plhash.c", - "nspr/lib/ds/plhash.h", - "nspr/lib/libc/include/plbase64.h", - "nspr/lib/libc/include/plerror.h", - "nspr/lib/libc/include/plgetopt.h", - "nspr/lib/libc/include/plstr.h", - "nspr/lib/libc/src/base64.c", - "nspr/lib/libc/src/plerror.c", - "nspr/lib/libc/src/plgetopt.c", - "nspr/lib/libc/src/strcase.c", - "nspr/lib/libc/src/strcat.c", - "nspr/lib/libc/src/strchr.c", - "nspr/lib/libc/src/strcmp.c", - "nspr/lib/libc/src/strcpy.c", - "nspr/lib/libc/src/strdup.c", - "nspr/lib/libc/src/strlen.c", - "nspr/lib/libc/src/strpbrk.c", - "nspr/lib/libc/src/strstr.c", - "nspr/lib/libc/src/strtok.c", - "nspr/pr/include/md/_darwin.cfg", - "nspr/pr/include/md/_darwin.h", - "nspr/pr/include/md/_pcos.h", - "nspr/pr/include/md/_pth.h", - "nspr/pr/include/md/_unix_errors.h", - "nspr/pr/include/md/_unixos.h", - "nspr/pr/include/md/_win32_errors.h", - "nspr/pr/include/md/_win95.cfg", - "nspr/pr/include/md/_win95.h", - "nspr/pr/include/md/prosdep.h", - "nspr/pr/include/nspr.h", - "nspr/pr/include/obsolete/pralarm.h", - "nspr/pr/include/obsolete/probslet.h", - "nspr/pr/include/obsolete/protypes.h", - "nspr/pr/include/obsolete/prsem.h", - "nspr/pr/include/pratom.h", - "nspr/pr/include/prbit.h", - "nspr/pr/include/prclist.h", - "nspr/pr/include/prcmon.h", - "nspr/pr/include/prcountr.h", - "nspr/pr/include/prcpucfg.h", - "nspr/pr/include/prcvar.h", - "nspr/pr/include/prdtoa.h", - "nspr/pr/include/prenv.h", - "nspr/pr/include/prerr.h", - "nspr/pr/include/prerror.h", - "nspr/pr/include/prinet.h", - "nspr/pr/include/prinit.h", - "nspr/pr/include/prinrval.h", - "nspr/pr/include/prio.h", - "nspr/pr/include/pripcsem.h", - "nspr/pr/include/private/pprio.h", - "nspr/pr/include/private/pprmwait.h", - "nspr/pr/include/private/pprthred.h", - "nspr/pr/include/private/primpl.h", - "nspr/pr/include/private/prpriv.h", - "nspr/pr/include/prlink.h", - "nspr/pr/include/prlock.h", - "nspr/pr/include/prlog.h", - "nspr/pr/include/prlong.h", - "nspr/pr/include/prmem.h", - "nspr/pr/include/prmon.h", - "nspr/pr/include/prmwait.h", - "nspr/pr/include/prnetdb.h", - "nspr/pr/include/prolock.h", - "nspr/pr/include/prpdce.h", - "nspr/pr/include/prprf.h", - "nspr/pr/include/prproces.h", - "nspr/pr/include/prrng.h", - "nspr/pr/include/prrwlock.h", - "nspr/pr/include/prshm.h", - "nspr/pr/include/prshma.h", - "nspr/pr/include/prsystem.h", - "nspr/pr/include/prthread.h", - "nspr/pr/include/prtime.h", - "nspr/pr/include/prtpool.h", - "nspr/pr/include/prtrace.h", - "nspr/pr/include/prtypes.h", - "nspr/pr/include/prvrsion.h", - "nspr/pr/include/prwin16.h", - "nspr/pr/src/io/prdir.c", - "nspr/pr/src/io/prfdcach.c", - "nspr/pr/src/io/prfile.c", - "nspr/pr/src/io/prio.c", - "nspr/pr/src/io/priometh.c", - "nspr/pr/src/io/pripv6.c", - "nspr/pr/src/io/prlayer.c", - "nspr/pr/src/io/prlog.c", - "nspr/pr/src/io/prmapopt.c", - "nspr/pr/src/io/prmmap.c", - "nspr/pr/src/io/prmwait.c", - "nspr/pr/src/io/prpolevt.c", - "nspr/pr/src/io/prprf.c", - "nspr/pr/src/io/prscanf.c", - "nspr/pr/src/io/prsocket.c", - "nspr/pr/src/io/prstdio.c", - "nspr/pr/src/linking/prlink.c", - "nspr/pr/src/malloc/prmalloc.c", - "nspr/pr/src/malloc/prmem.c", - "nspr/pr/src/md/prosdep.c", - "nspr/pr/src/md/unix/darwin.c", - "nspr/pr/src/md/unix/os_Darwin.s", - "nspr/pr/src/md/unix/unix.c", - "nspr/pr/src/md/unix/unix_errors.c", - "nspr/pr/src/md/unix/uxproces.c", - "nspr/pr/src/md/unix/uxrng.c", - "nspr/pr/src/md/unix/uxshm.c", - "nspr/pr/src/md/unix/uxwrap.c", - "nspr/pr/src/md/windows/ntgc.c", - "nspr/pr/src/md/windows/ntinrval.c", - "nspr/pr/src/md/windows/ntmisc.c", - "nspr/pr/src/md/windows/ntsec.c", - "nspr/pr/src/md/windows/ntsem.c", - "nspr/pr/src/md/windows/w32ipcsem.c", - "nspr/pr/src/md/windows/w32poll.c", - "nspr/pr/src/md/windows/w32rng.c", - "nspr/pr/src/md/windows/w32shm.c", - "nspr/pr/src/md/windows/w95cv.c", - "nspr/pr/src/md/windows/w95dllmain.c", - "nspr/pr/src/md/windows/w95io.c", - "nspr/pr/src/md/windows/w95sock.c", - "nspr/pr/src/md/windows/w95thred.c", - "nspr/pr/src/md/windows/win32_errors.c", - "nspr/pr/src/memory/prseg.c", - "nspr/pr/src/memory/prshm.c", - "nspr/pr/src/memory/prshma.c", - "nspr/pr/src/misc/pralarm.c", - "nspr/pr/src/misc/pratom.c", - "nspr/pr/src/misc/praton.c", - "nspr/pr/src/misc/prcountr.c", - "nspr/pr/src/misc/prdtoa.c", - "nspr/pr/src/misc/prenv.c", - "nspr/pr/src/misc/prerr.c", - "nspr/pr/src/misc/prerror.c", - "nspr/pr/src/misc/prerrortable.c", - "nspr/pr/src/misc/prinit.c", - "nspr/pr/src/misc/prinrval.c", - "nspr/pr/src/misc/pripc.c", - "nspr/pr/src/misc/pripcsem.c", - "nspr/pr/src/misc/prlog2.c", - "nspr/pr/src/misc/prlong.c", - "nspr/pr/src/misc/prnetdb.c", - "nspr/pr/src/misc/prolock.c", - "nspr/pr/src/misc/prrng.c", - "nspr/pr/src/misc/prsystem.c", - "nspr/pr/src/misc/prthinfo.c", - "nspr/pr/src/misc/prtime.c", - "nspr/pr/src/misc/prtpool.c", - "nspr/pr/src/misc/prtrace.c", - "nspr/pr/src/pthreads/ptio.c", - "nspr/pr/src/pthreads/ptmisc.c", - "nspr/pr/src/pthreads/ptsynch.c", - "nspr/pr/src/pthreads/ptthread.c", - "nspr/pr/src/threads/combined/prucpu.c", - "nspr/pr/src/threads/combined/prucv.c", - "nspr/pr/src/threads/combined/prulock.c", - "nspr/pr/src/threads/combined/prustack.c", - "nspr/pr/src/threads/combined/pruthr.c", - "nspr/pr/src/threads/prcmon.c", - "nspr/pr/src/threads/prcthr.c", - "nspr/pr/src/threads/prdump.c", - "nspr/pr/src/threads/prmon.c", - "nspr/pr/src/threads/prrwlock.c", - "nspr/pr/src/threads/prsem.c", - "nspr/pr/src/threads/prtpd.c", - ] - - public_configs = [ ":nspr_config" ] - - configs -= [ "//build/config/compiler:chromium_code" ] - if (is_win) { - configs -= [ - "//build/config/win:unicode", # Requires 8-bit mode. - "//build/config/win:lean_and_mean", # Won"t compile with lean and mean. - ] - } - configs += [ - "//build/config/compiler:no_chromium_code", - "//build/config/compiler:no_size_t_to_int_warning", - ] - - cflags = [] - defines = [ - "_NSPR_BUILD_", - "FORCE_PR_LOG", - ] - - include_dirs = [ "nspr/pr/include/private" ] - - if (is_win) { - cflags = [ "/wd4554" ] # Check precidence. - defines += [ - "XP_PC", - "WIN32", - "WIN95", - "_PR_GLOBAL_THREADS_ONLY", - "_CRT_SECURE_NO_WARNINGS", - ] - } else { - sources -= [ - "nspr/pr/src/md/windows/ntgc.c", - "nspr/pr/src/md/windows/ntinrval.c", - "nspr/pr/src/md/windows/ntmisc.c", - "nspr/pr/src/md/windows/ntsec.c", - "nspr/pr/src/md/windows/ntsem.c", - "nspr/pr/src/md/windows/w32ipcsem.c", - "nspr/pr/src/md/windows/w32poll.c", - "nspr/pr/src/md/windows/w32rng.c", - "nspr/pr/src/md/windows/w32shm.c", - "nspr/pr/src/md/windows/w95cv.c", - "nspr/pr/src/md/windows/w95dllmain.c", - "nspr/pr/src/md/windows/w95io.c", - "nspr/pr/src/md/windows/w95sock.c", - "nspr/pr/src/md/windows/w95thred.c", - "nspr/pr/src/md/windows/win32_errors.c", - "nspr/pr/src/threads/combined/prucpu.c", - "nspr/pr/src/threads/combined/prucv.c", - "nspr/pr/src/threads/combined/prulock.c", - "nspr/pr/src/threads/combined/prustack.c", - "nspr/pr/src/threads/combined/pruthr.c", - ] - } - - if (!is_posix) { - sources -= [ - "nspr/pr/src/md/unix/darwin.c", - "nspr/pr/src/md/unix/os_Darwin.s", - "nspr/pr/src/md/unix/unix.c", - "nspr/pr/src/md/unix/unix_errors.c", - "nspr/pr/src/md/unix/uxproces.c", - "nspr/pr/src/md/unix/uxrng.c", - "nspr/pr/src/md/unix/uxshm.c", - "nspr/pr/src/md/unix/uxwrap.c", - "nspr/pr/src/pthreads/ptio.c", - "nspr/pr/src/pthreads/ptmisc.c", - "nspr/pr/src/pthreads/ptsynch.c", - "nspr/pr/src/pthreads/ptthread.c", - ] - } - - if (current_cpu == "x86") { - defines += [ "_X86_" ] - } else if (current_cpu == "x64") { - defines += [ "_AMD64_" ] - } - - if (is_mac || is_ios) { - sources -= [ - "nspr/pr/src/io/prdir.c", - "nspr/pr/src/io/prfile.c", - "nspr/pr/src/io/prio.c", - "nspr/pr/src/io/prsocket.c", - "nspr/pr/src/misc/pripcsem.c", - "nspr/pr/src/threads/prcthr.c", - "nspr/pr/src/threads/prdump.c", - "nspr/pr/src/threads/prmon.c", - "nspr/pr/src/threads/prsem.c", - ] - defines += [ - "XP_UNIX", - "DARWIN", - "XP_MACOSX", - "_PR_PTHREADS", - "HAVE_BSD_FLOCK", - "HAVE_DLADDR", - "HAVE_LCHOWN", - "HAVE_SOCKLEN_T", - "HAVE_STRERROR", - ] - } - - if (is_mac) { - defines += [ "HAVE_CRT_EXTERNS_H" ] - libs = [ - "CoreFoundation.framework", - "CoreServices.framework", - ] - } - - if (is_clang) { - cflags += [ - # nspr uses a bunch of deprecated functions (NSLinkModule etc) in - # prlink.c on mac. - "-Wno-deprecated-declarations", - - # nspr passes "const char*" through "void*". - "-Wno-incompatible-pointer-types", - - # nspr passes "int*" through "unsigned int*". - "-Wno-pointer-sign", - ] - - # nspr uses assert(!"foo") instead of assert(false && "foo"). - configs -= [ "//build/config/clang:extra_warnings" ] - } - } - - component("nss") { - output_name = "crnss" - sources = [ - # Ensure at least one object file is produced, so that MSVC does not - # warn when creating the static/shared library. See the note for - # the "nssckbi" target for why the "nss" target was split as such. - "nss/lib/nss/nssver.c", - ] - - public_deps = [ - ":nss_static", - ] - - if (include_nss_root_certs) { - public_deps += [ ":nssckbi" ] - } - - if (component_mode == "shared_library") { - if (is_mac) { - ldflags = [ "-all_load" ] - } else if (is_win) { - # Pass the def file to the linker. - ldflags = - [ "/DEF:" + rebase_path("nss/exports_win.def", root_build_dir) ] - } - } - } - - config("nssckbi_config") { - include_dirs = [ "nss/lib/ckfw/builtins" ] - } - - # This is really more of a pseudo-target to work around the fact that - # a single static_library target cannot contain two object files of the - # same name (hash.o / hash.obj). Logically, this is part of the - # "nss_static" target. By separating it out, it creates a possible - # circular dependency between "nss_static" and "nssckbi" when - # "exclude_nss_root_certs" is not specified, as "nss_static" depends on - # the "builtinsC_GetFunctionList" exported by this target. This is an - # artifact of how NSS is being statically built, which is not an - # officially supported configuration - normally, "nssckbi.dll/so" would - # depend on libnss3.dll/so, and the higher layer caller would instruct - # libnss3.dll to dynamically load nssckbi.dll, breaking the circle. - # - # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency - # without requiring nssckbi to be built as a shared library. - source_set("nssckbi") { - visibility = [ ":nss" ] # This target is internal implementation detail. - - sources = [ - "nss/lib/ckfw/builtins/anchor.c", - "nss/lib/ckfw/builtins/bfind.c", - "nss/lib/ckfw/builtins/binst.c", - "nss/lib/ckfw/builtins/bobject.c", - "nss/lib/ckfw/builtins/bsession.c", - "nss/lib/ckfw/builtins/bslot.c", - "nss/lib/ckfw/builtins/btoken.c", - "nss/lib/ckfw/builtins/builtins.h", - "nss/lib/ckfw/builtins/certdata.c", - "nss/lib/ckfw/builtins/ckbiver.c", - "nss/lib/ckfw/builtins/constants.c", - "nss/lib/ckfw/builtins/nssckbi.h", - "nss/lib/ckfw/ck.h", - "nss/lib/ckfw/ckfw.h", - "nss/lib/ckfw/ckfwm.h", - "nss/lib/ckfw/ckfwtm.h", - "nss/lib/ckfw/ckmd.h", - "nss/lib/ckfw/ckt.h", - "nss/lib/ckfw/crypto.c", - "nss/lib/ckfw/find.c", - "nss/lib/ckfw/hash.c", - "nss/lib/ckfw/instance.c", - "nss/lib/ckfw/mechanism.c", - "nss/lib/ckfw/mutex.c", - "nss/lib/ckfw/nssck.api", - "nss/lib/ckfw/nssckepv.h", - "nss/lib/ckfw/nssckft.h", - "nss/lib/ckfw/nssckfw.h", - "nss/lib/ckfw/nssckfwc.h", - "nss/lib/ckfw/nssckfwt.h", - "nss/lib/ckfw/nssckg.h", - "nss/lib/ckfw/nssckmdt.h", - "nss/lib/ckfw/nssckt.h", - "nss/lib/ckfw/object.c", - "nss/lib/ckfw/session.c", - "nss/lib/ckfw/sessobj.c", - "nss/lib/ckfw/slot.c", - "nss/lib/ckfw/token.c", - "nss/lib/ckfw/wrap.c", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - - if (is_win) { - configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. - } - configs += [ "//build/config/compiler:no_chromium_code" ] - - include_dirs = [ "nss/lib/ckfw" ] - public_configs = [ ":nssckbi_config" ] - - public_deps = [ - ":nss_static", - ] - } - - config("nss_static_config") { - defines = [ - "NSS_STATIC", - "NSS_USE_STATIC_LIBS", - "USE_UTIL_DIRECTLY", - ] - if (is_win) { - defines += [ "_WINDOWS" ] - } - include_dirs = [ - "nspr/pr/include", - "nspr/lib/ds", - "nspr/lib/libc/include", - "nss/lib/base", - "nss/lib/certdb", - "nss/lib/certhigh", - "nss/lib/cryptohi", - "nss/lib/dev", - "nss/lib/freebl", - "nss/lib/freebl/ecl", - "nss/lib/nss", - "nss/lib/pk11wrap", - "nss/lib/pkcs7", - "nss/lib/pki", - "nss/lib/smime", - "nss/lib/softoken", - "nss/lib/util", - ] - } - - if (is_win && current_cpu == "x86") { - source_set("nss_static_avx") { - sources = [ - "nss/lib/freebl/intel-gcm-wrap.c", - "nss/lib/freebl/intel-gcm-x86-masm.asm", - "nss/lib/freebl/intel-gcm.h", - ] - defines = [ - "_WINDOWS", - "_X86_", - "INTEL_GCM", - "MP_API_COMPATIBLE", - "MP_ASSEMBLY_DIV_2DX1D", - "MP_ASSEMBLY_MULTIPLY", - "MP_ASSEMBLY_SQUARE", - "MP_NO_MP_WORD", - "MP_USE_UINT_DIGIT", - "NSS_DISABLE_DBM", - "NSS_STATIC", - "NSS_USE_STATIC_LIBS", - "NSS_X86", - "NSS_X86_OR_X64", - "RIJNDAEL_INCLUDE_TABLES", - "SHLIB_PREFIX=\"\"", - "SHLIB_SUFFIX=\"dll\"", - "SHLIB_VERSION=\"3\"", - "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", - "SOFTOKEN_SHLIB_VERSION=\"3\"", - "USE_HW_AES", - "USE_UTIL_DIRECTLY", - "WIN32", - "WIN95", - "XP_PC", - ] - include_dirs = [ - "nspr/pr/include", - "nspr/lib/ds", - "nspr/lib/libc/include", - "nss/lib/freebl/ecl", - "nss/lib/util", - ] - } - } - - source_set("nss_static") { - visibility = [ ":*" ] # Internal implementation detail. - - sources = [ - "nss/lib/base/arena.c", - "nss/lib/base/base.h", - "nss/lib/base/baset.h", - "nss/lib/base/error.c", - "nss/lib/base/errorval.c", - "nss/lib/base/hash.c", - "nss/lib/base/hashops.c", - "nss/lib/base/item.c", - "nss/lib/base/libc.c", - "nss/lib/base/list.c", - "nss/lib/base/nssbase.h", - "nss/lib/base/nssbaset.h", - "nss/lib/base/nssutf8.c", - "nss/lib/base/tracker.c", - "nss/lib/certdb/alg1485.c", - "nss/lib/certdb/cert.h", - "nss/lib/certdb/certdb.c", - "nss/lib/certdb/certdb.h", - "nss/lib/certdb/certi.h", - "nss/lib/certdb/certt.h", - "nss/lib/certdb/certv3.c", - "nss/lib/certdb/certxutl.c", - "nss/lib/certdb/certxutl.h", - "nss/lib/certdb/crl.c", - "nss/lib/certdb/genname.c", - "nss/lib/certdb/genname.h", - "nss/lib/certdb/polcyxtn.c", - "nss/lib/certdb/secname.c", - "nss/lib/certdb/stanpcertdb.c", - "nss/lib/certdb/xauthkid.c", - "nss/lib/certdb/xbsconst.c", - "nss/lib/certdb/xconst.c", - "nss/lib/certdb/xconst.h", - "nss/lib/certhigh/certhigh.c", - "nss/lib/certhigh/certhtml.c", - "nss/lib/certhigh/certreq.c", - "nss/lib/certhigh/certvfy.c", - "nss/lib/certhigh/crlv2.c", - "nss/lib/certhigh/ocsp.c", - "nss/lib/certhigh/ocsp.h", - "nss/lib/certhigh/ocspi.h", - "nss/lib/certhigh/ocspsig.c", - "nss/lib/certhigh/ocspt.h", - "nss/lib/certhigh/ocspti.h", - "nss/lib/certhigh/xcrldist.c", - "nss/lib/cryptohi/cryptohi.h", - "nss/lib/cryptohi/cryptoht.h", - "nss/lib/cryptohi/dsautil.c", - "nss/lib/cryptohi/key.h", - "nss/lib/cryptohi/keyhi.h", - "nss/lib/cryptohi/keyi.h", - "nss/lib/cryptohi/keyt.h", - "nss/lib/cryptohi/keythi.h", - "nss/lib/cryptohi/sechash.c", - "nss/lib/cryptohi/sechash.h", - "nss/lib/cryptohi/seckey.c", - "nss/lib/cryptohi/secsign.c", - "nss/lib/cryptohi/secvfy.c", - "nss/lib/dev/ckhelper.c", - "nss/lib/dev/ckhelper.h", - "nss/lib/dev/dev.h", - "nss/lib/dev/devm.h", - "nss/lib/dev/devslot.c", - "nss/lib/dev/devt.h", - "nss/lib/dev/devtm.h", - "nss/lib/dev/devtoken.c", - "nss/lib/dev/devutil.c", - "nss/lib/dev/nssdev.h", - "nss/lib/dev/nssdevt.h", - "nss/lib/freebl/aeskeywrap.c", - "nss/lib/freebl/alg2268.c", - "nss/lib/freebl/alghmac.c", - "nss/lib/freebl/alghmac.h", - "nss/lib/freebl/arcfive.c", - "nss/lib/freebl/arcfour.c", - "nss/lib/freebl/blapi.h", - "nss/lib/freebl/blapii.h", - "nss/lib/freebl/blapit.h", - "nss/lib/freebl/camellia.c", - "nss/lib/freebl/camellia.h", - "nss/lib/freebl/chacha20/chacha20.c", - "nss/lib/freebl/chacha20/chacha20.h", - "nss/lib/freebl/chacha20/chacha20_vec.c", - "nss/lib/freebl/chacha20poly1305.c", - "nss/lib/freebl/chacha20poly1305.h", - "nss/lib/freebl/ctr.c", - "nss/lib/freebl/ctr.h", - "nss/lib/freebl/cts.c", - "nss/lib/freebl/cts.h", - "nss/lib/freebl/des.c", - "nss/lib/freebl/des.h", - "nss/lib/freebl/desblapi.c", - "nss/lib/freebl/dh.c", - "nss/lib/freebl/drbg.c", - "nss/lib/freebl/dsa.c", - "nss/lib/freebl/ec.c", - "nss/lib/freebl/ec.h", - "nss/lib/freebl/ecdecode.c", - "nss/lib/freebl/ecl/ec2.h", - "nss/lib/freebl/ecl/ec_naf.c", - "nss/lib/freebl/ecl/ecl-curve.h", - "nss/lib/freebl/ecl/ecl-exp.h", - "nss/lib/freebl/ecl/ecl-priv.h", - "nss/lib/freebl/ecl/ecl.c", - "nss/lib/freebl/ecl/ecl.h", - "nss/lib/freebl/ecl/ecl_curve.c", - "nss/lib/freebl/ecl/ecl_gf.c", - "nss/lib/freebl/ecl/ecl_mult.c", - "nss/lib/freebl/ecl/ecp.h", - "nss/lib/freebl/ecl/ecp_256.c", - "nss/lib/freebl/ecl/ecp_256_32.c", - "nss/lib/freebl/ecl/ecp_384.c", - "nss/lib/freebl/ecl/ecp_521.c", - "nss/lib/freebl/ecl/ecp_aff.c", - "nss/lib/freebl/ecl/ecp_jac.c", - "nss/lib/freebl/ecl/ecp_jm.c", - "nss/lib/freebl/ecl/ecp_mont.c", - "nss/lib/freebl/gcm.c", - "nss/lib/freebl/gcm.h", - "nss/lib/freebl/hmacct.c", - "nss/lib/freebl/hmacct.h", - "nss/lib/freebl/intel-aes-x86-masm.asm", - "nss/lib/freebl/intel-aes.h", - "nss/lib/freebl/jpake.c", - "nss/lib/freebl/md2.c", - "nss/lib/freebl/md5.c", - "nss/lib/freebl/mpi/logtab.h", - "nss/lib/freebl/mpi/mp_gf2m-priv.h", - "nss/lib/freebl/mpi/mp_gf2m.c", - "nss/lib/freebl/mpi/mp_gf2m.h", - "nss/lib/freebl/mpi/mpcpucache.c", - "nss/lib/freebl/mpi/mpi-config.h", - "nss/lib/freebl/mpi/mpi-priv.h", - "nss/lib/freebl/mpi/mpi.c", - "nss/lib/freebl/mpi/mpi.h", - "nss/lib/freebl/mpi/mpi_amd64.c", - "nss/lib/freebl/mpi/mpi_arm.c", - "nss/lib/freebl/mpi/mpi_arm_mac.c", - "nss/lib/freebl/mpi/mpi_x86_asm.c", - "nss/lib/freebl/mpi/mplogic.c", - "nss/lib/freebl/mpi/mplogic.h", - "nss/lib/freebl/mpi/mpmontg.c", - "nss/lib/freebl/mpi/mpprime.c", - "nss/lib/freebl/mpi/mpprime.h", - "nss/lib/freebl/mpi/primes.c", - "nss/lib/freebl/nss_build_config_mac.h", - "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", - "nss/lib/freebl/poly1305/poly1305.c", - "nss/lib/freebl/poly1305/poly1305.h", - "nss/lib/freebl/pqg.c", - "nss/lib/freebl/pqg.h", - "nss/lib/freebl/rawhash.c", - "nss/lib/freebl/rijndael.c", - "nss/lib/freebl/rijndael.h", - "nss/lib/freebl/rijndael32.tab", - "nss/lib/freebl/rsa.c", - "nss/lib/freebl/rsapkcs.c", - "nss/lib/freebl/secmpi.h", - "nss/lib/freebl/secrng.h", - "nss/lib/freebl/seed.c", - "nss/lib/freebl/seed.h", - "nss/lib/freebl/sha256.h", - "nss/lib/freebl/sha512.c", - "nss/lib/freebl/sha_fast.c", - "nss/lib/freebl/sha_fast.h", - "nss/lib/freebl/shsign.h", - "nss/lib/freebl/shvfy.c", - "nss/lib/freebl/sysrand.c", - "nss/lib/freebl/tlsprfalg.c", - "nss/lib/freebl/unix_rand.c", - "nss/lib/freebl/win_rand.c", - "nss/lib/nss/nss.h", - "nss/lib/nss/nssinit.c", - "nss/lib/nss/nssrenam.h", - "nss/lib/nss/utilwrap.c", - "nss/lib/pk11wrap/debug_module.c", - "nss/lib/pk11wrap/dev3hack.c", - "nss/lib/pk11wrap/dev3hack.h", - "nss/lib/pk11wrap/pk11akey.c", - "nss/lib/pk11wrap/pk11auth.c", - "nss/lib/pk11wrap/pk11cert.c", - "nss/lib/pk11wrap/pk11cxt.c", - "nss/lib/pk11wrap/pk11err.c", - "nss/lib/pk11wrap/pk11func.h", - "nss/lib/pk11wrap/pk11kea.c", - "nss/lib/pk11wrap/pk11list.c", - "nss/lib/pk11wrap/pk11load.c", - "nss/lib/pk11wrap/pk11mech.c", - "nss/lib/pk11wrap/pk11merge.c", - "nss/lib/pk11wrap/pk11nobj.c", - "nss/lib/pk11wrap/pk11obj.c", - "nss/lib/pk11wrap/pk11pars.c", - "nss/lib/pk11wrap/pk11pbe.c", - "nss/lib/pk11wrap/pk11pk12.c", - "nss/lib/pk11wrap/pk11pqg.c", - "nss/lib/pk11wrap/pk11pqg.h", - "nss/lib/pk11wrap/pk11priv.h", - "nss/lib/pk11wrap/pk11pub.h", - "nss/lib/pk11wrap/pk11sdr.c", - "nss/lib/pk11wrap/pk11sdr.h", - "nss/lib/pk11wrap/pk11skey.c", - "nss/lib/pk11wrap/pk11slot.c", - "nss/lib/pk11wrap/pk11util.c", - "nss/lib/pk11wrap/secmod.h", - "nss/lib/pk11wrap/secmodi.h", - "nss/lib/pk11wrap/secmodt.h", - "nss/lib/pk11wrap/secmodti.h", - "nss/lib/pk11wrap/secpkcs5.h", - "nss/lib/pkcs7/certread.c", - "nss/lib/pkcs7/p7common.c", - "nss/lib/pkcs7/p7create.c", - "nss/lib/pkcs7/p7decode.c", - "nss/lib/pkcs7/p7encode.c", - "nss/lib/pkcs7/p7local.c", - "nss/lib/pkcs7/p7local.h", - "nss/lib/pkcs7/pkcs7t.h", - "nss/lib/pkcs7/secmime.c", - "nss/lib/pkcs7/secmime.h", - "nss/lib/pkcs7/secpkcs7.h", - "nss/lib/pki/asymmkey.c", - "nss/lib/pki/certdecode.c", - "nss/lib/pki/certificate.c", - "nss/lib/pki/cryptocontext.c", - "nss/lib/pki/nsspki.h", - "nss/lib/pki/nsspkit.h", - "nss/lib/pki/pki.h", - "nss/lib/pki/pki3hack.c", - "nss/lib/pki/pki3hack.h", - "nss/lib/pki/pkibase.c", - "nss/lib/pki/pkim.h", - "nss/lib/pki/pkistore.c", - "nss/lib/pki/pkistore.h", - "nss/lib/pki/pkit.h", - "nss/lib/pki/pkitm.h", - "nss/lib/pki/symmkey.c", - "nss/lib/pki/tdcache.c", - "nss/lib/pki/trustdomain.c", - "nss/lib/smime/cms.h", - "nss/lib/smime/cmslocal.h", - "nss/lib/smime/cmsreclist.h", - "nss/lib/smime/cmst.h", - "nss/lib/smime/smime.h", - "nss/lib/softoken/fipsaudt.c", - "nss/lib/softoken/fipstest.c", - "nss/lib/softoken/fipstokn.c", - "nss/lib/softoken/jpakesftk.c", - "nss/lib/softoken/lgglue.c", - "nss/lib/softoken/lgglue.h", - "nss/lib/softoken/lowkey.c", - "nss/lib/softoken/lowkeyi.h", - "nss/lib/softoken/lowkeyti.h", - "nss/lib/softoken/lowpbe.c", - "nss/lib/softoken/lowpbe.h", - "nss/lib/softoken/padbuf.c", - "nss/lib/softoken/pkcs11.c", - "nss/lib/softoken/pkcs11c.c", - "nss/lib/softoken/pkcs11i.h", - "nss/lib/softoken/pkcs11ni.h", - "nss/lib/softoken/pkcs11u.c", - "nss/lib/softoken/sdb.c", - "nss/lib/softoken/sdb.h", - "nss/lib/softoken/sftkdb.c", - "nss/lib/softoken/sftkdb.h", - "nss/lib/softoken/sftkdbt.h", - "nss/lib/softoken/sftkdbti.h", - "nss/lib/softoken/sftkhmac.c", - "nss/lib/softoken/sftkpars.c", - "nss/lib/softoken/sftkpars.h", - "nss/lib/softoken/sftkpwd.c", - "nss/lib/softoken/softkver.c", - "nss/lib/softoken/softkver.h", - "nss/lib/softoken/softoken.h", - "nss/lib/softoken/softoknt.h", - "nss/lib/softoken/tlsprf.c", - "nss/lib/ssl/sslerr.h", - "nss/lib/util/SECerrs.h", - "nss/lib/util/base64.h", - "nss/lib/util/ciferfam.h", - "nss/lib/util/derdec.c", - "nss/lib/util/derenc.c", - "nss/lib/util/dersubr.c", - "nss/lib/util/dertime.c", - "nss/lib/util/errstrs.c", - "nss/lib/util/hasht.h", - "nss/lib/util/nssb64.h", - "nss/lib/util/nssb64d.c", - "nss/lib/util/nssb64e.c", - "nss/lib/util/nssb64t.h", - "nss/lib/util/nssilckt.h", - "nss/lib/util/nssilock.c", - "nss/lib/util/nssilock.h", - "nss/lib/util/nsslocks.h", - "nss/lib/util/nssrwlk.c", - "nss/lib/util/nssrwlk.h", - "nss/lib/util/nssrwlkt.h", - "nss/lib/util/nssutil.h", - "nss/lib/util/oidstring.c", - "nss/lib/util/pkcs11.h", - "nss/lib/util/pkcs11f.h", - "nss/lib/util/pkcs11n.h", - "nss/lib/util/pkcs11p.h", - "nss/lib/util/pkcs11t.h", - "nss/lib/util/pkcs11u.h", - "nss/lib/util/pkcs1sig.c", - "nss/lib/util/pkcs1sig.h", - "nss/lib/util/portreg.c", - "nss/lib/util/portreg.h", - "nss/lib/util/quickder.c", - "nss/lib/util/secalgid.c", - "nss/lib/util/secasn1.h", - "nss/lib/util/secasn1d.c", - "nss/lib/util/secasn1e.c", - "nss/lib/util/secasn1t.h", - "nss/lib/util/secasn1u.c", - "nss/lib/util/seccomon.h", - "nss/lib/util/secder.h", - "nss/lib/util/secdert.h", - "nss/lib/util/secdig.c", - "nss/lib/util/secdig.h", - "nss/lib/util/secdigt.h", - "nss/lib/util/secerr.h", - "nss/lib/util/secitem.c", - "nss/lib/util/secitem.h", - "nss/lib/util/secoid.c", - "nss/lib/util/secoid.h", - "nss/lib/util/secoidt.h", - "nss/lib/util/secport.c", - "nss/lib/util/secport.h", - "nss/lib/util/sectime.c", - "nss/lib/util/templates.c", - "nss/lib/util/utf8.c", - "nss/lib/util/utilmod.c", - "nss/lib/util/utilmodt.h", - "nss/lib/util/utilpars.c", - "nss/lib/util/utilpars.h", - "nss/lib/util/utilparst.h", - "nss/lib/util/utilrename.h", - ] - - sources -= [ - # mpi_arm.c is included by mpi_arm_mac.c. - # NOTE: mpi_arm.c can be used directly on Linux. mpi_arm.c will need - # to be excluded conditionally if we start to build NSS on Linux. - "nss/lib/freebl/mpi/mpi_arm.c", - - # primes.c is included by mpprime.c. - "nss/lib/freebl/mpi/primes.c", - - # unix_rand.c and win_rand.c are included by sysrand.c. - "nss/lib/freebl/unix_rand.c", - "nss/lib/freebl/win_rand.c", - - # debug_module.c is included by pk11load.c. - "nss/lib/pk11wrap/debug_module.c", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - if (is_win) { - configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. - } - configs += [ - "//build/config/compiler:no_chromium_code", - "//build/config/compiler:no_size_t_to_int_warning", - ] - public_configs = [ ":nss_static_config" ] - - cflags = [] - - # Only need the defines and includes not in nss_static_config. - defines = [ - "MP_API_COMPATIBLE", - "NSS_DISABLE_DBM", - "RIJNDAEL_INCLUDE_TABLES", - "SHLIB_VERSION=\"3\"", - "SOFTOKEN_SHLIB_VERSION=\"3\"", - ] - include_dirs = [ - "nss/lib/freebl/mpi", - "nss/lib/ssl", - ] - - if (is_win) { - cflags += [ "/wd4101" ] # Unreferenced local variable. - } - - if (include_nss_libpkix) { - sources += [ - "nss/lib/certhigh/certvfypkix.c", - "nss/lib/certhigh/certvfypkixprint.c", - "nss/lib/libpkix/include/pkix.h", - "nss/lib/libpkix/include/pkix_certsel.h", - "nss/lib/libpkix/include/pkix_certstore.h", - "nss/lib/libpkix/include/pkix_checker.h", - "nss/lib/libpkix/include/pkix_crlsel.h", - "nss/lib/libpkix/include/pkix_errorstrings.h", - "nss/lib/libpkix/include/pkix_params.h", - "nss/lib/libpkix/include/pkix_pl_pki.h", - "nss/lib/libpkix/include/pkix_pl_system.h", - "nss/lib/libpkix/include/pkix_results.h", - "nss/lib/libpkix/include/pkix_revchecker.h", - "nss/lib/libpkix/include/pkix_sample_modules.h", - "nss/lib/libpkix/include/pkix_util.h", - "nss/lib/libpkix/include/pkixt.h", - "nss/lib/libpkix/pkix/certsel/pkix_certselector.c", - "nss/lib/libpkix/pkix/certsel/pkix_certselector.h", - "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c", - "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h", - "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c", - "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h", - "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_crlchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_crlchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c", - "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h", - "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_policychecker.c", - "nss/lib/libpkix/pkix/checker/pkix_policychecker.h", - "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h", - "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c", - "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h", - "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c", - "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h", - "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c", - "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h", - "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c", - "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h", - "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c", - "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h", - "nss/lib/libpkix/pkix/params/pkix_procparams.c", - "nss/lib/libpkix/pkix/params/pkix_procparams.h", - "nss/lib/libpkix/pkix/params/pkix_resourcelimits.c", - "nss/lib/libpkix/pkix/params/pkix_resourcelimits.h", - "nss/lib/libpkix/pkix/params/pkix_trustanchor.c", - "nss/lib/libpkix/pkix/params/pkix_trustanchor.h", - "nss/lib/libpkix/pkix/params/pkix_valparams.c", - "nss/lib/libpkix/pkix/params/pkix_valparams.h", - "nss/lib/libpkix/pkix/results/pkix_buildresult.c", - "nss/lib/libpkix/pkix/results/pkix_buildresult.h", - "nss/lib/libpkix/pkix/results/pkix_policynode.c", - "nss/lib/libpkix/pkix/results/pkix_policynode.h", - "nss/lib/libpkix/pkix/results/pkix_valresult.c", - "nss/lib/libpkix/pkix/results/pkix_valresult.h", - "nss/lib/libpkix/pkix/results/pkix_verifynode.c", - "nss/lib/libpkix/pkix/results/pkix_verifynode.h", - "nss/lib/libpkix/pkix/store/pkix_store.c", - "nss/lib/libpkix/pkix/store/pkix_store.h", - "nss/lib/libpkix/pkix/top/pkix_build.c", - "nss/lib/libpkix/pkix/top/pkix_build.h", - "nss/lib/libpkix/pkix/top/pkix_lifecycle.c", - "nss/lib/libpkix/pkix/top/pkix_lifecycle.h", - "nss/lib/libpkix/pkix/top/pkix_validate.c", - "nss/lib/libpkix/pkix/top/pkix_validate.h", - "nss/lib/libpkix/pkix/util/pkix_error.c", - "nss/lib/libpkix/pkix/util/pkix_error.h", - "nss/lib/libpkix/pkix/util/pkix_errpaths.c", - "nss/lib/libpkix/pkix/util/pkix_list.c", - "nss/lib/libpkix/pkix/util/pkix_list.h", - "nss/lib/libpkix/pkix/util/pkix_logger.c", - "nss/lib/libpkix/pkix/util/pkix_logger.h", - "nss/lib/libpkix/pkix/util/pkix_tools.c", - "nss/lib/libpkix/pkix/util/pkix_tools.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c", - "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c", - "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c", - "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h", - ] - - # Disable the LDAP code in libpkix. - defines += [ "NSS_PKIX_NO_LDAP" ] - - include_dirs += [ - "nss/lib/libpkix/include", - "nss/lib/libpkix/pkix/certsel", - "nss/lib/libpkix/pkix/checker", - "nss/lib/libpkix/pkix/crlsel", - "nss/lib/libpkix/pkix/params", - "nss/lib/libpkix/pkix/results", - "nss/lib/libpkix/pkix/store", - "nss/lib/libpkix/pkix/top", - "nss/lib/libpkix/pkix/util", - "nss/lib/libpkix/pkix_pl_nss/module", - "nss/lib/libpkix/pkix_pl_nss/pki", - "nss/lib/libpkix/pkix_pl_nss/system", - ] - } else { - defines += [ "NSS_DISABLE_LIBPKIX" ] - } - - if (!include_nss_root_certs) { - defines += [ "NSS_DISABLE_ROOT_CERTS" ] - } - - if (current_cpu == "x64" && !is_win) { - sources -= [ - "nss/lib/freebl/chacha20/chacha20.c", - "nss/lib/freebl/poly1305/poly1305.c", - ] - } else { - sources -= [ - "nss/lib/freebl/chacha20/chacha20_vec.c", - "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", - ] - } - - if (is_mac || is_ios) { - sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] - cflags += [ - "-include", - rebase_path("//third_party/nss/nss/lib/freebl/nss_build_config_mac.h", - root_build_dir), - ] - defines += [ - "XP_UNIX", - "DARWIN", - "HAVE_STRERROR", - "HAVE_BSD_FLOCK", - "SHLIB_SUFFIX=\"dylib\"", - "SHLIB_PREFIX=\"lib\"", - "SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"", - ] - - configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] - } else { - # Not Mac/iOS. - sources -= [ "nss/lib/freebl/mpi/mpi_arm_mac.c" ] - } - - if (is_win) { - defines += [ - "SHLIB_SUFFIX=\"dll\"", - "SHLIB_PREFIX=\"\"", - "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", - "XP_PC", - "WIN32", - "WIN95", - ] - - if (current_cpu == "x86") { - defines += [ - "NSS_X86_OR_X64", - "NSS_X86", - "_X86_", - "MP_ASSEMBLY_MULTIPLY", - "MP_ASSEMBLY_SQUARE", - "MP_ASSEMBLY_DIV_2DX1D", - "MP_USE_UINT_DIGIT", - "MP_NO_MP_WORD", - "USE_HW_AES", - "INTEL_GCM", - ] - sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] - } else if (current_cpu == "x64") { - sources -= [ - "nss/lib/freebl/intel-aes-x86-masm.asm", - "nss/lib/freebl/mpi/mpi_amd64.c", - "nss/lib/freebl/mpi/mpi_x86_asm.c", - ] - defines += [ - "NSS_USE_64", - "NSS_X86_OR_X64", - "NSS_X64", - "_AMD64_", - "MP_CHAR_STORE_SLOW", - "MP_IS_LITTLE_ENDIAN", - "WIN64", - ] - } - } else { - # Not Windows. - sources -= [ - # mpi_x86_asm.c contains MSVC inline assembly code. - "nss/lib/freebl/mpi/mpi_x86_asm.c", - ] - } - - if (is_clang) { - cflags += [ - # nss doesn"t explicitly cast between different enum types. - "-Wno-conversion", - - # nss passes "const char*" through "void*". - "-Wno-incompatible-pointer-types", - - # nss prefers `a && b || c` over `(a && b) || c`. - "-Wno-logical-op-parentheses", - - # nss doesn"t use exhaustive switches on enums - "-Wno-switch", - - # nss has some `unsigned < 0` checks. - "-Wno-tautological-compare", - ] - } - - public_deps = [ - ":nspr", - ] - deps = [ - ":nspr", - "//third_party/sqlite", - ] - - if (is_win && current_cpu == "x86") { - deps += [ ":nss_static_avx" ] - } - } -} # Windows/Mac/iOS. diff --git a/engine/src/flutter/build/secondary/tools/grit/BUILD.gn b/engine/src/flutter/build/secondary/tools/grit/BUILD.gn deleted file mode 100644 index 660bf1b1eb..0000000000 --- a/engine/src/flutter/build/secondary/tools/grit/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. - -# This target creates a stamp file that depends on all the sources in the grit -# directory. By depending on this, a target can force itself to be rebuilt if -# grit itself changes. -action("grit_sources") { - depfile = "$target_out_dir/grit_sources.d" - script = "//build/secondary/tools/grit/stamp_grit_sources.py" - - inputs = [ - "grit.py", - ] - - # Note that we can't call this "grit_sources.stamp" because that file is - # implicitly created by GN for script actions. - outputs = [ - "$target_out_dir/grit_sources.script.stamp", - ] - - args = [ - rebase_path("//tools/grit", root_build_dir), - rebase_path(outputs[0], root_build_dir), - rebase_path(depfile, root_build_dir), - ] -} diff --git a/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni b/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni deleted file mode 100644 index bdf812f219..0000000000 --- a/engine/src/flutter/build/secondary/tools/grit/grit_rule.gni +++ /dev/null @@ -1,483 +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. - -# Instantiate grit. This will produce a script target to run grit, and a -# static library that compiles the .cc files. -# -# Parameters -# -# source (required) -# Path to .grd file. -# -# outputs (required) -# 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 -# nodes of the processed files. -# -# output_dir (optional) -# Directory for generated files. If you specify this, you will often -# want to specify output_name if the target name is not particularly -# unique, since this can cause files from multiple grit targets to -# overwrite each other. -# -# output_name (optiona) -# Provide an alternate base name for the generated files, like the .d -# files. Normally these are based on the target name and go in the -# output_dir, but if multiple targets with the same name end up in -# the same output_dir, they can collide. -# -# depfile_dir (optional) -# If set, used to store the depfile and corresponding stamp file. -# Defaults to output_dir -# -# use_qualified_include (optional) -# If set, output_dir is not added to include_dirs. -# -# configs (optional) -# List of additional configs to be applied to the generated target. -# deps (optional) -# inputs (optional) -# List of additional files, required for grit to process source file. -# visibility (optional) -# Normal meaning. -# -# Example -# -# grit("my_resources") { -# # Source and outputs are required. -# source = "myfile.grd" -# outputs = [ -# "foo_strings.h", -# "foo_strings.pak", -# ] -# -# grit_flags = [ "-E", "foo=bar" ] # Optional extra flags. -# # You can also put deps here if the grit source depends on generated -# # files. -# } -import("//build/config/chrome_build.gni") -import("//build/config/crypto.gni") -import("//build/config/features.gni") -import("//build/config/ui.gni") - -grit_defines = [] - -# Mac and iOS want Title Case strings. -use_titlecase_in_grd_files = is_mac || is_ios -if (use_titlecase_in_grd_files) { - grit_defines += [ - "-D", - "use_titlecase", - ] -} - -if (is_chrome_branded) { - grit_defines += [ - "-D", - "_google_chrome", - "-E", - "CHROMIUM_BUILD=google_chrome", - ] -} else { - grit_defines += [ - "-D", - "_chromium", - "-E", - "CHROMIUM_BUILD=chromium", - ] -} - -if (is_chromeos) { - grit_defines += [ - "-D", - "chromeos", - "-D", - "scale_factors=2x", - ] -} - -if (is_desktop_linux) { - grit_defines += [ - "-D", - "desktop_linux", - ] -} - -if (toolkit_views) { - grit_defines += [ - "-D", - "toolkit_views", - ] -} - -if (use_aura) { - grit_defines += [ - "-D", - "use_aura", - ] -} - -if (use_ash) { - grit_defines += [ - "-D", - "use_ash", - ] -} - -if (use_nss_certs) { - grit_defines += [ - "-D", - "use_nss_certs", - ] -} - -if (use_ozone) { - grit_defines += [ - "-D", - "use_ozone", - ] -} - -if (enable_image_loader_extension) { - grit_defines += [ - "-D", - "image_loader_extension", - ] -} - -if (enable_remoting) { - grit_defines += [ - "-D", - "remoting", - ] -} - -if (is_android) { - grit_defines += [ - "-t", - "android", - "-E", - "ANDROID_JAVA_TAGGED_ONLY=true", - ] -} - -if (is_mac || is_ios) { - grit_defines += [ - "-D", - "scale_factors=2x", - ] -} - -if (is_ios) { - grit_defines += [ - "-t", - "ios", - - # iOS uses a whitelist to filter resources. - "-w", - rebase_path("//build/ios/grit_whitelist.txt", root_build_dir), - ] -} - -if (enable_extensions) { - grit_defines += [ - "-D", - "enable_extensions", - ] -} -if (enable_media_router) { - grit_defines += [ - "-D", - "enable_media_router", - ] -} -if (enable_plugins) { - grit_defines += [ - "-D", - "enable_plugins", - ] -} -if (enable_basic_printing || enable_print_preview) { - grit_defines += [ - "-D", - "enable_printing", - ] - if (enable_print_preview) { - grit_defines += [ - "-D", - "enable_print_preview", - ] - } -} -if (enable_themes) { - grit_defines += [ - "-D", - "enable_themes", - ] -} -if (enable_app_list) { - grit_defines += [ - "-D", - "enable_app_list", - ] -} -if (enable_settings_app) { - grit_defines += [ - "-D", - "enable_settings_app", - ] -} -if (enable_google_now) { - grit_defines += [ - "-D", - "enable_google_now", - ] -} - -# Note: use_concatenated_impulse_responses is omitted. It is never used and -# should probably be removed from GYP build. -if (enable_webrtc) { - grit_defines += [ - "-D", - "enable_webrtc", - ] -} -if (enable_hangout_services_extension) { - grit_defines += [ - "-D", - "enable_hangout_services_extension", - ] -} -if (enable_task_manager) { - grit_defines += [ - "-D", - "enable_task_manager", - ] -} -if (enable_notifications) { - grit_defines += [ - "-D", - "enable_notifications", - ] -} -if (enable_wifi_bootstrapping) { - grit_defines += [ - "-D", - "enable_wifi_bootstrapping", - ] -} -if (enable_service_discovery) { - grit_defines += [ - "-D", - "enable_service_discovery", - ] -} -if (mac_views_browser) { - grit_defines += [ - "-D", - "mac_views_browser", - ] -} - -grit_resource_id_file = "//tools/gritsettings/resource_ids" -grit_info_script = "//tools/grit/grit_info.py" - -template("grit") { - assert(defined(invoker.source), - "\"source\" must be defined for the grit template $target_name") - - grit_inputs = [ invoker.source ] - - if (defined(invoker.resource_ids)) { - resource_ids = invoker.resource_ids - } else { - resource_ids = grit_resource_id_file - } - if (resource_ids != "") { - # The script depends on the ID file. Only add this dependency if the ID - # file is specified. - grit_inputs += [ resource_ids ] - } - - if (defined(invoker.output_dir)) { - output_dir = invoker.output_dir - } else { - output_dir = target_gen_dir - } - - if (defined(invoker.output_name)) { - grit_output_name = invoker.output_name - } else { - grit_output_name = target_name - } - - if (defined(invoker.depfile_dir)) { - depfile_dir = invoker.depfile_dir - } else { - depfile_dir = output_dir - } - - # These are all passed as arguments to the script so have to be relative to - # the build directory. - if (resource_ids != "") { - resource_ids = rebase_path(resource_ids, root_build_dir) - } - rebased_output_dir = rebase_path(output_dir, root_build_dir) - source_path = rebase_path(invoker.source, root_build_dir) - - if (defined(invoker.grit_flags)) { - grit_flags = invoker.grit_flags - } else { - grit_flags = [] # These are optional so default to empty list. - } - - assert_files_flags = [] - - # We want to make sure the declared outputs actually match what Grit is - # writing. We write the list to a file (some of the output lists are long - # enough to not fit on a Windows command line) and ask Grit to verify those - # are the actual outputs at runtime. - asserted_list_file = - "$target_out_dir/${grit_output_name}_expected_outputs.txt" - write_file(asserted_list_file, - rebase_path(invoker.outputs, root_build_dir, output_dir)) - assert_files_flags += [ "--assert-file-list=" + - rebase_path(asserted_list_file, root_build_dir) ] - grit_outputs = - get_path_info(rebase_path(invoker.outputs, ".", output_dir), "abspath") - - # The config and the action below get this visibility son only the generated - # source set can depend on them. The variable "target_name" will get - # overwritten inside the inner classes so we need to compute it here. - target_visibility = [ ":$target_name" ] - - # The current grit setup makes an file in $output_dir/grit/foo.h that - # the source code expects to include via "grit/foo.h". It would be nice to - # change this to including absolute paths relative to the root gen directory - # (like "mycomponent/foo.h"). This config sets up the include path. - grit_config = target_name + "_grit_config" - config(grit_config) { - if (!defined(invoker.use_qualified_include) || - !invoker.use_qualified_include) { - include_dirs = [ output_dir ] - } - visibility = target_visibility - } - - grit_custom_target = target_name + "_grit" - action(grit_custom_target) { - script = "//tools/grit/grit.py" - inputs = grit_inputs - - depfile = "$depfile_dir/${grit_output_name}_stamp.d" - outputs = [ "${depfile}.stamp" ] + grit_outputs - - args = [ - "-i", - source_path, - "build", - ] - if (resource_ids != "") { - args += [ - "-f", - resource_ids, - ] - } - args += [ - "-o", - rebased_output_dir, - "--depdir", - ".", - "--depfile", - rebase_path(depfile, root_build_dir), - "--write-only-new=1", - "--depend-on-stamp", - ] + grit_defines - - # Add extra defines with -D flags. - if (defined(invoker.defines)) { - foreach(i, invoker.defines) { - args += [ - "-D", - i, - ] - } - } - - args += grit_flags + assert_files_flags - - if (defined(invoker.visibility)) { - # This needs to include both what the invoker specified (since they - # probably include generated headers from this target), as well as the - # generated source set (since there's no guarantee that the visibility - # specified by the invoker includes our target). - # - # Only define visibility at all if the invoker specified it. Otherwise, - # we want to keep the public "no visibility specified" default. - visibility = target_visibility + invoker.visibility - } - - deps = [ - "//tools/grit:grit_sources", - ] - if (defined(invoker.deps)) { - deps += invoker.deps - } - if (defined(invoker.inputs)) { - inputs += invoker.inputs - } - } - - # This is the thing that people actually link with, it must be named the - # same as the argument the template was invoked with. - source_set(target_name) { - # Since we generate a file, we need to be run before the targets that - # depend on us. - sources = grit_outputs - - # Deps set on the template invocation will go on the action that runs - # grit above rather than this library. This target needs to depend on the - # action publicly so other scripts can take the outputs from the grit - # script as inputs. - public_deps = [ - ":$grit_custom_target", - ] - public_configs = [ ":$grit_config" ] - - if (defined(invoker.public_configs)) { - public_configs += invoker.public_configs - } - - if (defined(invoker.configs)) { - configs += invoker.configs - } - - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - output_name = grit_output_name - } -} diff --git a/engine/src/flutter/build/secondary/tools/grit/repack.gni b/engine/src/flutter/build/secondary/tools/grit/repack.gni deleted file mode 100644 index 1030674c62..0000000000 --- a/engine/src/flutter/build/secondary/tools/grit/repack.gni +++ /dev/null @@ -1,47 +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. - -# This file defines a template to invoke grit repack in a consistent manner. -# -# Parameters: -# sources [required] -# List of pak files that need to be combined. -# -# output [required] -# File name (single string) of the output file. -# -# repack_options [optional] -# List of extra arguments to pass. -# -# deps [optional] -# visibility [optional] -# Normal meaning. -template("repack") { - action(target_name) { - assert(defined(invoker.sources), "Need sources for $target_name") - assert(defined(invoker.output), "Need output for $target_name") - - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - - script = "//tools/grit/grit/format/repack.py" - - inputs = invoker.sources - outputs = [ - invoker.output, - ] - - args = [] - if (defined(invoker.repack_options)) { - args += invoker.repack_options - } - args += [ rebase_path(invoker.output, root_build_dir) ] - args += rebase_path(invoker.sources, root_build_dir) - - if (defined(invoker.deps)) { - deps = invoker.deps - } - } -} diff --git a/engine/src/flutter/build/secondary/tools/grit/stamp_grit_sources.py b/engine/src/flutter/build/secondary/tools/grit/stamp_grit_sources.py deleted file mode 100644 index d43d4b8c7f..0000000000 --- a/engine/src/flutter/build/secondary/tools/grit/stamp_grit_sources.py +++ /dev/null @@ -1,55 +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. - -# This script enumerates the files in the given directory, writing an empty -# stamp file and a .d file listing the inputs required to make the stamp. This -# allows us to dynamically depend on the grit sources without enumerating the -# grit directory for every invocation of grit (which is what adding the source -# files to every .grd file's .d file would entail) or shelling out to grit -# synchronously during GN execution to get the list (which would be slow). -# -# Usage: -# stamp_grit_sources.py <.d-file> - -import os -import sys - -def GritSourceFiles(grit_root_dir): - files = [] - for root, _, filenames in os.walk(grit_root_dir): - grit_src = [os.path.join(root, f) for f in filenames - if f.endswith('.py') and not f.endswith('_unittest.py')] - files.extend(grit_src) - files = [f.replace('\\', '/') for f in files] - return sorted(files) - - -def WriteDepFile(dep_file, stamp_file, source_files): - with open(dep_file, "w") as f: - f.write(stamp_file) - f.write(": ") - f.write(' '.join(source_files)) - - -def WriteStampFile(stamp_file): - with open(stamp_file, "w"): - pass - - -def main(argv): - if len(argv) != 4: - print "Error: expecting 3 args." - return 1 - - grit_root_dir = sys.argv[1] - stamp_file = sys.argv[2] - dep_file = sys.argv[3] - - WriteStampFile(stamp_file) - WriteDepFile(dep_file, stamp_file, GritSourceFiles(grit_root_dir)) - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/build/slave/OWNERS b/engine/src/flutter/build/slave/OWNERS deleted file mode 100644 index f562c929a1..0000000000 --- a/engine/src/flutter/build/slave/OWNERS +++ /dev/null @@ -1,20 +0,0 @@ -set noparent -agable@chromium.org -agable@google.com -cmp@chromium.org -cmp@google.com -dpranke@chromium.org -iannucci@chromium.org -iannucci@google.com -johnw@chromium.org -johnw@google.com -maruel@chromium.org -maruel@google.com -mmoss@chromium.org -mmoss@google.com -pschmidt@chromium.org -pschmidt@google.com -stip@chromium.org -stip@google.com -szager@chromium.org -szager@google.com diff --git a/engine/src/flutter/build/slave/README b/engine/src/flutter/build/slave/README deleted file mode 100644 index e3718b2c28..0000000000 --- a/engine/src/flutter/build/slave/README +++ /dev/null @@ -1,8 +0,0 @@ -This is a directory which contains configuration information for the -buildsystem. - -* Under recipes, the buildsystem should use only this directory as an - entry point into src/. - -* Scripts in this directory must not import from outside this directory or shell - to scripts outside this directory. diff --git a/engine/src/flutter/build/some.gyp b/engine/src/flutter/build/some.gyp deleted file mode 100644 index 44a1dd59eb..0000000000 --- a/engine/src/flutter/build/some.gyp +++ /dev/null @@ -1,24 +0,0 @@ -# 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. -{ - 'targets': [ - { - 'target_name': 'some', - 'type': 'none', - 'dependencies': [ - # This file is intended to be locally modified. List the targets you use - # regularly. The generated some.sln will contains projects for only - # those targets and the targets they are transitively dependent on. This - # can result in a solution that loads and unloads faster in Visual - # Studio. - # - # Tip: Create a dummy CL to hold your local edits to this file, so they - # don't accidentally get added to another CL that you are editing. - # - # Example: - # '../chrome/chrome.gyp:chrome', - ], - }, - ], -} diff --git a/engine/src/flutter/build/symlink.py b/engine/src/flutter/build/symlink.py deleted file mode 100755 index 1c5d3ddf18..0000000000 --- a/engine/src/flutter/build/symlink.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python -# 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. -"""Make a symlink and optionally touch a file (to handle dependencies).""" -import errno -import optparse -import os.path -import shutil -import sys -def Main(argv): - parser = optparse.OptionParser() - parser.add_option('-f', '--force', action='store_true') - parser.add_option('--touch') - options, args = parser.parse_args(argv[1:]) - if len(args) < 2: - parser.error('at least two arguments required.') - target = args[-1] - sources = args[:-1] - for s in sources: - t = os.path.join(target, os.path.basename(s)) - if len(sources) == 1 and not os.path.isdir(target): - t = target - try: - os.symlink(s, t) - except OSError, e: - if e.errno == errno.EEXIST and options.force: - if os.path.isdir(t): - shutil.rmtree(t, ignore_errors=True) - else: - os.remove(t) - os.symlink(s, t) - else: - raise - if options.touch: - with open(options.touch, 'w') as f: - pass -if __name__ == '__main__': - sys.exit(Main(sys.argv)) diff --git a/engine/src/flutter/build/temp_gyp/README.chromium b/engine/src/flutter/build/temp_gyp/README.chromium deleted file mode 100644 index 8045d61591..0000000000 --- a/engine/src/flutter/build/temp_gyp/README.chromium +++ /dev/null @@ -1,3 +0,0 @@ -This directory will be removed once the files in it are committed upstream and -Chromium imports an upstream revision with these files. Contact mark for -details. diff --git a/engine/src/flutter/build/temp_gyp/pdfsqueeze.gyp b/engine/src/flutter/build/temp_gyp/pdfsqueeze.gyp deleted file mode 100644 index 2b3b1ff81c..0000000000 --- a/engine/src/flutter/build/temp_gyp/pdfsqueeze.gyp +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2009 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. - -{ - 'targets': [ - { - 'target_name': 'pdfsqueeze', - 'type': 'executable', - 'sources': [ - '../../third_party/pdfsqueeze/pdfsqueeze.m', - ], - 'defines': [ - # Use defines to map the full path names that will be used for - # the vars into the short forms expected by pdfsqueeze.m. - '______third_party_pdfsqueeze_ApplyGenericRGB_qfilter=ApplyGenericRGB_qfilter', - '______third_party_pdfsqueeze_ApplyGenericRGB_qfilter_len=ApplyGenericRGB_qfilter_len', - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)', - ], - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', - '$(SDKROOT)/System/Library/Frameworks/Quartz.framework', - ], - 'actions': [ - { - 'action_name': 'Generate inline filter data', - 'inputs': [ - '../../third_party/pdfsqueeze/ApplyGenericRGB.qfilter', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/ApplyGenericRGB.h', - ], - 'action': ['xxd', '-i', '<@(_inputs)', '<@(_outputs)'], - }, - ], - }, - ], -} diff --git a/engine/src/flutter/build/toolchain/OWNERS b/engine/src/flutter/build/toolchain/OWNERS deleted file mode 100644 index c6cda3fcdd..0000000000 --- a/engine/src/flutter/build/toolchain/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -brettw@chromium.org -dpranke@chromium.org -scottmg@chromium.org diff --git a/engine/src/flutter/build/toolchain/android/BUILD.gn b/engine/src/flutter/build/toolchain/android/BUILD.gn deleted file mode 100644 index e543fc66f5..0000000000 --- a/engine/src/flutter/build/toolchain/android/BUILD.gn +++ /dev/null @@ -1,155 +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. - -import("//build/config/sysroot.gni") # Imports android/config.gni. -import("//build/toolchain/ccache.gni") -import("//build/toolchain/clang.gni") -import("//build/toolchain/goma.gni") -import("//build/toolchain/gcc_toolchain.gni") - -# The Android GCC toolchains share most of the same parameters, so we have this -# wrapper around gcc_toolchain to avoid duplication of logic. -# -# Parameters: -# - android_ndk_sysroot -# Sysroot for this architecture. -# - android_ndk_lib_dir -# Subdirectory inside of android_ndk_sysroot where libs go. -# - tool_prefix -# Prefix to be added to the tool names. -# - toolchain_cpu -# Same as gcc_toolchain -template("android_gcc_toolchain") { - gcc_toolchain(target_name) { - # Make our manually injected libs relative to the build dir. - android_ndk_lib = rebase_path( - invoker.android_ndk_sysroot + "/" + invoker.android_ndk_lib_dir, - root_build_dir) - - libs_section_prefix = "$android_ndk_lib/crtbegin_dynamic.o" - libs_section_postfix = "$android_ndk_lib/crtend_android.o" - - solink_libs_section_prefix = "$android_ndk_lib/crtbegin_so.o" - solink_libs_section_postfix = "$android_ndk_lib/crtend_so.o" - - # The tools should be run relative to the build dir. - tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir) - - if (use_goma) { - assert(!use_ccache, "Goma and ccache can't be used together.") - compiler_prefix = "$goma_dir/gomacc " - } else if (use_ccache) { - compiler_prefix = "ccache " - } else { - compiler_prefix = "" - } - - is_clang = invoker.is_clang - if (is_clang) { - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - - cc = compiler_prefix + prefix + "/clang" - cxx = compiler_prefix + prefix + "/clang++" - } else { - cc = compiler_prefix + tool_prefix + "gcc" - cxx = compiler_prefix + tool_prefix + "g++" - } - - ar = tool_prefix + "ar" - ld = cxx - readelf = compiler_prefix + tool_prefix + "readelf" - nm = compiler_prefix + tool_prefix + "nm" - - toolchain_os = "android" - toolchain_cpu = invoker.toolchain_cpu - - # We make the assumption that the gcc_toolchain will produce a soname with - # the following definition. - soname = "{{target_output_name}}{{output_extension}}" - - stripped_soname = "lib.stripped/${soname}" - temp_stripped_soname = "${stripped_soname}.tmp" - - android_strip = "${tool_prefix}strip" - - strip_command = - "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" - replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then mv $temp_stripped_soname $stripped_soname; fi" - postsolink = "$strip_command && $replace_command" - solink_outputs = [ stripped_soname ] - default_output_extension = android_product_extension - - # We make the assumption that the gcc_toolchain will produce an exe with - # the following definition. - exe = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" - stripped_exe = "exe.stripped/$exe" - postlink = "$android_strip --strip-unneeded -o $stripped_exe $exe" - link_outputs = [ stripped_exe ] - } -} - -template("android_gcc_toolchains_helper") { - android_gcc_toolchain(target_name) { - android_ndk_sysroot = invoker.android_ndk_sysroot - android_ndk_lib_dir = invoker.android_ndk_lib_dir - tool_prefix = invoker.tool_prefix - toolchain_cpu = invoker.toolchain_cpu - } - android_gcc_toolchain("clang_$target_name") { - android_ndk_sysroot = invoker.android_ndk_sysroot - android_ndk_lib_dir = invoker.android_ndk_lib_dir - tool_prefix = invoker.tool_prefix - toolchain_cpu = invoker.toolchain_cpu - is_clang = true - } -} - -android_gcc_toolchains_helper("x86") { - android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" - android_ndk_lib_dir = "usr/lib" - - tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" - toolchain_cpu = "x86" -} - -android_gcc_toolchains_helper("arm") { - android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" - android_ndk_lib_dir = "usr/lib" - - tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" - toolchain_cpu = "arm" -} - -android_gcc_toolchains_helper("mipsel") { - android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" - android_ndk_lib_dir = "usr/lib" - - tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" - toolchain_cpu = "mipsel" -} - -android_gcc_toolchains_helper("x64") { - android_ndk_sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" - android_ndk_lib_dir = "usr/lib64" - - tool_prefix = "$x86_64_android_toolchain_root/bin/x86_64-linux-android-" - toolchain_cpu = "x86_64" -} - -android_gcc_toolchains_helper("arm64") { - android_ndk_sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" - android_ndk_lib_dir = "usr/lib" - - tool_prefix = "$arm64_android_toolchain_root/bin/arm-linux-androideabi-" - toolchain_cpu = "aarch64" -} - -android_gcc_toolchains_helper("mips64el") { - android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" - android_ndk_lib_dir = "usr/lib64" - - tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" - toolchain_cpu = "mipsel64el" -} diff --git a/engine/src/flutter/build/toolchain/ccache.gni b/engine/src/flutter/build/toolchain/ccache.gni deleted file mode 100644 index 806e079a4c..0000000000 --- a/engine/src/flutter/build/toolchain/ccache.gni +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 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. - -# Defines the configuration of ccache - a c/c++ compiler cache which can -# greatly reduce recompilation times. -# -# TIPS: -# -# Set clang_use_chrome_plugins=false if using ccache 3.1.9 or earlier, since -# these versions don't support -Xclang. (3.1.10 and later will silently -# ignore -Xclang, so it doesn't matter if you disable clang_use_chrome_plugins -# or not). -# -# Use ccache 3.2 or later to avoid clang unused argument warnings: -# https://bugzilla.samba.org/show_bug.cgi?id=8118 -# -# To avoid -Wparentheses-equality clang warnings, at some cost in terms of -# speed, you can do: -# export CCACHE_CPP2=yes - -declare_args() { - # Set to true to enable ccache. Probably doesn't work on windows. - use_ccache = false -} diff --git a/engine/src/flutter/build/toolchain/clang.gni b/engine/src/flutter/build/toolchain/clang.gni deleted file mode 100644 index c6803844d8..0000000000 --- a/engine/src/flutter/build/toolchain/clang.gni +++ /dev/null @@ -1,9 +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. - -declare_args() { - # Enable the optional type profiler in Clang, which will tag heap allocations - # with the allocation type. - use_clang_type_profiler = false -} diff --git a/engine/src/flutter/build/toolchain/cros/BUILD.gn b/engine/src/flutter/build/toolchain/cros/BUILD.gn deleted file mode 100644 index 140958b5b9..0000000000 --- a/engine/src/flutter/build/toolchain/cros/BUILD.gn +++ /dev/null @@ -1,35 +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("//build/toolchain/clang.gni") -import("//build/toolchain/gcc_toolchain.gni") - -declare_args() { - # The CrOS build system supports many different kinds of targets across - # many different architectures. Bringing your own toolchain is also supported, - # so it's actually impossible to enumerate all toolchains for all targets - # as GN toolchain specifications. - # These arguments provide a mechanism for specifying your CC, CXX and AR at - # buildfile-generation time, allowing the CrOS build system to always use - # the right tools for the current target. - cros_target_cc = "" - cros_target_cxx = "" - cros_target_ar = "" -} - -gcc_toolchain("target") { - assert(cros_target_cc != "", "Must provide target CC.") - assert(cros_target_cxx != "", "Must provide target CXX.") - assert(cros_target_ar != "", "Must provide target AR.") - - cc = "${cros_target_cc}" - cxx = "${cros_target_cxx}" - - ar = "${cros_target_ar}" - ld = cxx - - toolchain_cpu = "${target_cpu}" - toolchain_os = "linux" - is_clang = is_clang -} diff --git a/engine/src/flutter/build/toolchain/fnl/BUILD.gn b/engine/src/flutter/build/toolchain/fnl/BUILD.gn deleted file mode 100644 index 1e4a075231..0000000000 --- a/engine/src/flutter/build/toolchain/fnl/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# 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/toolchain/gcc_toolchain.gni") - -declare_args() { - toolchain_prefix = "" -} - -gcc_toolchain("target") { - assert(toolchain_prefix != "", "Must provide toolchain_prefix") - - cc = "${toolchain_prefix}gcc" - cxx = "${toolchain_prefix}g++" - ar = "${toolchain_prefix}ar" - ld = cxx - readelf = "${toolchain_prefix}readelf" - nm = "${toolchain_prefix}nm" - - toolchain_cpu = "${target_cpu}" - toolchain_os = "linux" - is_clang = is_clang -} diff --git a/engine/src/flutter/build/toolchain/gcc_toolchain.gni b/engine/src/flutter/build/toolchain/gcc_toolchain.gni deleted file mode 100644 index bb1d791938..0000000000 --- a/engine/src/flutter/build/toolchain/gcc_toolchain.gni +++ /dev/null @@ -1,252 +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. - -# This value will be inherited in the toolchain below. -concurrent_links = exec_script("get_concurrent_links.py", [], "value") - -# This template defines a toolchain for something that works like gcc -# (including clang). -# -# It requires the following variables specifying the executables to run: -# - cc -# - cxx -# - ar -# - ld -# - readelf -# - nm -# and the following which is used in the toolchain_args -# - toolchain_cpu (What "current_cpu" should be set to when invoking a -# build using this toolchain.) -# - toolchain_os (What "current_os" should be set to when invoking a -# build using this toolchain.) -# -# Optional parameters: -# - libs_section_prefix -# - libs_section_postfix -# The contents of these strings, if specified, will be placed around -# the libs section of the linker line. It allows one to inject libraries -# at the beginning and end for all targets in a toolchain. -# - solink_libs_section_prefix -# - solink_libs_section_postfix -# Same as libs_section_{pre,post}fix except used for solink instead of link. -# - post_solink -# The content of this string, if specified, will be appended to the solink -# command. -# - deps -# Just forwarded to the toolchain definition. -# - is_clang -# - strip -# Location of the strip executable. When specified, strip will be run on -# all shared libraries and executables as they are built. The pre-stripped -# artifacts will be put in lib.stripped/ and exe.stripped/. -template("gcc_toolchain") { - toolchain(target_name) { - assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") - assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") - assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") - assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") - assert(defined(invoker.readelf), - "gcc_toolchain() must specify a \"readelf\" value") - assert(defined(invoker.nm), "gcc_toolchain() must specify a \"nm\" value") - assert(defined(invoker.toolchain_cpu), - "gcc_toolchain() must specify a \"toolchain_cpu\"") - assert(defined(invoker.toolchain_os), - "gcc_toolchain() must specify a \"toolchain_os\"") - - # We can't do string interpolation ($ in strings) on things with dots in - # them. To allow us to use $cc below, for example, we create copies of - # these values in our scope. - cc = invoker.cc - cxx = invoker.cxx - ar = invoker.ar - ld = invoker.ld - readelf = invoker.readelf - nm = invoker.nm - - # Bring these into our scope for string interpolation with default values. - if (defined(invoker.libs_section_prefix)) { - libs_section_prefix = invoker.libs_section_prefix - } else { - libs_section_prefix = "" - } - - if (defined(invoker.libs_section_postfix)) { - libs_section_postfix = invoker.libs_section_postfix - } else { - libs_section_postfix = "" - } - - if (defined(invoker.solink_libs_section_prefix)) { - solink_libs_section_prefix = invoker.solink_libs_section_prefix - } else { - solink_libs_section_prefix = "" - } - - if (defined(invoker.solink_libs_section_postfix)) { - solink_libs_section_postfix = invoker.solink_libs_section_postfix - } else { - solink_libs_section_postfix = "" - } - - # These library switches can apply to all tools below. - lib_switch = "-l" - lib_dir_switch = "-L" - - tool("cc") { - depfile = "{{output}}.d" - command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "CC {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("cxx") { - depfile = "{{output}}.d" - command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "CXX {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("asm") { - # For GCC we can just use the C compiler to compile assembly. - depfile = "{{output}}.d" - command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "ASM {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("alink") { - rspfile = "{{output}}.rsp" - command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" - description = "AR {{output}}" - rspfile_content = "{{inputs}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", - ] - default_output_extension = ".a" - output_prefix = "lib" - } - - tool("solink") { - soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so". - sofile = "{{root_out_dir}}/$soname" # Possibly including toolchain dir. - rspfile = sofile + ".rsp" - - # These variables are not built into GN but are helpers that implement - # (1) linking to produce a .so, (2) extracting the symbols from that file - # to a temporary file, (3) if the temporary file has differences from the - # existing .TOC file, overwrite it, otherwise, don't change it. - tocfile = sofile + ".TOC" - temporary_tocname = sofile + ".tmp" - link_command = - "$ld -shared {{ldflags}} -o $sofile -Wl,-soname=$soname @$rspfile" - toc_command = "{ $readelf -d $sofile | grep SONAME ; $nm -gD -f p $sofile | cut -f1-2 -d' '; } > $temporary_tocname" - replace_command = "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi" - - command = "$link_command && $toc_command && $replace_command" - if (defined(invoker.postsolink)) { - command += " && " + invoker.postsolink - } - rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" - - description = "SOLINK $sofile" - - # Use this for {{output_extension}} expansions unless a target manually - # overrides it (in which case {{output_extension}} will be what the target - # specifies). - default_output_extension = ".so" - if (defined(invoker.default_output_extension)) { - default_output_extension = invoker.default_output_extension - } - - output_prefix = "lib" - - # Since the above commands only updates the .TOC file when it changes, ask - # Ninja to check if the timestamp actually changed to know if downstream - # dependencies should be recompiled. - restat = true - - # Tell GN about the output files. It will link to the sofile but use the - # tocfile for dependency management. - outputs = [ - sofile, - tocfile, - ] - if (defined(invoker.solink_outputs)) { - outputs += invoker.solink_outputs - } - link_output = sofile - depend_output = tocfile - } - - tool("link") { - exename = "{{target_output_name}}{{output_extension}}" - outfile = "{{root_out_dir}}/$exename" - rspfile = "$outfile.rsp" - unstripped_outfile = outfile - - if (defined(invoker.strip)) { - unstripped_outfile = "{{root_out_dir}}/exe.unstripped/$exename" - } - - command = "$ld {{ldflags}} -o $unstripped_outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" - if (defined(invoker.strip)) { - strip = invoker.strip - strip_command = "${strip} --strip-unneeded -o $outfile $unstripped_outfile" - command += " && " + strip_command - } - if (defined(invoker.postlink)) { - command += " && " + invoker.postlink - } - description = "LINK $outfile" - rspfile_content = "{{inputs}}" - outputs = [ - outfile, - ] - if (outfile != unstripped_outfile) { - outputs += [ unstripped_outfile ] - } - if (defined(invoker.link_outputs)) { - outputs += invoker.link_outputs - } - } - - tool("stamp") { - command = "touch {{output}}" - description = "STAMP {{output}}" - } - - tool("copy") { - command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" - description = "COPY {{source}} {{output}}" - } - - # When invoking this toolchain not as the default one, these args will be - # passed to the build. They are ignored when this is the default toolchain. - toolchain_args() { - current_cpu = invoker.toolchain_cpu - current_os = invoker.toolchain_os - - # These values need to be passed through unchanged. - target_os = target_os - target_cpu = target_cpu - - if (defined(invoker.is_clang)) { - is_clang = invoker.is_clang - } - } - - if (defined(invoker.deps)) { - deps = invoker.deps - } - } -} diff --git a/engine/src/flutter/build/toolchain/get_concurrent_links.py b/engine/src/flutter/build/toolchain/get_concurrent_links.py deleted file mode 100644 index 6a401017eb..0000000000 --- a/engine/src/flutter/build/toolchain/get_concurrent_links.py +++ /dev/null @@ -1,64 +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. - -# This script computs the number of concurrent links we want to run in the build -# as a function of machine spec. It's based on GetDefaultConcurrentLinks in GYP. - -import os -import re -import subprocess -import sys - -def GetDefaultConcurrentLinks(): - # Inherit the legacy environment variable for people that have set it in GYP. - pool_size = int(os.getenv('GYP_LINK_CONCURRENCY', 0)) - if pool_size: - return pool_size - - if sys.platform in ('win32', 'cygwin'): - import ctypes - - class MEMORYSTATUSEX(ctypes.Structure): - _fields_ = [ - ("dwLength", ctypes.c_ulong), - ("dwMemoryLoad", ctypes.c_ulong), - ("ullTotalPhys", ctypes.c_ulonglong), - ("ullAvailPhys", ctypes.c_ulonglong), - ("ullTotalPageFile", ctypes.c_ulonglong), - ("ullAvailPageFile", ctypes.c_ulonglong), - ("ullTotalVirtual", ctypes.c_ulonglong), - ("ullAvailVirtual", ctypes.c_ulonglong), - ("sullAvailExtendedVirtual", ctypes.c_ulonglong), - ] - - stat = MEMORYSTATUSEX(dwLength=ctypes.sizeof(MEMORYSTATUSEX)) - ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat)) - - mem_limit = max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB - hard_cap = max(1, int(os.getenv('GYP_LINK_CONCURRENCY_MAX', 2**32))) - return min(mem_limit, hard_cap) - elif sys.platform.startswith('linux'): - if os.path.exists("/proc/meminfo"): - with open("/proc/meminfo") as meminfo: - memtotal_re = re.compile(r'^MemTotal:\s*(\d*)\s*kB') - for line in meminfo: - match = memtotal_re.match(line) - if not match: - continue - # Allow 8Gb per link on Linux because Gold is quite memory hungry - return max(1, int(match.group(1)) / (8 * (2 ** 20))) - return 1 - elif sys.platform == 'darwin': - try: - avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.memsize'])) - # A static library debug build of Chromium's unit_tests takes ~2.7GB, so - # 4GB per ld process allows for some more bloat. - return max(1, avail_bytes / (4 * (2 ** 30))) # total / 4GB - except Exception: - return 1 - else: - # TODO(scottmg): Implement this for other platforms. - return 1 - -print GetDefaultConcurrentLinks() diff --git a/engine/src/flutter/build/toolchain/goma.gni b/engine/src/flutter/build/toolchain/goma.gni deleted file mode 100644 index c0f4cf2825..0000000000 --- a/engine/src/flutter/build/toolchain/goma.gni +++ /dev/null @@ -1,22 +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. - -# Defines the configuration of Goma. -# -# This is currently designed to match the GYP build exactly, so as not to break -# people during the transition. - -declare_args() { - # Set to true to enable distributed compilation using Goma. - use_goma = false - - # Set the default value based on the platform. - if (is_win) { - # Absolute directory containing the Goma source code. - goma_dir = "C:\goma\goma-win" - } else { - # Absolute directory containing the Goma source code. - goma_dir = getenv("HOME") + "/goma" - } -} diff --git a/engine/src/flutter/build/toolchain/linux/BUILD.gn b/engine/src/flutter/build/toolchain/linux/BUILD.gn deleted file mode 100644 index c16e31c46b..0000000000 --- a/engine/src/flutter/build/toolchain/linux/BUILD.gn +++ /dev/null @@ -1,115 +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. - -import("//build/config/sysroot.gni") -import("//build/toolchain/ccache.gni") -import("//build/toolchain/clang.gni") -import("//build/toolchain/gcc_toolchain.gni") -import("//build/toolchain/goma.gni") - -if (use_goma) { - assert(!use_ccache, "Goma and ccache can't be used together.") - compiler_prefix = "$goma_dir/gomacc " -} else if (use_ccache) { - compiler_prefix = "ccache " -} else { - compiler_prefix = "" -} - -gcc_toolchain("arm") { - cc = "${compiler_prefix}arm-linux-gnueabi-gcc" - cxx = "${compiler_prefix}arm-linux-gnueabi-g++" - - ar = "arm-linux-gnueabi-ar" - ld = cxx - readelf = "arm-linux-gnueabi-readelf" - nm = "arm-linux-gnueabi-nm" - - toolchain_cpu = "arm" - toolchain_os = "linux" - is_clang = false -} - -gcc_toolchain("clang_x86") { - if (use_clang_type_profiler) { - prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", - root_build_dir) - } else { - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - } - cc = "${compiler_prefix}$prefix/clang" - cxx = "${compiler_prefix}$prefix/clang++" - readelf = "readelf" - nm = "nm" - ar = "ar" - ld = cxx - - toolchain_cpu = "x86" - toolchain_os = "linux" - is_clang = true -} - -gcc_toolchain("x86") { - cc = "${compiler_prefix}gcc" - cxx = "$compiler_prefix}g++" - - readelf = "readelf" - nm = "nm" - ar = "ar" - ld = cxx - - toolchain_cpu = "x86" - toolchain_os = "linux" - is_clang = false -} - -gcc_toolchain("clang_x64") { - if (use_clang_type_profiler) { - prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", - root_build_dir) - } else { - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - } - cc = "${compiler_prefix}$prefix/clang" - cxx = "${compiler_prefix}$prefix/clang++" - - readelf = "readelf" - nm = "nm" - ar = "ar" - ld = cxx - strip = "strip" - - toolchain_cpu = "x64" - toolchain_os = "linux" - is_clang = true -} - -gcc_toolchain("x64") { - cc = "${compiler_prefix}gcc" - cxx = "${compiler_prefix}g++" - - readelf = "readelf" - nm = "nm" - ar = "ar" - ld = cxx - - toolchain_cpu = "x64" - toolchain_os = "linux" - is_clang = false -} - -gcc_toolchain("mipsel") { - cc = "mipsel-linux-gnu-gcc" - cxx = "mipsel-linux-gnu-g++" - ar = "mipsel-linux-gnu-ar" - ld = cxx - readelf = "mipsel-linux-gnu-readelf" - nm = "mipsel-linux-gnu-nm" - - toolchain_cpu = "mipsel" - toolchain_os = "linux" - is_clang = false -} diff --git a/engine/src/flutter/build/toolchain/mac/BUILD.gn b/engine/src/flutter/build/toolchain/mac/BUILD.gn deleted file mode 100644 index 8efdd5c85f..0000000000 --- a/engine/src/flutter/build/toolchain/mac/BUILD.gn +++ /dev/null @@ -1,261 +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. - -# TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires -# some enhancements since the commands on Mac are slightly different than on -# Linux. - -import("../goma.gni") -import("//build/config/ios/ios_sdk.gni") -import("//build/config/mac/mac_sdk.gni") - -assert(host_os == "mac") - -import("//build/toolchain/clang.gni") -import("//build/toolchain/goma.gni") -import("//build/config/sysroot.gni") - -if (use_goma) { - goma_prefix = "$goma_dir/gomacc " -} else { - goma_prefix = "" -} - -# This will copy the gyp-mac-tool to the build directory. We pass in the source -# file of the win tool. -gyp_mac_tool_source = - rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir) -exec_script("setup_toolchain.py", [ gyp_mac_tool_source ]) - -# Shared toolchain definition. Invocations should set toolchain_os to set the -# build args in this definition. -template("mac_toolchain") { - toolchain(target_name) { - assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value") - assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value") - assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value") - assert(defined(invoker.toolchain_cpu), - "mac_toolchain() must specify a \"toolchain_cpu\"") - assert(defined(invoker.toolchain_os), - "mac_toolchain() must specify a \"toolchain_os\"") - - # We can't do string interpolation ($ in strings) on things with dots in - # them. To allow us to use $cc below, for example, we create copies of - # these values in our scope. - cc = invoker.cc - cxx = invoker.cxx - ld = invoker.ld - - # Make these apply to all tools below. - lib_switch = "-l" - lib_dir_switch = "-L" - - sysroot_flags = "" - - if (defined(invoker.sysroot_flags)) { - sysroot_flags = invoker.sysroot_flags - } - - toolchain_flags = "" - if (invoker.toolchain_cpu == "i386") { - toolchain_flags = "-m32" - } - - tool("cc") { - depfile = "{{output}}.d" - command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "CC {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("cxx") { - depfile = "{{output}}.d" - command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "CXX {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("asm") { - # For GCC we can just use the C compiler to compile assembly. - depfile = "{{output}}.d" - command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "ASM {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("objc") { - depfile = "{{output}}.d" - command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "OBJC {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("objcxx") { - depfile = "{{output}}.d" - command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_flags $toolchain_flags {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}" - depsformat = "gcc" - description = "OBJCXX {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", - ] - } - - tool("alink") { - command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -static -o {{output}} {{inputs}}" - description = "LIBTOOL-STATIC {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", - ] - default_output_extension = ".a" - output_prefix = "lib" - } - - tool("solink") { - dylib = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.dylib" - rspfile = dylib + ".rsp" - - # These variables are not build into GN but are helpers that implement - # (1) linking to produce a .so, (2) extracting the symbols from that file - # to a temporary file, (3) if the temporary file has differences from the - # existing .TOC file, overwrite it, oterwise, don't change it. - # - # As a special case, if the library reexports symbols from other dynamic - # libraries, we always update the .TOC and skip the temporary file and - # diffing steps, since that library always needs to be re-linked. - tocname = dylib + ".TOC" - temporary_tocname = dylib + ".tmp" - - does_reexport_command = "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB" - link_command = "$ld -shared $sysroot_flags $toolchain_flags {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}" - replace_command = "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname" - extract_toc_command = "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }" - - command = "if $does_reexport_command ; then $link_command && $extract_toc_command > $tocname; else $link_command && $extract_toc_command > $temporary_tocname && $replace_command ; fi; fi" - - rspfile_content = "{{inputs_newline}}" - - description = "SOLINK {{output}}" - - # Use this for {{output_extension}} expansions unless a target manually - # overrides it (in which case {{output_extension}} will be what the target - # specifies). - default_output_extension = ".dylib" - - output_prefix = "lib" - - # Since the above commands only updates the .TOC file when it changes, ask - # Ninja to check if the timestamp actually changed to know if downstream - # dependencies should be recompiled. - restat = true - - # Tell GN about the output files. It will link to the dylib but use the - # tocname for dependency management. - outputs = [ - dylib, - tocname, - ] - link_output = dylib - depend_output = tocname - } - - tool("link") { - outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" - rspfile = "$outfile.rsp" - - command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -Xlinker -rpath -Xlinker @executable_path/Frameworks -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}" - description = "LINK $outfile" - rspfile_content = "{{inputs_newline}}" - outputs = [ - outfile, - ] - } - - tool("stamp") { - command = "touch {{output}}" - description = "STAMP {{output}}" - } - - tool("copy") { - command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" - description = "COPY {{source}} {{output}}" - } - - toolchain_args() { - current_cpu = invoker.toolchain_cpu - current_os = invoker.toolchain_os - - # These values need to be passed through unchanged. - target_os = target_os - target_cpu = target_cpu - - if (defined(invoker.is_clang)) { - is_clang = invoker.is_clang - } - } - } -} - -# Toolchain used for iOS device targets. -mac_toolchain("ios_clang_arm") { - toolchain_cpu = "arm" - toolchain_os = "mac" - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - cc = "${goma_prefix}$prefix/clang" - cxx = "${goma_prefix}$prefix/clang++" - ld = cxx - is_clang = true - sysroot_flags = "-isysroot $ios_device_sdk_path -miphoneos-version-min=$ios_deployment_target" -} - -# Toolchain used for iOS simulator targets. -mac_toolchain("ios_clang_x64") { - toolchain_cpu = "x64" - toolchain_os = "mac" - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - cc = "${goma_prefix}$prefix/clang" - cxx = "${goma_prefix}$prefix/clang++" - ld = cxx - is_clang = true - sysroot_flags = "-isysroot $ios_simulator_sdk_path -mios-simulator-version-min=$ios_deployment_target" -} - -# Toolchain used for Mac host targets. -mac_toolchain("clang_x64") { - toolchain_cpu = "x64" - toolchain_os = "mac" - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - cc = "${goma_prefix}$prefix/clang" - cxx = "${goma_prefix}$prefix/clang++" - ld = cxx - is_clang = true - sysroot_flags = "-isysroot $mac_sdk_path -mmacosx-version-min=$mac_sdk_min" -} - -# Toolchain used for Mac host (i386) targets. -mac_toolchain("clang_i386") { - toolchain_cpu = "i386" - toolchain_os = "mac" - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - cc = "${goma_prefix}$prefix/clang" - cxx = "${goma_prefix}$prefix/clang++" - ld = cxx - is_clang = true - sysroot_flags = "-isysroot $mac_sdk_path -mmacosx-version-min=$mac_sdk_min" -} diff --git a/engine/src/flutter/build/toolchain/mac/setup_toolchain.py b/engine/src/flutter/build/toolchain/mac/setup_toolchain.py deleted file mode 100644 index 431078fb18..0000000000 --- a/engine/src/flutter/build/toolchain/mac/setup_toolchain.py +++ /dev/null @@ -1,29 +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. - -import os -import stat -import sys - -def CopyTool(source_path): - """Copies the given tool to the current directory, including a warning not - to edit it.""" - with open(source_path) as source_file: - tool_source = source_file.readlines() - - # Add header and write it out to the current directory (which should be the - # root build dir). - out_path = 'gyp-mac-tool' - with open(out_path, 'w') as tool_file: - tool_file.write(''.join([tool_source[0], - '# Generated by setup_toolchain.py do not edit.\n'] - + tool_source[1:])) - st = os.stat(out_path) - os.chmod(out_path, st.st_mode | stat.S_IEXEC) - -# Find the tool source, it's the first argument, and copy it. -if len(sys.argv) != 2: - print "Need one argument (mac_tool source path)." - sys.exit(1) -CopyTool(sys.argv[1]) diff --git a/engine/src/flutter/build/toolchain/nacl/BUILD.gn b/engine/src/flutter/build/toolchain/nacl/BUILD.gn deleted file mode 100644 index 5fa637cb9f..0000000000 --- a/engine/src/flutter/build/toolchain/nacl/BUILD.gn +++ /dev/null @@ -1,63 +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. - -toolchain("x86_newlib") { - toolprefix = "gen/sdk/toolchain/linux_x86_newlib/bin/x86_64-nacl-" - cc = toolprefix + "gcc" - cxx = toolprefix + "g++" - ld = toolprefix + "g++" - - tool("cc") { - command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c \$in -o \$out" - description = "CC(NaCl x86 Newlib) \$out" - depfile = "\$out.d" - depsformat = "gcc" - } - tool("cxx") { - # cflags_pch_cc - command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -c \$in -o \$out" - description = "CXX(NaCl x86 Newlib) \$out" - depfile = "\$out.d" - depsformat = "gcc" - } - tool("alink") { - command = "rm -f \$out && ${toolprefix}ar rcs \$out \$in" - description = "AR(NaCl x86 Newlib) \$out" - } - tool("solink") { - command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi" - description = "SOLINK(NaCl x86 Newlib) \$lib" - - #pool = "link_pool" - restat = "1" - } - tool("link") { - command = "$ld \$ldflags -o \$out -Wl,--start-group \$in \$solibs -Wl,--end-group \$libs" - description = "LINK(NaCl x86 Newlib) \$out" - - #pool = "link_pool" - } - - if (is_win) { - tool("stamp") { - command = "$python_path gyp-win-tool stamp \$out" - description = "STAMP \$out" - } - } else { - tool("stamp") { - command = "touch \$out" - description = "STAMP \$out" - } - } - - toolchain_args() { - # Override the default OS detection. The build config will set the is_* - # flags accordingly. - current_os = "nacl" - - # Component build not supported in NaCl, since it does not support shared - # libraries. - is_component_build = false - } -} diff --git a/engine/src/flutter/build/toolchain/win/BUILD.gn b/engine/src/flutter/build/toolchain/win/BUILD.gn deleted file mode 100644 index 454cddea4f..0000000000 --- a/engine/src/flutter/build/toolchain/win/BUILD.gn +++ /dev/null @@ -1,253 +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. - -declare_args() { - # Path to the directory containing the VC binaries for the right - # combination of host and target architectures. Currently only the - # 64-bit host toolchain is supported, with either 32-bit or 64-bit targets. - # If vc_bin_dir is not specified on the command line (and it normally - # isn't), we will dynamically determine the right value to use at runtime. - vc_bin_dir = "" -} - -import("//build/config/win/visual_studio_version.gni") -import("//build/toolchain/goma.gni") - -# Should only be running on Windows. -assert(is_win) - -# Setup the Visual Studio state. -# -# Its arguments are the VS path and the compiler wrapper tool. It will write -# "environment.x86" and "environment.x64" to the build directory and return a -# list to us. -gyp_win_tool_path = - rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir) - -toolchain_data = exec_script("setup_toolchain.py", - [ - visual_studio_path, - gyp_win_tool_path, - windows_sdk_path, - visual_studio_runtime_dirs, - current_cpu, - ], - "scope") - -if (vc_bin_dir == "") { - vc_bin_dir = toolchain_data.vc_bin_dir -} - -if (use_goma) { - goma_prefix = "$goma_dir/gomacc.exe " -} else { - goma_prefix = "" -} - -# This value will be inherited in the toolchain below. -concurrent_links = exec_script("../get_concurrent_links.py", [], "value") - -# Parameters: -# current_cpu: current_cpu to pass as a build arg -# environment: File name of environment file. -template("msvc_toolchain") { - if (defined(invoker.concurrent_links)) { - concurrent_links = invoker.concurrent_links - } - - env = invoker.environment - - if (is_debug) { - configuration = "Debug" - } else { - configuration = "Release" - } - exec_script("../../vs_toolchain.py", - [ - "copy_dlls", - rebase_path(root_build_dir), - configuration, - invoker.current_cpu, - ]) - - cl = invoker.cl - - toolchain(target_name) { - # Make these apply to all tools below. - lib_switch = "" - lib_dir_switch = "/LIBPATH:" - - tool("cc") { - rspfile = "{{output}}.rsp" - - # TODO(brettw) enable this when GN support in the binary has been rolled. - #precompiled_header_type = "msvc" - pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" - command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname" - depsformat = "msvc" - description = "CC {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", - ] - rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" - } - - tool("cxx") { - rspfile = "{{output}}.rsp" - - # TODO(brettw) enable this when GN support in the binary has been rolled. - #precompiled_header_type = "msvc" - - # The PDB name needs to be different between C and C++ compiled files. - pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" - command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname" - depsformat = "msvc" - description = "CXX {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", - ] - rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" - } - - tool("rc") { - command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{include_dirs}} /fo{{output}} {{source}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.res", - ] - description = "RC {{output}}" - } - - tool("asm") { - # TODO(brettw): "/safeseh" assembler argument is hardcoded here. Extract - # assembler flags to a variable like cflags. crbug.com/418613 - command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {{include_dirs}} /safeseh /c /Fo {{output}} {{source}}" - description = "ASM {{output}}" - outputs = [ - "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", - ] - } - - tool("alink") { - rspfile = "{{output}}.rsp" - command = "$python_path gyp-win-tool link-wrapper $env False lib.exe /nologo /ignore:4221 /OUT:{{output}} @$rspfile" - description = "LIB {{output}}" - outputs = [ - # Ignore {{output_extension}} and always use .lib, there's no reason to - # allow targets to override this extension on Windows. - "{{target_out_dir}}/{{target_output_name}}.lib", - ] - default_output_extension = ".lib" - - # The use of inputs_newline is to work around a fixed per-line buffer - # size in the linker. - rspfile_content = "{{inputs_newline}}" - } - - tool("solink") { - dllname = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # e.g. foo.dll - libname = - "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.lib" # e.g. foo.dll.lib - rspfile = "${dllname}.rsp" - - link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" - - # TODO(brettw) support manifests - #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.exe -nologo -manifest $manifests -out:${dllname}.manifest" - #command = "cmd /c $link_command && $manifest_command" - command = link_command - - default_output_extension = ".dll" - description = "LINK(DLL) {{output}}" - outputs = [ - dllname, - libname, - ] - link_output = libname - depend_output = libname - - # The use of inputs_newline is to work around a fixed per-line buffer - # size in the linker. - rspfile_content = "{{libs}} {{solibs}} {{inputs_newline}} {{ldflags}}" - } - - tool("link") { - rspfile = "{{output}}.rsp" - - link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe /nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile" - - # TODO(brettw) support manifests - #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.exe -nologo -manifest $manifests -out:{{output}}.manifest" - #command = "cmd /c $link_command && $manifest_command" - command = link_command - - default_output_extension = ".exe" - description = "LINK {{output}}" - outputs = [ - "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", - ] - - # The use of inputs_newline is to work around a fixed per-line buffer - # size in the linker. - rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}" - } - - tool("stamp") { - command = "$python_path gyp-win-tool stamp {{output}}" - description = "STAMP {{output}}" - } - - tool("copy") { - command = - "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" - description = "COPY {{source}} {{output}}" - } - - # When invoking this toolchain not as the default one, these args will be - # passed to the build. They are ignored when this is the default toolchain. - toolchain_args() { - current_cpu = invoker.current_cpu - if (defined(invoker.is_clang)) { - is_clang = invoker.is_clang - } - } - } -} - -# TODO(dpranke): Declare both toolchains all of the time when we -# get it sorted out how we want to support them both in a single build. -# Right now only one of these can be enabled at a time because the -# runtime libraries get copied to root_build_dir and would collide. -if (current_cpu == "x86") { - msvc_toolchain("x86") { - environment = "environment.x86" - current_cpu = "x86" - cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" - is_clang = false - } - msvc_toolchain("clang_x86") { - environment = "environment.x86" - current_cpu = "x86" - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - cl = "${goma_prefix}$prefix/clang-cl.exe" - is_clang = true - } -} - -if (current_cpu == "x64") { - msvc_toolchain("x64") { - environment = "environment.x64" - current_cpu = "x64" - cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" - is_clang = false - } - msvc_toolchain("clang_x64") { - environment = "environment.x64" - current_cpu = "x64" - prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - root_build_dir) - cl = "${goma_prefix}$prefix/clang-cl.exe" - is_clang = true - } -} diff --git a/engine/src/flutter/build/toolchain/win/midl.gni b/engine/src/flutter/build/toolchain/win/midl.gni deleted file mode 100644 index 3e7fbecca5..0000000000 --- a/engine/src/flutter/build/toolchain/win/midl.gni +++ /dev/null @@ -1,113 +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. - -assert(is_win) - -import("//build/config/win/visual_studio_version.gni") - -# This template defines a rule to invoke the MS IDL compiler. -# -# Parameters -# -# sources -# List of .idl file to process. -# -# out_dir (optional) -# Directory to write the generated files to. Defaults to target_gen_dir. -# -# deps (optional) -# visibility (optional) - -template("midl") { - action_name = "${target_name}_idl_action" - source_set_name = target_name - - assert(defined(invoker.sources), "Source must be defined for $target_name") - - if (defined(invoker.out_dir)) { - out_dir = invoker.out_dir - } else { - out_dir = target_gen_dir - } - - header_file = "{{source_name_part}}.h" - dlldata_file = "{{source_name_part}}.dlldata.c" - interface_identifier_file = "{{source_name_part}}_i.c" - proxy_file = "{{source_name_part}}_p.c" - type_library_file = "{{source_name_part}}.tlb" - - action_foreach(action_name) { - visibility = [ ":$source_set_name" ] - - # This functionality is handled by the win-tool because the GYP build has - # MIDL support built-in. - # TODO(brettw) move this to a separate MIDL wrapper script for better - # clarity once GYP support is not needed. - script = "$root_build_dir/gyp-win-tool" - - sources = invoker.sources - - # Note that .tlb is not included in the outputs as it is not always - # generated depending on the content of the input idl file. - outputs = [ - "$out_dir/$header_file", - "$out_dir/$dlldata_file", - "$out_dir/$interface_identifier_file", - "$out_dir/$proxy_file", - ] - - if (current_cpu == "x86") { - win_tool_arch = "environment.x86" - idl_target_platform = "win32" - } else if (current_cpu == "x64") { - win_tool_arch = "environment.x64" - idl_target_platform = "x64" - } else { - assert(false, "Need environment for this arch") - } - - args = [ - "midl-wrapper", - win_tool_arch, - rebase_path(out_dir, root_build_dir), - type_library_file, - header_file, - dlldata_file, - interface_identifier_file, - proxy_file, - "{{source}}", - "/char", - "signed", - "/env", - idl_target_platform, - "/Oicf", - ] - - if (defined(invoker.deps)) { - deps = invoker.deps - } - } - - source_set(target_name) { - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - - # We only compile the IID files from the IDL tool rather than all outputs. - sources = process_file_template(invoker.sources, - [ "$out_dir/$interface_identifier_file" ]) - - public_deps = [ - ":$action_name", - ] - - config("midl_warnings") { - if (is_clang) { - # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" - cflags = [ "-Wno-extra-tokens" ] - } - } - configs += [ ":midl_warnings" ] - } -} diff --git a/engine/src/flutter/build/toolchain/win/setup_toolchain.py b/engine/src/flutter/build/toolchain/win/setup_toolchain.py deleted file mode 100644 index bc9bd1e7b4..0000000000 --- a/engine/src/flutter/build/toolchain/win/setup_toolchain.py +++ /dev/null @@ -1,154 +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. -# -# Copies the given "win tool" (which the toolchain uses to wrap compiler -# invocations) and the environment blocks for the 32-bit and 64-bit builds on -# Windows to the build directory. -# -# The arguments are the visual studio install location and the location of the -# win tool. The script assumes that the root build directory is the current dir -# and the files will be written to the current directory. - -import errno -import os -import re -import subprocess -import sys - - -def _ExtractImportantEnvironment(output_of_set): - """Extracts environment variables required for the toolchain to run from - a textual dump output by the cmd.exe 'set' command.""" - envvars_to_save = ( - 'goma_.*', # TODO(scottmg): This is ugly, but needed for goma. - 'include', - 'lib', - 'libpath', - 'path', - 'pathext', - 'systemroot', - 'temp', - 'tmp', - ) - env = {} - for line in output_of_set.splitlines(): - for envvar in envvars_to_save: - if re.match(envvar + '=', line.lower()): - var, setting = line.split('=', 1) - if envvar == 'path': - # Our own rules (for running gyp-win-tool) and other actions in - # Chromium rely on python being in the path. Add the path to this - # python here so that if it's not in the path when ninja is run - # later, python will still be found. - setting = os.path.dirname(sys.executable) + os.pathsep + setting - env[var.upper()] = setting - break - for required in ('SYSTEMROOT', 'TEMP', 'TMP'): - if required not in env: - raise Exception('Environment variable "%s" ' - 'required to be set to valid path' % required) - return env - - -def _SetupScript(target_cpu, sdk_dir): - """Returns a command (with arguments) to be used to set up the - environment.""" - # Check if we are running in the SDK command line environment and use - # the setup script from the SDK if so. |target_cpu| should be either - # 'x86' or 'x64'. - assert target_cpu in ('x86', 'x64') - if bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', 1))) and sdk_dir: - return [os.path.normpath(os.path.join(sdk_dir, 'Bin/SetEnv.Cmd')), - '/' + target_cpu] - else: - # We only support x64-hosted tools. - # TODO(scottmg|dpranke): Non-depot_tools toolchain: need to get Visual - # Studio install location from registry. - return [os.path.normpath(os.path.join(os.environ['GYP_MSVS_OVERRIDE_PATH'], - 'VC/vcvarsall.bat')), - 'amd64_x86' if target_cpu == 'x86' else 'amd64'] - - -def _FormatAsEnvironmentBlock(envvar_dict): - """Format as an 'environment block' directly suitable for CreateProcess. - Briefly this is a list of key=value\0, terminated by an additional \0. See - CreateProcess documentation for more details.""" - block = '' - nul = '\0' - for key, value in envvar_dict.iteritems(): - block += key + '=' + value + nul - block += nul - return block - - -def _CopyTool(source_path): - """Copies the given tool to the current directory, including a warning not - to edit it.""" - with open(source_path) as source_file: - tool_source = source_file.readlines() - - # Add header and write it out to the current directory (which should be the - # root build dir). - with open("gyp-win-tool", 'w') as tool_file: - tool_file.write(''.join([tool_source[0], - '# Generated by setup_toolchain.py do not edit.\n'] - + tool_source[1:])) - - -def main(): - if len(sys.argv) != 6: - print('Usage setup_toolchain.py ' - ' ' - ' ') - sys.exit(2) - tool_source = sys.argv[2] - win_sdk_path = sys.argv[3] - runtime_dirs = sys.argv[4] - target_cpu = sys.argv[5] - - _CopyTool(tool_source) - - cpus = ('x86', 'x64') - assert target_cpu in cpus - vc_bin_dir = '' - - # TODO(scottmg|goma): Do we need an equivalent of - # ninja_use_custom_environment_files? - - for cpu in cpus: - # Extract environment variables for subprocesses. - args = _SetupScript(cpu, win_sdk_path) - args.extend(('&&', 'set')) - popen = subprocess.Popen( - args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - variables, _ = popen.communicate() - env = _ExtractImportantEnvironment(variables) - env['PATH'] = runtime_dirs + ';' + env['PATH'] - - if cpu == target_cpu: - for path in env['PATH'].split(os.pathsep): - if os.path.exists(os.path.join(path, 'cl.exe')): - vc_bin_dir = os.path.realpath(path) - break - - # The Windows SDK include directories must be first. They both have a sal.h, - # and the SDK one is newer and the SDK uses some newer features from it not - # present in the Visual Studio one. - - if win_sdk_path: - additional_includes = ('{sdk_dir}\\Include\\shared;' + - '{sdk_dir}\\Include\\um;' + - '{sdk_dir}\\Include\\winrt;').format( - sdk_dir=win_sdk_path) - env['INCLUDE'] = additional_includes + env['INCLUDE'] - env_block = _FormatAsEnvironmentBlock(env) - with open('environment.' + cpu, 'wb') as f: - f.write(env_block) - - assert vc_bin_dir - print 'vc_bin_dir = "%s"' % vc_bin_dir - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/build/tree_truth.sh b/engine/src/flutter/build/tree_truth.sh deleted file mode 100755 index 617092dc8a..0000000000 --- a/engine/src/flutter/build/tree_truth.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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. -# -# Script for printing recent commits in a buildbot run. - -# Return the sha1 of the given tag. If not present, return "". -# $1: path to repo -# $2: tag name -tt_sha1_for_tag() { - oneline=$(cd $1 && git log -1 $2 --format='%H' 2>/dev/null) - if [ $? -eq 0 ] ; then - echo $oneline - fi -} - -# Return the sha1 of HEAD, or "" -# $1: path to repo -tt_sha1_for_head() { - ( cd $1 && git log HEAD -n1 --format='%H' | cat ) -} - -# For the given repo, set tag to HEAD. -# $1: path to repo -# $2: tag name -tt_tag_head() { - ( cd $1 && git tag -f $2 ) -} - -# For the given repo, delete the tag. -# $1: path to repo -# $2: tag name -tt_delete_tag() { - ( cd $1 && git tag -d $2 ) -} - -# For the given repo, set tag to "three commits ago" (for testing). -# $1: path to repo -# $2: tag name -tt_tag_three_ago() { - local sh=$(cd $1 && git log --pretty=oneline -n 3 | tail -1 | awk '{print $1}') - ( cd $1 && git tag -f $2 $sh ) -} - -# List the commits between the given tag and HEAD. -# If the tag does not exist, only list the last few. -# If the tag is at HEAD, list nothing. -# Output format has distinct build steps for repos with changes. -# $1: path to repo -# $2: tag name -# $3: simple/short repo name to use for display -tt_list_commits() { - local tag_sha1=$(tt_sha1_for_tag $1 $2) - local head_sha1=$(tt_sha1_for_head $1) - local display_name=$(echo $3 | sed 's#/#_#g') - if [ "${tag_sha1}" = "${head_sha1}" ] ; then - return - fi - if [ "${tag_sha1}" = "" ] ; then - echo "@@@BUILD_STEP Recent commits in repo $display_name@@@" - echo "NOTE: git tag was not found so we have no baseline." - echo "Here are some recent commits, but they may not be new for this build." - ( cd $1 && git log -n 10 --stat | cat) - else - echo "@@@BUILD_STEP New commits in repo $display_name@@@" - ( cd $1 && git log -n 500 $2..HEAD --stat | cat) - fi -} - -# Clean out the tree truth tags in all repos. For testing. -tt_clean_all() { - for project in $@; do - tt_delete_tag $CHROME_SRC/../$project tree_truth - done -} - -# Print tree truth for all clank repos. -tt_print_all() { - for project in $@; do - local full_path=$CHROME_SRC/../$project - tt_list_commits $full_path tree_truth $project - tt_tag_head $full_path tree_truth - done -} - -# Print a summary of the last 10 commits for each repo. -tt_brief_summary() { - echo "@@@BUILD_STEP Brief summary of recent CLs in every branch@@@" - for project in $@; do - echo $project: - local full_path=$CHROME_SRC/../$project - (cd $full_path && git log -n 10 --format=" %H %s %an, %ad" | cat) - echo "=================================================================" - done -} - -CHROME_SRC=$1 -shift -PROJECT_LIST=$@ -tt_brief_summary $PROJECT_LIST -tt_print_all $PROJECT_LIST diff --git a/engine/src/flutter/build/update-linux-sandbox.sh b/engine/src/flutter/build/update-linux-sandbox.sh deleted file mode 100755 index 735733a0d0..0000000000 --- a/engine/src/flutter/build/update-linux-sandbox.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2012 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. - -BUILDTYPE="${BUILDTYPE:-Debug}" -CHROME_SRC_DIR="${CHROME_SRC_DIR:-$(dirname -- $(readlink -fn -- "$0"))/..}" -CHROME_OUT_DIR="${CHROME_SRC_DIR}/${CHROMIUM_OUT_DIR:-out}/${BUILDTYPE}" -CHROME_SANDBOX_BUILD_PATH="${CHROME_OUT_DIR}/chrome_sandbox" -CHROME_SANDBOX_INST_PATH="/usr/local/sbin/chrome-devel-sandbox" -CHROME_SANDBOX_INST_DIR=$(dirname -- "$CHROME_SANDBOX_INST_PATH") - -TARGET_DIR_TYPE=$(stat -f -c %t -- "${CHROME_SANDBOX_INST_DIR}" 2>/dev/null) -if [ $? -ne 0 ]; then - echo "Could not get status of ${CHROME_SANDBOX_INST_DIR}" - exit 1 -fi - -# Make sure the path is not on NFS. -if [ "${TARGET_DIR_TYPE}" = "6969" ]; then - echo "Please make sure ${CHROME_SANDBOX_INST_PATH} is not on NFS!" - exit 1 -fi - -installsandbox() { - echo "(using sudo so you may be asked for your password)" - sudo -- cp "${CHROME_SANDBOX_BUILD_PATH}" \ - "${CHROME_SANDBOX_INST_PATH}" && - sudo -- chown root:root "${CHROME_SANDBOX_INST_PATH}" && - sudo -- chmod 4755 "${CHROME_SANDBOX_INST_PATH}" - return $? -} - -if [ ! -d "${CHROME_OUT_DIR}" ]; then - echo -n "${CHROME_OUT_DIR} does not exist. Use \"BUILDTYPE=Release ${0}\" " - echo "If you are building in Release mode" - exit 1 -fi - -if [ ! -f "${CHROME_SANDBOX_BUILD_PATH}" ]; then - echo -n "Could not find ${CHROME_SANDBOX_BUILD_PATH}, " - echo "please make sure you build the chrome_sandbox target" - exit 1 -fi - -if [ ! -f "${CHROME_SANDBOX_INST_PATH}" ]; then - echo -n "Could not find ${CHROME_SANDBOX_INST_PATH}, " - echo "installing it now." - installsandbox -fi - -if [ ! -f "${CHROME_SANDBOX_INST_PATH}" ]; then - echo "Failed to install ${CHROME_SANDBOX_INST_PATH}" - exit 1 -fi - -CURRENT_API=$("${CHROME_SANDBOX_BUILD_PATH}" --get-api) -INSTALLED_API=$("${CHROME_SANDBOX_INST_PATH}" --get-api) - -if [ "${CURRENT_API}" != "${INSTALLED_API}" ]; then - echo "Your installed setuid sandbox is too old, installing it now." - if ! installsandbox; then - echo "Failed to install ${CHROME_SANDBOX_INST_PATH}" - exit 1 - fi -else - echo "Your setuid sandbox is up to date" - if [ "${CHROME_DEVEL_SANDBOX}" != "${CHROME_SANDBOX_INST_PATH}" ]; then - echo -n "Make sure you have \"export " - echo -n "CHROME_DEVEL_SANDBOX=${CHROME_SANDBOX_INST_PATH}\" " - echo "somewhere in your .bashrc" - echo "This variable is currently: ${CHROME_DEVEL_SANDBOX:-empty}" - fi -fi diff --git a/engine/src/flutter/build/util/BUILD.gn b/engine/src/flutter/build/util/BUILD.gn deleted file mode 100644 index 29dd9439ca..0000000000 --- a/engine/src/flutter/build/util/BUILD.gn +++ /dev/null @@ -1,48 +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. - -action("webkit_version") { - script = "version.py" - - lastchange_file = "LASTCHANGE.blink" - - # TODO(brettw) move from content to this directory. - template_file = "//content/webkit_version.h.in" - inputs = [ - lastchange_file, - template_file, - ] - - output_file = "$root_gen_dir/webkit_version.h" - outputs = [ - output_file, - ] - - args = [ - "-f", - rebase_path(lastchange_file, root_build_dir), - rebase_path(template_file, root_build_dir), - rebase_path(output_file, root_build_dir), - ] -} - -action("chrome_version_json") { - script = "version.py" - _chrome_version_path = "//chrome/VERSION" - inputs = [ - _chrome_version_path, - ] - _output_file = "$root_gen_dir/CHROME_VERSION.json" - outputs = [ - _output_file, - ] - args = [ - "--file", - rebase_path(_chrome_version_path, root_build_dir), - "--template", - "{\"full-quoted\": \"\\\"@MAJOR@.@MINOR@.@BUILD@.@PATCH@\\\"\"}", - "--output", - rebase_path(_output_file, root_build_dir), - ] -} diff --git a/engine/src/flutter/build/util/lastchange.py b/engine/src/flutter/build/util/lastchange.py deleted file mode 100755 index 3f3ee4af47..0000000000 --- a/engine/src/flutter/build/util/lastchange.py +++ /dev/null @@ -1,309 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -""" -lastchange.py -- Chromium revision fetching utility. -""" - -import re -import optparse -import os -import subprocess -import sys - -_GIT_SVN_ID_REGEX = re.compile(r'.*git-svn-id:\s*([^@]*)@([0-9]+)', re.DOTALL) - -class VersionInfo(object): - def __init__(self, url, revision): - self.url = url - self.revision = revision - - -def FetchSVNRevision(directory, svn_url_regex): - """ - Fetch the Subversion branch and revision for a given directory. - - Errors are swallowed. - - Returns: - A VersionInfo object or None on error. - """ - try: - proc = subprocess.Popen(['svn', 'info'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=directory, - shell=(sys.platform=='win32')) - except OSError: - # command is apparently either not installed or not executable. - return None - if not proc: - return None - - attrs = {} - for line in proc.stdout: - line = line.strip() - if not line: - continue - key, val = line.split(': ', 1) - attrs[key] = val - - try: - match = svn_url_regex.search(attrs['URL']) - if match: - url = match.group(2) - else: - url = '' - revision = attrs['Revision'] - except KeyError: - return None - - return VersionInfo(url, revision) - - -def RunGitCommand(directory, command): - """ - Launches git subcommand. - - Errors are swallowed. - - Returns: - A process object or None. - """ - command = ['git'] + command - # Force shell usage under cygwin. This is a workaround for - # mysterious loss of cwd while invoking cygwin's git. - # We can't just pass shell=True to Popen, as under win32 this will - # cause CMD to be used, while we explicitly want a cygwin shell. - if sys.platform == 'cygwin': - command = ['sh', '-c', ' '.join(command)] - try: - proc = subprocess.Popen(command, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=directory, - shell=(sys.platform=='win32')) - return proc - except OSError: - return None - - -def FetchGitRevision(directory): - """ - Fetch the Git hash for a given directory. - - Errors are swallowed. - - Returns: - A VersionInfo object or None on error. - """ - hsh = '' - proc = RunGitCommand(directory, ['rev-parse', 'HEAD']) - if proc: - output = proc.communicate()[0].strip() - if proc.returncode == 0 and output: - hsh = output - if not hsh: - return None - pos = '' - proc = RunGitCommand(directory, ['cat-file', 'commit', 'HEAD']) - if proc: - output = proc.communicate()[0] - if proc.returncode == 0 and output: - for line in reversed(output.splitlines()): - if line.startswith('Cr-Commit-Position:'): - pos = line.rsplit()[-1].strip() - break - if not pos: - return VersionInfo('git', hsh) - return VersionInfo('git', '%s-%s' % (hsh, pos)) - - -def FetchGitSVNURLAndRevision(directory, svn_url_regex, go_deeper): - """ - Fetch the Subversion URL and revision through Git. - - Errors are swallowed. - - Returns: - A tuple containing the Subversion URL and revision. - """ - git_args = ['log', '-1', '--format=%b'] - if go_deeper: - git_args.append('--grep=git-svn-id') - proc = RunGitCommand(directory, git_args) - if proc: - output = proc.communicate()[0].strip() - if proc.returncode == 0 and output: - # Extract the latest SVN revision and the SVN URL. - # The target line is the last "git-svn-id: ..." line like this: - # git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85528 0039d316.... - match = _GIT_SVN_ID_REGEX.search(output) - if match: - revision = match.group(2) - url_match = svn_url_regex.search(match.group(1)) - if url_match: - url = url_match.group(2) - else: - url = '' - return url, revision - return None, None - - -def FetchGitSVNRevision(directory, svn_url_regex, go_deeper): - """ - Fetch the Git-SVN identifier for the local tree. - - Errors are swallowed. - """ - url, revision = FetchGitSVNURLAndRevision(directory, svn_url_regex, go_deeper) - if url and revision: - return VersionInfo(url, revision) - return None - - -def FetchVersionInfo(default_lastchange, directory=None, - directory_regex_prior_to_src_url='chrome|blink|svn', - go_deeper=False): - """ - Returns the last change (in the form of a branch, revision tuple), - from some appropriate revision control system. - """ - svn_url_regex = re.compile( - r'.*/(' + directory_regex_prior_to_src_url + r')(/.*)') - - version_info = (FetchSVNRevision(directory, svn_url_regex) or - FetchGitSVNRevision(directory, svn_url_regex, go_deeper) or - FetchGitRevision(directory)) - if not version_info: - if default_lastchange and os.path.exists(default_lastchange): - revision = open(default_lastchange, 'r').read().strip() - version_info = VersionInfo(None, revision) - else: - version_info = VersionInfo(None, None) - return version_info - -def GetHeaderGuard(path): - """ - Returns the header #define guard for the given file path. - This treats everything after the last instance of "src/" as being a - relevant part of the guard. If there is no "src/", then the entire path - is used. - """ - src_index = path.rfind('src/') - if src_index != -1: - guard = path[src_index + 4:] - else: - guard = path - guard = guard.upper() - return guard.replace('/', '_').replace('.', '_').replace('\\', '_') + '_' - -def GetHeaderContents(path, define, version): - """ - Returns what the contents of the header file should be that indicate the given - revision. Note that the #define is specified as a string, even though it's - currently always a SVN revision number, in case we need to move to git hashes. - """ - header_guard = GetHeaderGuard(path) - - header_contents = """/* Generated by lastchange.py, do not edit.*/ - -#ifndef %(header_guard)s -#define %(header_guard)s - -#define %(define)s "%(version)s" - -#endif // %(header_guard)s -""" - header_contents = header_contents % { 'header_guard': header_guard, - 'define': define, - 'version': version } - return header_contents - -def WriteIfChanged(file_name, contents): - """ - Writes the specified contents to the specified file_name - iff the contents are different than the current contents. - """ - try: - old_contents = open(file_name, 'r').read() - except EnvironmentError: - pass - else: - if contents == old_contents: - return - os.unlink(file_name) - open(file_name, 'w').write(contents) - - -def main(argv=None): - if argv is None: - argv = sys.argv - - parser = optparse.OptionParser(usage="lastchange.py [options]") - parser.add_option("-d", "--default-lastchange", metavar="FILE", - help="Default last change input FILE.") - parser.add_option("-m", "--version-macro", - help="Name of C #define when using --header. Defaults to " + - "LAST_CHANGE.", - default="LAST_CHANGE") - parser.add_option("-o", "--output", metavar="FILE", - help="Write last change to FILE. " + - "Can be combined with --header to write both files.") - parser.add_option("", "--header", metavar="FILE", - help="Write last change to FILE as a C/C++ header. " + - "Can be combined with --output to write both files.") - parser.add_option("--revision-only", action='store_true', - help="Just print the SVN revision number. Overrides any " + - "file-output-related options.") - parser.add_option("-s", "--source-dir", metavar="DIR", - help="Use repository in the given directory.") - parser.add_option("--git-svn-go-deeper", action='store_true', - help="In a Git-SVN repo, dig down to the last committed " + - "SVN change (historic behaviour).") - opts, args = parser.parse_args(argv[1:]) - - out_file = opts.output - header = opts.header - - while len(args) and out_file is None: - if out_file is None: - out_file = args.pop(0) - if args: - sys.stderr.write('Unexpected arguments: %r\n\n' % args) - parser.print_help() - sys.exit(2) - - if opts.source_dir: - src_dir = opts.source_dir - else: - src_dir = os.path.dirname(os.path.abspath(__file__)) - - version_info = FetchVersionInfo(opts.default_lastchange, - directory=src_dir, - go_deeper=opts.git_svn_go_deeper) - - if version_info.revision == None: - version_info.revision = '0' - - if opts.revision_only: - print version_info.revision - else: - contents = "LASTCHANGE=%s\n" % version_info.revision - if not out_file and not opts.header: - sys.stdout.write(contents) - else: - if out_file: - WriteIfChanged(out_file, contents) - if header: - WriteIfChanged(header, - GetHeaderContents(header, opts.version_macro, - version_info.revision)) - - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/util/lib/common/__init__.py b/engine/src/flutter/build/util/lib/common/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/engine/src/flutter/build/util/lib/common/perf_result_data_type.py b/engine/src/flutter/build/util/lib/common/perf_result_data_type.py deleted file mode 100644 index 67b550a46c..0000000000 --- a/engine/src/flutter/build/util/lib/common/perf_result_data_type.py +++ /dev/null @@ -1,20 +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. - -DEFAULT = 'default' -UNIMPORTANT = 'unimportant' -HISTOGRAM = 'histogram' -UNIMPORTANT_HISTOGRAM = 'unimportant-histogram' -INFORMATIONAL = 'informational' - -ALL_TYPES = [DEFAULT, UNIMPORTANT, HISTOGRAM, UNIMPORTANT_HISTOGRAM, - INFORMATIONAL] - - -def IsValidType(datatype): - return datatype in ALL_TYPES - - -def IsHistogram(datatype): - return (datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM) diff --git a/engine/src/flutter/build/util/lib/common/perf_tests_results_helper.py b/engine/src/flutter/build/util/lib/common/perf_tests_results_helper.py deleted file mode 100644 index 6cb058b2df..0000000000 --- a/engine/src/flutter/build/util/lib/common/perf_tests_results_helper.py +++ /dev/null @@ -1,166 +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. - -import re -import sys - -import json -import logging -import math - -import perf_result_data_type - - -# Mapping from result type to test output -RESULT_TYPES = {perf_result_data_type.UNIMPORTANT: 'RESULT ', - perf_result_data_type.DEFAULT: '*RESULT ', - perf_result_data_type.INFORMATIONAL: '', - perf_result_data_type.UNIMPORTANT_HISTOGRAM: 'HISTOGRAM ', - perf_result_data_type.HISTOGRAM: '*HISTOGRAM '} - - -def _EscapePerfResult(s): - """Escapes |s| for use in a perf result.""" - return re.sub('[\:|=/#&,]', '_', s) - - -def FlattenList(values): - """Returns a simple list without sub-lists.""" - ret = [] - for entry in values: - if isinstance(entry, list): - ret.extend(FlattenList(entry)) - else: - ret.append(entry) - return ret - - -def GeomMeanAndStdDevFromHistogram(histogram_json): - histogram = json.loads(histogram_json) - # Handle empty histograms gracefully. - if not 'buckets' in histogram: - return 0.0, 0.0 - count = 0 - sum_of_logs = 0 - for bucket in histogram['buckets']: - if 'high' in bucket: - bucket['mean'] = (bucket['low'] + bucket['high']) / 2.0 - else: - bucket['mean'] = bucket['low'] - if bucket['mean'] > 0: - sum_of_logs += math.log(bucket['mean']) * bucket['count'] - count += bucket['count'] - - if count == 0: - return 0.0, 0.0 - - sum_of_squares = 0 - geom_mean = math.exp(sum_of_logs / count) - for bucket in histogram['buckets']: - if bucket['mean'] > 0: - sum_of_squares += (bucket['mean'] - geom_mean) ** 2 * bucket['count'] - return geom_mean, math.sqrt(sum_of_squares / count) - - -def _ValueToString(v): - # Special case for floats so we don't print using scientific notation. - if isinstance(v, float): - return '%f' % v - else: - return str(v) - - -def _MeanAndStdDevFromList(values): - avg = None - sd = None - if len(values) > 1: - try: - value = '[%s]' % ','.join([_ValueToString(v) for v in values]) - avg = sum([float(v) for v in values]) / len(values) - sqdiffs = [(float(v) - avg) ** 2 for v in values] - variance = sum(sqdiffs) / (len(values) - 1) - sd = math.sqrt(variance) - except ValueError: - value = ', '.join(values) - else: - value = values[0] - return value, avg, sd - - -def PrintPages(page_list): - """Prints list of pages to stdout in the format required by perf tests.""" - print 'Pages: [%s]' % ','.join([_EscapePerfResult(p) for p in page_list]) - - -def PrintPerfResult(measurement, trace, values, units, - result_type=perf_result_data_type.DEFAULT, - print_to_stdout=True): - """Prints numerical data to stdout in the format required by perf tests. - - The string args may be empty but they must not contain any colons (:) or - equals signs (=). - This is parsed by the buildbot using: - http://src.chromium.org/viewvc/chrome/trunk/tools/build/scripts/slave/process_log_utils.py - - Args: - measurement: A description of the quantity being measured, e.g. "vm_peak". - On the dashboard, this maps to a particular graph. Mandatory. - trace: A description of the particular data point, e.g. "reference". - On the dashboard, this maps to a particular "line" in the graph. - Mandatory. - values: A list of numeric measured values. An N-dimensional list will be - flattened and treated as a simple list. - units: A description of the units of measure, e.g. "bytes". - result_type: Accepts values of perf_result_data_type.ALL_TYPES. - print_to_stdout: If True, prints the output in stdout instead of returning - the output to caller. - - Returns: - String of the formated perf result. - """ - assert perf_result_data_type.IsValidType(result_type), \ - 'result type: %s is invalid' % result_type - - trace_name = _EscapePerfResult(trace) - - if (result_type == perf_result_data_type.UNIMPORTANT or - result_type == perf_result_data_type.DEFAULT or - result_type == perf_result_data_type.INFORMATIONAL): - assert isinstance(values, list) - assert '/' not in measurement - flattened_values = FlattenList(values) - assert len(flattened_values) - value, avg, sd = _MeanAndStdDevFromList(flattened_values) - output = '%s%s: %s%s%s %s' % ( - RESULT_TYPES[result_type], - _EscapePerfResult(measurement), - trace_name, - # Do not show equal sign if the trace is empty. Usually it happens when - # measurement is enough clear to describe the result. - '= ' if trace_name else '', - value, - units) - else: - assert perf_result_data_type.IsHistogram(result_type) - assert isinstance(values, list) - # The histograms can only be printed individually, there's no computation - # across different histograms. - assert len(values) == 1 - value = values[0] - output = '%s%s: %s= %s %s' % ( - RESULT_TYPES[result_type], - _EscapePerfResult(measurement), - trace_name, - value, - units) - avg, sd = GeomMeanAndStdDevFromHistogram(value) - - if avg: - output += '\nAvg %s: %f%s' % (measurement, avg, units) - if sd: - output += '\nSd %s: %f%s' % (measurement, sd, units) - if print_to_stdout: - print output - sys.stdout.flush() - return output diff --git a/engine/src/flutter/build/util/lib/common/unittest_util.py b/engine/src/flutter/build/util/lib/common/unittest_util.py deleted file mode 100644 index 189f5871c7..0000000000 --- a/engine/src/flutter/build/util/lib/common/unittest_util.py +++ /dev/null @@ -1,153 +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. - -"""Utilities for dealing with the python unittest module.""" - -import fnmatch -import sys -import unittest - - -class _TextTestResult(unittest._TextTestResult): - """A test result class that can print formatted text results to a stream. - - Results printed in conformance with gtest output format, like: - [ RUN ] autofill.AutofillTest.testAutofillInvalid: "test desc." - [ OK ] autofill.AutofillTest.testAutofillInvalid - [ RUN ] autofill.AutofillTest.testFillProfile: "test desc." - [ OK ] autofill.AutofillTest.testFillProfile - [ RUN ] autofill.AutofillTest.testFillProfileCrazyCharacters: "Test." - [ OK ] autofill.AutofillTest.testFillProfileCrazyCharacters - """ - def __init__(self, stream, descriptions, verbosity): - unittest._TextTestResult.__init__(self, stream, descriptions, verbosity) - self._fails = set() - - def _GetTestURI(self, test): - return '%s.%s.%s' % (test.__class__.__module__, - test.__class__.__name__, - test._testMethodName) - - def getDescription(self, test): - return '%s: "%s"' % (self._GetTestURI(test), test.shortDescription()) - - def startTest(self, test): - unittest.TestResult.startTest(self, test) - self.stream.writeln('[ RUN ] %s' % self.getDescription(test)) - - def addSuccess(self, test): - unittest.TestResult.addSuccess(self, test) - self.stream.writeln('[ OK ] %s' % self._GetTestURI(test)) - - def addError(self, test, err): - unittest.TestResult.addError(self, test, err) - self.stream.writeln('[ ERROR ] %s' % self._GetTestURI(test)) - self._fails.add(self._GetTestURI(test)) - - def addFailure(self, test, err): - unittest.TestResult.addFailure(self, test, err) - self.stream.writeln('[ FAILED ] %s' % self._GetTestURI(test)) - self._fails.add(self._GetTestURI(test)) - - def getRetestFilter(self): - return ':'.join(self._fails) - - -class TextTestRunner(unittest.TextTestRunner): - """Test Runner for displaying test results in textual format. - - Results are displayed in conformance with google test output. - """ - - def __init__(self, verbosity=1): - unittest.TextTestRunner.__init__(self, stream=sys.stderr, - verbosity=verbosity) - - def _makeResult(self): - return _TextTestResult(self.stream, self.descriptions, self.verbosity) - - -def GetTestsFromSuite(suite): - """Returns all the tests from a given test suite.""" - tests = [] - for x in suite: - if isinstance(x, unittest.TestSuite): - tests += GetTestsFromSuite(x) - else: - tests += [x] - return tests - - -def GetTestNamesFromSuite(suite): - """Returns a list of every test name in the given suite.""" - return map(lambda x: GetTestName(x), GetTestsFromSuite(suite)) - - -def GetTestName(test): - """Gets the test name of the given unittest test.""" - return '.'.join([test.__class__.__module__, - test.__class__.__name__, - test._testMethodName]) - - -def FilterTestSuite(suite, gtest_filter): - """Returns a new filtered tests suite based on the given gtest filter. - - See http://code.google.com/p/googletest/wiki/AdvancedGuide - for gtest_filter specification. - """ - return unittest.TestSuite(FilterTests(GetTestsFromSuite(suite), gtest_filter)) - - -def FilterTests(all_tests, gtest_filter): - """Filter a list of tests based on the given gtest filter. - - Args: - all_tests: List of tests (unittest.TestSuite) - gtest_filter: Filter to apply. - - Returns: - Filtered subset of the given list of tests. - """ - test_names = [GetTestName(test) for test in all_tests] - filtered_names = FilterTestNames(test_names, gtest_filter) - return [test for test in all_tests if GetTestName(test) in filtered_names] - - -def FilterTestNames(all_tests, gtest_filter): - """Filter a list of test names based on the given gtest filter. - - See http://code.google.com/p/googletest/wiki/AdvancedGuide - for gtest_filter specification. - - Args: - all_tests: List of test names. - gtest_filter: Filter to apply. - - Returns: - Filtered subset of the given list of test names. - """ - pattern_groups = gtest_filter.split('-') - positive_patterns = ['*'] - if pattern_groups[0]: - positive_patterns = pattern_groups[0].split(':') - negative_patterns = None - if len(pattern_groups) > 1: - negative_patterns = pattern_groups[1].split(':') - - tests = [] - for test in all_tests: - # Test name must by matched by one positive pattern. - for pattern in positive_patterns: - if fnmatch.fnmatch(test, pattern): - break - else: - continue - # Test name must not be matched by any negative patterns. - for pattern in negative_patterns or []: - if fnmatch.fnmatch(test, pattern): - break - else: - tests += [test] - return tests diff --git a/engine/src/flutter/build/util/lib/common/util.py b/engine/src/flutter/build/util/lib/common/util.py deleted file mode 100644 index a415b1f534..0000000000 --- a/engine/src/flutter/build/util/lib/common/util.py +++ /dev/null @@ -1,151 +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. - -"""Generic utilities for all python scripts.""" - -import atexit -import httplib -import os -import signal -import stat -import subprocess -import sys -import tempfile -import urlparse - - -def GetPlatformName(): - """Return a string to be used in paths for the platform.""" - if IsWindows(): - return 'win' - if IsMac(): - return 'mac' - if IsLinux(): - return 'linux' - raise NotImplementedError('Unknown platform "%s".' % sys.platform) - - -def IsWindows(): - return sys.platform == 'cygwin' or sys.platform.startswith('win') - - -def IsLinux(): - return sys.platform.startswith('linux') - - -def IsMac(): - return sys.platform.startswith('darwin') - - -def _DeleteDir(path): - """Deletes a directory recursively, which must exist.""" - # Don't use shutil.rmtree because it can't delete read-only files on Win. - for root, dirs, files in os.walk(path, topdown=False): - for name in files: - filename = os.path.join(root, name) - os.chmod(filename, stat.S_IWRITE) - os.remove(filename) - for name in dirs: - os.rmdir(os.path.join(root, name)) - os.rmdir(path) - - -def Delete(path): - """Deletes the given file or directory (recursively), which must exist.""" - if os.path.isdir(path): - _DeleteDir(path) - else: - os.remove(path) - - -def MaybeDelete(path): - """Deletes the given file or directory (recurisvely), if it exists.""" - if os.path.exists(path): - Delete(path) - - -def MakeTempDir(parent_dir=None): - """Creates a temporary directory and returns an absolute path to it. - - The temporary directory is automatically deleted when the python interpreter - exits normally. - - Args: - parent_dir: the directory to create the temp dir in. If None, the system - temp dir is used. - - Returns: - The absolute path to the temporary directory. - """ - path = tempfile.mkdtemp(dir=parent_dir) - atexit.register(MaybeDelete, path) - return path - - -def Unzip(zip_path, output_dir): - """Unzips the given zip file using a system installed unzip tool. - - Args: - zip_path: zip file to unzip. - output_dir: directory to unzip the contents of the zip file. The directory - must exist. - - Raises: - RuntimeError if the unzip operation fails. - """ - if IsWindows(): - unzip_cmd = ['C:\\Program Files\\7-Zip\\7z.exe', 'x', '-y'] - else: - unzip_cmd = ['unzip', '-o'] - unzip_cmd += [zip_path] - if RunCommand(unzip_cmd, output_dir) != 0: - raise RuntimeError('Unable to unzip %s to %s' % (zip_path, output_dir)) - - -def Kill(pid): - """Terminate the given pid.""" - if IsWindows(): - subprocess.call(['taskkill.exe', '/T', '/F', '/PID', str(pid)]) - else: - os.kill(pid, signal.SIGTERM) - - -def RunCommand(cmd, cwd=None): - """Runs the given command and returns the exit code. - - Args: - cmd: list of command arguments. - cwd: working directory to execute the command, or None if the current - working directory should be used. - - Returns: - The exit code of the command. - """ - process = subprocess.Popen(cmd, cwd=cwd) - process.wait() - return process.returncode - - -def DoesUrlExist(url): - """Determines whether a resource exists at the given URL. - - Args: - url: URL to be verified. - - Returns: - True if url exists, otherwise False. - """ - parsed = urlparse.urlparse(url) - try: - conn = httplib.HTTPConnection(parsed.netloc) - conn.request('HEAD', parsed.path) - response = conn.getresponse() - except (socket.gaierror, socket.error): - return False - finally: - conn.close() - # Follow both permanent (301) and temporary (302) redirects. - if response.status == 302 or response.status == 301: - return DoesUrlExist(response.getheader('location')) - return response.status == 200 diff --git a/engine/src/flutter/build/util/version.py b/engine/src/flutter/build/util/version.py deleted file mode 100755 index 4d3691ae37..0000000000 --- a/engine/src/flutter/build/util/version.py +++ /dev/null @@ -1,166 +0,0 @@ -#!/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. - -""" -version.py -- Chromium version string substitution utility. -""" - -import argparse -import os -import sys - - -def fetch_values_from_file(values_dict, file_name): - """ - Fetches KEYWORD=VALUE settings from the specified file. - - Everything to the left of the first '=' is the keyword, - everything to the right is the value. No stripping of - white space, so beware. - - The file must exist, otherwise you get the Python exception from open(). - """ - for line in open(file_name, 'r').readlines(): - key, val = line.rstrip('\r\n').split('=', 1) - values_dict[key] = val - - -def fetch_values(file_list): - """ - Returns a dictionary of values to be used for substitution, populating - the dictionary with KEYWORD=VALUE settings from the files in 'file_list'. - - Explicitly adds the following value from internal calculations: - - OFFICIAL_BUILD - """ - CHROME_BUILD_TYPE = os.environ.get('CHROME_BUILD_TYPE') - if CHROME_BUILD_TYPE == '_official': - official_build = '1' - else: - official_build = '0' - - values = dict( - OFFICIAL_BUILD = official_build, - ) - - for file_name in file_list: - fetch_values_from_file(values, file_name) - - return values - - -def subst_template(contents, values): - """ - Returns the template with substituted values from the specified dictionary. - - Keywords to be substituted are surrounded by '@': @KEYWORD@. - - No attempt is made to avoid recursive substitution. The order - of evaluation is random based on the order of the keywords returned - by the Python dictionary. So do NOT substitute a value that - contains any @KEYWORD@ strings expecting them to be recursively - substituted, okay? - """ - for key, val in values.iteritems(): - try: - contents = contents.replace('@' + key + '@', val) - except TypeError: - print repr(key), repr(val) - return contents - - -def subst_file(file_name, values): - """ - Returns the contents of the specified file_name with substituted - values from the specified dictionary. - - This is like subst_template, except it operates on a file. - """ - template = open(file_name, 'r').read() - return subst_template(template, values); - - -def write_if_changed(file_name, contents): - """ - Writes the specified contents to the specified file_name - iff the contents are different than the current contents. - """ - try: - old_contents = open(file_name, 'r').read() - except EnvironmentError: - pass - else: - if contents == old_contents: - return - os.unlink(file_name) - open(file_name, 'w').write(contents) - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('-f', '--file', action='append', default=[], - help='Read variables from FILE.') - parser.add_argument('-i', '--input', default=None, - help='Read strings to substitute from FILE.') - parser.add_argument('-o', '--output', default=None, - help='Write substituted strings to FILE.') - parser.add_argument('-t', '--template', default=None, - help='Use TEMPLATE as the strings to substitute.') - parser.add_argument('-e', '--eval', action='append', default=[], - help='Evaluate VAL after reading variables. Can be used ' - 'to synthesize variables. e.g. -e \'PATCH_HI=int(' - 'PATCH)/256.') - parser.add_argument('args', nargs=argparse.REMAINDER, - help='For compatibility: INPUT and OUTPUT can be ' - 'passed as positional arguments.') - options = parser.parse_args() - - evals = {} - for expression in options.eval: - try: - evals.update(dict([expression.split('=', 1)])) - except ValueError: - parser.error('-e requires VAR=VAL') - - # Compatibility with old versions that considered the first two positional - # arguments shorthands for --input and --output. - while len(options.args) and (options.input is None or \ - options.output is None): - if options.input is None: - options.input = options.args.pop(0) - elif options.output is None: - options.output = options.args.pop(0) - if options.args: - parser.error('Unexpected arguments: %r' % options.args) - - values = fetch_values(options.file) - for key, val in evals.iteritems(): - values[key] = str(eval(val, globals(), values)) - - if options.template is not None: - contents = subst_template(options.template, values) - elif options.input: - contents = subst_file(options.input, values) - else: - # Generate a default set of version information. - contents = """MAJOR=%(MAJOR)s -MINOR=%(MINOR)s -BUILD=%(BUILD)s -PATCH=%(PATCH)s -LASTCHANGE=%(LASTCHANGE)s -OFFICIAL_BUILD=%(OFFICIAL_BUILD)s -""" % values - - if options.output is not None: - write_if_changed(options.output, contents) - else: - print contents - - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/vs_toolchain.py b/engine/src/flutter/build/vs_toolchain.py deleted file mode 100644 index 16f4477556..0000000000 --- a/engine/src/flutter/build/vs_toolchain.py +++ /dev/null @@ -1,259 +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 json -import os -import pipes -import shutil -import subprocess -import sys - - -script_dir = os.path.dirname(os.path.realpath(__file__)) -chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) -SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.insert(1, os.path.join(chrome_src, 'tools')) -sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) -json_data_file = os.path.join(script_dir, 'win_toolchain.json') - - -import gyp - - -def SetEnvironmentAndGetRuntimeDllDirs(): - """Sets up os.environ to use the depot_tools VS toolchain with gyp, and - returns the location of the VS runtime DLLs so they can be copied into - the output directory after gyp generation. - """ - vs2013_runtime_dll_dirs = None - depot_tools_win_toolchain = \ - bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1'))) - if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain: - if not os.path.exists(json_data_file): - Update() - with open(json_data_file, 'r') as tempf: - toolchain_data = json.load(tempf) - - toolchain = toolchain_data['path'] - version = toolchain_data['version'] - win_sdk = toolchain_data.get('win_sdk') - if not win_sdk: - win_sdk = toolchain_data['win8sdk'] - wdk = toolchain_data['wdk'] - # TODO(scottmg): The order unfortunately matters in these. They should be - # split into separate keys for x86 and x64. (See CopyVsRuntimeDlls call - # below). http://crbug.com/345992 - vs2013_runtime_dll_dirs = toolchain_data['runtime_dirs'] - - os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain - os.environ['GYP_MSVS_VERSION'] = version - # We need to make sure windows_sdk_path is set to the automated - # toolchain values in GYP_DEFINES, but don't want to override any - # otheroptions.express - # values there. - gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES')) - gyp_defines_dict['windows_sdk_path'] = win_sdk - os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v))) - for k, v in gyp_defines_dict.iteritems()) - os.environ['WINDOWSSDKDIR'] = win_sdk - os.environ['WDK_DIR'] = wdk - # Include the VS runtime in the PATH in case it's not machine-installed. - runtime_path = ';'.join(vs2013_runtime_dll_dirs) - os.environ['PATH'] = runtime_path + ';' + os.environ['PATH'] - return vs2013_runtime_dll_dirs - - -def _VersionNumber(): - """Gets the standard version number ('120', '140', etc.) based on - GYP_MSVS_VERSION.""" - if os.environ['GYP_MSVS_VERSION'] == '2013': - return '120' - elif os.environ['GYP_MSVS_VERSION'] == '2015': - return '140' - else: - raise ValueError('Unexpected GYP_MSVS_VERSION') - - -def _CopyRuntimeImpl(target, source): - """Copy |source| to |target| if it doesn't already exist or if it - needs to be updated. - """ - if (os.path.isdir(os.path.dirname(target)) and - (not os.path.isfile(target) or - os.stat(target).st_mtime != os.stat(source).st_mtime)): - print 'Copying %s to %s...' % (source, target) - if os.path.exists(target): - os.unlink(target) - shutil.copy2(source, target) - - -def _CopyRuntime2013(target_dir, source_dir, dll_pattern): - """Copy both the msvcr and msvcp runtime DLLs, only if the target doesn't - exist, but the target directory does exist.""" - for file_part in ('p', 'r'): - dll = dll_pattern % file_part - target = os.path.join(target_dir, dll) - source = os.path.join(source_dir, dll) - _CopyRuntimeImpl(target, source) - - -def _CopyRuntime2015(target_dir, source_dir, dll_pattern): - """Copy both the msvcp and vccorlib runtime DLLs, only if the target doesn't - exist, but the target directory does exist.""" - for file_part in ('msvcp', 'vccorlib'): - dll = dll_pattern % file_part - target = os.path.join(target_dir, dll) - source = os.path.join(source_dir, dll) - _CopyRuntimeImpl(target, source) - - -def CopyVsRuntimeDlls(output_dir, runtime_dirs): - """Copies the VS runtime DLLs from the given |runtime_dirs| to the output - directory so that even if not system-installed, built binaries are likely to - be able to run. - - This needs to be run after gyp has been run so that the expected target - output directories are already created. - """ - assert sys.platform.startswith(('win32', 'cygwin')) - - x86, x64 = runtime_dirs - out_debug = os.path.join(output_dir, 'Debug') - out_debug_nacl64 = os.path.join(output_dir, 'Debug', 'x64') - out_release = os.path.join(output_dir, 'Release') - out_release_nacl64 = os.path.join(output_dir, 'Release', 'x64') - out_debug_x64 = os.path.join(output_dir, 'Debug_x64') - out_release_x64 = os.path.join(output_dir, 'Release_x64') - - if os.path.exists(out_debug) and not os.path.exists(out_debug_nacl64): - os.makedirs(out_debug_nacl64) - if os.path.exists(out_release) and not os.path.exists(out_release_nacl64): - os.makedirs(out_release_nacl64) - if os.environ.get('GYP_MSVS_VERSION') == '2015': - _CopyRuntime2015(out_debug, x86, '%s140d.dll') - _CopyRuntime2015(out_release, x86, '%s140.dll') - _CopyRuntime2015(out_debug_x64, x64, '%s140d.dll') - _CopyRuntime2015(out_release_x64, x64, '%s140.dll') - _CopyRuntime2015(out_debug_nacl64, x64, '%s140d.dll') - _CopyRuntime2015(out_release_nacl64, x64, '%s140.dll') - else: - # VS2013 is the default. - _CopyRuntime2013(out_debug, x86, 'msvc%s120d.dll') - _CopyRuntime2013(out_release, x86, 'msvc%s120.dll') - _CopyRuntime2013(out_debug_x64, x64, 'msvc%s120d.dll') - _CopyRuntime2013(out_release_x64, x64, 'msvc%s120.dll') - _CopyRuntime2013(out_debug_nacl64, x64, 'msvc%s120d.dll') - _CopyRuntime2013(out_release_nacl64, x64, 'msvc%s120.dll') - - # Copy the PGO runtime library to the release directories. - if os.environ.get('GYP_MSVS_OVERRIDE_PATH'): - pgo_x86_runtime_dir = os.path.join(os.environ.get('GYP_MSVS_OVERRIDE_PATH'), - 'VC', 'bin') - pgo_x64_runtime_dir = os.path.join(pgo_x86_runtime_dir, 'amd64') - pgo_runtime_dll = 'pgort' + _VersionNumber() + '.dll' - source_x86 = os.path.join(pgo_x86_runtime_dir, pgo_runtime_dll) - if os.path.exists(source_x86): - _CopyRuntimeImpl(os.path.join(out_release, pgo_runtime_dll), source_x86) - source_x64 = os.path.join(pgo_x64_runtime_dir, pgo_runtime_dll) - if os.path.exists(source_x64): - _CopyRuntimeImpl(os.path.join(out_release_x64, pgo_runtime_dll), - source_x64) - - -def CopyDlls(target_dir, configuration, target_cpu): - """Copy the VS runtime DLLs into the requested directory as needed. - - configuration is one of 'Debug' or 'Release'. - target_cpu is one of 'x86' or 'x64'. - - The debug configuration gets both the debug and release DLLs; the - release config only the latter. - """ - vs2013_runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() - if not vs2013_runtime_dll_dirs: - return - - x64_runtime, x86_runtime = vs2013_runtime_dll_dirs - runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime - _CopyRuntime2013( - target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + '.dll') - if configuration == 'Debug': - _CopyRuntime2013( - target_dir, runtime_dir, 'msvc%s' + _VersionNumber() + 'd.dll') - - -def _GetDesiredVsToolchainHashes(): - """Load a list of SHA1s corresponding to the toolchains that we want installed - to build with.""" - # TODO(scottmg): If explicitly set to VS2015 override hashes to the VS2015 RC - # toolchain. http://crbug.com/492774. - if os.environ.get('GYP_MSVS_VERSION') == '2015': - return ['40721575c85171cea5d7afe5ec17bd108a94796e'] - else: - # Default to VS2013. - return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef'] - - -def Update(): - """Requests an update of the toolchain to the specific hashes we have at - this revision. The update outputs a .json of the various configuration - information required to pass to gyp which we use in |GetToolchainDir()|. - """ - depot_tools_win_toolchain = \ - bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1'))) - if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain: - import find_depot_tools - depot_tools_path = find_depot_tools.add_depot_tools_to_path() - get_toolchain_args = [ - sys.executable, - os.path.join(depot_tools_path, - 'win_toolchain', - 'get_toolchain_if_necessary.py'), - '--output-json', json_data_file, - ] + _GetDesiredVsToolchainHashes() - subprocess.check_call(get_toolchain_args) - - return 0 - - -def GetToolchainDir(): - """Gets location information about the current toolchain (must have been - previously updated by 'update'). This is used for the GN build.""" - runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() - - # If WINDOWSSDKDIR is not set, search the default SDK path and set it. - if not 'WINDOWSSDKDIR' in os.environ: - default_sdk_path = 'C:\\Program Files (x86)\\Windows Kits\\8.1' - if os.path.isdir(default_sdk_path): - os.environ['WINDOWSSDKDIR'] = default_sdk_path - - print '''vs_path = "%s" -sdk_path = "%s" -vs_version = "%s" -wdk_dir = "%s" -runtime_dirs = "%s" -''' % ( - os.environ['GYP_MSVS_OVERRIDE_PATH'], - os.environ['WINDOWSSDKDIR'], - os.environ['GYP_MSVS_VERSION'], - os.environ.get('WDK_DIR', ''), - ';'.join(runtime_dll_dirs or ['None'])) - - -def main(): - if not sys.platform.startswith(('win32', 'cygwin')): - return 0 - commands = { - 'update': Update, - 'get_toolchain_dir': GetToolchainDir, - 'copy_dlls': CopyDlls, - } - if len(sys.argv) < 2 or sys.argv[1] not in commands: - print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) - return 1 - return commands[sys.argv[1]](*sys.argv[2:]) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/build/whitespace_file.txt b/engine/src/flutter/build/whitespace_file.txt deleted file mode 100644 index ea82f4e4ca..0000000000 --- a/engine/src/flutter/build/whitespace_file.txt +++ /dev/null @@ -1,156 +0,0 @@ -Copyright 2014 The Chromium Authors. All rights reserved. -Use of this useless file is governed by a BSD-style license that can be -found in the LICENSE file. - - -This file is used for making non-code changes to trigger buildbot cycles. Make -any modification below this line. - -====================================================================== - -Let's make a story. Add zero+ sentences for every commit: - -CHÄPTER 1: -It was a dark and blinky night; the rain fell in torrents -- except at -occasional intervals, when it was checked by a violent gust of wind which -swept up the streets (for it is in London that our scene lies), rattling along -the housetops, and fiercely agitating the scanty flame of the lamps that -struggled against the elements. A hooded figure emerged. - -It was a Domo-Kun. - -"What took you so long?", inquired his wife. - -Silence. Oblivious to his silence, she continued, "Did Mr. Usagi enjoy the -waffles you brought him?" "You know him, he's not one to forego a waffle, -no matter how burnt," he snickered. - -The pause was filled with the sound of compile errors. - -CHAPTER 2: -The jelly was as dark as night, and just as runny. -The Domo-Kun shuddered, remembering the way Mr. Usagi had speared his waffles -with his fork, watching the runny jelly spread and pool across his plate, -like the blood of a dying fawn. "It reminds me of that time --" he started, as -his wife cut in quickly: "-- please. I can't bear to hear it.". A flury of -images coming from the past flowed through his mind. - -"You recall what happened on Mulholland drive?" The ceiling fan rotated slowly -overhead, barely disturbing the thick cigarette smoke. No doubt was left about -when the fan was last cleaned. - -There was a poignant pause. - -CHAPTER 3: -Mr. Usagi felt that something wasn't right. Shortly after the Domo-Kun left he -began feeling sick. He thought out loud to himself, "No, he wouldn't have done -that to me." He considered that perhaps he shouldn't have pushed so hard. -Perhaps he shouldn't have been so cold and sarcastic, after the unimaginable -horror that had occurred just the week before. - -Next time, there won't be any sushi. Why sushi with waffles anyway? It's like -adorning breakfast cereal with halibut -- shameful. - -CHAPTER 4: -The taste of stale sushi in his mouth the next morning was unbearable. He -wondered where the sushi came from as he attempted to wash the taste away with -a bottle of 3000¥ sake. He tries to recall the cook's face. Purple? Probably. - -CHAPTER 5: -Many tears later, Mr. Usagi would laugh at the memory of the earnest, -well-intentioned Domo-Kun. Another day in the life. That is when he realized that -life goes on. - -TRUISMS (1978-1983) -JENNY HOLZER -A LITTLE KNOWLEDGE CAN GO A LONG WAY -A LOT OF PROFESSIONALS ARE CRACKPOTS -A MAN CAN'T KNOW WHAT IT IS TO BE A MOTHER -A NAME MEANS A LOT JUST BY ITSELF -A POSITIVE ATTITUDE MEANS ALL THE DIFFERENCE IN THE WORLD -A RELAXED MAN IS NOT NECESSARILY A BETTER MAN -NO ONE SHOULD EVER USE SVN -AN INFLEXIBLE POSITION SOMETIMES IS A SIGN OF PARALYSIS -IT IS MANS FATE TO OUTSMART HIMSELF -BEING SURE OF YOURSELF MEANS YOU'RE A FOOL -AM NOT -ARE TOO -IF AT FIRST YOU DON'T SUCCEED: TRY, EXCEPT, FINALLY -AND THEN, TIME LEAPT BACKWARDS -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhh LOT -I'm really tempted to change something above the line. -Reeccciiiipppppeeeeeesssssss!!!!!!!!! -PEOPLE SAY "FAILURE IS NOT AN OPTION", BUT FAILURE IS ALWAYS AN OPTION. -WHAT GOES UP MUST HAVE A NON-ZERO VELOCITY - -I can feel the heat closing in, feel them out there making their moves... -What could possibly go wrong? We've already ate our cake. - -Stand Still. Pause Clocks. We can make the World Stop. -WUBWUBWUBWUBWUB - -I want a 1917 build and you will give me what I want. - -This sentence is false. - -Beauty is in the eyes of a Beholder. - -I'm the best at space. - -The first time Yossarian saw the chaplain, he fell madly in love with him. -* -* -* -Give not thyself up, then, to fire, lest it invert thee, deaden thee; as for -the time it did me. There is a wisdom that is woe; but there is a woe that is -madness. And there is a Catskill eagle in some souls that can alike dive down -into the blackest gorges, and soar out of them again and become invisible in -the sunny spaces. And even if he for ever flies within the gorge, that gorge -is in the mountains; so that even in his lowest swoop the mountain eagle is -still higher than other birds upon the plain, even though they soar. -* -* -* - -I'm here to commit lines and drop rhymes -* -This is a line to test and try uploading a cl. - -And lo, in the year 2014, there was verily an attempt to upgrade to GCC 4.8 on -the Android bots, and it was good. Except on one bot, where it was bad. And -lo, the change was reverted, and GCC went back to 4.6, where code is slower -and less optimized. And verily did it break the build, because artifacts had -been created with 4.8, and alignment was no longer the same, and a great -sadness descended upon the Android GN buildbot, and it did refuseth to build -any more. But the sheriffs thought to themselves: Placebo! Let us clobber the -bot, and perhaps it will rebuild with GCC 4.6, which hath worked for many many -seasons. And so they modified the whitespace file with these immortal lines, -and visited it upon the bots, that great destruction might be wrought upon -their outdated binaries. In clobberus, veritas. - -As the git approaches, light begins to shine through the SCM thrice again... -However, the git, is, after all, quite stupid. - -Suddenly Domo-Kun found itself in a room filled with dazzling mirrors. - -A herd of wild gits appears! Time for CQ :D -And one more for sizes.py... - -Sigh. - -It was love at first sight. The moment Yossarian first laid eyes on the chaplain, he fell madly in love with him. - -Cool whitespace change for git-cl land - -Oh god the bots are red! I'm blind! Mmmm, cronuts. - -If you stand on your head, you will get footprints in your hair. - -sigh -sigher -pick up cls - -In the BUILD we trust. -^_^ - -In the masters we don't. diff --git a/engine/src/flutter/build/win_is_xtree_patched.py b/engine/src/flutter/build/win_is_xtree_patched.py deleted file mode 100755 index 3f1994ff9d..0000000000 --- a/engine/src/flutter/build/win_is_xtree_patched.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/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. - -"""Determines if the VS xtree header has been patched to disable C4702.""" - -import os - - -def IsPatched(): - # TODO(scottmg): For now, just return if we're using the packaged toolchain - # script (because we know it's patched). Another case could be added here to - # query the active VS installation and actually check the contents of xtree. - # http://crbug.com/346399. - return int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', 1)) == 1 - - -def DoMain(_): - """Hook to be called from gyp without starting a separate python - interpreter.""" - return "1" if IsPatched() else "0" - - -if __name__ == '__main__': - print DoMain([]) diff --git a/engine/src/flutter/testing/BUILD.gn b/engine/src/flutter/testing/BUILD.gn deleted file mode 100644 index fc50637493..0000000000 --- a/engine/src/flutter/testing/BUILD.gn +++ /dev/null @@ -1,13 +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. - -source_set("gmock_mutant") { - sources = [ - "gmock_mutant.h", # gMock helpers - ] - - deps = [ - "//base", - ] -} diff --git a/engine/src/flutter/testing/OWNERS b/engine/src/flutter/testing/OWNERS deleted file mode 100644 index 72e8ffc0db..0000000000 --- a/engine/src/flutter/testing/OWNERS +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/engine/src/flutter/testing/PRESUBMIT.py b/engine/src/flutter/testing/PRESUBMIT.py deleted file mode 100644 index 5e8fc90625..0000000000 --- a/engine/src/flutter/testing/PRESUBMIT.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2012 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. - -"""Top-level presubmit script for testing. - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts -for more details on the presubmit API built into depot_tools. -""" - - -def CommonChecks(input_api, output_api): - output = [] - blacklist = [r'gmock.*', r'gtest.*'] - output.extend(input_api.canned_checks.RunPylint( - input_api, output_api, black_list=blacklist)) - return output - - -def CheckChangeOnUpload(input_api, output_api): - return CommonChecks(input_api, output_api) - - -def CheckChangeOnCommit(input_api, output_api): - return CommonChecks(input_api, output_api) diff --git a/engine/src/flutter/testing/android/OWNERS b/engine/src/flutter/testing/android/OWNERS deleted file mode 100644 index 0242c2d14c..0000000000 --- a/engine/src/flutter/testing/android/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -aruslan@chromium.org -dtrainor@chromium.org -miguelg@chromium.org -nyquist@chromium.org -skyostil@chromium.org -tedchoc@chromium.org -yfriedman@chromium.org diff --git a/engine/src/flutter/testing/android/appurify_support.gyp b/engine/src/flutter/testing/android/appurify_support.gyp deleted file mode 100644 index 2904368e72..0000000000 --- a/engine/src/flutter/testing/android/appurify_support.gyp +++ /dev/null @@ -1,22 +0,0 @@ -# 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=="android"', { - 'targets': [ - { - 'target_name': 'appurify_support_java', - 'type': 'none', - 'variables': { - 'java_in_dir': '../../testing/android/appurify_support/java', - }, - 'includes': [ - '../../build/java.gypi', - ], - }, - ], - }], - ], -} diff --git a/engine/src/flutter/testing/android/appurify_support/BUILD.gn b/engine/src/flutter/testing/android/appurify_support/BUILD.gn deleted file mode 100644 index 871f9d0dd8..0000000000 --- a/engine/src/flutter/testing/android/appurify_support/BUILD.gn +++ /dev/null @@ -1,15 +0,0 @@ -# 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/android/rules.gni") - -# GYP: //testing/android/appurify_support.gyp:appurify_support_java -android_library("appurify_support_java") { - chromium_code = true - - java_files = [ - "java/src/org/chromium/test/support/ResultsBundleGenerator.java", - "java/src/org/chromium/test/support/RobotiumBundleGenerator.java", - ] -} diff --git a/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/ResultsBundleGenerator.java b/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/ResultsBundleGenerator.java deleted file mode 100644 index c9588d90d4..0000000000 --- a/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/ResultsBundleGenerator.java +++ /dev/null @@ -1,30 +0,0 @@ -// 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. - -package org.chromium.test.support; - -import android.os.Bundle; - -import java.util.Map; - -/** - * Creates a results Bundle. - */ -public interface ResultsBundleGenerator { - - /** Indicates the state of a test. - */ - static enum TestResult { - PASSED, FAILED, ERROR, UNKNOWN - } - - /** Creates a bundle of test results from the provided raw results. - - Note: actual bundle content and format may vary. - - @param rawResults A map between test names and test results. - */ - Bundle generate(Map rawResults); -} - 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 deleted file mode 100644 index e006954cfb..0000000000 --- a/engine/src/flutter/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java +++ /dev/null @@ -1,61 +0,0 @@ -// 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. - -package org.chromium.test.support; - -import android.app.Instrumentation; -import android.os.Bundle; -import android.util.Log; - -import java.util.Map; - -/** - * Creates a results bundle that emulates the one created by Robotium. - */ -public class RobotiumBundleGenerator implements ResultsBundleGenerator { - - private static final String TAG = "RobotiumBundleGenerator"; - - public Bundle generate(Map rawResults) { - int testsPassed = 0; - int testsFailed = 0; - int testsErrored = 0; - - for (Map.Entry entry : rawResults.entrySet()) { - switch (entry.getValue()) { - case PASSED: - ++testsPassed; - break; - case FAILED: - // TODO(jbudorick): Remove this log message once AMP execution and - // results handling has been stabilized. - Log.d(TAG, "FAILED: " + entry.getKey()); - ++testsFailed; - break; - case UNKNOWN: - ++testsErrored; - break; - default: - Log.w(TAG, "Unhandled: " + entry.getKey() + ", " - + entry.getValue().toString()); - break; - } - } - - StringBuilder resultBuilder = new StringBuilder(); - 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)"); - } - - Bundle resultsBundle = new Bundle(); - resultsBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, - resultBuilder.toString()); - return resultsBundle; - } -} diff --git a/engine/src/flutter/testing/android/broker/BUILD.gn b/engine/src/flutter/testing/android/broker/BUILD.gn deleted file mode 100644 index 8daa040832..0000000000 --- a/engine/src/flutter/testing/android/broker/BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ -# 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/android/rules.gni") - -# GYP: //testing/android/on_device_instrumentation.gyp:broker_java -android_library("broker_java") { - chromium_code = true - - java_files = - [ "java/src/org/chromium/test/broker/OnDeviceInstrumentationBroker.java" ] -} diff --git a/engine/src/flutter/testing/android/broker/java/src/org/chromium/test/broker/OnDeviceInstrumentationBroker.java b/engine/src/flutter/testing/android/broker/java/src/org/chromium/test/broker/OnDeviceInstrumentationBroker.java deleted file mode 100644 index cd755d0897..0000000000 --- a/engine/src/flutter/testing/android/broker/java/src/org/chromium/test/broker/OnDeviceInstrumentationBroker.java +++ /dev/null @@ -1,64 +0,0 @@ -// 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. - -package org.chromium.test.broker; - -import android.app.Activity; -import android.content.ComponentName; -import android.content.Intent; -import android.os.Bundle; -import android.util.Log; - -/** - * An Activity target for OnDeviceInstrumentationDriver that starts the specified - * Instrumentation test. - */ -public class OnDeviceInstrumentationBroker extends Activity { - - public static final String EXTRA_INSTRUMENTATION_PACKAGE = - "org.chromium.test.broker.OnDeviceInstrumentationBroker." - + "InstrumentationPackage"; - public static final String EXTRA_INSTRUMENTATION_CLASS = - "org.chromium.test.broker.OnDeviceInstrumentationBroker." - + "InstrumentationClass"; - public static final String EXTRA_TARGET_ARGS = - "org.chromium.test.broker.OnDeviceInstrumentationBroker.TargetArgs"; - public static final String EXTRA_TEST = - "org.chromium.test.broker.OnDeviceInstrumentationBroker.Test"; - - private static final String TAG = "OnDeviceInstrumentationBroker"; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - Log.d(TAG, "onCreate()"); - } - - @Override - public void onStart() { - super.onStart(); - - Intent i = getIntent(); - String instrumentationPackage = i.getStringExtra(EXTRA_INSTRUMENTATION_PACKAGE); - String instrumentationClass = i.getStringExtra(EXTRA_INSTRUMENTATION_CLASS); - Bundle targetArgs = i.getBundleExtra(EXTRA_TARGET_ARGS); - String test = i.getStringExtra(EXTRA_TEST); - - if (instrumentationPackage == null || instrumentationClass == null) { - finish(); - return; - } - - ComponentName instrumentationComponent = - new ComponentName(instrumentationPackage, instrumentationClass); - - if (test != null) { - targetArgs.putString("class", test); - } - - startInstrumentation(instrumentationComponent, null, targetArgs); - finish(); - } -} - diff --git a/engine/src/flutter/testing/android/driver/BUILD.gn b/engine/src/flutter/testing/android/driver/BUILD.gn deleted file mode 100644 index 436ac63c24..0000000000 --- a/engine/src/flutter/testing/android/driver/BUILD.gn +++ /dev/null @@ -1,21 +0,0 @@ -# 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/android/rules.gni") - -# GYP: //testing/android/on_device_instrumentation.gyp:driver_apk -android_apk("driver_apk") { - android_manifest = "java/AndroidManifest.xml" - apk_name = "OnDeviceInstrumentationDriver" - testonly = true - - deps = [ - "//testing/android/appurify_support:appurify_support_java", - "//testing/android/broker:broker_java", - "//testing/android/reporter:reporter_java", - ] - - java_files = - [ "java/src/org/chromium/test/driver/OnDeviceInstrumentationDriver.java" ] -} diff --git a/engine/src/flutter/testing/android/driver/java/AndroidManifest.xml b/engine/src/flutter/testing/android/driver/java/AndroidManifest.xml deleted file mode 100644 index c7e99ef106..0000000000 --- a/engine/src/flutter/testing/android/driver/java/AndroidManifest.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - diff --git a/engine/src/flutter/testing/android/driver/java/src/org/chromium/test/driver/OnDeviceInstrumentationDriver.java b/engine/src/flutter/testing/android/driver/java/src/org/chromium/test/driver/OnDeviceInstrumentationDriver.java deleted file mode 100644 index 78c571a4c5..0000000000 --- a/engine/src/flutter/testing/android/driver/java/src/org/chromium/test/driver/OnDeviceInstrumentationDriver.java +++ /dev/null @@ -1,271 +0,0 @@ -// 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. - -package org.chromium.test.driver; - -import android.app.Activity; -import android.app.Instrumentation; -import android.content.ComponentName; -import android.content.Intent; -import android.os.Bundle; -import android.os.Environment; -import android.test.InstrumentationTestRunner; -import android.util.Log; - -import org.chromium.test.broker.OnDeviceInstrumentationBroker; -import org.chromium.test.reporter.TestStatusReceiver; -import org.chromium.test.reporter.TestStatusReporter; -import org.chromium.test.support.ResultsBundleGenerator; -import org.chromium.test.support.RobotiumBundleGenerator; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.regex.Pattern; - -/** - * An Instrumentation that drives instrumentation tests from outside the app. - */ -public class OnDeviceInstrumentationDriver extends Instrumentation { - - private static final String TAG = "OnDeviceInstrumentationDriver"; - - private static final String EXTRA_TEST_LIST = - "org.chromium.test.driver.OnDeviceInstrumentationDriver.TestList"; - private static final String EXTRA_TEST_LIST_FILE = - "org.chromium.test.driver.OnDeviceInstrumentationDriver.TestListFile"; - private static final String EXTRA_TARGET_PACKAGE = - "org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetPackage"; - private static final String EXTRA_TARGET_CLASS = - "org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetClass"; - - private static final Pattern COMMA = Pattern.compile(","); - private static final int TEST_WAIT_TIMEOUT = 5 * TestStatusReporter.HEARTBEAT_INTERVAL_MS; - - private boolean mDriverStarted; - private Thread mDriverThread; - private Bundle mTargetArgs; - private String mTargetClass; - private String mTargetPackage; - private List mTestClasses; - - /** Parse any arguments and prepare to run tests. - - @param arguments The arguments to parse. - */ - @Override - public void onCreate(Bundle arguments) { - mTargetArgs = new Bundle(arguments); - mTargetPackage = arguments.getString(EXTRA_TARGET_PACKAGE); - if (mTargetPackage == null) { - fail("No target package."); - return; - } - mTargetArgs.remove(EXTRA_TARGET_PACKAGE); - - mTargetClass = arguments.getString(EXTRA_TARGET_CLASS); - if (mTargetClass == null) { - fail("No target class."); - return; - } - mTargetArgs.remove(EXTRA_TARGET_CLASS); - - mTestClasses = new ArrayList(); - String testList = arguments.getString(EXTRA_TEST_LIST); - if (testList != null) { - mTestClasses.addAll(Arrays.asList(COMMA.split(testList))); - mTargetArgs.remove(EXTRA_TEST_LIST); - } - - String testListFilePath = arguments.getString(EXTRA_TEST_LIST_FILE); - if (testListFilePath != null) { - File testListFile = new File(Environment.getExternalStorageDirectory(), - testListFilePath); - try { - BufferedReader testListFileReader = - new BufferedReader(new FileReader(testListFile)); - String test; - while ((test = testListFileReader.readLine()) != null) { - mTestClasses.add(test); - } - testListFileReader.close(); - } catch (IOException e) { - Log.e(TAG, "Error reading " + testListFile.getAbsolutePath(), e); - } - mTargetArgs.remove(EXTRA_TEST_LIST_FILE); - } - - if (mTestClasses.isEmpty()) { - fail("No tests."); - return; - } - - mDriverThread = new Thread( - new Driver(mTargetPackage, mTargetClass, mTargetArgs, mTestClasses)); - - start(); - } - - /** Start running tests. */ - @Override - public void onStart() { - super.onStart(); - - // Start the driver on its own thread s.t. it can block while the main thread's - // Looper receives and handles messages. - if (!mDriverStarted) { - mDriverThread.start(); - mDriverStarted = true; - } - } - - /** Clean up the reporting service. */ - @Override - public void onDestroy() { - super.onDestroy(); - } - - private class Driver implements Runnable { - - private static final String TAG = OnDeviceInstrumentationDriver.TAG + ".Driver"; - - private Bundle mTargetArgs; - private String mTargetClass; - private String mTargetPackage; - private List mTestClasses; - - public Driver(String targetPackage, String targetClass, Bundle targetArgs, - List testClasses) { - mTargetPackage = targetPackage; - mTargetClass = targetClass; - mTargetArgs = targetArgs; - mTestClasses = testClasses; - } - - private void sendTestStatus(int status, String testClass, String testMethod) { - Bundle statusBundle = new Bundle(); - statusBundle.putString(InstrumentationTestRunner.REPORT_KEY_NAME_CLASS, testClass); - statusBundle.putString(InstrumentationTestRunner.REPORT_KEY_NAME_TEST, testMethod); - sendStatus(status, statusBundle); - } - - /** Run the tests. */ - @Override - public void run() { - final HashMap finished = - new HashMap(); - final Object statusLock = new Object(); - - try { - TestStatusReceiver r = new TestStatusReceiver(); - r.registerCallback(new TestStatusReceiver.StartCallback() { - @Override - public void testStarted(String testClass, String testMethod) { - sendTestStatus(InstrumentationTestRunner.REPORT_VALUE_RESULT_START, - testClass, testMethod); - synchronized (statusLock) { - statusLock.notify(); - } - } - }); - r.registerCallback(new TestStatusReceiver.PassCallback() { - @Override - public void testPassed(String testClass, String testMethod) { - sendTestStatus(InstrumentationTestRunner.REPORT_VALUE_RESULT_OK, testClass, - testMethod); - synchronized (statusLock) { - finished.put(testClass + "#" + testMethod, - ResultsBundleGenerator.TestResult.PASSED); - statusLock.notify(); - } - } - }); - r.registerCallback(new TestStatusReceiver.FailCallback() { - @Override - public void testFailed(String testClass, String testMethod) { - sendTestStatus(InstrumentationTestRunner.REPORT_VALUE_RESULT_ERROR, - testClass, testMethod); - synchronized (statusLock) { - finished.put(testClass + "#" + testMethod, - ResultsBundleGenerator.TestResult.FAILED); - statusLock.notify(); - } - } - }); - r.registerCallback(new TestStatusReceiver.HeartbeatCallback() { - @Override - public void heartbeat() { - Log.i(TAG, "Heartbeat received."); - synchronized (statusLock) { - statusLock.notify(); - } - } - }); - r.register(getContext()); - - for (String t : mTestClasses) { - Intent slaveIntent = new Intent(); - slaveIntent.setComponent(new ComponentName( - mTargetPackage, OnDeviceInstrumentationBroker.class.getName())); - slaveIntent.putExtra( - OnDeviceInstrumentationBroker.EXTRA_INSTRUMENTATION_PACKAGE, - mTargetPackage); - slaveIntent.putExtra( - OnDeviceInstrumentationBroker.EXTRA_INSTRUMENTATION_CLASS, - mTargetClass); - slaveIntent.putExtra(OnDeviceInstrumentationBroker.EXTRA_TEST, t); - slaveIntent.putExtra(OnDeviceInstrumentationBroker.EXTRA_TARGET_ARGS, - mTargetArgs); - slaveIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - - getContext().startActivity(slaveIntent); - - synchronized (statusLock) { - while (!finished.containsKey(t)) { - long waitStart = System.currentTimeMillis(); - statusLock.wait(TEST_WAIT_TIMEOUT); - if (System.currentTimeMillis() - waitStart > TEST_WAIT_TIMEOUT) { - Log.e(TAG, t + " has gone missing and is assumed to be dead."); - finished.put(t, ResultsBundleGenerator.TestResult.FAILED); - break; - } - } - } - } - getContext().unregisterReceiver(r); - - } catch (InterruptedException e) { - fail("Interrupted while running tests.", e); - return; - } - pass(new RobotiumBundleGenerator().generate(finished)); - } - - } - - private void fail(String reason) { - Log.e(TAG, reason); - failImpl(reason); - } - - private void fail(String reason, Exception e) { - Log.e(TAG, reason, e); - failImpl(reason); - } - - private void failImpl(String reason) { - Bundle b = new Bundle(); - b.putString("reason", reason); - finish(Activity.RESULT_CANCELED, b); - } - - private void pass(Bundle results) { - finish(Activity.RESULT_OK, results); - } -} diff --git a/engine/src/flutter/testing/android/junit/BUILD.gn b/engine/src/flutter/testing/android/junit/BUILD.gn deleted file mode 100644 index d479629278..0000000000 --- a/engine/src/flutter/testing/android/junit/BUILD.gn +++ /dev/null @@ -1,24 +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. - -assert(is_android) - -import("//build/config/android/rules.gni") - -# GYP: //testing/android/junit_test.gyp:junit_test_support -java_library("junit_test_support") { - testonly = true - DEPRECATED_java_in_dir = "java/src" - deps = [ - "//third_party/junit", - "//third_party/mockito:mockito_java", - "//third_party/robolectric:robolectric_java", - "//third_party/robolectric:android-all-4.3_r2-robolectric-0", - ] -} - -# GYP: //testing/android/junit_test.gyp:junit_unit_tests -junit_binary("junit_unittests") { - DEPRECATED_java_in_dir = "javatests/src" -} diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestComputer.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestComputer.java deleted file mode 100644 index c6782d0d27..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestComputer.java +++ /dev/null @@ -1,76 +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.testing.local; - -import org.junit.runner.Computer; -import org.junit.runner.Description; -import org.junit.runner.Runner; -import org.junit.runner.manipulation.Filter; -import org.junit.runner.manipulation.Filterable; -import org.junit.runner.manipulation.NoTestsRemainException; -import org.junit.runner.notification.RunNotifier; -import org.junit.runners.model.InitializationError; -import org.junit.runners.model.RunnerBuilder; - -/** - * A Computer that logs the start and end of test cases googletest-style. - */ -public class GtestComputer extends Computer { - - private final GtestLogger mLogger; - - public GtestComputer(GtestLogger logger) { - mLogger = logger; - } - - /** - * A wrapping Runner that logs the start and end of each test case. - */ - private class GtestSuiteRunner extends Runner implements Filterable { - private final Runner mRunner; - - public GtestSuiteRunner(Runner contained) { - mRunner = contained; - } - - public Description getDescription() { - return mRunner.getDescription(); - } - - public void run(RunNotifier notifier) { - long startTimeMillis = System.currentTimeMillis(); - mLogger.testCaseStarted(mRunner.getDescription(), - mRunner.getDescription().testCount()); - mRunner.run(notifier); - mLogger.testCaseFinished(mRunner.getDescription(), - mRunner.getDescription().testCount(), - System.currentTimeMillis() - startTimeMillis); - } - - public void filter(Filter filter) throws NoTestsRemainException { - if (mRunner instanceof Filterable) { - ((Filterable) mRunner).filter(filter); - } - } - } - - /** - * Returns a suite of unit tests with each class runner wrapped by a - * GtestSuiteRunner. - */ - @Override - public Runner getSuite(final RunnerBuilder builder, Class[] classes) - throws InitializationError { - return super.getSuite( - new RunnerBuilder() { - @Override - public Runner runnerForClass(Class testClass) throws Throwable { - return new GtestSuiteRunner(builder.runnerForClass(testClass)); - } - }, classes); - } - -} - diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java deleted file mode 100644 index d5527aa22a..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java +++ /dev/null @@ -1,98 +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.testing.local; - -import org.junit.runner.Description; -import org.junit.runner.manipulation.Filter; - -import java.util.HashSet; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Filters tests based on a googletest-style filter string. - */ -class GtestFilter extends Filter { - - private final String mFilterString; - - private final Set mPositiveRegexes; - private final Set mNegativeRegexes; - - private static final Pattern ASTERISK = Pattern.compile("\\*"); - private static final Pattern COLON = Pattern.compile(":"); - private static final Pattern DASH = Pattern.compile("-"); - private static final Pattern DOLLAR = Pattern.compile("\\$"); - private static final Pattern PERIOD = Pattern.compile("\\."); - - /** - * Creates the filter and converts the provided googletest-style filter - * string into positive and negative regexes. - */ - public GtestFilter(String filterString) { - mFilterString = filterString; - mPositiveRegexes = new HashSet(); - mNegativeRegexes = new HashSet(); - - String[] filterStrings = COLON.split(filterString); - for (String f : filterStrings) { - if (f.isEmpty()) continue; - - String sanitized = PERIOD.matcher(f).replaceAll(Matcher.quoteReplacement("\\.")); - sanitized = DOLLAR.matcher(sanitized).replaceAll(Matcher.quoteReplacement("\\$")); - sanitized = ASTERISK.matcher(sanitized).replaceAll(".*"); - int negIndex = sanitized.indexOf('-'); - if (negIndex == 0) { - mNegativeRegexes.add(Pattern.compile(sanitized.substring(1))); - } else if (negIndex != -1) { - String[] c = DASH.split(sanitized, 2); - mPositiveRegexes.add(Pattern.compile(c[0])); - mNegativeRegexes.add(Pattern.compile(c[1])); - } else { - mPositiveRegexes.add(Pattern.compile(sanitized)); - } - } - } - - /** - * Determines whether or not a test with the provided description should - * run based on the configured positive and negative regexes. - * - * A test should run if: - * - it's just a class, OR - * - it doesn't match any of the negative regexes, AND - * - either: - * - there are no configured positive regexes, OR - * - it matches at least one of the positive regexes. - */ - @Override - public boolean shouldRun(Description description) { - if (description.getMethodName() == null) return true; - - String gtestName = description.getClassName() + "." + description.getMethodName(); - for (Pattern p : mNegativeRegexes) { - if (p.matcher(gtestName).matches()) return false; - } - - if (mPositiveRegexes.isEmpty()) return true; - - for (Pattern p : mPositiveRegexes) { - if (p.matcher(gtestName).matches()) return true; - } - - return false; - } - - /** - * Returns a description of this filter. - */ - @Override - public String describe() { - return "gtest-filter: " + mFilterString; - } - -} - diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestListener.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestListener.java deleted file mode 100644 index 122d1355c0..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestListener.java +++ /dev/null @@ -1,80 +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.testing.local; - -import org.junit.runner.Description; -import org.junit.runner.Result; -import org.junit.runner.notification.Failure; -import org.junit.runner.notification.RunListener; - -import java.util.HashSet; -import java.util.Set; - -/** A JUnit RunListener that emulates GTest output to the extent that it can. - */ -public class GtestListener extends RunListener { - - private Set mFailedTests; - private final GtestLogger mLogger; - private long mRunStartTimeMillis; - private long mTestStartTimeMillis; - private int mTestsPassed; - private boolean mCurrentTestPassed; - - public GtestListener(GtestLogger logger) { - mLogger = logger; - } - - /** Called before any tests run. - */ - @Override - public void testRunStarted(Description d) throws Exception { - mLogger.testRunStarted(d.testCount()); - mRunStartTimeMillis = System.currentTimeMillis(); - mTestsPassed = 0; - mFailedTests = new HashSet(); - mCurrentTestPassed = true; - } - - /** Called after all tests run. - */ - @Override - public void testRunFinished(Result r) throws Exception { - long elapsedTimeMillis = System.currentTimeMillis() - mRunStartTimeMillis; - mLogger.testRunFinished(mTestsPassed, mFailedTests, elapsedTimeMillis); - } - - /** Called when a test is about to start. - */ - @Override - public void testStarted(Description d) throws Exception { - mCurrentTestPassed = true; - mLogger.testStarted(d); - mTestStartTimeMillis = System.currentTimeMillis(); - } - - /** Called when a test has just finished. - */ - @Override - public void testFinished(Description d) throws Exception { - long testElapsedTimeMillis = System.currentTimeMillis() - mTestStartTimeMillis; - mLogger.testFinished(d, mCurrentTestPassed, testElapsedTimeMillis); - if (mCurrentTestPassed) { - ++mTestsPassed; - } else { - mFailedTests.add(d); - } - } - - /** Called when a test fails. - */ - @Override - public void testFailure(Failure f) throws Exception { - mCurrentTestPassed = false; - mLogger.testFailed(f); - } - -} - diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestLogger.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestLogger.java deleted file mode 100644 index 09723745ca..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/GtestLogger.java +++ /dev/null @@ -1,109 +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.testing.local; - -import org.junit.runner.Description; -import org.junit.runner.notification.Failure; - -import java.io.PrintStream; -import java.util.Set; - -/** - * Formats and logs test status information in googletest-style. - */ -public class GtestLogger { - - private final PrintStream mOutputStream; - - public GtestLogger(PrintStream outputStream) { - mOutputStream = outputStream; - } - - /** - * Logs the start of an individual test. - */ - public void testStarted(Description test) { - mOutputStream.format("[ RUN ] %s.%s", test.getClassName(), test.getMethodName()); - mOutputStream.println(); - } - - /** - * Logs a test failure. - */ - public void testFailed(Failure f) { - if (f.getException() != null) { - f.getException().printStackTrace(mOutputStream); - } - } - - /** - * Logs the end of an individual test. - */ - public void testFinished(Description test, boolean passed, long elapsedTimeMillis) { - if (passed) { - mOutputStream.format("[ OK ] %s.%s (%d ms)", - test.getClassName(), test.getMethodName(), elapsedTimeMillis); - } else { - mOutputStream.format("[ FAILED ] %s.%s (%d ms)", - test.getClassName(), test.getMethodName(), elapsedTimeMillis); - } - mOutputStream.println(); - } - - /** - * Logs the start of a test case. - */ - public void testCaseStarted(Description test, int testCount) { - mOutputStream.format("[----------] Run %d test cases from %s", testCount, - test.getClassName()); - mOutputStream.println(); - } - - /** - * Logs the end of a test case. - */ - public void testCaseFinished(Description test, int testCount, - long elapsedTimeMillis) { - mOutputStream.format("[----------] Run %d test cases from %s (%d ms)", - testCount, test.getClassName(), elapsedTimeMillis); - mOutputStream.println(); - mOutputStream.println(); - } - - /** - * Logs the start of a test run. - */ - public void testRunStarted(int testCount) { - mOutputStream.format("[==========] Running %d tests.", testCount); - mOutputStream.println(); - mOutputStream.println("[----------] Global test environment set-up."); - mOutputStream.println(); - } - - /** - * Logs the end of a test run. - */ - public void testRunFinished(int passedTestCount, Set failedTests, - long elapsedTimeMillis) { - int totalTestCount = passedTestCount + failedTests.size(); - mOutputStream.println("[----------] Global test environment tear-down."); - mOutputStream.format("[==========] %d tests ran. (%d ms total)", - totalTestCount, elapsedTimeMillis); - mOutputStream.println(); - mOutputStream.format("[ PASSED ] %d tests.", passedTestCount); - mOutputStream.println(); - if (!failedTests.isEmpty()) { - mOutputStream.format("[ FAILED ] %d tests.", failedTests.size()); - mOutputStream.println(); - for (Description d : failedTests) { - mOutputStream.format("[ FAILED ] %s.%s", d.getClassName(), d.getMethodName()); - mOutputStream.println(); - } - mOutputStream.println(); - } - } - -} - diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonListener.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonListener.java deleted file mode 100644 index 3d501b3b18..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonListener.java +++ /dev/null @@ -1,54 +0,0 @@ -// 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. - -package org.chromium.testing.local; - -import org.junit.runner.Description; -import org.junit.runner.Result; -import org.junit.runner.notification.Failure; -import org.junit.runner.notification.RunListener; - -/** A json RunListener that creates a Json file with test run information. - */ -public class JsonListener extends RunListener { - - private final JsonLogger mJsonLogger; - private long mTestStartTimeMillis; - private boolean mCurrentTestPassed; - - public JsonListener(JsonLogger jsonLogger) { - mJsonLogger = jsonLogger; - } - - /** Called after all tests run. - */ - @Override - public void testRunFinished(Result r) throws Exception { - mJsonLogger.writeJsonToFile(); - } - - /** Called when a test is about to start. - */ - @Override - public void testStarted(Description d) throws Exception { - mCurrentTestPassed = true; - mTestStartTimeMillis = System.currentTimeMillis(); - } - - /** Called when a test has just finished. - */ - @Override - public void testFinished(Description d) throws Exception { - long testElapsedTimeMillis = System.currentTimeMillis() - mTestStartTimeMillis; - mJsonLogger.addTestResultInfo(d, mCurrentTestPassed, testElapsedTimeMillis); - } - - /** Called when a test fails. - */ - @Override - public void testFailure(Failure f) throws Exception { - mCurrentTestPassed = false; - } -} - diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonLogger.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonLogger.java deleted file mode 100644 index c253ba33ca..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JsonLogger.java +++ /dev/null @@ -1,89 +0,0 @@ -// 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. - -package org.chromium.testing.local; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.junit.runner.Description; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.PrintStream; - -/** - * Creates json file with junit test information. Format of the json file mirrors the - * json generated by build/android/pylib/results/json_results.py. - */ -public class JsonLogger { - - private final JSONObject mBaseJsonObject; - private final JSONObject mBaseTestInfoJsonObject; - private final File mOutputFile; - - public JsonLogger(File outputFile) { - mBaseJsonObject = new JSONObject(); - mBaseTestInfoJsonObject = new JSONObject(); - mOutputFile = outputFile; - - try { - mBaseJsonObject.put("global_tags", new JSONArray()); - mBaseJsonObject.put("all_tests", new JSONArray()); - mBaseJsonObject.put("disabled_tests", new JSONArray()); - mBaseJsonObject.put("per_iteration_data", - new JSONArray().put(mBaseTestInfoJsonObject)); - } catch (JSONException e) { - System.err.println("Unable to create json output."); - } - } - - /** - * Add the results of a test run to the json output. - */ - public void addTestResultInfo(Description test, boolean passed, long elapsedTimeMillis) { - JSONObject testInfoJsonObject = new JSONObject(); - - try { - testInfoJsonObject.put("status", (passed ? "SUCCESS" : "FAILURE")); - testInfoJsonObject.put("elapsed_time_ms", elapsedTimeMillis); - testInfoJsonObject.put("output_snippet", ""); - testInfoJsonObject.put("output_snippet_base64", ""); - testInfoJsonObject.put("losless_snippet", ""); - - if (mBaseTestInfoJsonObject.optJSONArray(testName(test)) == null) { - mBaseTestInfoJsonObject.put(testName(test), new JSONArray()); - mBaseJsonObject.getJSONArray("all_tests").put(testName(test)); - } - mBaseTestInfoJsonObject.getJSONArray(testName(test)).put(testInfoJsonObject); - } catch (JSONException e) { - System.err.println("Unable to log test to json output: " + testName(test)); - } - } - - /** - * Writes the json output to a file. - */ - public void writeJsonToFile() { - try { - PrintStream stream = new PrintStream(new FileOutputStream(mOutputFile)); - try { - stream.print(mBaseJsonObject); - } finally { - try { - stream.close(); - } catch (RuntimeException e) { - System.err.println("Unable to close output file: " + mOutputFile.getPath()); - } - } - } catch (FileNotFoundException e) { - System.err.println("File not found: " + mOutputFile.getPath()); - } - } - - private String testName(Description test) { - return test.getClassName() + "#" + test.getMethodName(); - } -} \ No newline at end of file diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java deleted file mode 100644 index 20c5a657b5..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java +++ /dev/null @@ -1,117 +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.testing.local; - -import java.io.File; -import java.util.HashSet; -import java.util.Set; -import java.util.regex.Pattern; - -/** - * Parses command line arguments for JunitTestMain. - */ -public class JunitTestArgParser { - - private static final Pattern COLON = Pattern.compile(":"); - - private final Set mPackageFilters; - private final Set> mRunnerFilters; - private final Set mGtestFilters; - private File mJsonOutput; - private String[] mTestJars; - - public static JunitTestArgParser parse(String[] args) { - - JunitTestArgParser parsed = new JunitTestArgParser(); - - for (int i = 0; i < args.length; ++i) { - if (args[i].startsWith("-")) { - String argName; - if (args[i].startsWith("-", 1)) { - argName = args[i].substring(2, args[i].length()); - } else { - argName = args[i].substring(1, args[i].length()); - } - try { - if ("package-filter".equals(argName)) { - // Read the command line argument after the flag. - parsed.addPackageFilter(args[++i]); - } else if ("runner-filter".equals(argName)) { - // Read the command line argument after the flag. - parsed.addRunnerFilter(Class.forName(args[++i])); - } else if ("gtest-filter".equals(argName)) { - // Read the command line argument after the flag. - parsed.addGtestFilter(args[++i]); - } else if ("json-results-file".equals(argName)) { - // Read the command line argument after the flag. - parsed.setJsonOutputFile(args[++i]); - } else if ("test-jars".equals(argName)) { - // Read the command line argument after the flag. - parsed.setTestJars(args[++i]); - } else { - System.out.println("Ignoring flag: \"" + argName + "\""); - } - } catch (ArrayIndexOutOfBoundsException e) { - System.err.println("No value specified for argument \"" + argName + "\""); - System.exit(1); - } catch (ClassNotFoundException e) { - System.err.println("Class not found. (" + e.toString() + ")"); - System.exit(1); - } - } else { - System.out.println("Ignoring argument: \"" + args[i] + "\""); - } - } - - return parsed; - } - - private JunitTestArgParser() { - mPackageFilters = new HashSet(); - mRunnerFilters = new HashSet>(); - mGtestFilters = new HashSet(); - mJsonOutput = null; - } - - public Set getPackageFilters() { - return mPackageFilters; - } - - public Set> getRunnerFilters() { - return mRunnerFilters; - } - - public Set getGtestFilters() { - return mGtestFilters; - } - - public File getJsonOutputFile() { - return mJsonOutput; - } - - public String[] getTestJars() { - return mTestJars; - } - - private void addPackageFilter(String packageFilter) { - mPackageFilters.add(packageFilter); - } - - private void addRunnerFilter(Class runnerFilter) { - mRunnerFilters.add(runnerFilter); - } - - private void addGtestFilter(String gtestFilter) { - mGtestFilters.add(gtestFilter); - } - - private void setJsonOutputFile(String path) { - mJsonOutput = new File(path); - } - - private void setTestJars(String jars) { - mTestJars = COLON.split(jars); - } -} \ No newline at end of file diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java deleted file mode 100644 index f32579b9bf..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java +++ /dev/null @@ -1,109 +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.testing.local; - -import org.junit.runner.JUnitCore; -import org.junit.runner.Request; -import org.junit.runner.RunWith; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Pattern; - -/** - * Runs tests based on JUnit from the classpath on the host JVM based on the - * provided filter configurations. - */ -public final class JunitTestMain { - - private static final String CLASS_FILE_EXT = ".class"; - - private static final Pattern COLON = Pattern.compile(":"); - private static final Pattern FORWARD_SLASH = Pattern.compile("/"); - - private JunitTestMain() { - } - - /** - * Finds all classes on the class path annotated with RunWith. - */ - public static Class[] findClassesFromClasspath(String[] testJars) { - String[] jarPaths = COLON.split(System.getProperty("java.class.path")); - List testJarPaths = new ArrayList(testJars.length); - for (String testJar: testJars) { - for (String jarPath: jarPaths) { - if (jarPath.endsWith(testJar)) { - testJarPaths.add(jarPath); - break; - } - } - } - List classes = new ArrayList(); - for (String jp : testJarPaths) { - try { - JarFile jf = new JarFile(jp); - for (Enumeration eje = jf.entries(); eje.hasMoreElements();) { - JarEntry je = eje.nextElement(); - String cn = je.getName(); - if (!cn.endsWith(CLASS_FILE_EXT) || cn.indexOf('$') != -1) { - continue; - } - cn = cn.substring(0, cn.length() - CLASS_FILE_EXT.length()); - cn = FORWARD_SLASH.matcher(cn).replaceAll("."); - Class c = classOrNull(cn); - if (c != null && c.isAnnotationPresent(RunWith.class)) { - classes.add(c); - } - } - jf.close(); - } catch (IOException e) { - System.err.println("Error while reading classes from " + jp); - } - } - return classes.toArray(new Class[classes.size()]); - } - - private static Class classOrNull(String className) { - try { - return Class.forName(className); - } catch (ClassNotFoundException e) { - System.err.println("Class not found: " + className); - } catch (NoClassDefFoundError e) { - System.err.println("Class definition not found: " + className); - } catch (Exception e) { - System.err.println("Other exception while reading class: " + className); - } - return null; - } - - public static void main(String[] args) { - JunitTestArgParser parser = JunitTestArgParser.parse(args); - - JUnitCore core = new JUnitCore(); - GtestLogger gtestLogger = new GtestLogger(System.out); - core.addListener(new GtestListener(gtestLogger)); - JsonLogger jsonLogger = new JsonLogger(parser.getJsonOutputFile()); - core.addListener(new JsonListener(jsonLogger)); - Class[] classes = findClassesFromClasspath(parser.getTestJars()); - Request testRequest = Request.classes(new GtestComputer(gtestLogger), classes); - - for (String packageFilter : parser.getPackageFilters()) { - testRequest = testRequest.filterWith(new PackageFilter(packageFilter)); - } - for (Class runnerFilter : parser.getRunnerFilters()) { - testRequest = testRequest.filterWith(new RunnerFilter(runnerFilter)); - } - for (String gtestFilter : parser.getGtestFilters()) { - testRequest = testRequest.filterWith(new GtestFilter(gtestFilter)); - } - System.exit(core.run(testRequest).wasSuccessful() ? 0 : 1); - } - -} - diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/LocalRobolectricTestRunner.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/LocalRobolectricTestRunner.java deleted file mode 100644 index cf6202b050..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/LocalRobolectricTestRunner.java +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -package org.chromium.testing.local; - -import org.junit.runners.model.InitializationError; - -import org.robolectric.AndroidManifest; -import org.robolectric.DependencyResolver; -import org.robolectric.RobolectricTestRunner; -import org.robolectric.SdkConfig; -import org.robolectric.annotation.Config; - -/** - * A custom Robolectric Junit4 Test Runner. This test runner will load the - * "real" android jars from a local directory rather than use Maven to fetch - * them from the Maven Central repository. Additionally, it will ignore the - * API level written in the AndroidManifest as that can cause issues if - * robolectric does not support that API level. - */ -public class LocalRobolectricTestRunner extends RobolectricTestRunner { - - private static final int ANDROID_API_LEVEL = 18; - - public LocalRobolectricTestRunner(Class testClass) throws InitializationError { - super(testClass); - } - - @Override - protected final DependencyResolver getJarResolver() { - return new RobolectricClasspathDependencyResolver(); - } - - @Override - protected SdkConfig pickSdkVersion(AndroidManifest appManifest, Config config) { - // Pulling from the manifest is dangerous as the apk might target a version of - // android that robolectric does not yet support. We still allow the API level to - // be overridden with the Config annotation. - return config.emulateSdk() < 0 - ? new SdkConfig(ANDROID_API_LEVEL) : super.pickSdkVersion(null, config); - } - - @Override - protected int pickReportedSdkVersion(Config config, AndroidManifest appManifest) { - return config.reportSdk() < 0 - ? ANDROID_API_LEVEL : super.pickReportedSdkVersion(config, appManifest); - } -} \ No newline at end of file diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/PackageFilter.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/PackageFilter.java deleted file mode 100644 index 4d6a580d47..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/PackageFilter.java +++ /dev/null @@ -1,41 +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.testing.local; - -import org.junit.runner.Description; -import org.junit.runner.manipulation.Filter; - -/** - * Filters tests based on the package. - */ -class PackageFilter extends Filter { - - private final String mFilterString; - - /** - * Creates the filter. - */ - public PackageFilter(String filterString) { - mFilterString = filterString; - } - - /** - * Determines whether or not a test with the provided description should - * run based on its package. - */ - @Override - public boolean shouldRun(Description description) { - return description.getTestClass().getPackage().getName().equals(mFilterString); - } - - /** - * Returns a description of this filter. - */ - @Override - public String describe() { - return "package-filter: " + mFilterString; - } - -} diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RobolectricClasspathDependencyResolver.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RobolectricClasspathDependencyResolver.java deleted file mode 100644 index 47bc1ba0dd..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RobolectricClasspathDependencyResolver.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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. - -package org.chromium.testing.local; - -import org.robolectric.DependencyJar; -import org.robolectric.DependencyResolver; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.regex.Pattern; - -/** - * A Robolectric dependency resolver that looks for the Robolectric dependencies - * in the Java classpath. - */ -public class RobolectricClasspathDependencyResolver implements DependencyResolver { - private static final Pattern COLON = Pattern.compile(":"); - private final String[] mClassPathJars; - - /** - * Creates a {@link ClasspathDependencyResolver}. - */ - public RobolectricClasspathDependencyResolver() { - mClassPathJars = COLON.split(System.getProperty("java.class.path")); - } - - /** - * Returns the {@link URL} for a Robolectric dependency. It looks through the jars - * in the classpath to find the dependency's filepath. - */ - @Override - public URL getLocalArtifactUrl(DependencyJar dependency) { - // Jar filenames are constructed identically to how they are built in Robolectric's - // own LocalDependencyResolver. - String dependencyJar = dependency.getArtifactId() + "-" + dependency.getVersion() + "." - + dependency.getType(); - - for (String jarPath : mClassPathJars) { - if (jarPath.endsWith(dependencyJar)) { - return fileToUrl(new File(jarPath)); - } - } - throw new IllegalStateException( - String.format("Robolectric jar %s was not found in classpath.", dependencyJar)); - } - - /** - * Returns the {@link URL} for a list of Robolectric dependencies. - */ - @Override - public URL[] getLocalArtifactUrls(DependencyJar... dependencies) { - URL[] urls = new URL[dependencies.length]; - - for (int i = 0; i < dependencies.length; i++) { - urls[i] = getLocalArtifactUrl(dependencies[i]); - } - - return urls; - } - - private static URL fileToUrl(File file) { - try { - return file.toURI().toURL(); - } catch (MalformedURLException e) { - throw new IllegalArgumentException( - String.format("File \"%s\" cannot be represented as a URL: %s", file, e)); - } - } -} \ No newline at end of file diff --git a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RunnerFilter.java b/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RunnerFilter.java deleted file mode 100644 index e32753e998..0000000000 --- a/engine/src/flutter/testing/android/junit/java/src/org/chromium/testing/local/RunnerFilter.java +++ /dev/null @@ -1,45 +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.testing.local; - -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.junit.runner.manipulation.Filter; - -/** - * Filters tests based on the Runner class annotating the test class. - */ -class RunnerFilter extends Filter { - - private final Class mRunnerClass; - - /** - * Creates the filter. - */ - public RunnerFilter(Class runnerClass) { - mRunnerClass = runnerClass; - } - - /** - * Determines whether or not a test with the provided description should - * run based on the Runner class annotating the test class. - */ - @Override - public boolean shouldRun(Description description) { - Class c = description.getTestClass(); - return c != null && c.isAnnotationPresent(RunWith.class) - && c.getAnnotation(RunWith.class).value() == mRunnerClass; - } - - /** - * Returns a description of this filter. - */ - @Override - public String describe() { - return "runner-filter: " + mRunnerClass.getName(); - } - -} - diff --git a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestFilterTest.java b/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestFilterTest.java deleted file mode 100644 index a19b37945d..0000000000 --- a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestFilterTest.java +++ /dev/null @@ -1,124 +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.testing.local; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.junit.runner.manipulation.Filter; -import org.junit.runners.BlockJUnit4ClassRunner; - -/** - * Unit tests for GtestFilter. - */ -@RunWith(BlockJUnit4ClassRunner.class) -public class GtestFilterTest { - - private class TestClass {} - private class OtherTestClass {} - - @Test - public void testDescription() { - Filter filterUnderTest = new GtestFilter(TestClass.class.getName() + ".*"); - Assert.assertEquals("gtest-filter: " + TestClass.class.getName() + ".*", - filterUnderTest.describe()); - } - - @Test - public void testNoFilter() { - Filter filterUnderTest = new GtestFilter(""); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } - - @Test - public void testPositiveFilterExplicit() { - Filter filterUnderTest = new GtestFilter(TestClass.class.getName() + ".testMethod"); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } - - @Test - public void testPositiveFilterClassRegex() { - Filter filterUnderTest = new GtestFilter(TestClass.class.getName() + ".*"); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } - - @Test - public void testNegativeFilterExplicit() { - Filter filterUnderTest = new GtestFilter("-" + TestClass.class.getName() + ".testMethod"); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } - - @Test - public void testNegativeFilterClassRegex() { - Filter filterUnderTest = new GtestFilter("-" + TestClass.class.getName() + ".*"); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } - - @Test - public void testPositiveAndNegativeFilter() { - Filter filterUnderTest = new GtestFilter(TestClass.class.getName() + ".*" - + "-" + TestClass.class.getName() + ".testMethod"); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } - - @Test - public void testMultiplePositiveFilters() { - Filter filterUnderTest = new GtestFilter( - TestClass.class.getName() + ".otherTestMethod:" - + OtherTestClass.class.getName() + ".otherTestMethod"); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "otherTestMethod"))); - } - - @Test - public void testMultipleFiltersPositiveAndNegative() { - Filter filterUnderTest = new GtestFilter(TestClass.class.getName() + ".*:" - + "-" + TestClass.class.getName() + ".testMethod"); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "testMethod"))); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(TestClass.class, "otherTestMethod"))); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(OtherTestClass.class, "testMethod"))); - } -} - diff --git a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestLoggerTest.java b/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestLoggerTest.java deleted file mode 100644 index 0520901bcf..0000000000 --- a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/GtestLoggerTest.java +++ /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. - -package org.chromium.testing.local; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.junit.runners.BlockJUnit4ClassRunner; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.io.Serializable; -import java.util.Comparator; -import java.util.HashSet; -import java.util.Set; -import java.util.TreeSet; - -/** - * Unit tests for GtestLogger. - */ -@RunWith(BlockJUnit4ClassRunner.class) -public class GtestLoggerTest { - - @Test - public void testTestStarted() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testStarted( - Description.createTestDescription(GtestLoggerTest.class, "testTestStarted")); - Assert.assertEquals( - "[ RUN ] org.chromium.testing.local.GtestLoggerTest.testTestStarted\n", - actual.toString()); - } - - @Test - public void testTestFinishedPassed() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testFinished( - Description.createTestDescription(GtestLoggerTest.class, "testTestFinishedPassed"), - true, 123); - Assert.assertEquals( - "[ OK ] org.chromium.testing.local.GtestLoggerTest.testTestFinishedPassed" - + " (123 ms)\n", - actual.toString()); - } - - @Test - public void testTestFinishedFailed() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testFinished( - Description.createTestDescription(GtestLoggerTest.class, "testTestFinishedPassed"), - false, 123); - Assert.assertEquals( - "[ FAILED ] org.chromium.testing.local.GtestLoggerTest.testTestFinishedPassed" - + " (123 ms)\n", - actual.toString()); - } - - @Test - public void testTestCaseStarted() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testCaseStarted( - Description.createSuiteDescription(GtestLoggerTest.class), 456); - Assert.assertEquals( - "[----------] Run 456 test cases from org.chromium.testing.local.GtestLoggerTest\n", - actual.toString()); - } - - @Test - public void testTestCaseFinished() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testCaseFinished( - Description.createSuiteDescription(GtestLoggerTest.class), 456, 123); - Assert.assertEquals( - "[----------] Run 456 test cases from org.chromium.testing.local.GtestLoggerTest" - + " (123 ms)\n\n", - actual.toString()); - } - - @Test - public void testTestRunStarted() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testRunStarted(1234); - Assert.assertEquals( - "[==========] Running 1234 tests.\n" - + "[----------] Global test environment set-up.\n\n", - actual.toString()); - } - - @Test - public void testTestRunFinishedNoFailures() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - loggerUnderTest.testRunFinished(1234, new HashSet(), 4321); - Assert.assertEquals( - "[----------] Global test environment tear-down.\n" - + "[==========] 1234 tests ran. (4321 ms total)\n" - + "[ PASSED ] 1234 tests.\n", - actual.toString()); - } - - @Test - public void testTestRunFinishedWithFailures() { - ByteArrayOutputStream actual = new ByteArrayOutputStream(); - GtestLogger loggerUnderTest = new GtestLogger(new PrintStream(actual)); - - Set failures = new TreeSet(new DescriptionComparator()); - failures.add(Description.createTestDescription( - GtestLoggerTest.class, "testTestRunFinishedNoFailures")); - failures.add(Description.createTestDescription( - GtestLoggerTest.class, "testTestRunFinishedWithFailures")); - - loggerUnderTest.testRunFinished(1232, failures, 4312); - Assert.assertEquals( - "[----------] Global test environment tear-down.\n" - + "[==========] 1234 tests ran. (4312 ms total)\n" - + "[ PASSED ] 1232 tests.\n" - + "[ FAILED ] 2 tests.\n" - + "[ FAILED ] org.chromium.testing.local.GtestLoggerTest" - + ".testTestRunFinishedNoFailures\n" - + "[ FAILED ] org.chromium.testing.local.GtestLoggerTest" - + ".testTestRunFinishedWithFailures\n" - + "\n", - actual.toString()); - } - - private static class DescriptionComparator implements Comparator, Serializable { - @Override - public int compare(Description o1, Description o2) { - return toGtestStyleString(o1).compareTo(toGtestStyleString(o2)); - } - - private static String toGtestStyleString(Description d) { - return d.getClassName() + "." + d.getMethodName(); - } - } -} - diff --git a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/PackageFilterTest.java b/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/PackageFilterTest.java deleted file mode 100644 index 4427676bdb..0000000000 --- a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/PackageFilterTest.java +++ /dev/null @@ -1,47 +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.testing.local; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.junit.runner.manipulation.Filter; -import org.junit.runners.BlockJUnit4ClassRunner; - -/** - * Unit tests for PackageFilter. - */ -@RunWith(BlockJUnit4ClassRunner.class) -public class PackageFilterTest { - - @Test - public void testDescription() { - Filter filterUnderTest = new PackageFilter("test.package"); - Assert.assertEquals("package-filter: test.package", filterUnderTest.describe()); - } - - @Test - public void testNoFilter() { - Filter filterUnderTest = new PackageFilter(""); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(PackageFilterTest.class, "testNoFilter"))); - } - - @Test - public void testFilterHit() { - Filter filterUnderTest = new PackageFilter("org.chromium.testing.local"); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(PackageFilterTest.class, "testWithFilter"))); - } - - @Test - public void testFilterMiss() { - Filter filterUnderTest = new PackageFilter("org.chromium.native_test"); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(PackageFilterTest.class, "testWithFilter"))); - } - -} diff --git a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/RunnerFilterTest.java b/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/RunnerFilterTest.java deleted file mode 100644 index 9f54bfa685..0000000000 --- a/engine/src/flutter/testing/android/junit/javatests/src/org/chromium/testing/local/RunnerFilterTest.java +++ /dev/null @@ -1,58 +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.testing.local; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.junit.runner.manipulation.Filter; -import org.junit.runners.BlockJUnit4ClassRunner; -import org.junit.runners.Suite; - -/** - * Unit tests for RunnerFilter. - */ -@RunWith(BlockJUnit4ClassRunner.class) -public class RunnerFilterTest { - - private class FakeTestClass {} - - @Test - public void testDescription() { - Filter filterUnderTest = new RunnerFilter(BlockJUnit4ClassRunner.class); - Assert.assertEquals("runner-filter: org.junit.runners.BlockJUnit4ClassRunner", - filterUnderTest.describe()); - } - - @Test - public void testNoFilter() { - Filter filterUnderTest = new RunnerFilter(null); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(RunnerFilterTest.class, "testNoFilter"))); - } - - @Test - public void testFilterHit() { - Filter filterUnderTest = new RunnerFilter(BlockJUnit4ClassRunner.class); - Assert.assertTrue(filterUnderTest.shouldRun( - Description.createTestDescription(RunnerFilterTest.class, "testFilterHit"))); - } - - @Test - public void testFilterMiss() { - Filter filterUnderTest = new RunnerFilter(Suite.class); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(RunnerFilterTest.class, "testFilterMiss"))); - } - - @Test - public void testClassNotFound() { - Filter filterUnderTest = new RunnerFilter(BlockJUnit4ClassRunner.class); - Assert.assertFalse(filterUnderTest.shouldRun( - Description.createTestDescription(FakeTestClass.class, "fakeTestMethod"))); - } -} - diff --git a/engine/src/flutter/testing/android/junit/junit_test.gyp b/engine/src/flutter/testing/android/junit/junit_test.gyp deleted file mode 100644 index 16e00488d1..0000000000 --- a/engine/src/flutter/testing/android/junit/junit_test.gyp +++ /dev/null @@ -1,43 +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. - -{ - 'targets': [ - { - # GN: //testing/android/junit:junit_test_support - 'target_name': 'junit_test_support', - 'type': 'none', - 'dependencies': [ - '../../../third_party/junit/junit.gyp:junit_jar', - '../../../third_party/mockito/mockito.gyp:mockito_jar', - '../../../third_party/robolectric/robolectric.gyp:robolectric_jar' - ], - 'variables': { - 'src_paths': [ - 'java/src', - ], - }, - 'includes': [ - '../../../build/host_jar.gypi', - ], - }, - { - # GN: //testing/android/junit:junit_unittests - 'target_name': 'junit_unit_tests', - 'type': 'none', - 'dependencies': [ - 'junit_test_support', - ], - 'variables': { - 'main_class': 'org.chromium.testing.local.JunitTestMain', - 'src_paths': [ - 'javatests/src', - ], - }, - 'includes': [ - '../../../build/host_jar.gypi', - ], - }, - ], -} diff --git a/engine/src/flutter/testing/android/native_test.gyp b/engine/src/flutter/testing/android/native_test.gyp deleted file mode 100644 index 734a00f0ca..0000000000 --- a/engine/src/flutter/testing/android/native_test.gyp +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (c) 2012 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=="android"', { - 'targets': [ - { - # GN: //testing/android:native_test_jni_headers - 'target_name': 'native_test_jni_headers', - 'type': 'none', - 'sources': [ - 'native_test/java/src/org/chromium/native_test/NativeTestActivity.java' - ], - 'variables': { - 'jni_gen_package': 'testing', - }, - 'includes': [ '../../build/jni_generator.gypi' ], - }, - { - # GN: //testing/android:native_test_support - 'target_name': 'native_test_support', - 'message': 'building native pieces of native test package', - 'type': 'static_library', - 'sources': [ - 'native_test/native_test_launcher.cc', - 'native_test/native_test_launcher.h', - 'native_test/native_test_util.cc', - 'native_test/native_test_util.h', - ], - 'dependencies': [ - '../../base/base.gyp:base', - '../../base/base.gyp:test_support_base', - '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../gtest.gyp:gtest', - 'native_test_jni_headers', - ], - }, - { - # GN: //testing/android:native_test_native_code - 'target_name': 'native_test_native_code', - 'message': 'building JNI onload for native test package', - 'type': 'static_library', - 'sources': [ - 'native_test/native_test_jni_onload.cc', - ], - 'dependencies': [ - 'native_test_support', - '../../base/base.gyp:base', - ], - }, - { - 'target_name': 'native_test_java', - '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', - ], - 'variables': { - 'chromium_code': '1', - 'jar_excluded_classes': [ '*/NativeLibraries.class' ], - 'java_in_dir': 'native_test/java', - }, - 'includes': [ '../../build/java.gypi' ], - }, - ], - }] - ], -} diff --git a/engine/src/flutter/testing/android/native_test/BUILD.gn b/engine/src/flutter/testing/android/native_test/BUILD.gn deleted file mode 100644 index 0e8ffcb581..0000000000 --- a/engine/src/flutter/testing/android/native_test/BUILD.gn +++ /dev/null @@ -1,44 +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("//build/config/android/rules.gni") - -# GYP: //testing/android/native_test.gyp:native_test_support -source_set("native_test_support") { - testonly = true - sources = [ - "native_test_launcher.cc", - "native_test_launcher.h", - "native_test_util.cc", - "native_test_util.h", - ] - deps = [ - ":native_test_jni_headers", - "//base", - "//base/test:test_support", - "//base/third_party/dynamic_annotations", - "//testing/gtest", - ] -} - -# GYP: //testing/android/native_test.gyp:native_test_native_code -source_set("native_test_native_code") { - testonly = true - sources = [ - "native_test_jni_onload.cc", - ] - libs = [ "log" ] - deps = [ - ":native_test_support", - "//base", - ] -} - -# GYP: //testing/android/native_test.gyp:native_test_jni_headers -generate_jni("native_test_jni_headers") { - sources = [ - "java/src/org/chromium/native_test/NativeTestActivity.java", - ] - jni_package = "testing" -} diff --git a/engine/src/flutter/testing/android/native_test/README.chromium b/engine/src/flutter/testing/android/native_test/README.chromium deleted file mode 100644 index c00255a43a..0000000000 --- a/engine/src/flutter/testing/android/native_test/README.chromium +++ /dev/null @@ -1,2 +0,0 @@ -apk-based runner for Chromium unit test bundles. This is a simple wrapper APK -that should include a single gtest native library. diff --git a/engine/src/flutter/testing/android/native_test/java/AndroidManifest.xml b/engine/src/flutter/testing/android/native_test/java/AndroidManifest.xml deleted file mode 100644 index 6505014428..0000000000 --- a/engine/src/flutter/testing/android/native_test/java/AndroidManifest.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 deleted file mode 100644 index 0f6628a648..0000000000 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeBrowserTestActivity.java +++ /dev/null @@ -1,85 +0,0 @@ -// 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. - -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", - - // switches::kUseFakeDeviceForMediaStream - "--use-fake-device-for-media-stream", - - // switches::kUseFakeUIForMediaStream - "--use-fake-ui-for-media-stream" - }; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - for (String flag : BROWSER_TESTS_FLAGS) { - appendCommandLineFlags(flag); - } - } - - @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 deleted file mode 100644 index 8e147201c5..0000000000 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2012 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.native_test; - -import android.app.Activity; -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 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. - * Our tests need to go up to our own java classes, which is not possible using - * the native activity class loader. - */ -@JNINamespace("testing::android") -public class NativeTestActivity extends Activity { - public static final String EXTRA_COMMAND_LINE_FILE = - "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"; - - private String mCommandLineFilePath; - private StringBuilder mCommandLineFlags = new StringBuilder(); - private TestStatusReporter mReporter; - private boolean mRunInSubThread = false; - private boolean mStdoutFifo = false; - private String mStdoutFilePath; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - CommandLine.init(new String[]{}); - - parseArgumentsFromIntent(getIntent()); - mReporter = new TestStatusReporter(this); - } - - private void parseArgumentsFromIntent(Intent intent) { - mCommandLineFilePath = intent.getStringExtra(EXTRA_COMMAND_LINE_FILE); - if (mCommandLineFilePath == null) { - mCommandLineFilePath = ""; - } else { - File commandLineFile = new File(mCommandLineFilePath); - if (!commandLineFile.isAbsolute()) { - mCommandLineFilePath = Environment.getExternalStorageDirectory() + "/" - + mCommandLineFilePath; - } - Log.i(TAG, "command line file path: %s", mCommandLineFilePath); - } - - String commandLineFlags = intent.getStringExtra(EXTRA_COMMAND_LINE_FLAGS); - if (commandLineFlags != null) mCommandLineFlags.append(commandLineFlags); - - 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(); - mStdoutFifo = true; - } - } - - protected void appendCommandLineFlags(String flags) { - mCommandLineFlags.append(" ").append(flags); - } - - @Override - public void onStart() { - super.onStart(); - - if (mRunInSubThread) { - // Create a new thread and run tests on it. - new Thread() { - @Override - public void run() { - runTests(); - } - }.start(); - } 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().post(new Runnable() { - @Override - public void run() { - runTests(); - } - }); - } - } - - 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 - // which run tests. For example, we look for - // RUNNER_FAILED build/android/test_package.py. - private void nativeTestFailed() { - Log.e(TAG, "[ RUNNER_FAILED ] could not load native library"); - } - - private native void nativeRunTests(String commandLineFlags, String commandLineFilePath, - String stdoutFilePath, boolean stdoutFifo, Context appContext); -} 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 deleted file mode 100644 index 6e39401882..0000000000 --- a/engine/src/flutter/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java +++ /dev/null @@ -1,327 +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.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; - -import java.io.BufferedInputStream; -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; - -/** - * An Instrumentation that runs tests based on NativeTestActivity. - */ -public class NativeTestInstrumentationTestRunner extends Instrumentation { - - public static final String EXTRA_NATIVE_TEST_ACTIVITY = - "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 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 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) { - mCommandLineFile = arguments.getString(NativeTestActivity.EXTRA_COMMAND_LINE_FILE); - mCommandLineFlags = arguments.getString(NativeTestActivity.EXTRA_COMMAND_LINE_FLAGS); - 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()); - Log.i(TAG, "stdout file created: %s", mStdoutFile.getAbsolutePath()); - } catch (IOException e) { - Log.e(TAG, "Unable to create temporary stdout file.", e); - finish(Activity.RESULT_CANCELED, new Bundle()); - return; - } - - start(); - } - - @Override - public void onStart() { - super.onStart(); - - 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()); - } - - /** Monitors a test shard's execution. */ - private class ShardMonitor implements Runnable { - private static final int MONITOR_FREQUENCY_MS = 1000; - - private long mExpirationNanoTime; - private int mPid; - private AtomicBoolean mStopped; - - public ShardMonitor(int pid, long expirationNanoTime) { - mPid = pid; - mExpirationNanoTime = expirationNanoTime; - mStopped = new AtomicBoolean(false); - } - - public void stopped() { - mStopped.set(true); - } - - @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 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); - } - } - - 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)); - } - } - } - - /** - * Generates a map between test names and test results from the instrumented Activity's - * output. - */ - private Map parseResults() { - Map results = - new HashMap(); - - BufferedReader r = null; - - try { - if (mStdoutFile == null || !mStdoutFile.exists()) { - Log.e(TAG, "Unable to find stdout file."); - return results; - } - - r = new BufferedReader(new InputStreamReader( - new BufferedInputStream(new FileInputStream(mStdoutFile)))); - - for (String l = r.readLine(); l != null && !l.equals("< register_callbacks; - register_callbacks.push_back(base::Bind(&RegisterJNI)); - - if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks)) - return -1; - - std::vector init_callbacks; - init_callbacks.push_back(base::Bind(&Init)); - if (!base::android::OnJNIOnLoadInit(init_callbacks)) - return -1; - - return JNI_VERSION_1_4; -} diff --git a/engine/src/flutter/testing/android/native_test/native_test_launcher.cc b/engine/src/flutter/testing/android/native_test/native_test_launcher.cc deleted file mode 100644 index 343f1180c6..0000000000 --- a/engine/src/flutter/testing/android/native_test/native_test_launcher.cc +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2012 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 class sets up the environment for running the native tests inside an -// android application. It outputs (to a fifo) markers identifying the -// START/PASSED/CRASH of the test suite, FAILURE/SUCCESS of individual tests, -// etc. -// These markers are read by the test runner script to generate test results. -// It installs signal handlers to detect crashes. - -#include -#include - -#include "base/android/base_jni_registrar.h" -#include "base/android/fifo_utils.h" -#include "base/android/jni_android.h" -#include "base/android/jni_string.h" -#include "base/android/scoped_java_ref.h" -#include "base/at_exit.h" -#include "base/base_switches.h" -#include "base/command_line.h" -#include "base/files/file_path.h" -#include "base/files/file_util.h" -#include "base/logging.h" -#include "base/strings/stringprintf.h" -#include "gtest/gtest.h" -#include "jni/NativeTestActivity_jni.h" -#include "testing/android/native_test/native_test_util.h" - -// The main function of the program to be wrapped as a test apk. -extern int main(int argc, char** argv); - -namespace testing { -namespace android { - -namespace { - -// The test runner script writes the command line file in -// "/data/local/tmp". -static const char kCommandLineFilePath[] = - "/data/local/tmp/chrome-native-tests-command-line"; - -const char kLogTag[] = "chromium"; -const char kCrashedMarker[] = "[ CRASHED ]\n"; - -// The list of signals which are considered to be crashes. -const int kExceptionSignals[] = { - SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, -1 -}; - -struct sigaction g_old_sa[NSIG]; - -// This function runs in a compromised context. It should not allocate memory. -void SignalHandler(int sig, siginfo_t* info, void* reserved) { - // Output the crash marker. - write(STDOUT_FILENO, kCrashedMarker, sizeof(kCrashedMarker)); - g_old_sa[sig].sa_sigaction(sig, info, reserved); -} - -// Writes printf() style string to Android's logger where |priority| is one of -// the levels defined in . -void AndroidLog(int priority, const char* format, ...) { - va_list args; - va_start(args, format); - __android_log_vprint(priority, kLogTag, format, args); - va_end(args); -} - -} // namespace - -static void RunTests(JNIEnv* env, - jobject obj, - jstring jcommand_line_flags, - jstring jcommand_line_file_path, - jstring jstdout_file_path, - jboolean jstdout_fifo, - jobject app_context) { - // Command line initialized basically, will be fully initialized later. - static const char* const kInitialArgv[] = { "ChromeTestActivity" }; - base::CommandLine::Init(arraysize(kInitialArgv), kInitialArgv); - - // Set the application context in base. - base::android::ScopedJavaLocalRef scoped_context( - env, env->NewLocalRef(app_context)); - base::android::InitApplicationContext(env, scoped_context); - base::android::RegisterJni(env); - - std::vector args; - - const std::string command_line_file_path( - base::android::ConvertJavaStringToUTF8(env, jcommand_line_file_path)); - if (command_line_file_path.empty()) - ParseArgsFromCommandLineFile(kCommandLineFilePath, &args); - else - ParseArgsFromCommandLineFile(command_line_file_path.c_str(), &args); - - const std::string command_line_flags( - base::android::ConvertJavaStringToUTF8(env, jcommand_line_flags)); - ParseArgsFromString(command_line_flags, &args); - - std::vector argv; - int argc = ArgsToArgv(args, &argv); - - // Fully initialize command line with arguments. - base::CommandLine::ForCurrentProcess()->AppendArguments( - base::CommandLine(argc, &argv[0]), false); - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); - - base::FilePath stdout_file_path( - base::android::ConvertJavaStringToUTF8(env, jstdout_file_path)); - - // A few options, such "--gtest_list_tests", will just use printf directly - // Always redirect stdout to a known file. - unlink(stdout_file_path.value().c_str()); - if (jstdout_fifo) { - if (!base::android::CreateFIFO(stdout_file_path, 0666)) { - AndroidLog(ANDROID_LOG_ERROR, "Failed to create fifo %s: %s\n", - stdout_file_path.value().c_str(), strerror(errno)); - exit(EXIT_FAILURE); - } - } - if (!base::android::RedirectStream(stdout, stdout_file_path, "w+")) { - AndroidLog(ANDROID_LOG_ERROR, "Failed to redirect stream to file: %s: %s\n", - stdout_file_path.value().c_str(), strerror(errno)); - exit(EXIT_FAILURE); - } - dup2(STDOUT_FILENO, STDERR_FILENO); - - if (command_line.HasSwitch(switches::kWaitForDebugger)) { - AndroidLog(ANDROID_LOG_VERBOSE, - "Native test waiting for GDB because flag %s was supplied", - switches::kWaitForDebugger); - base::debug::WaitForDebugger(24 * 60 * 60, false); - } - - ScopedMainEntryLogger scoped_main_entry_logger; - main(argc, &argv[0]); -} - -bool RegisterNativeTestJNI(JNIEnv* env) { - return RegisterNativesImpl(env); -} - -// TODO(nileshagrawal): now that we're using FIFO, test scripts can detect EOF. -// Remove the signal handlers. -void InstallHandlers() { - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - - sa.sa_sigaction = SignalHandler; - sa.sa_flags = SA_SIGINFO; - - for (unsigned int i = 0; kExceptionSignals[i] != -1; ++i) { - sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]); - } -} - -} // namespace android -} // namespace testing diff --git a/engine/src/flutter/testing/android/native_test/native_test_launcher.h b/engine/src/flutter/testing/android/native_test/native_test_launcher.h deleted file mode 100644 index ea4dfe837a..0000000000 --- a/engine/src/flutter/testing/android/native_test/native_test_launcher.h +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -#ifndef TESTING_ANDROID_NATIVE_TEST_LAUNCHER_H_ -#define TESTING_ANDROID_NATIVE_TEST_LAUNCHER_H_ - -#include - -namespace testing { -namespace android { - -void InstallHandlers(); -bool RegisterNativeTestJNI(JNIEnv* env); - -} // namespace android -} // namespace testing - -#endif // TESTING_ANDROID_NATIVE_TEST_LAUNCHER_H_ diff --git a/engine/src/flutter/testing/android/native_test/native_test_util.cc b/engine/src/flutter/testing/android/native_test/native_test_util.cc deleted file mode 100644 index ffb1b114e4..0000000000 --- a/engine/src/flutter/testing/android/native_test/native_test_util.cc +++ /dev/null @@ -1,50 +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. - -#include "testing/android/native_test/native_test_util.h" - -#include "base/files/file_path.h" -#include "base/files/file_util.h" -#include "base/strings/string_tokenizer.h" -#include "base/strings/string_util.h" - -namespace testing { -namespace android { - -void ParseArgsFromString(const std::string& command_line, - std::vector* args) { - base::StringTokenizer tokenizer(command_line, base::kWhitespaceASCII); - tokenizer.set_quote_chars("\""); - while (tokenizer.GetNext()) { - std::string token; - base::RemoveChars(tokenizer.token(), "\"", &token); - args->push_back(token); - } -} - -void ParseArgsFromCommandLineFile( - const char* path, std::vector* args) { - base::FilePath command_line(path); - std::string command_line_string; - if (base::ReadFileToString(command_line, &command_line_string)) { - ParseArgsFromString(command_line_string, args); - } -} - -int ArgsToArgv(const std::vector& args, - std::vector* argv) { - // We need to pass in a non-const char**. - int argc = args.size(); - - argv->resize(argc + 1); - for (int i = 0; i < argc; ++i) { - (*argv)[i] = const_cast(args[i].c_str()); - } - (*argv)[argc] = NULL; // argv must be NULL terminated. - - return argc; -} - -} // namespace android -} // namespace testing diff --git a/engine/src/flutter/testing/android/native_test/native_test_util.h b/engine/src/flutter/testing/android/native_test/native_test_util.h deleted file mode 100644 index e647a92201..0000000000 --- a/engine/src/flutter/testing/android/native_test/native_test_util.h +++ /dev/null @@ -1,39 +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. - -#ifndef TESTING_ANDROID_NATIVE_TEST_UTIL_ -#define TESTING_ANDROID_NATIVE_TEST_UTIL_ - -#include -#include -#include - -// Helper methods for setting up environment for running gtest tests -// inside an APK. -namespace testing { -namespace android { - -class ScopedMainEntryLogger { - public: - ScopedMainEntryLogger() { - printf(">>ScopedMainEntryLogger\n"); - } - - ~ScopedMainEntryLogger() { - printf("<* args); -void ParseArgsFromCommandLineFile( - const char* path, std::vector* args); -int ArgsToArgv(const std::vector& args, std::vector* argv); - -} // namespace android -} // namespace testing - -#endif // TESTING_ANDROID_NATIVE_TEST_UTIL_ diff --git a/engine/src/flutter/testing/android/on_device_instrumentation.gyp b/engine/src/flutter/testing/android/on_device_instrumentation.gyp deleted file mode 100644 index 12e0f353c1..0000000000 --- a/engine/src/flutter/testing/android/on_device_instrumentation.gyp +++ /dev/null @@ -1,79 +0,0 @@ -# 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=="android"', { - 'variables' : { - 'driver_apk_name': 'OnDeviceInstrumentationDriver', - 'driver_apk_path': '<(PRODUCT_DIR)/apks/<(driver_apk_name).apk' - }, - 'targets': [ - { - 'target_name': 'reporter_java', - 'type': 'none', - 'dependencies': ['../../base/base.gyp:base_java'], - 'variables': { - 'java_in_dir': '../../testing/android/reporter/java', - }, - 'includes': [ - '../../build/java.gypi', - ], - }, - { - 'target_name': 'broker_java', - 'type': 'none', - 'variables': { - 'java_in_dir': '../../testing/android/broker/java', - }, - 'includes': [ - '../../build/java.gypi', - ], - }, - { - 'target_name': 'driver_apk', - 'type': 'none', - 'dependencies': [ - 'broker_java', - 'reporter_java', - 'appurify_support.gyp:appurify_support_java', - ], - 'variables': { - 'apk_name': '<(driver_apk_name)', - 'final_apk_path': '<(driver_apk_path)', - 'java_in_dir': '../../testing/android/driver/java', - }, - 'includes': [ - '../../build/java_apk.gypi', - ], - }, - { - # This emulates gn's datadeps fields, allowing other APKs to declare - # that they require that this APK be built without including the - # driver's code. - 'target_name': 'require_driver_apk', - 'type': 'none', - 'actions': [ - { - 'action_name': 'require_<(driver_apk_name)', - 'message': 'Making sure <(driver_apk_path) has been built.', - 'variables': { - 'required_file': '<(PRODUCT_DIR)/driver_apk/<(driver_apk_name).apk.required', - }, - 'inputs': [ - '<(driver_apk_path)', - ], - 'outputs': [ - '<(required_file)', - ], - 'action': [ - 'python', '../../build/android/gyp/touch.py', '<(required_file)', - ], - }, - ], - }, - ], - }], - ], -} diff --git a/engine/src/flutter/testing/android/reporter/BUILD.gn b/engine/src/flutter/testing/android/reporter/BUILD.gn deleted file mode 100644 index 7086a79d3d..0000000000 --- a/engine/src/flutter/testing/android/reporter/BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ -# 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/android/rules.gni") - -# GYP: //testing/android/on_device_instrumentation.gyp:reporter_java -android_library("reporter_java") { - chromium_code = true - - deps = [ - "//base:base_java", - ] - java_files = [ - "java/src/org/chromium/test/reporter/TestStatusListener.java", - "java/src/org/chromium/test/reporter/TestStatusReceiver.java", - "java/src/org/chromium/test/reporter/TestStatusReporter.java", - ] -} diff --git a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusListener.java b/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusListener.java deleted file mode 100644 index 62754181ce..0000000000 --- a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusListener.java +++ /dev/null @@ -1,78 +0,0 @@ -// 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. - -package org.chromium.test.reporter; - -import android.content.Context; -import android.util.Log; - -import junit.framework.AssertionFailedError; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestListener; - -/** - * A TestListener that reports when tests start, pass, or fail. - */ -public class TestStatusListener implements TestListener { - - private static final String TAG = "TestStatusListener"; - - private boolean mFailed; - private final TestStatusReporter mReporter; - - public TestStatusListener(Context context) { - mReporter = new TestStatusReporter(context); - } - - /** Called when an error has occurred while running a test. - - Note that an error usually means a problem with the test or test harness, not with - the code under test. - - @param test The test in which the error occurred. - @param t The exception that was raised. - */ - @Override - public void addError(Test test, Throwable t) { - Log.e(TAG, "Error while running " + test.toString(), t); - mFailed = true; - } - - /** Called when a test has failed. - - @param test The test in which the failure occurred. - @param t The exception that was raised. - */ - public void addFailure(Test test, AssertionFailedError e) { - Log.e(TAG, "Failure while running " + test.toString(), e); - mFailed = true; - } - - /** Called when a test has started. - @param test The test that started. - */ - @Override - public void startTest(Test test) { - mFailed = false; - TestCase testCase = (TestCase) test; - mReporter.startHeartbeat(); - mReporter.testStarted(testCase.getClass().getName(), testCase.getName()); - } - - /** Called when a test has ended. - @param test The test that ended. - */ - @Override - public void endTest(Test test) { - TestCase testCase = (TestCase) test; - if (mFailed) { - mReporter.testFailed(testCase.getClass().getName(), testCase.getName()); - } else { - mReporter.testPassed(testCase.getClass().getName(), testCase.getName()); - } - mReporter.stopHeartbeat(); - } - -} 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 deleted file mode 100644 index 1f410a9fa8..0000000000 --- a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReceiver.java +++ /dev/null @@ -1,154 +0,0 @@ -// 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. - -package org.chromium.test.reporter; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; - -import org.chromium.base.Log; - -import java.util.ArrayList; -import java.util.List; - -/** Receives test status broadcasts send from - {@link org.chromium.test.reporter.TestStatusReporter}. - */ -public class TestStatusReceiver extends BroadcastReceiver { - - 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; - static { - IntentFilter filter = new IntentFilter(); - filter.addAction(TestStatusReporter.ACTION_HEARTBEAT); - 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); - } catch (IntentFilter.MalformedMimeTypeException e) { - Log.wtf(TAG, "Invalid MIME type", e); - } - INTENT_FILTER = filter; - } - - /** A callback used when a test has failed. */ - public interface FailCallback { - void testFailed(String testClass, String testMethod); - } - - /** A callback used when a heartbeat is received. */ - public interface HeartbeatCallback { - void heartbeat(); - } - - /** A callback used when a test has passed. */ - public interface PassCallback { - void testPassed(String testClass, String testMethod); - } - - /** A callback used when a test has started. */ - public interface StartCallback { - 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); - } - - /** Register a callback for when a heartbeat is received. */ - public void registerCallback(HeartbeatCallback c) { - mHeartbeatCallbacks.add(c); - } - - /** Register a callback for when a test has passed. */ - public void registerCallback(PassCallback c) { - mPassCallbacks.add(c); - } - - /** Register a callback for when a test has started. */ - public void registerCallback(StartCallback c) { - 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); - } - - /** Receive a broadcast intent. - * - * @param context The Context in which the receiver is running. - * @param intent The intent received. - */ - @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); - - switch (intent.getAction()) { - case TestStatusReporter.ACTION_TEST_STARTED: - for (StartCallback c : mStartCallbacks) { - c.testStarted(testClass, testMethod); - } - break; - case TestStatusReporter.ACTION_TEST_PASSED: - for (PassCallback c : mPassCallbacks) { - c.testPassed(testClass, testMethod); - } - break; - case TestStatusReporter.ACTION_TEST_FAILED: - for (FailCallback c : mFailCallbacks) { - c.testFailed(testClass, testMethod); - } - break; - case TestStatusReporter.ACTION_HEARTBEAT: - for (HeartbeatCallback c : mHeartbeatCallbacks) { - 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: %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 deleted file mode 100644 index 85355f9033..0000000000 --- a/engine/src/flutter/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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. - -package org.chromium.test.reporter; - -import android.content.Context; -import android.content.Intent; - -import org.chromium.base.ThreadUtils; - -import java.util.concurrent.atomic.AtomicBoolean; - -/** - * Broadcasts test status to any listening {@link org.chromium.test.reporter.TestStatusReceiver}. - */ -public class TestStatusReporter { - - public static final String ACTION_HEARTBEAT = - "org.chromium.test.reporter.TestStatusReporter.HEARTBEAT"; - public static final String ACTION_TEST_STARTED = - "org.chromium.test.reporter.TestStatusReporter.TEST_STARTED"; - public static final String ACTION_TEST_PASSED = - "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 = - "org.chromium.test.reporter.TestStatusReporter.TEST_METHOD"; - - public static final int HEARTBEAT_INTERVAL_MS = 5000; - - private final Context mContext; - private final AtomicBoolean mKeepBeating = new AtomicBoolean(false); - - public TestStatusReporter(Context c) { - mContext = c; - } - - public void startHeartbeat() { - mKeepBeating.set(true); - Runnable heartbeat = new Runnable() { - @Override - public void run() { - Intent i = new Intent(ACTION_HEARTBEAT); - i.setType(DATA_TYPE_HEARTBEAT); - mContext.sendBroadcast(i); - if (mKeepBeating.get()) { - ThreadUtils.postOnUiThreadDelayed(this, HEARTBEAT_INTERVAL_MS); - } - } - }; - ThreadUtils.postOnUiThreadDelayed(heartbeat, HEARTBEAT_INTERVAL_MS); - } - - public void testStarted(String testClass, String testMethod) { - sendTestBroadcast(ACTION_TEST_STARTED, testClass, testMethod); - } - - public void testPassed(String testClass, String testMethod) { - sendTestBroadcast(ACTION_TEST_PASSED, testClass, testMethod); - } - - public void testFailed(String testClass, String testMethod) { - sendTestBroadcast(ACTION_TEST_FAILED, testClass, testMethod); - } - - 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); - i.putExtra(EXTRA_TEST_METHOD, testMethod); - 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/OWNERS b/engine/src/flutter/testing/buildbot/OWNERS deleted file mode 100644 index c768380d6a..0000000000 --- a/engine/src/flutter/testing/buildbot/OWNERS +++ /dev/null @@ -1,18 +0,0 @@ -# This is needed because of * in testing/OWNERS . -# This is reserved for people that are comfortably with buildbot recipes -# and understand the implications of changing these files. -set noparent - -dpranke@chromium.org -jam@chromium.org -jochen@chromium.org -machenbach@chromium.org -maruel@chromium.org -phajdan.jr@chromium.org -sky@chromium.org -thakis@chromium.org - -per-file chromium.perf.json=eakuefner@chromium.org -per-file chromium.perf.json=fmeawad@chromium.org -per-file chromium.perf.json=simonhatch@chromium.org -per-file chromium.perf.json=sullivan@chromium.org diff --git a/engine/src/flutter/testing/buildbot/PRESUBMIT.py b/engine/src/flutter/testing/buildbot/PRESUBMIT.py deleted file mode 100644 index a74562a656..0000000000 --- a/engine/src/flutter/testing/buildbot/PRESUBMIT.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2012 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. - -"""Enforces json format. - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts -for more details on the presubmit API built into depot_tools. -""" - - -def CommonChecks(input_api, output_api): - args = [input_api.python_executable, 'manage.py', '--check'] - cmd = input_api.Command( - name='manage', cmd=args, kwargs={}, message=output_api.PresubmitError) - return input_api.RunTests([cmd]) - - -def CheckChangeOnUpload(input_api, output_api): - return CommonChecks(input_api, output_api) - - -def CheckChangeOnCommit(input_api, output_api): - return CommonChecks(input_api, output_api) diff --git a/engine/src/flutter/testing/buildbot/chromium.chrome.json b/engine/src/flutter/testing/buildbot/chromium.chrome.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.chrome.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/buildbot/chromium.chromiumos.json b/engine/src/flutter/testing/buildbot/chromium.chromiumos.json deleted file mode 100644 index 0cadd6a89e..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.chromiumos.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "Linux ChromiumOS GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "chromedriver_unittests", - "chromeos_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "ui_chromeos_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - } - ] - }, - "Linux ChromiumOS GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "chromedriver_unittests", - "chromeos_unittests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "ui_chromeos_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - } - ] - }, - "Linux ChromiumOS Ozone Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "net_unittests" - }, - { - "test": "ozone_unittests" - }, - { - "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" - }, - { - "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" - } - ] - }, - "Linux ChromiumOS Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 5 - }, - "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" - }, - { - "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" - }, - { - "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": "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" - }, - { - "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" - }, - { - "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" - }, - { - "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" - } - ] - }, - "Linux ChromiumOS Tests (dbg)(1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 10 - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "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" - }, - { - "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" - }, - { - "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" - }, - { - "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" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.fyi.json b/engine/src/flutter/testing/buildbot/chromium.fyi.json deleted file mode 100644 index 4ff6efb260..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.fyi.json +++ /dev/null @@ -1,4169 +0,0 @@ -{ - "Browser Side Navigation Linux": { - "gtest_tests": [ - { - "args": [ - "--enable-browser-side-navigation", - "--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" - ], - "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" - } - ] - }, - "Chromium Mac 10.10": { - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "test": "base_unittests" - }, - { - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "crypto_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "message_center_unittests" - }, - { - "test": "mojo_common_unittests" - }, - { - "test": "mojo_public_bindings_unittests" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "test": "mojo_system_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "sandbox_mac_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_integration_tests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "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": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "test": "angle_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "test": "app_shell_unittests" - }, - { - "test": "aura_unittests" - }, - { - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "compositor_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "crypto_unittests" - }, - { - "test": "dbus_unittests" - }, - { - "test": "device_unittests" - }, - { - "test": "display_unittests" - }, - { - "test": "events_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "mojo_common_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_system_unittests" - }, - { - "test": "nacl_helper_nonsfi_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "nacl_loader_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "ui_touch_selection_unittests" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - }, - { - "test": "views_unittests" - }, - { - "test": "wm_unittests" - } - ], - "scripts": [ - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "ClangToTLinuxASan tester": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "test": "angle_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 5 - }, - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_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": "device_unittests" - }, - { - "test": "display_unittests" - }, - { - "test": "extensions_browsertests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "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, - "shards": 4 - }, - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "test": "unit_tests" - }, - { - "test": "url_unittests" - } - ] - }, - "ClangToTMac tester": { - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "angle_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "message_center_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "mojo_common_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_system_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "sandbox_mac_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_integration_tests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "unit_tests" - }, - { - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "ClangToTMacASan tester": { - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "angle_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "message_center_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "mojo_common_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_system_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "sandbox_mac_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_integration_tests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "unit_tests" - }, - { - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "ClangToTWin tester": { - "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" - } - ] - }, - "ClangToTWin(dbg) tester": { - "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" - } - ] - }, - "ClangToTWin(dll) tester": { - "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" - } - ] - }, - "ClangToTWin64 tester": { - "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" - } - ] - }, - "ClangToTWin64(dbg) tester": { - "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" - } - ] - }, - "ClangToTWin64(dll) tester": { - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - }, - { - "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" - } - ] - }, - "CrWinAsan tester": { - "gtest_tests": [ - { - "test": "angle_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" - }, - { - "test": "chrome_elf_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - }, - { - "test": "views_unittests" - } - ] - }, - "CrWinAsan(dll) tester": { - "gtest_tests": [ - { - "test": "angle_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" - }, - { - "test": "chrome_elf_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - }, - { - "test": "sbox_integration_tests" - }, - { - "test": "sbox_unittests" - }, - { - "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" - }, - { - "test": "views_unittests" - } - ] - }, - "CrWinClang tester": { - "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" - } - ] - }, - "CrWinClang(dbg) tester": { - "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" - } - ] - }, - "CrWinClang(shared) tester": { - "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" - } - ] - }, - "CrWinClang64 tester": { - "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" - } - ] - }, - "CrWinClang64(dbg) tester": { - "gtest_tests": [ - { - "test": "angle_unittests" - }, - { - "test": "base_unittests" - }, - { - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "chrome_elf_unittests" - }, - { - "test": "components_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "courgette_unittests" - }, - { - "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" - }, - { - "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" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - }, - { - "test": "views_unittests" - } - ] - }, - "CrWinClang64(dll) tester": { - "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" - } - ] - }, - "CrWinClangLLD tester": { - "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" - } - ] - }, - "Linux ARM Cross-Compile": { - "compile_targets": [ - "browser_tests_run" - ], - "gtest_tests": [ - { - "test": "browser_tests" - } - ] - }, - "Linux Trusty": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "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" - }, - { - "test": "dbus_unittests" - }, - { - "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" - }, - { - "test": "gl_unittests" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "test": "mojo_system_unittests" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Linux Trusty (32)": { - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "test": "app_shell_unittests" - }, - { - "test": "aura_unittests" - }, - { - "test": "base_unittests" - }, - { - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "test": "compositor_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "crypto_unittests" - }, - { - "test": "dbus_unittests" - }, - { - "test": "device_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "display_unittests" - }, - { - "test": "events_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "mojo_common_unittests" - }, - { - "test": "mojo_public_bindings_unittests" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "test": "mojo_system_unittests" - }, - { - "test": "nacl_helper_nonsfi_unittests" - }, - { - "test": "nacl_loader_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "ui_touch_selection_unittests" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - }, - { - "test": "views_unittests" - }, - { - "test": "wm_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Linux Trusty (dbg)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "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" - }, - { - "test": "dbus_unittests" - }, - { - "test": "device_unittests" - }, - { - "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" - }, - { - "test": "gl_unittests" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "test": "mojo_system_unittests" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Linux Trusty (dbg)(32)": { - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "test": "app_shell_unittests" - }, - { - "test": "aura_unittests" - }, - { - "test": "base_unittests" - }, - { - "test": "browser_tests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_unittests" - }, - { - "test": "compositor_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "crypto_unittests" - }, - { - "test": "dbus_unittests" - }, - { - "test": "device_unittests" - }, - { - "test": "display_unittests" - }, - { - "test": "events_unittests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "test": "interactive_ui_tests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "midi_unittests" - }, - { - "test": "mojo_common_unittests" - }, - { - "test": "mojo_public_bindings_unittests" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "test": "mojo_system_unittests" - }, - { - "test": "nacl_helper_nonsfi_unittests" - }, - { - "test": "nacl_loader_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "ui_touch_selection_unittests" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - }, - { - "test": "views_unittests" - }, - { - "test": "wm_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Site Isolation Linux": { - "gtest_tests": [ - { - "args": [ - "--site-per-process", - "--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=-*.PreventSpoofFromSubframeAndReplace:SessionHistoryTest.CrossFrameFormBackForward:SessionHistoryTest.FrameBackForward:*.SupportCrossProcessPostMessageWithMessagePort:DevToolsProtocolTest.NavigationPreservesMessages:NavigationControllerBrowserTest.ReloadOriginalRequest" - ], - "test": "content_browsertests" - }, - { - "args": [ - "--site-per-process" - ], - "test": "content_unittests" - }, - { - "args": [ - "--site-per-process" - ], - "test": "unit_tests" - } - ] - }, - "Site Isolation Win": { - "gtest_tests": [ - { - "args": [ - "--site-per-process", - "--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=-*.PreventSpoofFromSubframeAndReplace:SessionHistoryTest.CrossFrameFormBackForward:SessionHistoryTest.FrameBackForward:*.SupportCrossProcessPostMessageWithMessagePort:DevToolsProtocolTest.NavigationPreservesMessages:NavigationControllerBrowserTest.ReloadOriginalRequest" - ], - "test": "content_browsertests" - }, - { - "args": [ - "--site-per-process" - ], - "test": "content_unittests" - }, - { - "args": [ - "--site-per-process" - ], - "test": "unit_tests" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.linux.json b/engine/src/flutter/testing/buildbot/chromium.linux.json deleted file mode 100644 index 4004bcd37f..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.linux.json +++ /dev/null @@ -1,1469 +0,0 @@ -{ - "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" - ] - }, - "Android Tests": { - "scripts": [ - { - "name": "webview_licenses", - "script": "webview_licenses.py" - }, - { - "name": "telemetry_perf_unittests", - "script": "telemetry_perf_unittests.py" - }, - { - "args": [ - "android_webview_unittests" - ], - "name": "android_webview_unittests", - "script": "android_gtest_test.py" - } - ] - }, - "Android Tests (dbg)": { - "scripts": [ - { - "name": "webview_licenses", - "script": "webview_licenses.py" - }, - { - "name": "telemetry_perf_unittests", - "script": "telemetry_perf_unittests.py" - } - ] - }, - "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" - }, - { - "test": "cast_shell_browser_test" - }, - { - "test": "cast_shell_unittests" - }, - { - "args": [ - "--gtest_filter=-OutOfProcessPPAPITest.TrueTypeFont:OutOfProcessPPAPITest.BrowserFont" - ], - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_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": "sandbox_linux_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": "url_unittests" - } - ] - }, - "Linux GN": { - "additional_compile_targets": [ - "browser_tests", - "mandoline:all" - ], - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "test": "aura_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_browsertests" - }, - { - "test": "components_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "crypto_unittests" - }, - { - "test": "dbus_unittests" - }, - { - "test": "device_unittests" - }, - { - "test": "display_unittests" - }, - { - "test": "events_unittests" - }, - { - "test": "extensions_browsertests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "gn_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "test": "html_viewer_unittests" - }, - { - "test": "interactive_ui_tests" - }, - { - "test": "ipc_mojo_unittests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "mojo_common_unittests" - }, - { - "test": "mojo_public_application_unittests" - }, - { - "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": "nacl_loader_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "resource_provider_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_integration_tests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "ui_touch_selection_unittests" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - }, - { - "test": "view_manager_unittests" - }, - { - "test": "views_unittests" - }, - { - "test": "wm_unittests" - } - ], - "scripts": [ - { - "name": "gn_check", - "script": "gn_check.py" - }, - { - "args": [ - "chrome" - ], - "name": "gyp_flag_compare", - "script": "gyp_flag_compare.py" - } - ] - }, - "Linux GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "mandoline:all", - "media_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Linux GN Clobber": { - "additional_compile_targets": [ - "all" - ] - }, - "Linux Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 5 - }, - "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_browsertests" - }, - { - "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" - }, - { - "test": "gl_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gn_unittests" - }, - { - "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" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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_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" - }, - { - "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" - } - ], - "scripts": [ - { - "name": "checkdeps", - "script": "checkdeps.py" - }, - { - "name": "checklicenses", - "script": "checklicenses.py" - }, - { - "name": "checkperms", - "script": "checkperms.py" - }, - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Linux Tests (dbg)(1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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" - }, - { - "test": "gl_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gn_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "test": "interactive_ui_tests" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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" - }, - { - "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_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" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Linux Tests (dbg)(1)(32)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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" - }, - { - "test": "gl_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gn_unittests" - }, - { - "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" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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_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" - }, - { - "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" - } - ], - "scripts": [ - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.mac.json b/engine/src/flutter/testing/buildbot/chromium.mac.json deleted file mode 100644 index 4003708146..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.mac.json +++ /dev/null @@ -1,1339 +0,0 @@ -{ - "Mac GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "base_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "crypto_unittests", - "gcm_unit_tests", - "gn_unittests", - "gpu_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "ppapi_unittests", - "printing_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - }, - "Mac GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "base_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "crypto_unittests", - "gcm_unit_tests", - "gn_unittests", - "gpu_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "ppapi_unittests", - "printing_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - }, - "Mac10.10 Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_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": "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": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_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": "message_center_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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_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": "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Mac10.6 Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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": "gl_unittests" - }, - { - "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": "message_center_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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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_mac_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_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": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Mac10.8 Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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": "content_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_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" - }, - { - "test": "gl_unittests" - }, - { - "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": "message_center_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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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_mac_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_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": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Mac10.9 Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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": "content_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_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" - }, - { - "test": "gl_unittests" - }, - { - "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": "message_center_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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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_mac_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_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": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Mac10.9 Tests (dbg)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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": "content_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_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" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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": "mojo_common_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_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_mac_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_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": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "url_unittests" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json b/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json deleted file mode 100644 index bfc7e0f93e..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.memory.fyi.json +++ /dev/null @@ -1,805 +0,0 @@ -{ - "Linux ChromeOS MSan Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_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, - "shards": 5 - }, - "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" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "test": "interactive_ui_tests" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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" - } - ] - }, - "Linux MSan Tests": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_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, - "shards": 5 - }, - "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" - }, - { - "test": "gl_unittests" - }, - { - "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" - }, - { - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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" - } - ] - }, - "Linux TSan Tests": { - "disabled_tests": { - "app_shell_browsertests": "http://crbug.com/455633", - "browser_tests": "Too many errors, clean content_browsertests first. http://crbug.com/368525", - "cc_unittests": "http://crbug.com/437454", - "interactive_ui_tests": "http://crbug.com/455679" - }, - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_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": "cast_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": "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_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gcm_unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 4 - }, - "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, - "shards": 2 - }, - "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 deleted file mode 100644 index 7e9b230175..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.memory.json +++ /dev/null @@ -1,645 +0,0 @@ -{ - "Linux ASan LSan Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "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" - }, - { - "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" - }, - { - "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" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "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, - "shards": 4 - }, - "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, - "shards": 2 - }, - "test": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "url_unittests" - } - ] - }, - "Linux ASan Tests (sandboxed)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 5 - }, - "test": "browser_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "interactive_ui_tests" - } - ] - }, - "Linux Chromium OS ASan LSan Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_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, - "shards": 10 - }, - "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" - }, - { - "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" - }, - { - "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" - }, - { - "test": "gl_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 4 - }, - "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" - }, - { - "test": "ui_chromeos_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "ui_touch_selection_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "test": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "url_unittests" - }, - { - "test": "views_unittests" - } - ] - }, - "Mac ASan 64 Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 20 - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "test": "content_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "content_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gcm_unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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": "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": "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" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.perf.json b/engine/src/flutter/testing/buildbot/chromium.perf.json deleted file mode 100644 index 565a917200..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.perf.json +++ /dev/null @@ -1,440 +0,0 @@ -{ - "Android MotoE Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "gpu_perftests" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android Nexus10 Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "gpu_perftests" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android Nexus4 Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "gpu_perftests" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android Nexus5 Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "gpu_perftests" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android Nexus6 Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android Nexus7v2 Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "gpu_perftests" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android Nexus9 Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - }, - { - "args": [ - "gpu_perftests" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "cc_perftests" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Android One Perf": { - "scripts": [ - { - "name": "host_info", - "script": "host_info.py" - } - ] - }, - "Linux Perf (3)": { - "scripts": [ - { - "args": [ - "cc_perftests", - "--test-launcher-print-test-stdio=always" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Mac 10.8 Perf (1)": { - "scripts": [ - { - "args": [ - "gpu_perftests", - "--test-launcher-print-test-stdio=always" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Mac 10.8 Perf (3)": { - "scripts": [ - { - "args": [ - "cc_perftests", - "--test-launcher-print-test-stdio=always" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Mac 10.9 Perf (1)": { - "scripts": [ - { - "args": [ - "gpu_perftests", - "--test-launcher-print-test-stdio=always" - ], - "name": "gpu_perftests", - "script": "gtest_perf_test.py" - } - ] - }, - "Mac 10.9 Perf (3)": { - "scripts": [ - { - "args": [ - "cc_perftests", - "--test-launcher-print-test-stdio=always" - ], - "name": "cc_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 7 ATI GPU Perf (2)": { - "scripts": [ - { - "args": [ - "angle_perftests", - "--test-launcher-print-test-stdio=always", - "--test-launcher-jobs=1" - ], - "name": "angle_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 7 Intel GPU Perf": { - "scripts": [ - { - "args": [ - "angle_perftests", - "--test-launcher-print-test-stdio=always", - "--test-launcher-jobs=1" - ], - "name": "angle_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 7 Low-End Perf (2)": { - "scripts": [ - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 7 Nvidia GPU Perf (2)": { - "scripts": [ - { - "args": [ - "angle_perftests", - "--test-launcher-print-test-stdio=always", - "--test-launcher-jobs=1" - ], - "name": "angle_perftests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 7 Perf (3)": { - "scripts": [ - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 7 x64 Perf (2)": { - "scripts": [ - { - "args": [ - "performance_browser_tests", - "--test-launcher-print-test-stdio=always", - "--gtest_filter=TabCapturePerformanceTest.*:CastV2PerformanceTest.*", - "--test-launcher-jobs=1", - "--enable-gpu" - ], - "name": "performance_browser_tests", - "script": "gtest_perf_test.py" - }, - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - }, - "Win 8 Perf (2)": { - "scripts": [ - { - "args": [ - "load_library_perf_tests", - "--test-launcher-print-test-stdio=always" - ], - "name": "load_library_perf_tests", - "script": "gtest_perf_test.py" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.webkit.json b/engine/src/flutter/testing/buildbot/chromium.webkit.json deleted file mode 100644 index 4e8a96cd4e..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.webkit.json +++ /dev/null @@ -1,1255 +0,0 @@ -{ - "Linux ChromiumOS Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 5 - }, - "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" - }, - { - "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" - }, - { - "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": "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" - }, - { - "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" - } - ] - }, - "Linux ChromiumOS Tests (2)": { - "gtest_tests": [] - }, - "Linux ChromiumOS Tests (dbg)(1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 20 - }, - "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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" - }, - { - "test": "google_apis_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "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" - }, - { - "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" - } - ] - }, - "Linux ChromiumOS Tests (dbg)(2)": { - "gtest_tests": [] - }, - "Linux ChromiumOS Tests (dbg)(3)": { - "gtest_tests": [] - }, - "Linux GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "nacl_loader_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - }, - "Linux GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - }, - "WebKit Linux": { - "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 Linux (dbg)": { - "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 Linux 32": { - "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 Linux Leak": { - "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 Linux Oilpan": { - "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 Linux Oilpan (dbg)": { - "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 Linux Oilpan Leak": { - "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 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": [ - { - "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 (dbg)": { - "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.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": [ - { - "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 (dbg)": { - "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.7": { - "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.7 (dbg)": { - "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.8": { - "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.9": { - "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.9 (retina)": { - "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 Win Oilpan": { - "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 Win Oilpan (dbg)": { - "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 Win7": { - "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 Win7 (dbg)": { - "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 XP": { - "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" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.webrtc.fyi.json b/engine/src/flutter/testing/buildbot/chromium.webrtc.fyi.json deleted file mode 100644 index 65ed33a619..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.webrtc.fyi.json +++ /dev/null @@ -1,280 +0,0 @@ -{ - "Android GN": { - "additional_compile_targets": [ - "chrome_shell_apk" - ] - }, - "Android GN (dbg)": { - "additional_compile_targets": [ - "chrome_shell_apk" - ] - }, - "Linux GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "base_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "mandoline:all", - "media_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Linux GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "base_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "mandoline:all", - "media_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Mac GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "base_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "crypto_unittests", - "gcm_unit_tests", - "gn_unittests", - "gpu_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "ppapi_unittests", - "printing_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests" - ] - }, - "Mac GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "base_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "crypto_unittests", - "gcm_unit_tests", - "gn_unittests", - "gpu_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "ppapi_unittests", - "printing_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests" - ] - }, - "Win GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Win GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium.win.json b/engine/src/flutter/testing/buildbot/chromium.win.json deleted file mode 100644 index 0f760f22f8..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium.win.json +++ /dev/null @@ -1,1907 +0,0 @@ -{ - "Vista Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 10 - }, - "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" - }, - { - "test": "chrome_elf_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": "courgette_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_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" - }, - { - "test": "gl_unittests" - }, - { - "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, - "shards": 2 - }, - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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": "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - } - ], - "scripts": [] - }, - "Win 7 Tests x64 (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 10 - }, - "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" - }, - { - "test": "chrome_elf_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "chromedriver_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "components_browsertests" - }, - { - "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": "courgette_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "device_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" - }, - { - "test": "gl_unittests" - }, - { - "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, - "shards": 2 - }, - "test": "interactive_ui_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "ipc_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "jingle_unittests" - }, - { - "test": "keyboard_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": "mojo_common_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_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": "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Win x64 GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Win x64 GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Win7 Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 10 - }, - "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" - }, - { - "test": "chrome_elf_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "chromedriver_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "components_browsertests" - }, - { - "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": "courgette_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "device_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" - }, - { - "test": "gl_unittests" - }, - { - "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, - "shards": 2 - }, - "test": "interactive_ui_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "ipc_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "jingle_unittests" - }, - { - "test": "keyboard_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": "mojo_common_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_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": "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - }, - "Win7 Tests (ANGLE)": {}, - "Win7 Tests (dbg)(1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_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, - "shards": 20 - }, - "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" - }, - { - "test": "chrome_elf_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, - "shards": 2 - }, - "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" - }, - { - "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": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "installer_util_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 4 - }, - "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" - }, - { - "test": "mojo_public_environment_unittests" - }, - { - "test": "mojo_public_system_unittests" - }, - { - "test": "mojo_public_utility_unittests" - }, - { - "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": "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "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" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - } - ] - }, - "Win8 Aura": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "gtest_tests": [ - { - "test": "content_browsertests" - }, - { - "test": "events_unittests" - }, - { - "test": "ui_touch_selection_unittests" - } - ] - }, - "Win8 GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "Win8 GN (dbg)": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "XP Tests (1)": { - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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, - "shards": 10 - }, - "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" - }, - { - "test": "chrome_elf_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "chromedriver_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "components_browsertests" - }, - { - "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": "courgette_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "crypto_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" - }, - { - "test": "gl_unittests" - }, - { - "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, - "shards": 2 - }, - "test": "interactive_ui_tests" - }, - { - "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": "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": "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" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - { - "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" - } - ], - "scripts": [ - { - "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" - }, - { - "name": "nacl_integration", - "script": "nacl_integration.py" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/chromium_arm.json b/engine/src/flutter/testing/buildbot/chromium_arm.json deleted file mode 100644 index c3d306d08d..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium_arm.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compile_targets": [ - "browser_tests_run", - "nacl_helper_nonsfi_unittests_run", - "nacl_loader_unittests_run", - "sandbox_linux_unittests_run" - ], - "gtest_tests": [ - "browser_tests", - "nacl_helper_nonsfi_unittests", - "nacl_loader_unittests", - "sandbox_linux_unittests" - ] -} diff --git a/engine/src/flutter/testing/buildbot/chromium_memory_trybot.json b/engine/src/flutter/testing/buildbot/chromium_memory_trybot.json deleted file mode 100644 index cbe9dc9027..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium_memory_trybot.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "gtest_tests": [ - "accessibility_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "test": "browser_tests" - }, - "cacheinvalidation_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "cc_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "components_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "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" - }, - "device_unittests", - { - "platforms": [ - "linux" - ], - "test": "display_unittests" - }, - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "test": "interactive_ui_tests" - }, - "ipc_tests", - "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, - "shards": 2 - }, - "test": "net_unittests" - }, - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - { - "platforms": [ - "linux" - ], - "test": "sandbox_linux_unittests" - }, - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 2 - }, - "test": "unit_tests" - }, - "url_unittests" - ] -} diff --git a/engine/src/flutter/testing/buildbot/chromium_trybot.json b/engine/src/flutter/testing/buildbot/chromium_trybot.json deleted file mode 100644 index 59c8c6fde4..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium_trybot.json +++ /dev/null @@ -1,379 +0,0 @@ -{ - "compile_targets": [ - "all" - ], - "filter_compile_builders": [ - "win_chromium_compile_dbg", - "win_chromium_rel_swarming", - "win_chromium_x64_rel_swarming", - "win8_chromium_rel" - ], - "gtest_tests": [ - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "accessibility_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "app_list_unittests" - }, - { - "chromium_configs": [ - "chromium_chromeos", - "chromium_chromeos_clang", - "chromium_chromeos_ozone" - ], - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "ash_unittests" - }, - { - "platforms": [ - "win" - ], - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "ash_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "base_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 8 - }, - "test": "browser_tests" - }, - "cacheinvalidation_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "cast_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "cc_unittests" - }, - "chromedriver_unittests", - { - "chromium_configs": [ - "chromium_chromeos", - "chromium_chromeos_clang", - "chromium_chromeos_ozone" - ], - "test": "chromevox_tests" - }, - { - "platforms": [ - "win" - ], - "test": "chrome_elf_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "components_browsertests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "components_unittests" - }, - { - "platforms": [ - "linux", - "win" - ], - "test": "compositor_unittests" - }, - { - "can_use_on_swarming_builders": true, - "platforms": [ - "win" - ], - "test": "courgette_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" - }, - { - "platforms": [ - "linux" - ], - "test": "dbus_unittests" - }, - "device_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "events_unittests" - }, - { - "platforms": [ - "win", - "mac", - "linux" - ], - "test": "extensions_unittests" - }, - "gcm_unit_tests", - { - "chromium_configs": [ - "chromium_chromeos", - "chromium_chromeos_clang", - "chromium_chromeos_ozone" - ], - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gfx_unittests" - }, - "google_apis_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "gpu_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "test": "interactive_ui_tests" - }, - { - "platforms": [ - "win" - ], - "test": "installer_util_unittests" - }, - { - "platforms": [ - "linux" - ], - "test": "ipc_mojo_unittests" - }, - "ipc_tests", - "jingle_unittests", - { - "platforms": [ - "linux", - "win" - ], - "test": "keyboard_unittests" - }, - "media_perftests", - { - "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" - }, - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - { - "platforms": [ - "linux" - ], - "test": "nacl_helper_nonsfi_unittests" - }, - "nacl_loader_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "net_unittests" - }, - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - { - "platforms": [ - "win" - ], - "test": "sbox_integration_tests" - }, - { - "platforms": [ - "win" - ], - "test": "sbox_validation_tests" - }, - { - "platforms": [ - "win" - ], - "test": "sbox_unittests" - }, - "sql_unittests", - { - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 3 - }, - "test": "sync_integration_tests" - }, - "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, - "shards": 2 - }, - "test": "unit_tests" - }, - { - "chromium_configs": [ - "chromium_chromeos", - "chromium_chromeos_clang", - "chromium_chromeos_ozone" - ], - "platforms": [ - "linux" - ], - "test": "ui_chromeos_unittests" - }, - "url_unittests", - "skia_unittests", - { - "platforms": [ - "linux", - "win" - ], - "test": "wm_unittests" - }, - { - "platforms": [ - "linux", - "win" - ], - "swarming": { - "can_use_on_swarming_builders": true - }, - "test": "extensions_browsertests" - }, - { - "platforms": [ - "linux", - "win" - ], - "test": "app_shell_unittests" - }, - { - "platforms": [ - "linux", - "win" - ], - "test": "aura_unittests" - }, - { - "platforms": [ - "linux", - "win" - ], - "test": "views_unittests" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "platforms": [ - "linux" - ], - "test": "sandbox_linux_unittests" - }, - { - "platforms": [ - "mac" - ], - "test": "sandbox_mac_unittests" - }, - { - "chromium_configs": [ - "chromium_chromeos", - "chromium_chromeos_clang", - "chromium_chromeos_ozone" - ], - "platforms": [ - "linux" - ], - "test": "chromeos_unittests" - }, - { - "platforms": [ - "linux" - ], - "test": "display_unittests" - }, - { - "chromium_configs": [ - "chromium_chromeos_ozone" - ], - "platforms": [ - "linux" - ], - "test": "ozone_unittests" - } - ], - "non_filter_builders": [], - "non_filter_tests_builders": [] -} diff --git a/engine/src/flutter/testing/buildbot/chromium_win8_trybot.json b/engine/src/flutter/testing/buildbot/chromium_win8_trybot.json deleted file mode 100644 index 38e2f614e9..0000000000 --- a/engine/src/flutter/testing/buildbot/chromium_win8_trybot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compile_targets": [ - "all" - ], - "gtest_tests": [ - "base_unittests", - "views_unittests", - "wm_unittests", - "aura_unittests", - "ash_unittests", - "compositor_unittests", - "content_browsertests", - "events_unittests", - "ui_touch_selection_unittests", - "sbox_integration_tests", - "sbox_validation_tests", - "sbox_unittests" - ] -} diff --git a/engine/src/flutter/testing/buildbot/client.v8.branches.json b/engine/src/flutter/testing/buildbot/client.v8.branches.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/buildbot/client.v8.branches.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/buildbot/client.v8.fyi.json b/engine/src/flutter/testing/buildbot/client.v8.fyi.json deleted file mode 100644 index d214267dfc..0000000000 --- a/engine/src/flutter/testing/buildbot/client.v8.fyi.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "V8 Android GN (dbg)": { - "additional_compile_targets": [ - "chrome_shell_apk" - ], - "gtest_tests": [] - }, - "V8 Linux GN": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "nacl_loader_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "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 deleted file mode 100755 index 7a39176649..0000000000 --- a/engine/src/flutter/testing/buildbot/manage.py +++ /dev/null @@ -1,302 +0,0 @@ -#!/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. - -"""Toolbox to manage all the json files in this directory. - -It can reformat them in their canonical format or ensures they are well -formatted. -""" - -import argparse -import ast -import collections -import glob -import json -import os -import subprocess -import sys - - -THIS_DIR = os.path.dirname(os.path.abspath(__file__)) -SRC_DIR = os.path.dirname(os.path.dirname(THIS_DIR)) -sys.path.insert(0, os.path.join(SRC_DIR, 'third_party', 'colorama', 'src')) - -import colorama - - -SKIP = { - # These are not 'builders'. - 'compile_targets', 'gtest_tests', 'filter_compile_builders', - 'non_filter_builders', 'non_filter_tests_builders', - - # These are not supported on Swarming yet. - # http://crbug.com/472205 - 'Chromium Mac 10.10', - # http://crbug.com/441429 - 'Linux Trusty (32)', 'Linux Trusty (dbg)(32)', - - # 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', - 'Site Isolation Win', -} - - -# 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.""" - - -def get_isolates(): - """Returns the list of all isolate files.""" - files = subprocess.check_output(['git', 'ls-files'], cwd=SRC_DIR).splitlines() - return [os.path.basename(f) for f in files if f.endswith('.isolate')] - - -def process_builder_convert(data, test_name): - """Converts 'test_name' to run on Swarming in 'data'. - - Returns True if 'test_name' was found. - """ - result = False - for test in data['gtest_tests']: - if test['test'] != test_name: - continue - test.setdefault('swarming', {}) - if not test['swarming'].get('can_use_on_swarming_builders'): - test['swarming']['can_use_on_swarming_builders'] = True - result = True - return result - - -def process_builder_remaining(data, filename, builder, tests_location): - """Calculates tests_location when mode is --remaining.""" - for test in data['gtest_tests']: - name = test['test'] - if test.get('swarming', {}).get('can_use_on_swarming_builders'): - tests_location[name]['count_run_on_swarming'] += 1 - else: - tests_location[name]['count_run_local'] += 1 - tests_location[name]['local_configs'].setdefault( - filename, []).append(builder) - - -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. - - Return False if the process exit code should be 1. - """ - filename = os.path.basename(filepath) - with open(filepath) as f: - content = f.read() - try: - config = json.loads(content) - except ValueError as e: - raise Error('Exception raised while checking %s: %s' % (filepath, e)) - - for builder, data in sorted(config.iteritems()): - if builder in SKIP: - # Oddities. - continue - if not isinstance(data, dict): - raise Error('%s: %s is broken: %s' % (filename, builder, data)) - if 'gtest_tests' not in data: - continue - if not isinstance(data['gtest_tests'], list): - raise Error( - '%s: %s is broken: %s' % (filename, builder, data['gtest_tests'])) - if not all(isinstance(g, dict) for g in data['gtest_tests']): - 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']) - - # 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) - if mode == 'convert': - process_builder_convert(data, test_name) - - expected = json.dumps( - config, sort_keys=True, indent=2, separators=(',', ': ')) + '\n' - if content != expected: - if mode in ('convert', 'write'): - with open(filepath, 'wb') as f: - f.write(expected) - if mode == 'write': - print('Updated %s' % filename) - else: - print('%s is not in canonical format' % filename) - print('run `testing/buildbot/manage.py -w` to fix') - return mode != 'check' - return True - - -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. - """ - if test_name: - if test_name not in tests_location: - raise Error('Unknown test %s' % test_name) - for config, builders in sorted( - tests_location[test_name]['local_configs'].iteritems()): - print('%s:' % config) - for builder in sorted(builders): - print(' %s' % builder) - return - - isolates = get_isolates() - l = max(map(len, tests_location)) - print('%-*s%sLocal %sSwarming %sMissing isolate' % - (l, 'Test', colorama.Fore.RED, colorama.Fore.GREEN, - colorama.Fore.MAGENTA)) - total_local = 0 - total_swarming = 0 - for name, location in sorted(tests_location.iteritems()): - if not location['count_run_on_swarming']: - c = colorama.Fore.RED - elif location['count_run_local']: - c = colorama.Fore.YELLOW - else: - c = colorama.Fore.GREEN - total_local += location['count_run_local'] - total_swarming += location['count_run_on_swarming'] - missing_isolate = '' - if name + '.isolate' not in isolates: - missing_isolate = colorama.Fore.MAGENTA + '*' - print('%s%-*s %4d %4d %s' % - (c, l, name, location['count_run_local'], - location['count_run_on_swarming'], missing_isolate)) - - total = total_local + total_swarming - p_local = 100. * total_local / total - p_swarming = 100. * total_swarming / total - print('%s%-*s %4d (%4.1f%%) %4d (%4.1f%%)' % - (colorama.Fore.WHITE, l, 'Total:', total_local, p_local, - total_swarming, p_swarming)) - print('%-*s %4d' % (l, 'Total executions:', total)) - - -def main(): - colorama.init() - parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__) - group = parser.add_mutually_exclusive_group(required=True) - group.add_argument( - '-c', '--check', dest='mode', action='store_const', const='check', - default='check', help='Only check the files') - group.add_argument( - '--convert', dest='mode', action='store_const', const='convert', - help='Convert a test to run on Swarming everywhere') - group.add_argument( - '--remaining', dest='mode', action='store_const', const='remaining', - help='Count the number of tests not yet running on Swarming') - group.add_argument( - '-w', '--write', dest='mode', action='store_const', const='write', - help='Rewrite the files') - parser.add_argument( - 'test_name', nargs='?', - help='The test name to print which configs to update; only to be used ' - 'with --remaining') - args = parser.parse_args() - - if args.mode == 'convert': - if not args.test_name: - parser.error('A test name is required with --convert') - if args.test_name + '.isolate' not in get_isolates(): - parser.error('Create %s.isolate first' % args.test_name) - - # Stats when running in --remaining mode; - tests_location = collections.defaultdict( - lambda: { - '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, - ninja_targets, ninja_targets_seen): - result = 1 - - 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: - sys.stderr.write('%s\n' % e) - return 1 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/engine/src/flutter/testing/buildbot/ninja_to_gn.pyl b/engine/src/flutter/testing/buildbot/ninja_to_gn.pyl deleted file mode 100644 index 5e26949eb4..0000000000 --- a/engine/src/flutter/testing/buildbot/ninja_to_gn.pyl +++ /dev/null @@ -1,102 +0,0 @@ -# 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 deleted file mode 100644 index da3533ee79..0000000000 --- a/engine/src/flutter/testing/buildbot/trybot_analyze_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "android_webview": { - "exclusions": [ - "android_webview/.*" - ] - }, - "base": { - "exclusions": [ - ".*isolate", - "build/.*gyp[i]?", - "build/android/.*py", - "build/android/pylib/.*", - "build/compiler_version.py", - "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/.*", - "tools/whitespace.txt" - ] - }, - "chromium": { - "exclusions": [ - "chrome/test/data/.*", - "chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py", - "components/test/data/.*", - "content/test/data/.*", - "content/test/gpu/.*", - "extensions/test/data/.*", - "gpu/gles2_conform_support/gles2_conform_test_expectations.txt", - "mojo/tools/.*", - "media/test/data/.*", - "net/data/.*", - "sql/test/data/.*", - "third_party/accessibility-audit/axs_testing.js", - "third_party/hunspell_dictionaries/.*", - "third_party/zlib/google/test/data/.*", - "tools/clang/scripts/update.py", - "tools/clang/scripts/update.sh", - "tools/mb/.*", - "tools/metrics/histograms/histograms.xml", - "tools/perf/.*", - "tools/telemetry/.*" - ] - }, - "ios": { - "exclusions": [ - "ios/build/bots/.*" - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/tryserver.blink.json b/engine/src/flutter/testing/buildbot/tryserver.blink.json deleted file mode 100644 index 303f773a17..0000000000 --- a/engine/src/flutter/testing/buildbot/tryserver.blink.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "android_chromium_gn_compile_rel": { - "additional_compile_targets": [ - "chrome_shell_apk" - ], - "gtest_tests": [] - }, - "linux_chromium_gn_rel": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json b/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json deleted file mode 100644 index 36fa0c3e47..0000000000 --- a/engine/src/flutter/testing/buildbot/tryserver.chromium.linux.json +++ /dev/null @@ -1,362 +0,0 @@ -{ - "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" - ] - }, - "linux_chromium_gn_chromeos_dbg": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "chromedriver_unittests", - "chromeos_unittests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_tests", - "jingle_unittests", - "mandoline:all", - "media_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "ui_chromeos_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "linux_chromium_gn_chromeos_rel": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "chromedriver_unittests", - "chromeos_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_tests", - "jingle_unittests", - "mandoline:all", - "media_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "ui_chromeos_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "linux_chromium_gn_dbg": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "mandoline:all", - "media_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "linux_chromium_gn_rel": { - "additional_compile_targets": [ - "browser_tests", - "mandoline:all" - ], - "gtest_tests": [ - { - "test": "accessibility_unittests" - }, - { - "test": "app_list_unittests" - }, - { - "test": "aura_unittests" - }, - { - "test": "base_unittests" - }, - { - "test": "cacheinvalidation_unittests" - }, - { - "test": "cast_unittests" - }, - { - "test": "cc_unittests" - }, - { - "test": "chromedriver_unittests" - }, - { - "test": "components_browsertests" - }, - { - "test": "components_unittests" - }, - { - "test": "content_browsertests" - }, - { - "test": "content_unittests" - }, - { - "test": "crypto_unittests" - }, - { - "test": "dbus_unittests" - }, - { - "test": "device_unittests" - }, - { - "test": "display_unittests" - }, - { - "test": "events_unittests" - }, - { - "test": "extensions_browsertests" - }, - { - "test": "extensions_unittests" - }, - { - "test": "gcm_unit_tests" - }, - { - "test": "gfx_unittests" - }, - { - "test": "gl_unittests" - }, - { - "test": "gn_unittests" - }, - { - "test": "google_apis_unittests" - }, - { - "test": "gpu_unittests" - }, - { - "test": "html_viewer_unittests" - }, - { - "test": "interactive_ui_tests" - }, - { - "test": "ipc_mojo_unittests" - }, - { - "test": "ipc_tests" - }, - { - "test": "jingle_unittests" - }, - { - "test": "media_unittests" - }, - { - "test": "mojo_common_unittests" - }, - { - "test": "mojo_public_application_unittests" - }, - { - "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": "nacl_loader_unittests" - }, - { - "test": "net_unittests" - }, - { - "test": "ppapi_unittests" - }, - { - "test": "printing_unittests" - }, - { - "test": "remoting_unittests" - }, - { - "test": "resource_provider_unittests" - }, - { - "test": "sandbox_linux_unittests" - }, - { - "test": "skia_unittests" - }, - { - "test": "sql_unittests" - }, - { - "test": "sync_integration_tests" - }, - { - "test": "sync_unit_tests" - }, - { - "test": "ui_base_unittests" - }, - { - "test": "ui_touch_selection_unittests" - }, - { - "test": "unit_tests" - }, - { - "test": "url_unittests" - }, - { - "test": "view_manager_unittests" - }, - { - "test": "views_unittests" - }, - { - "test": "wm_unittests" - } - ], - "scripts": [ - { - "name": "gn_check", - "script": "gn_check.py" - }, - { - "args": [ - "chrome" - ], - "name": "gyp_flag_compare", - "script": "gyp_flag_compare.py" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/tryserver.chromium.mac.json b/engine/src/flutter/testing/buildbot/tryserver.chromium.mac.json deleted file mode 100644 index 4a46f9a42d..0000000000 --- a/engine/src/flutter/testing/buildbot/tryserver.chromium.mac.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "mac_chromium_gn_dbg": { - "additional_compile_targets": [ - "accessibility_unittests", - "base_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "crypto_unittests", - "gcm_unit_tests", - "gn_unittests", - "gpu_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "ppapi_unittests", - "printing_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - }, - "mac_chromium_gn_rel": { - "additional_compile_targets": [ - "accessibility_unittests", - "base_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "crypto_unittests", - "gcm_unit_tests", - "gn_unittests", - "gpu_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "ppapi_unittests", - "printing_unittests", - "skia_unittests", - "sql_unittests", - "sync_unit_tests", - "ui_base_unittests", - "url_unittests" - ], - "gtest_tests": [ - { - "test": "base_unittests" - } - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/tryserver.chromium.perf.json b/engine/src/flutter/testing/buildbot/tryserver.chromium.perf.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/buildbot/tryserver.chromium.perf.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/buildbot/tryserver.chromium.win.json b/engine/src/flutter/testing/buildbot/tryserver.chromium.win.json deleted file mode 100644 index 41423872d2..0000000000 --- a/engine/src/flutter/testing/buildbot/tryserver.chromium.win.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "win8_chromium_gn_dbg": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "win8_chromium_gn_rel": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "win_chromium_gn_x64_dbg": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - }, - "win_chromium_gn_x64_rel": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "app_shell_unittests", - "ash_unittests", - "aura_unittests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chrome", - "chrome_elf_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "compositor_unittests", - "content_browsertests", - "content_unittests", - "courgette_unittests", - "crypto_unittests", - "device_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "keyboard_unittests", - "mandoline:all", - "media_unittests", - "message_center_unittests", - "ppapi_unittests", - "printing_unittests", - "sbox_integration_tests", - "sbox_unittests", - "sbox_validation_tests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "url_unittests", - "views_unittests", - "wm_unittests" - ] - } -} diff --git a/engine/src/flutter/testing/buildbot/tryserver.v8.json b/engine/src/flutter/testing/buildbot/tryserver.v8.json deleted file mode 100644 index 548606135b..0000000000 --- a/engine/src/flutter/testing/buildbot/tryserver.v8.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "v8_android_chromium_gn_dbg": { - "additional_compile_targets": [ - "chrome_shell_apk" - ], - "gtest_tests": [] - }, - "v8_linux_chromium_gn_rel": { - "additional_compile_targets": [ - "accessibility_unittests", - "app_list_unittests", - "aura_unittests", - "browser_tests", - "cacheinvalidation_unittests", - "cast_unittests", - "cc_unittests", - "chromedriver_unittests", - "components_browsertests", - "components_unittests", - "content_browsertests", - "content_unittests", - "crypto_unittests", - "dbus_unittests", - "device_unittests", - "display_unittests", - "events_unittests", - "extensions_browsertests", - "extensions_unittests", - "gcm_unit_tests", - "gfx_unittests", - "gl_unittests", - "gn_unittests", - "google_apis_unittests", - "gpu_unittests", - "interactive_ui_tests", - "ipc_mojo_unittests", - "ipc_tests", - "jingle_unittests", - "media_unittests", - "mojo_common_unittests", - "mojo_public_bindings_unittests", - "mojo_public_environment_unittests", - "mojo_public_system_unittests", - "mojo_public_utility_unittests", - "mojo_system_unittests", - "nacl_loader_unittests", - "net_unittests", - "ppapi_unittests", - "printing_unittests", - "remoting_unittests", - "sandbox_linux_unittests", - "skia_unittests", - "sql_unittests", - "sync_integration_tests", - "sync_unit_tests", - "ui_base_unittests", - "ui_touch_selection_unittests", - "unit_tests", - "url_unittests", - "views_unittests", - "wm_unittests" - ], - "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 deleted file mode 100644 index bc0d8241f9..0000000000 --- a/engine/src/flutter/testing/chromoting/app_remoting_integration_tests.isolate +++ /dev/null @@ -1,38 +0,0 @@ -# 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 deleted file mode 100644 index 4143ad4a14..0000000000 --- a/engine/src/flutter/testing/chromoting/browser_test_commands_linux.txt +++ /dev/null @@ -1,13 +0,0 @@ -/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.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.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 -/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=FullscreenBrowserTest.MANUAL_Me2Me_Bump_Scroll --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 -cd ../../remoting/internal/config && /usr/bin/python ./is_valid_json.py diff --git a/engine/src/flutter/testing/chromoting/browser_tests_launcher.py b/engine/src/flutter/testing/chromoting/browser_tests_launcher.py deleted file mode 100644 index d39d2910e3..0000000000 --- a/engine/src/flutter/testing/chromoting/browser_tests_launcher.py +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright (c) 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. - - -"""Utility script to launch browser-tests on the Chromoting bot.""" -import argparse -import glob -import hashlib -import os -from os.path import expanduser -import shutil -import socket -import subprocess - -import psutil - -BROWSER_TEST_ID = 'browser_tests' -PROD_DIR_ID = '#PROD_DIR#' -HOST_HASH_VALUE = hashlib.md5(socket.gethostname()).hexdigest() -SUCCESS_INDICATOR = 'SUCCESS: all tests passed.' -NATIVE_MESSAGING_DIR = 'NativeMessagingHosts' -CRD_ID = 'chrome-remote-desktop' # Used in a few file/folder names -CHROMOTING_HOST_PATH = '/opt/google/chrome-remote-desktop/chrome-remote-desktop' -TEST_FAILURE = False -FAILING_TESTS = '' -HOST_READY_INDICATOR = 'Host ready to receive connections.' -BROWSER_NOT_STARTED_ERROR = ( - 'Still waiting for the following processes to finish') -TIME_OUT_INDICATOR = '(TIMED OUT)' -MAX_RETRIES = 1 - - -def LaunchBTCommand(args, command): - """Launches the specified browser-test command. - - If the execution failed because a browser-instance was not launched, retry - once. - Args: - args: Command line args, used for test-case startup tasks. - command: Browser-test command line. - """ - global TEST_FAILURE, FAILING_TESTS - - retries = 0 - while retries <= MAX_RETRIES: - TestCaseSetup(args) - results = RunCommandInSubProcess(command) - - if SUCCESS_INDICATOR in results: - # Test passed. - break - - # Sometimes, during execution of browser-tests, a browser instance is - # not started and the test times out. See http://crbug/480025. - # To work around it, check if this execution failed owing to that - # problem and retry. - # There are 2 things to look for in the results: - # A line saying "Still waiting for the following processes to finish", - # and, because sometimes that line gets logged even if the test - # eventually passes, we'll also look for "(TIMED OUT)", before retrying. - if not ( - BROWSER_NOT_STARTED_ERROR in results and TIME_OUT_INDICATOR in results): - # Test failed for some other reason. Let's not retry. - break - retries += 1 - - # Check that the test passed. - if SUCCESS_INDICATOR not in results: - TEST_FAILURE = True - # Add this command-line to list of tests that failed. - FAILING_TESTS += command - - -def RunCommandInSubProcess(command): - """Creates a subprocess with command-line that is passed in. - - Args: - command: The text of command to be executed. - Returns: - results: stdout contents of executing the command. - """ - - cmd_line = [command] - try: - results = subprocess.check_output(cmd_line, stderr=subprocess.STDOUT, - shell=True) - except subprocess.CalledProcessError, e: - results = e.output - finally: - print results - return results - - -def TestMachineCleanup(user_profile_dir): - """Cleans up test machine so as not to impact other tests. - - Args: - user_profile_dir: the user-profile folder used by Chromoting tests. - - """ - # Stop the host service. - RunCommandInSubProcess(CHROMOTING_HOST_PATH + ' --stop') - - # Cleanup any host logs. - RunCommandInSubProcess('rm /tmp/chrome_remote_desktop_*') - - # Remove the user-profile dir - if os.path.exists(user_profile_dir): - shutil.rmtree(user_profile_dir) - - -def InitialiseTestMachineForLinux(cfg_file): - """Sets up a Linux machine for connect-to-host browser-tests. - - Copy over me2me host-config to expected locations. - By default, the Linux me2me host expects the host-config file to be under - $HOME/.config/chrome-remote-desktop - Its name is expected to have a hash that is specific to a machine. - - Args: - cfg_file: location of test account's host-config file. - - Raises: - Exception: if host did not start properly. - """ - - # First get home directory on current machine. - home_dir = expanduser('~') - default_config_file_location = os.path.join(home_dir, '.config', CRD_ID) - if os.path.exists(default_config_file_location): - shutil.rmtree(default_config_file_location) - os.makedirs(default_config_file_location) - - # Copy over test host-config to expected location, with expected file-name. - # The file-name should contain a hash-value that is machine-specific. - default_config_file_name = 'host#%s.json' % HOST_HASH_VALUE - config_file_src = os.path.join(os.getcwd(), cfg_file) - shutil.copyfile( - config_file_src, - os.path.join(default_config_file_location, default_config_file_name)) - - # Make sure chromoting host is running. - if not RestartMe2MeHost(): - # Host start failed. Don't run any tests. - raise Exception('Host restart failed.') - - -def RestartMe2MeHost(): - """Stops and starts the Me2Me host on the test machine. - - Waits to confirm that host is ready to receive connections before returning. - - Returns: - True: if HOST_READY_INDICATOR is found in stdout, indicating host is ready. - False: if HOST_READY_INDICATOR not found in stdout. - """ - - # Stop chromoting host. - RunCommandInSubProcess(CHROMOTING_HOST_PATH + ' --stop') - # Start chromoting host. - results = RunCommandInSubProcess(CHROMOTING_HOST_PATH + ' --start') - # Confirm that the start process completed, and we got: - # "Host ready to receive connections." in the log. - if HOST_READY_INDICATOR not in results: - return False - return True - - -def SetupUserProfileDir(me2me_manifest_file, it2me_manifest_file, - user_profile_dir): - """Sets up the Google Chrome user profile directory. - - Delete the previous user profile directory if exists and create a new one. - This invalidates any state changes by the previous test so each test can start - with the same environment. - - When a user launches the remoting web-app, the native messaging host process - is started. For this to work, this function places the me2me and it2me native - messaging host manifest files in a specific folder under the user-profile dir. - - Args: - me2me_manifest_file: location of me2me native messaging host manifest file. - it2me_manifest_file: location of it2me native messaging host manifest file. - user_profile_dir: Chrome user-profile-directory. - """ - native_messaging_folder = os.path.join(user_profile_dir, NATIVE_MESSAGING_DIR) - - if os.path.exists(user_profile_dir): - shutil.rmtree(user_profile_dir) - os.makedirs(native_messaging_folder) - - manifest_files = [me2me_manifest_file, it2me_manifest_file] - for manifest_file in manifest_files: - manifest_file_src = os.path.join(os.getcwd(), manifest_file) - manifest_file_dest = ( - os.path.join(native_messaging_folder, os.path.basename(manifest_file))) - shutil.copyfile(manifest_file_src, manifest_file_dest) - - -def PrintRunningProcesses(): - processes = psutil.get_process_list() - processes = sorted(processes, key=lambda process: process.name) - - print 'List of running processes:\n' - for process in processes: - print process.name - - -def TestCaseSetup(args): - # Stop+start me2me host process. - if not RestartMe2MeHost(): - # Host restart failed. Don't run any more tests. - raise Exception('Host restart failed.') - - # Reset the user profile directory to start each test with a clean slate. - SetupUserProfileDir(args.me2me_manifest_file, args.it2me_manifest_file, - args.user_profile_dir) - - -def main(args): - - InitialiseTestMachineForLinux(args.cfg_file) - - with open(args.commands_file) as f: - for line in f: - # Replace the PROD_DIR value in the command-line with - # the passed in value. - line = line.replace(PROD_DIR_ID, args.prod_dir) - # Launch specified command line for test. - LaunchBTCommand(args, line) - - # All tests completed. Include host-logs in the test results. - host_log_contents = '' - # There should be only 1 log file, as we delete logs on test completion. - # Loop through matching files, just in case there are more. - for log_file in glob.glob('/tmp/chrome_remote_desktop_*'): - with open(log_file, 'r') as log: - host_log_contents += '\nHOST LOG %s\n CONTENTS:\n%s' % ( - log_file, log.read()) - print host_log_contents - - # Was there any test failure? - if TEST_FAILURE: - print '++++++++++AT LEAST 1 TEST FAILED++++++++++' - print FAILING_TESTS.rstrip('\n') - print '++++++++++++++++++++++++++++++++++++++++++' - raise Exception('At least one test failed.') - -if __name__ == '__main__': - - parser = argparse.ArgumentParser() - parser.add_argument('-f', '--commands_file', - help='path to file listing commands to be launched.') - parser.add_argument('-p', '--prod_dir', - help='path to folder having product and test binaries.') - parser.add_argument('-c', '--cfg_file', - help='path to test host config file.') - parser.add_argument('--me2me_manifest_file', - help='path to me2me host manifest file.') - parser.add_argument('--it2me_manifest_file', - help='path to it2me host manifest file.') - parser.add_argument( - '-u', '--user_profile_dir', - help='path to user-profile-dir, used by connect-to-host tests.') - command_line_args = parser.parse_args() - try: - main(command_line_args) - finally: - # Stop host and cleanup user-profile-dir. - TestMachineCleanup(command_line_args.user_profile_dir) diff --git a/engine/src/flutter/testing/chromoting/chromoting_integration_tests.isolate b/engine/src/flutter/testing/chromoting/chromoting_integration_tests.isolate deleted file mode 100644 index eb7fec0544..0000000000 --- a/engine/src/flutter/testing/chromoting/chromoting_integration_tests.isolate +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright (c) 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. -{ - 'conditions': [ - ['OS=="linux"', { - 'variables': { - 'command': [ - './browser_tests_launcher.py', - '--commands_file', - './browser_test_commands_linux.txt', - '--prod_dir', - '<(PRODUCT_DIR)', - '--cfg_file', - '../../remoting/tools/internal/test-account-host-config.json', - '--me2me_manifest_file', - '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json', - '--it2me_manifest_file', - '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json', - '--user_profile_dir', - '/tmp/chromoting_test_profile', - ], - 'files': [ - '../xvfb.py', - './browser_tests_launcher.py', - './browser_test_commands_linux.txt', - '<(PRODUCT_DIR)/libosmesa.so', - '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', - '../../remoting/tools/internal/test-account-host-config.json', - '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json', - '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json', - '<(PRODUCT_DIR)/remoting-me2me-host.deb', - '<(PRODUCT_DIR)/nacl_helper', - '<(PRODUCT_DIR)/nacl_helper_bootstrap', - '<(PRODUCT_DIR)/pnacl/', - '../../remoting/internal/config/', - ], - }, - }], - ['OS=="linux" and use_ozone==0', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)', - ], - }, - }], - ['OS=="linux" or OS=="mac" or OS=="win"', { - 'variables': { - 'files': [ - '../test_env.py', - '<(PRODUCT_DIR)/browser_tests<(EXECUTABLE_SUFFIX)', - '<(PRODUCT_DIR)/remoting/remoting.webapp/', - '<(PRODUCT_DIR)/remoting/remoting.webapp.v2/', - '<(PRODUCT_DIR)/remoting/browser_test_resources/', - '<(PRODUCT_DIR)/resources.pak', - '../../remoting/tools/internal/test_accounts.json', - ], - 'read_only': 1, - }, - }], - ['OS=="linux" or OS=="win"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/chrome_100_percent.pak', - '<(PRODUCT_DIR)/locales/en-US.pak', - ], - }, - }], - ['OS=="win"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/chrome_elf.dll', - '<(PRODUCT_DIR)/libglesv2.dll', - ], - }, - }], - ['OS=="mac"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/<(mac_product_name).app/', - '<(PRODUCT_DIR)/exif.so', - ], - }, - }], - ['OS=="win"', { - 'variables': { - 'command': [ - '../test_env.py', - '<(PRODUCT_DIR)/browser_tests<(EXECUTABLE_SUFFIX)', - '--gtest_filter=RemoteDesktopBrowserTest.MANUAL_Launch:RemoteDesktopBrowserTest.MANUAL_Auth', - '--run-manual', - '--ui-test-action-timeout=100000', - '--webapp-unpacked=<(PRODUCT_DIR)/remoting/remoting.webapp.v2', - '--extension-name=Chromoting', - '--accounts-file=../../remoting/tools/internal/test_accounts.json', - '--account-type=gmail', - ], - }, - }], - ['OS=="mac"', { - 'variables': { - 'command': [ - '../test_env.py', - '<(PRODUCT_DIR)/browser_tests<(EXECUTABLE_SUFFIX)', - '--gtest_filter=RemoteDesktopBrowserTest.MANUAL_Launch', - '--run-manual', - '--ui-test-action-timeout=100000', - '--webapp-unpacked=<(PRODUCT_DIR)/remoting/remoting.webapp.v2', - '--extension-name=Chromoting', - '--accounts-file=../../remoting/tools/internal/test_accounts.json', - '--account-type=gmail', - ], - }, - }], - ['OS=="win" and kasko==1', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/kasko.dll', - ], - }, - }], - ], - 'includes': [ - '../../base/base.isolate', - '../../gin/v8.isolate', - ], -} diff --git a/engine/src/flutter/testing/chromoting/chromoting_test_files.txt b/engine/src/flutter/testing/chromoting/chromoting_test_files.txt deleted file mode 100644 index d68d381106..0000000000 --- a/engine/src/flutter/testing/chromoting/chromoting_test_files.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 57fb9a19ed..0000000000 --- a/engine/src/flutter/testing/chromoting/download_test_files.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 deleted file mode 100644 index 23a18ea0fd..0000000000 --- a/engine/src/flutter/testing/chromoting/integration_tests.gyp +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) 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. - -{ - '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', - 'includes': [ - './dependencies.gypi', - ], - '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' - ], - }], - ], -} diff --git a/engine/src/flutter/testing/chromoting/multi_machine_example/example_task.isolate b/engine/src/flutter/testing/chromoting/multi_machine_example/example_task.isolate deleted file mode 100644 index 710e6da5ed..0000000000 --- a/engine/src/flutter/testing/chromoting/multi_machine_example/example_task.isolate +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -{ - 'includes': [ - '../chromoting_integration_tests.isolate', - '../../legion/legion.isolate', - '../../../chrome/chrome.isolate', - '../../../remoting/tools/remote_test_helper/remote_test_helper.isolate', - ], - 'variables': { - 'command': [ - 'python', - '../../legion/run_task.py', - ], - }, -} diff --git a/engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.isolate b/engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.isolate deleted file mode 100644 index 957cae4246..0000000000 --- a/engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.isolate +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -{ - 'includes': [ - '../../legion/legion.isolate', - ], - 'variables': { - 'command': [ - 'python', - 'example_test_controller.py', - '--commands_file', - '../browser_test_commands_linux.txt', - '--prod_dir', - '<(PRODUCT_DIR)', - '--cfg_file', - '../../../remoting/tools/internal/test-account-host-config.json', - '--me2me_manifest_file', - '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json', - '--it2me_manifest_file', - '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json', - '--user_profile_dir', - '/tmp/chromoting_test_profile', - ], - 'files': [ - 'example_test_controller.py', - '../../../tools/swarming_client/', - ], - }, -} diff --git a/engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.py b/engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.py deleted file mode 100755 index 2ba2024c1c..0000000000 --- a/engine/src/flutter/testing/chromoting/multi_machine_example/example_test_controller.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/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. - -"""The test controller for the chromoting localhost browser_tests. - -This test uses the legion framework to setup this controller which will run -the chromoting_integration_tests on a task machine. This is intended to be an -example Legion-based test for the chromoting team. - -The controller will start a task machine to run browser_tests_launcher on. The -output of these tests are streamed back to the test controller to be output -on the controller's stdout and stderr channels. The final test output is then -read and becomes the final output of the controller, mirroring the test's -pass/fail result. -""" - -import argparse -import logging -import os -import sys -import time - -# Map the legion directory so we can import the host controller. -SRC_DIR = os.path.join('..', '..', '..') -sys.path.append(os.path.join(SRC_DIR, 'testing')) -from legion import test_controller - - -class ExampleController(test_controller.TestController): - """The test controller for the Chromoting browser_tests.""" - - def __init__(self): - super(ExampleController, self).__init__() - self.task = None - self.args = None - - def RunTest(self): - """Main method to run the test code.""" - self.ParseArgs() - self.CreateTask() - self.TestIntegrationTests() - - def CreateBrowserTestsLauncherCommand(self): - return [ - 'python', - self.TaskAbsPath('../browser_tests_launcher.py'), - '--commands_file', self.TaskAbsPath(self.args.commands_file), - '--prod_dir', self.TaskAbsPath(self.args.prod_dir), - '--cfg_file', self.TaskAbsPath(self.args.cfg_file), - '--me2me_manifest_file', self.TaskAbsPath( - self.args.me2me_manifest_file), - '--it2me_manifest_file', self.TaskAbsPath( - self.args.it2me_manifest_file), - '--user_profile_dir', self.args.user_profile_dir, - ] - - def TaskAbsPath(self, path): - """Returns the absolute path to the resource on the task machine. - - Args: - path: The relative path to the resource. - - Since the test controller and the task machines run in different tmp dirs - on different machines the absolute path cannot be calculated correctly on - this machine. This function maps the relative path (from this directory) - to an absolute path on the task machine. - """ - return self.task.rpc.AbsPath(path) - - def CreateTask(self): - """Creates a task object and sets the proper values.""" - self.task = self.CreateNewTask( - isolated_hash=self.args.task_machine, - dimensions={'os': 'Ubuntu-14.04', 'pool': 'Chromoting'}) - self.task.Create() - self.task.WaitForConnection() - - def ParseArgs(self): - """Gets the command line args.""" - parser = argparse.ArgumentParser() - parser.add_argument('--task_machine', - help='isolated hash of the task machine.') - # The rest of the args are taken from - # testing/chromoting/browser_tests_launcher.py. - parser.add_argument('-f', '--commands_file', - help='path to file listing commands to be launched.') - parser.add_argument('-p', '--prod_dir', - help='path to folder having product and test binaries.') - parser.add_argument('-c', '--cfg_file', - help='path to test host config file.') - parser.add_argument('--me2me_manifest_file', - help='path to me2me host manifest file.') - parser.add_argument('--it2me_manifest_file', - help='path to it2me host manifest file.') - parser.add_argument( - '-u', '--user_profile_dir', - help='path to user-profile-dir, used by connect-to-host tests.') - self.args, _ = parser.parse_known_args() - - def TestIntegrationTests(self): - """Runs the integration tests via browser_tests_launcher.py.""" - # Create a process object, configure it, and start it. - # All interactions with the process are based on this "proc" key. - proc = self.task.rpc.subprocess.Process( - self.CreateBrowserTestsLauncherCommand()) - # Set the cwd to browser_tests_launcher relative to this directory. - # This allows browser_test_launcher to use relative paths. - self.task.rpc.subprocess.SetCwd(proc, '../') - # Set the task verbosity to true to allow stdout/stderr to be echo'ed to - # run_task's stdout/stderr on the task machine. This can assist in - # debugging. - self.task.rpc.subprocess.SetVerbose(proc) - # Set the process as detached to create it in a new process group. - self.task.rpc.subprocess.SetDetached(proc) - # Start the actual process on the task machine. - self.task.rpc.subprocess.Start(proc) - - # Collect the stdout/stderr and emit it from this controller while the - # process is running. - while self.task.rpc.subprocess.Poll(proc) is None: - # Output the test's stdout and stderr in semi-realtime. - # This is not true realtime due to the RPC calls and the 1s sleep. - stdout, stderr = self.task.rpc.subprocess.ReadOutput(proc) - if stdout: - sys.stdout.write(stdout) - if stderr: - sys.stderr.write(stderr) - time.sleep(1) - - # Get the return code, clean up the process object. - returncode = self.task.rpc.subprocess.GetReturncode(proc) - self.task.rpc.subprocess.Delete(proc) - - # Pass or fail depending on the return code from the browser_tests_launcher. - if returncode != 0: - raise AssertionError('browser_tests_launcher failed with return code ' - '%i' % returncode) - - -if __name__ == '__main__': - ExampleController().RunController() diff --git a/engine/src/flutter/testing/coverage_util_ios.cc b/engine/src/flutter/testing/coverage_util_ios.cc deleted file mode 100644 index 15ac1b4a0a..0000000000 --- a/engine/src/flutter/testing/coverage_util_ios.cc +++ /dev/null @@ -1,15 +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. - -extern "C" void __gcov_flush(); - -namespace coverage_util { - -void FlushCoverageDataIfNecessary() { -#if defined(ENABLE_TEST_CODE_COVERAGE) - __gcov_flush(); -#endif -} - -} // namespace coverage_util diff --git a/engine/src/flutter/testing/coverage_util_ios.h b/engine/src/flutter/testing/coverage_util_ios.h deleted file mode 100644 index 702811aa7b..0000000000 --- a/engine/src/flutter/testing/coverage_util_ios.h +++ /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. - -#ifndef TESTING_COVERAGE_UTIL_IOS_H_ -#define TESTING_COVERAGE_UTIL_IOS_H_ - -namespace coverage_util { - -// Flushes .gcda coverage files if ENABLE_TEST_CODE_COVERAGE is defined. iOS 7 -// does not call any code at the "end" of an app so flushing should be -// performed manually. -void FlushCoverageDataIfNecessary(); - -} // namespace coverage_util - -#endif // TESTING_COVERAGE_UTIL_IOS_H_ diff --git a/engine/src/flutter/testing/generate_gmock_mutant.py b/engine/src/flutter/testing/generate_gmock_mutant.py deleted file mode 100755 index 45ac4edbbc..0000000000 --- a/engine/src/flutter/testing/generate_gmock_mutant.py +++ /dev/null @@ -1,450 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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 string -import sys - -HEADER = """\ -// 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. - -// This file automatically generated by testing/generate_gmock_mutant.py. -// DO NOT EDIT. - -#ifndef TESTING_GMOCK_MUTANT_H_ -#define TESTING_GMOCK_MUTANT_H_ - -// The intention of this file is to make possible using GMock actions in -// all of its syntactic beauty. Classes and helper functions can be used as -// more generic variants of Task and Callback classes (see base/task.h) -// Mutant supports both pre-bound arguments (like Task) and call-time -// arguments (like Callback) - hence the name. :-) -// -// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and -// call-time (C). The arguments as well as the return type are templatized. -// DispatchToMethod/Function will also try to call the selected method or -// function even if provided pre-bound arguments does not match exactly with -// the function signature hence the X1, X2 ... XN parameters in CreateFunctor. -// DispatchToMethod will try to invoke method that may not belong to the -// object's class itself but to the object's class base class. -// -// Additionally you can bind the object at calltime by binding a pointer to -// pointer to the object at creation time - before including this file you -// have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING. -// -// TODO(stoyan): It's yet not clear to me should we use T& and T&* instead -// of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style. -// -// -// Sample usage with gMock: -// -// struct Mock : public ObjectDelegate { -// MOCK_METHOD2(string, OnRequest(int n, const string& request)); -// MOCK_METHOD1(void, OnQuit(int exit_code)); -// MOCK_METHOD2(void, LogMessage(int level, const string& message)); -// -// string HandleFlowers(const string& reply, int n, const string& request) { -// string result = SStringPrintf("In request of %d %s ", n, request); -// for (int i = 0; i < n; ++i) result.append(reply) -// return result; -// } -// -// void DoLogMessage(int level, const string& message) { -// } -// -// void QuitMessageLoop(int seconds) { -// base::MessageLoop* loop = base::MessageLoop::current(); -// loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(), -// 1000 * seconds); -// } -// }; -// -// Mock mock; -// // 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), base::StartsWith("flower")) -// .Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, -// string("orchids")))); -// -// -// // No pre-bound arguments, two call-time arguments passed -// // directly to DoLogMessage -// EXPECT_CALL(mock, OnLogMessage(_, _)) -// .Times(AnyNumber()) -// .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage)); -// -// -// // In this case we have a single pre-bound argument - 3. We ignore -// // all of the arguments of OnQuit. -// EXCEPT_CALL(mock, OnQuit(_)) -// .Times(1) -// .WillOnce(InvokeWithoutArgs(CreateFunctor( -// &mock, &Mock::QuitMessageLoop, 3))); -// -// MessageLoop loop; -// loop.Run(); -// -// -// // Here is another example of how we can set an action that invokes -// // method of an object that is not yet created. -// struct Mock : public ObjectDelegate { -// MOCK_METHOD1(void, DemiurgeCreated(Demiurge*)); -// MOCK_METHOD2(void, OnRequest(int count, const string&)); -// -// void StoreDemiurge(Demiurge* w) { -// demiurge_ = w; -// } -// -// Demiurge* demiurge; -// } -// -// EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::StoreDemiurge))); -// -// EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick"))) -// .Times(AnyNumber()) -// .WillAlways(WithArgs<0>(Invoke( -// CreateFunctor(&mock->demiurge_, &Demiurge::DecreaseMonsters)))); -// - -#include "base/memory/linked_ptr.h" -#include "base/tuple.h" - -namespace testing {""" - -MUTANT = """\ - -// Interface that is exposed to the consumer, that does the actual calling -// of the method. -template -class MutantRunner { - public: - virtual R RunWithParams(const Params& params) = 0; - virtual ~MutantRunner() {} -}; - -// Mutant holds pre-bound arguments (like Task). Like Callback -// allows call-time arguments. You bind a pointer to the object -// at creation time. -template -class Mutant : public MutantRunner { - public: - Mutant(T* obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToMethod(this->obj_, this->method_, pb_, params); - } - - T* obj_; - Method method_; - PreBound pb_; -}; - -template -class MutantFunction : public MutantRunner { - public: - MutantFunction(Function function, const PreBound& pb) - : function_(function), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToFunction(function_, pb_, params); - } - - Function function_; - PreBound pb_; -}; - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// MutantLateBind is like Mutant, but you bind a pointer to a pointer -// to the object. This way you can create actions for an object -// that is not yet created (has only storage for a pointer to it). -template -class MutantLateObjectBind : public MutantRunner { - public: - MutantLateObjectBind(T** obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation. - virtual R RunWithParams(const Params& params) { - EXPECT_THAT(*this->obj_, testing::NotNull()); - if (NULL == *this->obj_) - return R(); - return DispatchToMethod( *this->obj_, this->method_, pb_, params); - } - - T** obj_; - Method method_; - PreBound pb_; -}; -#endif - -// Simple MutantRunner<> wrapper acting as a functor. -// Redirects operator() to MutantRunner::Run() -template -struct MutantFunctor { - explicit MutantFunctor(MutantRunner* cb) : impl_(cb) { - } - - ~MutantFunctor() { - } - - inline R operator()() { - return impl_->RunWithParams(base::Tuple<>()); - } - - template - inline R operator()(const Arg1& a) { - return impl_->RunWithParams(Params(a)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b) { - return impl_->RunWithParams(Params(a, b)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) { - return impl_->RunWithParams(Params(a, b, c)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c, - const Arg4& d) { - return impl_->RunWithParams(Params(a, b, c, d)); - } - - private: - // We need copy constructor since MutantFunctor is copied few times - // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS - MutantFunctor(); - linked_ptr > impl_; -}; -""" - -FOOTER = """\ -} // namespace testing - -#endif // TESTING_GMOCK_MUTANT_H_""" - -# Templates for DispatchToMethod/DispatchToFunction functions. -# template_params - typename P1, typename P2.. typename C1.. -# prebound - Tuple -# calltime - Tuple -# args - p.a, p.b.., c.a, c.b.. -DISPATCH_TO_METHOD_TEMPLATE = """\ -template -inline R DispatchToMethod(T* obj, Method method, - const %(prebound)s& p, - const %(calltime)s& c) { - return (obj->*method)(%(args)s); -} -""" - -DISPATCH_TO_FUNCTION_TEMPLATE = """\ -template -inline R DispatchToFunction(Function function, - const %(prebound)s& p, - const %(calltime)s& c) { - return (*function)(%(args)s); -} -""" - -# Templates for CreateFunctor functions. -# template_params - typename P1, typename P2.. typename C1.. typename X1.. -# prebound - Tuple -# calltime - Tuple -# params - X1,.. , A1, .. -# args - const P1& p1 .. -# call_args - p1, p2, p3.. -CREATE_METHOD_FUNCTOR_TEMPLATE = """\ -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(%(params)s), %(args)s) { - MutantRunner* t = - new Mutant - (obj, method, base::MakeTuple(%(call_args)s)); - return MutantFunctor(t); -} -""" - -CREATE_FUNCTION_FUNCTOR_TEMPLATE = """\ -template -inline MutantFunctor -CreateFunctor(R (*function)(%(params)s), %(args)s) { - MutantRunner* t = - new MutantFunction - (function, base::MakeTuple(%(call_args)s)); - return MutantFunctor(t); -} -""" - -def SplitLine(line, width): - """Splits a single line at comma, at most |width| characters long.""" - if len(line) <= width: - return (line, None) - n = 1 + line[:width].rfind(",") - if n == 0: # If comma cannot be found give up and return the entire line. - return (line, None) - # Assume there is a space after the comma - assert line[n] == " " - return (line[:n], line[n + 1:]) - - -def Wrap(s, width, subsequent_offset): - """Wraps a single line |s| at commas so every line is at most |width| - characters long. - """ - w = [] - spaces = " " * subsequent_offset - while s: - (f, s) = SplitLine(s, width) - w.append(f) - if s: - s = spaces + s - return "\n".join(w) - - -def Clean(s): - """Cleans artifacts from generated C++ code. - - Our simple string formatting/concatenation may introduce extra commas. - """ - s = s.replace(", >", ">") - s = s.replace(", )", ")") - return s - - -def ExpandPattern(pattern, it): - """Return list of expanded pattern strings. - - Each string is created by replacing all '%' in |pattern| with element of |it|. - """ - return [pattern.replace("%", x) for x in it] - - -def Gen(pattern, n, start): - """Expands pattern replacing '%' with sequential integers starting with start. - - Expanded patterns will be joined with comma separator. - Gen("X%", 3, 1) will return "X1, X2, X3". - """ - it = string.hexdigits[start:n + start] - return ", ".join(ExpandPattern(pattern, it)) - - -def Merge(a): - return ", ".join(filter(len, a)) - - -def GenTuple(pattern, n): - return Clean("base::Tuple<%s>" % (Gen(pattern, n, 1))) - - -def FixCode(s): - lines = Clean(s).splitlines() - # Wrap sometimes very long 1st line to be inside the "template <" - lines[0] = Wrap(lines[0], 80, 10) - - # Wrap all subsequent lines to 6 spaces arbitrarily. This is a 2-space line - # indent, plus a 4 space continuation indent. - for line in xrange(1, len(lines)): - lines[line] = Wrap(lines[line], 80, 6) - return "\n".join(lines) - - -def GenerateDispatch(prebound, calltime): - print "\n// %d - %d" % (prebound, calltime) - args = { - "template_params": Merge([Gen("typename P%", prebound, 1), - Gen("typename C%", calltime, 1)]), - "prebound": GenTuple("P%", prebound), - "calltime": GenTuple("C%", calltime), - "args": Merge([Gen("base::get<%>(p)", prebound, 0), - Gen("base::get<%>(c)", calltime, 0)]), - } - - print FixCode(DISPATCH_TO_METHOD_TEMPLATE % args) - print FixCode(DISPATCH_TO_FUNCTION_TEMPLATE % args) - - -def GenerateCreateFunctor(prebound, calltime): - print "// %d - %d" % (prebound, calltime) - args = { - "calltime": GenTuple("A%", calltime), - "prebound": GenTuple("P%", prebound), - "params": Merge([Gen("X%", prebound, 1), Gen("A%", calltime, 1)]), - "args": Gen("const P%& p%", prebound, 1), - "call_args": Gen("p%", prebound, 1), - "template_params": Merge([Gen("typename P%", prebound, 1), - Gen("typename A%", calltime, 1), - Gen("typename X%", prebound, 1)]) - } - - mutant = FixCode(CREATE_METHOD_FUNCTOR_TEMPLATE % args) - print mutant - - # Slightly different version for free function call. - print "\n", FixCode(CREATE_FUNCTION_FUNCTOR_TEMPLATE % args) - - # Functor with pointer to a pointer of the object. - print "\n#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - mutant2 = mutant.replace("CreateFunctor(T* obj,", "CreateFunctor(T** obj,") - mutant2 = mutant2.replace("new Mutant", "new MutantLateObjectBind") - mutant2 = mutant2.replace(" " * 17 + "Tuple", " " * 31 + "Tuple") - print mutant2 - print "#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING\n" - - # OS_WIN specific. Same functors but with stdcall calling conventions. - # These are not for WIN64 (x86_64) because there is only one calling - # convention in WIN64. - # Functor for method with __stdcall calling conventions. - print "#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)" - stdcall_method = CREATE_METHOD_FUNCTOR_TEMPLATE - stdcall_method = stdcall_method.replace("U::", "__stdcall U::") - stdcall_method = FixCode(stdcall_method % args) - print stdcall_method - # Functor for free function with __stdcall calling conventions. - stdcall_function = CREATE_FUNCTION_FUNCTOR_TEMPLATE - stdcall_function = stdcall_function.replace("R (*", "R (__stdcall *") - print "\n", FixCode(stdcall_function % args) - - print "#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - stdcall2 = stdcall_method - stdcall2 = stdcall2.replace("CreateFunctor(T* obj,", "CreateFunctor(T** obj,") - stdcall2 = stdcall2.replace("new Mutant", "new MutantLateObjectBind") - stdcall2 = stdcall2.replace(" " * 17 + "Tuple", " " * 31 + "Tuple") - print stdcall2 - print "#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - print "#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)\n" - - -def main(): - print HEADER - for prebound in xrange(0, 6 + 1): - for args in xrange(0, 6 + 1): - GenerateDispatch(prebound, args) - print MUTANT - for prebound in xrange(0, 6 + 1): - for args in xrange(0, 6 + 1): - GenerateCreateFunctor(prebound, args) - print FOOTER - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/engine/src/flutter/testing/gmock.gyp b/engine/src/flutter/testing/gmock.gyp deleted file mode 100644 index 6363b4b183..0000000000 --- a/engine/src/flutter/testing/gmock.gyp +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2009 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. - -{ - 'targets': [ - { - 'target_name': 'gmock', - 'type': 'static_library', - 'dependencies': [ - 'gtest.gyp:gtest', - ], - 'sources': [ - # Sources based on files in r173 of gmock. - 'gmock/include/gmock/gmock-actions.h', - 'gmock/include/gmock/gmock-cardinalities.h', - 'gmock/include/gmock/gmock-generated-actions.h', - 'gmock/include/gmock/gmock-generated-function-mockers.h', - 'gmock/include/gmock/gmock-generated-matchers.h', - 'gmock/include/gmock/gmock-generated-nice-strict.h', - 'gmock/include/gmock/gmock-matchers.h', - 'gmock/include/gmock/gmock-spec-builders.h', - 'gmock/include/gmock/gmock.h', - 'gmock/include/gmock/internal/gmock-generated-internal-utils.h', - 'gmock/include/gmock/internal/gmock-internal-utils.h', - 'gmock/include/gmock/internal/gmock-port.h', - 'gmock/src/gmock-all.cc', - 'gmock/src/gmock-cardinalities.cc', - 'gmock/src/gmock-internal-utils.cc', - 'gmock/src/gmock-matchers.cc', - 'gmock/src/gmock-spec-builders.cc', - 'gmock/src/gmock.cc', - 'gmock_mutant.h', # gMock helpers - ], - 'sources!': [ - 'gmock/src/gmock-all.cc', # Not needed by our build. - ], - 'include_dirs': [ - 'gmock', - 'gmock/include', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'gmock/include', # So that gmock headers can find themselves. - ], - }, - 'export_dependent_settings': [ - 'gtest.gyp:gtest', - ], - 'conditions': [ - ['OS == "ios"', { - 'toolsets': ['host', 'target'], - }], - ], - }, - { - 'target_name': 'gmock_main', - 'type': 'static_library', - 'dependencies': [ - 'gmock', - ], - 'sources': [ - 'gmock/src/gmock_main.cc', - ], - }, - ], -} diff --git a/engine/src/flutter/testing/gmock_mutant.h b/engine/src/flutter/testing/gmock_mutant.h deleted file mode 100644 index 6049d1d292..0000000000 --- a/engine/src/flutter/testing/gmock_mutant.h +++ /dev/null @@ -1,5177 +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. - -// This file automatically generated by testing/generate_gmock_mutant.py. -// DO NOT EDIT. - -#ifndef TESTING_GMOCK_MUTANT_H_ -#define TESTING_GMOCK_MUTANT_H_ - -// The intention of this file is to make possible using GMock actions in -// all of its syntactic beauty. Classes and helper functions can be used as -// more generic variants of Task and Callback classes (see base/task.h) -// Mutant supports both pre-bound arguments (like Task) and call-time -// arguments (like Callback) - hence the name. :-) -// -// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and -// call-time (C). The arguments as well as the return type are templatized. -// DispatchToMethod/Function will also try to call the selected method or -// function even if provided pre-bound arguments does not match exactly with -// the function signature hence the X1, X2 ... XN parameters in CreateFunctor. -// DispatchToMethod will try to invoke method that may not belong to the -// object's class itself but to the object's class base class. -// -// Additionally you can bind the object at calltime by binding a pointer to -// pointer to the object at creation time - before including this file you -// have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING. -// -// TODO(stoyan): It's yet not clear to me should we use T& and T&* instead -// of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style. -// -// -// Sample usage with gMock: -// -// struct Mock : public ObjectDelegate { -// MOCK_METHOD2(string, OnRequest(int n, const string& request)); -// MOCK_METHOD1(void, OnQuit(int exit_code)); -// MOCK_METHOD2(void, LogMessage(int level, const string& message)); -// -// string HandleFlowers(const string& reply, int n, const string& request) { -// string result = SStringPrintf("In request of %d %s ", n, request); -// for (int i = 0; i < n; ++i) result.append(reply) -// return result; -// } -// -// void DoLogMessage(int level, const string& message) { -// } -// -// void QuitMessageLoop(int seconds) { -// base::MessageLoop* loop = base::MessageLoop::current(); -// loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(), -// 1000 * seconds); -// } -// }; -// -// Mock mock; -// // 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), base::StartsWith("flower")) -// .Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, -// string("orchids")))); -// -// -// // No pre-bound arguments, two call-time arguments passed -// // directly to DoLogMessage -// EXPECT_CALL(mock, OnLogMessage(_, _)) -// .Times(AnyNumber()) -// .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage)); -// -// -// // In this case we have a single pre-bound argument - 3. We ignore -// // all of the arguments of OnQuit. -// EXCEPT_CALL(mock, OnQuit(_)) -// .Times(1) -// .WillOnce(InvokeWithoutArgs(CreateFunctor( -// &mock, &Mock::QuitMessageLoop, 3))); -// -// MessageLoop loop; -// loop.Run(); -// -// -// // Here is another example of how we can set an action that invokes -// // method of an object that is not yet created. -// struct Mock : public ObjectDelegate { -// MOCK_METHOD1(void, DemiurgeCreated(Demiurge*)); -// MOCK_METHOD2(void, OnRequest(int count, const string&)); -// -// void StoreDemiurge(Demiurge* w) { -// demiurge_ = w; -// } -// -// Demiurge* demiurge; -// } -// -// EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::StoreDemiurge))); -// -// EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick"))) -// .Times(AnyNumber()) -// .WillAlways(WithArgs<0>(Invoke( -// CreateFunctor(&mock->demiurge_, &Demiurge::DecreaseMonsters)))); -// - -#include "base/memory/linked_ptr.h" -#include "base/tuple.h" - -namespace testing { - -// 0 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple<>& c) { - return (obj->*method)(); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple<>& c) { - return (*function)(); -} - -// 0 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple& c) { - return (*function)(base::get<0>(c)); -} - -// 0 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(c), base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple& c) { - return (*function)(base::get<0>(c), base::get<1>(c)); -} - -// 0 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple& c) { - return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c)); -} - -// 0 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple& c) { - return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c)); -} - -// 0 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple& c) { - return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c)); -} - -// 0 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple<>& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple<>& p, - const base::Tuple& c) { - return (*function)(base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} - -// 1 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple<>& c) { - return (obj->*method)(base::get<0>(p)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple<>& c) { - return (*function)(base::get<0>(p)); -} - -// 1 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<0>(c)); -} - -// 1 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c)); -} - -// 1 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c)); -} - -// 1 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c)); -} - -// 1 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} - -// 1 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} - -// 2 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple<>& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple<>& c) { - return (*function)(base::get<0>(p), base::get<1>(p)); -} - -// 2 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c)); -} - -// 2 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c)); -} - -// 2 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c)); -} - -// 2 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c)); -} - -// 2 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} - -// 2 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c), - base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c), - base::get<5>(c)); -} - -// 3 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple<>& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple<>& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p)); -} - -// 3 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c)); -} - -// 3 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c)); -} - -// 3 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c)); -} - -// 3 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c)); -} - -// 3 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c), - base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c), - base::get<4>(c)); -} - -// 3 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c), - base::get<4>(c), base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<0>(c), base::get<1>(c), base::get<2>(c), base::get<3>(c), - base::get<4>(c), base::get<5>(c)); -} - -// 4 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple<>& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple<>& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p)); -} - -// 4 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c)); -} - -// 4 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c)); -} - -// 4 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c)); -} - -// 4 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c)); -} - -// 4 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c)); -} - -// 4 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<0>(c), base::get<1>(c), base::get<2>(c), - base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} - -// 5 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple<>& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple<>& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p)); -} - -// 5 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c)); -} - -// 5 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c)); -} - -// 5 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c)); -} - -// 5 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c)); -} - -// 5 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} - -// 5 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<0>(c), base::get<1>(c), - base::get<2>(c), base::get<3>(c), base::get<4>(c), base::get<5>(c)); -} - -// 6 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple<>& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple<>& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p)); -} - -// 6 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c)); -} - -// 6 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c)); -} - -// 6 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c)); -} - -// 6 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c)); -} - -// 6 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c)); -} - -// 6 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const base::Tuple& p, - const base::Tuple& c) { - return (obj->*method)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c), - base::get<5>(c)); -} -template -inline R DispatchToFunction(Function function, - const base::Tuple& p, - const base::Tuple& c) { - return (*function)(base::get<0>(p), base::get<1>(p), base::get<2>(p), - base::get<3>(p), base::get<4>(p), base::get<5>(p), base::get<0>(c), - base::get<1>(c), base::get<2>(c), base::get<3>(c), base::get<4>(c), - base::get<5>(c)); -} - -// Interface that is exposed to the consumer, that does the actual calling -// of the method. -template -class MutantRunner { - public: - virtual R RunWithParams(const Params& params) = 0; - virtual ~MutantRunner() {} -}; - -// Mutant holds pre-bound arguments (like Task). Like Callback -// allows call-time arguments. You bind a pointer to the object -// at creation time. -template -class Mutant : public MutantRunner { - public: - Mutant(T* obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToMethod(this->obj_, this->method_, pb_, params); - } - - T* obj_; - Method method_; - PreBound pb_; -}; - -template -class MutantFunction : public MutantRunner { - public: - MutantFunction(Function function, const PreBound& pb) - : function_(function), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToFunction(function_, pb_, params); - } - - Function function_; - PreBound pb_; -}; - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// MutantLateBind is like Mutant, but you bind a pointer to a pointer -// to the object. This way you can create actions for an object -// that is not yet created (has only storage for a pointer to it). -template -class MutantLateObjectBind : public MutantRunner { - public: - MutantLateObjectBind(T** obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation. - virtual R RunWithParams(const Params& params) { - EXPECT_THAT(*this->obj_, testing::NotNull()); - if (NULL == *this->obj_) - return R(); - return DispatchToMethod( *this->obj_, this->method_, pb_, params); - } - - T** obj_; - Method method_; - PreBound pb_; -}; -#endif - -// Simple MutantRunner<> wrapper acting as a functor. -// Redirects operator() to MutantRunner::Run() -template -struct MutantFunctor { - explicit MutantFunctor(MutantRunner* cb) : impl_(cb) { - } - - ~MutantFunctor() { - } - - inline R operator()() { - return impl_->RunWithParams(base::Tuple<>()); - } - - template - inline R operator()(const Arg1& a) { - return impl_->RunWithParams(Params(a)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b) { - return impl_->RunWithParams(Params(a, b)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) { - return impl_->RunWithParams(Params(a, b, c)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c, - const Arg4& d) { - return impl_->RunWithParams(Params(a, b, c, d)); - } - - private: - // We need copy constructor since MutantFunctor is copied few times - // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS - MutantFunctor(); - linked_ptr > impl_; -}; - -// 0 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)()) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)()) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)()) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)()) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)()) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)()) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(A1)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(A1)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(A1)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(A1)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(A1)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(A1, A2)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(A1, A2)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(A1, A2)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(A1, A2)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(A1, A2, A3)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(A1, A2, A3)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(A1, A2, A3, A4)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(A1, A2, A3, A4, A5)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(A1, A2, A3, A4, A5, A6)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5, A6)) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple()); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple()); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, A1), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, A1), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, A1, A2), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), - const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), - const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5), - const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5), - const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5, A6), const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5, A6), const P1& p1, - const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2, - const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2, - const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2, - const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5), const P1& p1, const P2& p2, - const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1), const P1& p1, const P2& p2, - const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 0 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6), const P1& p1, const P2& p2, - const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple<>> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple<>> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 1 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 2 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 3 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 4 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 5 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 6 -template -inline MutantFunctor> -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor> -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new Mutant, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} - -template -inline MutantFunctor> -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantFunction, base::Tuple> - (function, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor> -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner>* t = - new MutantLateObjectBind, base::Tuple> - (obj, method, base::MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor>(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -} // namespace testing - -#endif // TESTING_GMOCK_MUTANT_H_ diff --git a/engine/src/flutter/testing/gtest.gyp b/engine/src/flutter/testing/gtest.gyp deleted file mode 100644 index 79d7e66980..0000000000 --- a/engine/src/flutter/testing/gtest.gyp +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'includes': [ - 'gtest.gypi', - ], - 'targets': [ - { - 'target_name': 'gtest', - 'toolsets': ['host', 'target'], - 'type': 'static_library', - 'sources': [ - '<@(gtest_sources)', - ], - 'include_dirs': [ - 'gtest', - 'gtest/include', - ], - 'dependencies': [ - 'gtest_prod', - ], - 'defines': [ - # In order to allow regex matches in gtest to be shared between Windows - # and other systems, we tell gtest to always use it's internal engine. - 'GTEST_HAS_POSIX_RE=0', - # Chrome doesn't support / require C++11, yet. - 'GTEST_LANG_CXX11=0', - ], - 'all_dependent_settings': { - 'defines': [ - 'GTEST_HAS_POSIX_RE=0', - 'GTEST_LANG_CXX11=0', - ], - }, - 'conditions': [ - ['OS == "mac" or OS == "ios"', { - 'sources': [ - 'gtest_mac.h', - 'gtest_mac.mm', - 'platform_test_mac.mm', - ], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', - ], - }, - }], - ['OS == "ios"', { - 'dependencies' : [ - '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host', - ], - 'direct_dependent_settings': { - 'target_conditions': [ - # Turn all tests into bundles on iOS because that's the only - # type of executable supported for iOS. - ['_type=="executable"', { - 'variables': { - # Use a variable so the path gets fixed up so it is always - # correct when INFOPLIST_FILE finally gets set. - 'ios_unittest_info_plist_path': - '<(DEPTH)/testing/gtest_ios/unittest-Info.plist', - }, - 'mac_bundle': 1, - 'xcode_settings': { - 'BUNDLE_ID_TEST_NAME': - '>!(echo ">(_target_name)" | sed -e "s/_//g")', - 'INFOPLIST_FILE': '>(ios_unittest_info_plist_path)', - }, - 'mac_bundle_resources': [ - '<(ios_unittest_info_plist_path)', - '<(DEPTH)/testing/gtest_ios/Default.png', - ], - 'mac_bundle_resources!': [ - '<(ios_unittest_info_plist_path)', - ], - }], - ], - }, - 'sources': [ - 'coverage_util_ios.cc', - 'coverage_util_ios.h', - ], - }], - ['OS=="ios" and asan==1', { - 'direct_dependent_settings': { - 'target_conditions': [ - # Package the ASan runtime dylib into the test app bundles. - ['_type=="executable"', { - 'postbuilds': [ - { - 'variables': { - # Define copy_asan_dylib_path in a variable ending in - # _path so that gyp understands it's a path and - # performs proper relativization during dict merging. - 'copy_asan_dylib_path': - '<(DEPTH)/build/mac/copy_asan_runtime_dylib.sh', - }, - 'postbuild_name': 'Copy ASan runtime dylib', - 'action': [ - '>(copy_asan_dylib_path)', - ], - }, - ], - }], - ], - }, - }], - ['os_posix == 1', { - 'defines': [ - # gtest isn't able to figure out when RTTI is disabled for gcc - # versions older than 4.3.2, and assumes it's enabled. Our Mac - # and Linux builds disable RTTI, and cannot guarantee that the - # compiler will be 4.3.2. or newer. The Mac, for example, uses - # 4.2.1 as that is the latest available on that platform. gtest - # must be instructed that RTTI is disabled here, and for any - # direct dependents that might include gtest headers. - 'GTEST_HAS_RTTI=0', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_HAS_RTTI=0', - ], - }, - }], - ['OS=="android" and android_app_abi=="x86"', { - 'defines': [ - 'GTEST_HAS_CLONE=0', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_HAS_CLONE=0', - ], - }, - }], - ['OS=="android"', { - # We want gtest features that use tr1::tuple, but we currently - # don't support the variadic templates used by libstdc++'s - # implementation. gtest supports this scenario by providing its - # own implementation but we must opt in to it. - 'defines': [ - 'GTEST_USE_OWN_TR1_TUPLE=1', - # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. - # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 - # automatically on android, so it has to be set explicitly here. - 'GTEST_HAS_TR1_TUPLE=1', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_USE_OWN_TR1_TUPLE=1', - 'GTEST_HAS_TR1_TUPLE=1', - ], - }, - }], - ], - 'direct_dependent_settings': { - 'defines': [ - 'UNIT_TEST', - ], - 'include_dirs': [ - 'gtest/include', # So that gtest headers can find themselves. - ], - 'target_conditions': [ - ['_type=="executable"', { - 'test': 1, - 'conditions': [ - ['OS=="mac"', { - 'run_as': { - 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], - }, - }], - ['OS=="ios"', { - 'variables': { - # Use a variable so the path gets fixed up so it is always - # correct when the action finally gets used. - 'ios_run_unittest_script_path': - '<(DEPTH)/testing/gtest_ios/run-unittest.sh', - }, - 'run_as': { - 'action????': ['>(ios_run_unittest_script_path)'], - }, - }], - ['OS=="win"', { - 'run_as': { - 'action????': ['$(TargetPath)', '--gtest_print_time'], - }, - }], - ], - }], - ], - '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', - 'type': 'static_library', - 'dependencies': [ - 'gtest', - ], - 'sources': [ - 'gtest/src/gtest_main.cc', - ], - }, - { - 'target_name': 'gtest_prod', - 'toolsets': ['host', 'target'], - 'type': 'none', - 'sources': [ - 'gtest/include/gtest/gtest_prod.h', - ], - }, - ], -} diff --git a/engine/src/flutter/testing/gtest_ios/Default.png b/engine/src/flutter/testing/gtest_ios/Default.png deleted file mode 100644 index 8c9089d5c6789aae633902ca93ad552f14bfadd7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1707 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72WW?*2n3R7Lez`!6`;u=vBoS#-wo>-L1 z;Fyx1l&avFo0y&&l$w}QS$HzlhJk^ZA;2fZ^*;!l`Tu|B|Nm+K{~Q1R&+z}u|Nm#s z{691E|CzM^XN>=!VE{?aJoA6%%>Ogf{?9c2Ka&BZHto#+w3+|Y(*CCz|4(B8X*E9c z-+1PKr89*TilAf6c0>)`+44{BCJ_EAWI4#ZCIL(+Ljp2V9!x0^*|JhV3i~;(eJQF_y3Sx$OB8OdvLqxQ6q9p3G&CVvbk$ zZ;8|yuz=V!z&}(P7~ULW(4j?kl#IB{an^LB{Ts5Ud5>N diff --git a/engine/src/flutter/testing/gtest_ios/run-unittest.sh b/engine/src/flutter/testing/gtest_ios/run-unittest.sh deleted file mode 100755 index 1598630984..0000000000 --- a/engine/src/flutter/testing/gtest_ios/run-unittest.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -p - -# Copyright (c) 2012 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 - -# Environment sanitization. Set a known-safe PATH. Clear environment variables -# that might impact the interpreter's operation. The |bash -p| invocation -# on the #! line takes the bite out of BASH_ENV, ENV, and SHELLOPTS (among -# other features), but clearing them here ensures that they won't impact any -# shell scripts used as utility programs. SHELLOPTS is read-only and can't be -# unset, only unexported. -export PATH="/usr/bin:/bin:/usr/sbin:/sbin" -unset BASH_ENV CDPATH ENV GLOBIGNORE IFS POSIXLY_CORRECT -export -n SHELLOPTS - -readonly ScriptDir=$(dirname "$(echo ${0} | sed -e "s,^\([^/]\),$(pwd)/\1,")") -readonly ScriptName=$(basename "${0}") -readonly ThisScript="${ScriptDir}/${ScriptName}" -readonly SimExecutable="${BUILD_DIR}/ninja-iossim/${CONFIGURATION}/iossim" - -# Helper to print a line formatted for Xcodes build output parser. -XcodeNote() { - echo "${ThisScript}:${1}: note: ${2}" -} - -# Helper to print a divider to make things stick out in a busy output window. -XcodeHeader() { - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" - XcodeNote "$1" ">>>>> $2" - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" -} - -# Kills the iPhone Simulator if it is running. -KillSimulator() { - /usr/bin/killall "iPhone Simulator" 2> /dev/null || true -} - -# Runs tests via the iPhone Simulator for multiple devices. -RunTests() { - local -r appPath="${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app" - - if [[ ! -x "${SimExecutable}" ]]; then - echo "Unable to run tests: ${SimExecutable} was not found/executable." - exit 1 - fi - - for device in 'iPhone' 'iPad'; do - iosVersion="6.1" - KillSimulator - local command=( - "${SimExecutable}" "-d${device}" "-s${iosVersion}" "${appPath}" - ) - # Pass along any command line flags - if [[ "$#" -gt 0 ]]; then - command+=( "--" "${@}" ) - fi - XcodeHeader ${LINENO} "Launching tests for ${device} (iOS ${iosVersion})" - "${command[@]}" - - # If the command didn't exit successfully, abort. - if [[ $? -ne 0 ]]; then - exit $?; - fi - done -} - -# Time to get to work. - -if [[ "${PLATFORM_NAME}" != "iphonesimulator" ]]; then - XcodeNote ${LINENO} "Skipping running of unittests for device build." -else - if [[ "$#" -gt 0 ]]; then - RunTests "${@}" - else - RunTests - fi - KillSimulator -fi - -exit 0 diff --git a/engine/src/flutter/testing/gtest_ios/unittest-Info.plist b/engine/src/flutter/testing/gtest_ios/unittest-Info.plist deleted file mode 100644 index 6b3c09453c..0000000000 --- a/engine/src/flutter/testing/gtest_ios/unittest-Info.plist +++ /dev/null @@ -1,150 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.gtest.${BUNDLE_ID_TEST_NAME} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - ${MAIN_NIB_FILE} - UILaunchImages - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Landscape - UILaunchImageSize - {414, 736} - - - UILaunchImages~ipad - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {768, 1024} - - - UILaunchImageMinimumOSVersion - 7.0 - UILaunchImageName - Default - UILaunchImageOrientation - Landscape - UILaunchImageSize - {768, 1024} - - - UISupportedInterfaceOrientation - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - CFBundleURLTypes - - - CFBundleURLSchemes - - com.google.sso.chrome - ${BUNDLE_ID_TEST_NAME}.http - ${BUNDLE_ID_TEST_NAME}.https - ${BUNDLE_ID_TEST_NAME}-x-callback - - - - UTImportedTypeDeclarations - - - UTTypeConformsTo - - public.url - org.appextension.find-login-action - - UTTypeDescription - Chrome Password Fill by App Extension Action - UTTypeIdentifier - org.appextension.chrome-password-action - - - UTTypeConformsTo - - public.url - - UTTypeDescription - 1Password Find Login Action - UTTypeIdentifier - org.appextension.find-login-action - - - UIBackgroundModes - - fetch - - - diff --git a/engine/src/flutter/testing/gtest_mac.h b/engine/src/flutter/testing/gtest_mac.h deleted file mode 100644 index 0a9af4323a..0000000000 --- a/engine/src/flutter/testing/gtest_mac.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef TESTING_GTEST_MAC_H_ -#define TESTING_GTEST_MAC_H_ - -#include -#include - -#ifdef GTEST_OS_MAC - -#import - -namespace testing { -namespace internal { - -// This overloaded version allows comparison between ObjC objects that conform -// 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}_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 - -// Tests that [expected isEqual:actual]. -#define EXPECT_NSEQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual) -#define EXPECT_NSNE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2) - -#define ASSERT_NSEQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual) -#define ASSERT_NSNE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2) - -#endif // GTEST_OS_MAC - -#endif // TESTING_GTEST_MAC_H_ diff --git a/engine/src/flutter/testing/gtest_mac.mm b/engine/src/flutter/testing/gtest_mac.mm deleted file mode 100644 index 62b51c5a5a..0000000000 --- a/engine/src/flutter/testing/gtest_mac.mm +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2010 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 "gtest_mac.h" - -#include - -#include -#include -#include - -#ifdef GTEST_OS_MAC - -#import - -namespace testing { -namespace internal { - -// Handles nil values for |obj| properly by using safe printing of %@ in -// -stringWithFormat:. -static inline const char* StringDescription(id obj) { - return [[NSString stringWithFormat:@"%@", obj] UTF8String]; -} - -// This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_EQ(). -GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, - const char* actual_expression, - id expected, - id actual) { - if (expected == actual || [expected isEqual:actual]) { - return AssertionSuccess(); - } - return EqFailure(expected_expression, - actual_expression, - std::string(StringDescription(expected)), - std::string(StringDescription(actual)), - false); -} - -// This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NE(). -GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, - const char* actual_expression, - id expected, - id actual) { - if (expected != actual && ![expected isEqual:actual]) { - return AssertionSuccess(); - } - Message msg; - msg << "Expected: (" << expected_expression << ") != (" << actual_expression - << "), actual: " << StringDescription(expected) - << " vs " << StringDescription(actual); - 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 - -#endif // GTEST_OS_MAC diff --git a/engine/src/flutter/testing/gtest_mac_unittest.mm b/engine/src/flutter/testing/gtest_mac_unittest.mm deleted file mode 100644 index 2dfa24e8d8..0000000000 --- a/engine/src/flutter/testing/gtest_mac_unittest.mm +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2012 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. - -// Note that while this file is in testing/ and tests GTest macros, it is built -// as part of Chromium's unit_tests target because the project does not build -// or run GTest's internal test suite. - -#import "testing/gtest_mac.h" - -#import - -#include "base/mac/scoped_nsautorelease_pool.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/gtest/include/gtest/internal/gtest-port.h" - -TEST(GTestMac, ExpectNSEQ) { - base::mac::ScopedNSAutoreleasePool pool; - - EXPECT_NSEQ(@"a", @"a"); - - NSString* s1 = [NSString stringWithUTF8String:"a"]; - NSString* s2 = @"a"; - EXPECT_NE(s1, s2); - EXPECT_NSEQ(s1, s2); -} - -TEST(GTestMac, AssertNSEQ) { - base::mac::ScopedNSAutoreleasePool pool; - - NSString* s1 = [NSString stringWithUTF8String:"a"]; - NSString* s2 = @"a"; - EXPECT_NE(s1, s2); - ASSERT_NSEQ(s1, s2); -} - -TEST(GTestMac, ExpectNSNE) { - base::mac::ScopedNSAutoreleasePool pool; - - EXPECT_NSNE([NSNumber numberWithInt:2], [NSNumber numberWithInt:42]); -} - -TEST(GTestMac, AssertNSNE) { - base::mac::ScopedNSAutoreleasePool pool; - - ASSERT_NSNE(@"a", @"b"); -} - -TEST(GTestMac, ExpectNSNil) { - base::mac::ScopedNSAutoreleasePool pool; - - EXPECT_NSEQ(nil, nil); - EXPECT_NSNE(nil, @"a"); - EXPECT_NSNE(@"a", nil); - - // 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/gtest_nacl.gyp b/engine/src/flutter/testing/gtest_nacl.gyp deleted file mode 100644 index d1c0ce0fb4..0000000000 --- a/engine/src/flutter/testing/gtest_nacl.gyp +++ /dev/null @@ -1,94 +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. - -{ - 'variables': { - 'chromium_code': 1, - }, - 'includes': [ - '../build/common_untrusted.gypi', - 'gtest.gypi', - ], - 'conditions': [ - ['disable_nacl==0 and disable_nacl_untrusted==0', { - 'targets': [ - { - 'target_name': 'gtest_nacl', - 'type': 'none', - 'variables': { - 'nlib_target': 'libgtest_nacl.a', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_irt': 0, - 'build_pnacl_newlib': 1, - 'build_nonsfi_helper': 1, - }, - 'sources': [ - '<@(gtest_sources)', - ], - 'include_dirs': [ - 'gtest', - 'gtest/include', - ], - 'defines': [ - # In order to allow regex matches in gtest to be shared between - # Windows and other systems, we tell gtest to always use it's - # internal engine. - 'GTEST_HAS_POSIX_RE=0', - 'GTEST_LANG_CXX11=0', - # gtest isn't able to figure out when RTTI is disabled for gcc - # versions older than 4.3.2, and assumes it's enabled. Our Mac - # and Linux builds disable RTTI, and cannot guarantee that the - # compiler will be 4.3.2. or newer. The Mac, for example, uses - # 4.2.1 as that is the latest available on that platform. gtest - # must be instructed that RTTI is disabled here, and for any - # direct dependents that might include gtest headers. - 'GTEST_HAS_RTTI=0', - ], - 'all_dependent_settings': { - 'defines': [ - 'GTEST_HAS_POSIX_RE=0', - 'GTEST_LANG_CXX11=0', - ], - 'link_flags': [ - '-lgtest_nacl', - ], - }, - 'direct_dependent_settings': { - 'defines': [ - 'UNIT_TEST', - 'GTEST_HAS_RTTI=0', - ], - 'include_dirs': [ - 'gtest/include', # So that gtest headers can find themselves. - ], - }, - }, - { - 'target_name': 'gtest_main_nacl', - 'type': 'none', - 'variables': { - 'nlib_target': 'libgtest_main_nacl.a', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_irt': 0, - 'build_pnacl_newlib': 1, - 'build_nonsfi_helper': 1, - }, - 'dependencies': [ - 'gtest_nacl', - ], - 'sources': [ - 'gtest/src/gtest_main.cc', - ], - 'all_dependent_settings': { - 'link_flags': [ - '-lgtest_main_nacl', - ], - }, - }, - ], - }], - ], -} diff --git a/engine/src/flutter/testing/iossim/OWNERS b/engine/src/flutter/testing/iossim/OWNERS deleted file mode 100644 index 1b3348e791..0000000000 --- a/engine/src/flutter/testing/iossim/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -rohitrao@chromium.org -stuartmorgan@chromium.org diff --git a/engine/src/flutter/testing/iossim/iossim.gyp b/engine/src/flutter/testing/iossim/iossim.gyp deleted file mode 100644 index 6041d396ab..0000000000 --- a/engine/src/flutter/testing/iossim/iossim.gyp +++ /dev/null @@ -1,156 +0,0 @@ -# Copyright (c) 2012 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': { - 'mac_deployment_target': '10.8' - }, - 'conditions': [ - ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { - 'targets': [ - { - 'target_name': 'iossim', - 'toolsets': ['host'], - 'type': 'executable', - 'variables': { - 'developer_dir': '="6.0"', { - 'variables': { - 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks', - }, - 'defines': [ - 'IOSSIM_USE_XCODE_6', - ], - 'actions': [ - { - 'action_name': 'generate_dvt_foundation_header', - 'inputs': [ - '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoundation', - '<(PRODUCT_DIR)/class-dump', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h' - ], - 'action': [ - # Actions don't provide a way to redirect stdout, so a custom - # script is invoked that will execute the first argument and - # write the output to the file specified as the second argument. - # -I sorts classes, categories, and protocols by inheritance. - # -C only displays classes matching regular expression. - './redirect-stdout.sh', - '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidation|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework', - '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h', - ], - 'message': 'Generating DVTFoundation.h', - }, - { - 'action_name': 'generate_dvt_core_simulator', - 'inputs': [ - '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/Current/CoreSimulator', - '<(PRODUCT_DIR)/class-dump', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h' - ], - 'action': [ - # Actions don't provide a way to redirect stdout, so a custom - # script is invoked that will execute the first argument and - # write the output to the file specified as the second argument. - # -I sorts classes, categories, and protocols by inheritance. - # -C only displays classes matching regular expression. - './redirect-stdout.sh', - '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework', - '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h', - ], - 'message': 'Generating CoreSimulator.h', - }, - ], # actions - }, { # else: xcode_version<"6.0" - 'variables': { - 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks', - }, - }], # xcode_version - ], # conditions - 'dependencies': [ - '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host', - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)/iossim', - ], - 'sources': [ - 'iossim.mm', - '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', - ], - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', - ], - 'actions': [ - { - 'action_name': 'generate_dvt_iphone_sim_header', - 'inputs': [ - '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Versions/Current/DVTiPhoneSimulatorRemoteClient', - '<(PRODUCT_DIR)/class-dump', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h' - ], - 'action': [ - # Actions don't provide a way to redirect stdout, so a custom - # script is invoked that will execute the first argument and - # write the output to the file specified as the second argument. - # -I sorts classes, categories, and protocols by inheritance. - # -C only displays classes matching regular expression. - './redirect-stdout.sh', - '<(PRODUCT_DIR)/class-dump -I -CiPhoneSimulator <(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework', - '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h', - ], - 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h', - }, - ], # actions - 'xcode_settings': { - 'ARCHS': ['x86_64'], - }, - }, - ], - }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)"!="ninja" - 'variables': { - 'ninja_output_dir': 'ninja-iossim', - 'ninja_product_dir': - '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)', - }, - 'targets': [ - { - 'target_name': 'iossim', - 'type': 'none', - 'toolsets': ['host'], - 'variables': { - # Gyp to rerun - 're_run_targets': [ - 'testing/iossim/iossim.gyp', - ], - }, - 'includes': ['../../build/ios/mac_build.gypi'], - 'actions': [ - { - 'action_name': 'compile iossim', - 'inputs': [], - 'outputs': [], - 'action': [ - '<@(ninja_cmd)', - 'iossim', - ], - 'message': 'Generating the iossim executable', - }, - ], - }, - ], - }], - ], -} diff --git a/engine/src/flutter/testing/iossim/iossim.mm b/engine/src/flutter/testing/iossim/iossim.mm deleted file mode 100644 index 4d557ac8a8..0000000000 --- a/engine/src/flutter/testing/iossim/iossim.mm +++ /dev/null @@ -1,1037 +0,0 @@ -// Copyright (c) 2012 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. - -#include -#import -#include -#include -#include - -// An executable (iossim) that runs an app in the iOS Simulator. -// Run 'iossim -h' for usage information. -// -// For best results, the iOS Simulator application should not be running when -// iossim is invoked. -// -// Headers for iPhoneSimulatorRemoteClient and other frameworks used in this -// tool are generated by class-dump, via GYP. -// (class-dump is available at http://www.codethecode.com/projects/class-dump/) -// -// However, there are some forward declarations required to get things to -// compile. - -// TODO(lliabraa): Once all builders are on Xcode 6 this ifdef can be removed -// (crbug.com/385030). -#if defined(IOSSIM_USE_XCODE_6) -@class DVTStackBacktrace; -#import "DVTFoundation.h" -#endif // IOSSIM_USE_XCODE_6 - -// TODO(lliabraa): Once all builders are on Xcode 6 this ifdef can be removed -// (crbug.com/385030). -#if defined(IOSSIM_USE_XCODE_6) -@protocol SimBridge; -@class DVTSimulatorApplication; -@class SimDeviceSet; -@class SimDeviceType; -@class SimRuntime; -@class SimServiceConnectionManager; -#import "CoreSimulator.h" -#endif // IOSSIM_USE_XCODE_6 - -@interface DVTPlatform : NSObject -+ (BOOL)loadAllPlatformsReturningError:(id*)arg1; -@end -@class DTiPhoneSimulatorApplicationSpecifier; -@class DTiPhoneSimulatorSession; -@class DTiPhoneSimulatorSessionConfig; -@class DTiPhoneSimulatorSystemRoot; -@class DVTConfinementServiceConnection; -@class DVTDispatchLock; -@class DVTiPhoneSimulatorMessenger; -@class DVTNotificationToken; -@class DVTTask; -// The DTiPhoneSimulatorSessionDelegate protocol is referenced -// by the iPhoneSimulatorRemoteClient framework, but not defined in the object -// file, so it must be defined here before importing the generated -// iPhoneSimulatorRemoteClient.h file. -@protocol DTiPhoneSimulatorSessionDelegate -- (void)session:(DTiPhoneSimulatorSession*)session - didEndWithError:(NSError*)error; -- (void)session:(DTiPhoneSimulatorSession*)session - didStart:(BOOL)started - withError:(NSError*)error; -@end -#import "DVTiPhoneSimulatorRemoteClient.h" - -// An undocumented system log key included in messages from launchd. The value -// is the PID of the process the message is about (as opposed to launchd's PID). -#define ASL_KEY_REF_PID "RefPID" - -namespace { - -// Name of environment variables that control the user's home directory in the -// simulator. -const char* const kUserHomeEnvVariable = "CFFIXED_USER_HOME"; -const char* const kHomeEnvVariable = "HOME"; - -// Device family codes for iPhone and iPad. -const int kIPhoneFamily = 1; -const int kIPadFamily = 2; - -// Max number of seconds to wait for the simulator session to start. -// This timeout must allow time to start up iOS Simulator, install the app -// and perform any other black magic that is encoded in the -// iPhoneSimulatorRemoteClient framework to kick things off. Normal start up -// time is only a couple seconds but machine load, disk caches, etc., can all -// affect startup time in the wild so the timeout needs to be fairly generous. -// If this timeout occurs iossim will likely exit with non-zero status; the -// exception being if the app is invoked and completes execution before the -// session is started (this case is handled in session:didStart:withError). -const NSTimeInterval kDefaultSessionStartTimeoutSeconds = 30; - -// While the simulated app is running, its stdout is redirected to a file which -// is polled by iossim and written to iossim's stdout using the following -// polling interval. -const NSTimeInterval kOutputPollIntervalSeconds = 0.1; - -NSString* const kDVTFoundationRelativePath = - @"../SharedFrameworks/DVTFoundation.framework"; -NSString* const kDevToolsFoundationRelativePath = - @"../OtherFrameworks/DevToolsFoundation.framework"; -NSString* const kSimulatorRelativePath = - @"Platforms/iPhoneSimulator.platform/Developer/Applications/" - @"iPhone Simulator.app"; - -// Simulator Error String Key. This can be found by looking in the Simulator's -// Localizable.strings files. -NSString* const kSimulatorAppQuitErrorKey = @"The simulated application quit."; - -const char* gToolName = "iossim"; - -// Exit status codes. -const int kExitSuccess = EXIT_SUCCESS; -const int kExitFailure = EXIT_FAILURE; -const int kExitInvalidArguments = 2; -const int kExitInitializationFailure = 3; -const int kExitAppFailedToStart = 4; -const int kExitAppCrashed = 5; -const int kExitUnsupportedXcodeVersion = 6; - -void LogError(NSString* format, ...) { - va_list list; - va_start(list, format); - - NSString* message = - [[[NSString alloc] initWithFormat:format arguments:list] autorelease]; - - fprintf(stderr, "%s: ERROR: %s\n", gToolName, [message UTF8String]); - fflush(stderr); - - va_end(list); -} - -void LogWarning(NSString* format, ...) { - va_list list; - va_start(list, format); - - NSString* message = - [[[NSString alloc] initWithFormat:format arguments:list] autorelease]; - - fprintf(stderr, "%s: WARNING: %s\n", gToolName, [message UTF8String]); - fflush(stderr); - - va_end(list); -} - -// Helper to find a class by name and die if it isn't found. -Class FindClassByName(NSString* nameOfClass) { - Class theClass = NSClassFromString(nameOfClass); - if (!theClass) { - LogError(@"Failed to find class %@ at runtime.", nameOfClass); - exit(kExitInitializationFailure); - } - return theClass; -} - -// Returns the a NSString containing the stdout from running an NSTask that -// launches |toolPath| with th given command line |args|. -NSString* GetOutputFromTask(NSString* toolPath, NSArray* args) { - NSTask* task = [[[NSTask alloc] init] autorelease]; - [task setLaunchPath:toolPath]; - [task setArguments:args]; - NSPipe* outputPipe = [NSPipe pipe]; - [task setStandardOutput:outputPipe]; - NSFileHandle* outputFile = [outputPipe fileHandleForReading]; - - [task launch]; - NSData* outputData = [outputFile readDataToEndOfFile]; - [task waitUntilExit]; - if ([task isRunning]) { - LogError(@"Task '%@ %@' is still running.", - toolPath, - [args componentsJoinedByString:@" "]); - return nil; - } else if ([task terminationStatus]) { - LogError(@"Task '%@ %@' exited with return code %d.", - toolPath, - [args componentsJoinedByString:@" "], - [task terminationStatus]); - return nil; - } - return [[[NSString alloc] initWithData:outputData - encoding:NSUTF8StringEncoding] autorelease]; -} - -// Finds the Xcode version via xcodebuild -version. Output from xcodebuild is -// expected to look like: -// Xcode -// Build version 5B130a -// where is the string returned by this function (e.g. 6.0). -NSString* FindXcodeVersion() { - NSString* output = GetOutputFromTask(@"/usr/bin/xcodebuild", - @[ @"-version" ]); - // Scan past the "Xcode ", then scan the rest of the line into |version|. - NSScanner* scanner = [NSScanner scannerWithString:output]; - BOOL valid = [scanner scanString:@"Xcode " intoString:NULL]; - NSString* version; - valid = - [scanner scanUpToCharactersFromSet:[NSCharacterSet newlineCharacterSet] - intoString:&version]; - if (!valid) { - LogError(@"Unable to find Xcode version. 'xcodebuild -version' " - @"returned \n%@", output); - return nil; - } - return version; -} - -// Returns true if iossim is running with Xcode 6 or later installed on the -// host. -BOOL IsRunningWithXcode6OrLater() { - static NSString* xcodeVersion = FindXcodeVersion(); - if (!xcodeVersion) { - return false; - } - NSArray* components = [xcodeVersion componentsSeparatedByString:@"."]; - if ([components count] < 1) { - return false; - } - NSInteger majorVersion = [[components objectAtIndex:0] integerValue]; - return majorVersion >= 6; -} - -// Prints supported devices and SDKs. -void PrintSupportedDevices() { - if (IsRunningWithXcode6OrLater()) { -#if defined(IOSSIM_USE_XCODE_6) - printf("Supported device/SDK combinations:\n"); - Class simDeviceSetClass = FindClassByName(@"SimDeviceSet"); - id deviceSet = - [simDeviceSetClass setForSetPath:[simDeviceSetClass defaultSetPath]]; - for (id simDevice in [deviceSet availableDevices]) { - NSString* deviceInfo = - [NSString stringWithFormat:@" -d '%@' -s '%@'\n", - [simDevice name], [[simDevice runtime] versionString]]; - printf("%s", [deviceInfo UTF8String]); - } -#endif // IOSSIM_USE_XCODE_6 - } else { - printf("Supported SDK versions:\n"); - Class rootClass = FindClassByName(@"DTiPhoneSimulatorSystemRoot"); - for (id root in [rootClass knownRoots]) { - printf(" '%s'\n", [[root sdkVersion] UTF8String]); - } - // This is the list of devices supported on Xcode 5.1.x. - printf("Supported devices:\n"); - printf(" 'iPhone'\n"); - printf(" 'iPhone Retina (3.5-inch)'\n"); - printf(" 'iPhone Retina (4-inch)'\n"); - printf(" 'iPhone Retina (4-inch 64-bit)'\n"); - printf(" 'iPad'\n"); - printf(" 'iPad Retina'\n"); - printf(" 'iPad Retina (64-bit)'\n"); - } -} -} // namespace - -// A delegate that is called when the simulated app is started or ended in the -// simulator. -@interface SimulatorDelegate : NSObject { - @private - NSString* stdioPath_; - NSString* developerDir_; - NSString* simulatorHome_; - NSThread* outputThread_; - NSBundle* simulatorBundle_; - BOOL appRunning_; -} -@end - -// An implementation that copies the simulated app's stdio to stdout of this -// executable. While it would be nice to get stdout and stderr independently -// from iOS Simulator, issues like I/O buffering and interleaved output -// between iOS Simulator and the app would cause iossim to display things out -// of order here. Printing all output to a single file keeps the order correct. -// Instances of this classe should be initialized with the location of the -// simulated app's output file. When the simulated app starts, a thread is -// started which handles copying data from the simulated app's output file to -// the stdout of this executable. -@implementation SimulatorDelegate - -// Specifies the file locations of the simulated app's stdout and stderr. -- (SimulatorDelegate*)initWithStdioPath:(NSString*)stdioPath - developerDir:(NSString*)developerDir - simulatorHome:(NSString*)simulatorHome { - self = [super init]; - if (self) { - stdioPath_ = [stdioPath copy]; - developerDir_ = [developerDir copy]; - simulatorHome_ = [simulatorHome copy]; - } - - return self; -} - -- (void)dealloc { - [stdioPath_ release]; - [developerDir_ release]; - [simulatorBundle_ release]; - [super dealloc]; -} - -// Reads data from the simulated app's output and writes it to stdout. This -// method blocks, so it should be called in a separate thread. The iOS -// Simulator takes a file path for the simulated app's stdout and stderr, but -// this path isn't always available (e.g. when the stdout is Xcode's build -// window). As a workaround, iossim creates a temp file to hold output, which -// this method reads and copies to stdout. -- (void)tailOutputForSession:(DTiPhoneSimulatorSession*)session { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - - NSFileHandle* simio = [NSFileHandle fileHandleForReadingAtPath:stdioPath_]; - if (IsRunningWithXcode6OrLater()) { -#if defined(IOSSIM_USE_XCODE_6) - // With iOS 8 simulators on Xcode 6, the app output is relative to the - // simulator's data directory. - NSString* versionString = - [[[session sessionConfig] simulatedSystemRoot] sdkVersion]; - NSInteger majorVersion = [[[versionString componentsSeparatedByString:@"."] - objectAtIndex:0] intValue]; - if (majorVersion >= 8) { - NSString* dataPath = session.sessionConfig.device.dataPath; - NSString* appOutput = - [dataPath stringByAppendingPathComponent:stdioPath_]; - simio = [NSFileHandle fileHandleForReadingAtPath:appOutput]; - } -#endif // IOSSIM_USE_XCODE_6 - } - NSFileHandle* standardOutput = [NSFileHandle fileHandleWithStandardOutput]; - // Copy data to stdout/stderr while the app is running. - while (appRunning_) { - NSAutoreleasePool* innerPool = [[NSAutoreleasePool alloc] init]; - [standardOutput writeData:[simio readDataToEndOfFile]]; - [NSThread sleepForTimeInterval:kOutputPollIntervalSeconds]; - [innerPool drain]; - } - - // Once the app is no longer running, copy any data that was written during - // the last sleep cycle. - [standardOutput writeData:[simio readDataToEndOfFile]]; - - [pool drain]; -} - -// Fetches a localized error string from the Simulator. -- (NSString *)localizedSimulatorErrorString:(NSString*)stringKey { - // Lazy load of the simulator bundle. - if (simulatorBundle_ == nil) { - NSString* simulatorPath = [developerDir_ - stringByAppendingPathComponent:kSimulatorRelativePath]; - simulatorBundle_ = [NSBundle bundleWithPath:simulatorPath]; - } - NSString *localizedStr = - [simulatorBundle_ localizedStringForKey:stringKey - value:nil - table:nil]; - if ([localizedStr length]) - return localizedStr; - // Failed to get a value, follow Cocoa conventions and use the key as the - // string. - return stringKey; -} - -- (void)session:(DTiPhoneSimulatorSession*)session - didStart:(BOOL)started - withError:(NSError*)error { - if (!started) { - // If the test executes very quickly (<30ms), the SimulatorDelegate may not - // get the initial session:started:withError: message indicating successful - // startup of the simulated app. Instead the delegate will get a - // session:started:withError: message after the timeout has elapsed. To - // account for this case, check if the simulated app's stdio file was - // ever created and if it exists dump it to stdout and return success. - NSFileManager* fileManager = [NSFileManager defaultManager]; - if ([fileManager fileExistsAtPath:stdioPath_]) { - appRunning_ = NO; - [self tailOutputForSession:session]; - // Note that exiting in this state leaves a process running - // (e.g. /.../iPhoneSimulator4.3.sdk/usr/libexec/installd -t 30) that will - // prevent future simulator sessions from being started for 30 seconds - // unless the iOS Simulator application is killed altogether. - [self session:session didEndWithError:nil]; - - // session:didEndWithError should not return (because it exits) so - // the execution path should never get here. - exit(kExitFailure); - } - - LogError(@"Simulator failed to start: \"%@\" (%@:%ld)", - [error localizedDescription], - [error domain], static_cast([error code])); - PrintSupportedDevices(); - exit(kExitAppFailedToStart); - } - - // Start a thread to write contents of outputPath to stdout. - appRunning_ = YES; - outputThread_ = - [[NSThread alloc] initWithTarget:self - selector:@selector(tailOutputForSession:) - object:session]; - [outputThread_ start]; -} - -- (void)session:(DTiPhoneSimulatorSession*)session - didEndWithError:(NSError*)error { - appRunning_ = NO; - // Wait for the output thread to finish copying data to stdout. - if (outputThread_) { - while (![outputThread_ isFinished]) { - [NSThread sleepForTimeInterval:kOutputPollIntervalSeconds]; - } - [outputThread_ release]; - outputThread_ = nil; - } - - if (error) { - // There appears to be a race condition where sometimes the simulator - // framework will end with an error, but the error is that the simulated - // app cleanly shut down; try to trap this error and don't fail the - // simulator run. - NSString* localizedDescription = [error localizedDescription]; - NSString* ignorableErrorStr = - [self localizedSimulatorErrorString:kSimulatorAppQuitErrorKey]; - if ([ignorableErrorStr isEqual:localizedDescription]) { - LogWarning(@"Ignoring that Simulator ended with: \"%@\" (%@:%ld)", - localizedDescription, [error domain], - static_cast([error code])); - } else { - LogError(@"Simulator ended with error: \"%@\" (%@:%ld)", - localizedDescription, [error domain], - static_cast([error code])); - exit(kExitFailure); - } - } - - // Try to determine if the simulated app crashed or quit with a non-zero - // status code. iOS Simluator handles things a bit differently depending on - // the version, so first determine the iOS version being used. - BOOL badEntryFound = NO; - NSString* versionString = - [[[session sessionConfig] simulatedSystemRoot] sdkVersion]; - NSInteger majorVersion = [[[versionString componentsSeparatedByString:@"."] - objectAtIndex:0] intValue]; - if (majorVersion <= 6) { - // In iOS 6 and before, logging from the simulated apps went to the main - // system logs, so use ASL to check if the simulated app exited abnormally - // by looking for system log messages from launchd that refer to the - // simulated app's PID. Limit query to messages in the last minute since - // PIDs are cyclical. - aslmsg query = asl_new(ASL_TYPE_QUERY); - asl_set_query(query, ASL_KEY_SENDER, "launchd", - ASL_QUERY_OP_EQUAL | ASL_QUERY_OP_SUBSTRING); - char session_id[20]; - if (snprintf(session_id, 20, "%d", [session simulatedApplicationPID]) < 0) { - LogError(@"Failed to get [session simulatedApplicationPID]"); - exit(kExitFailure); - } - asl_set_query(query, ASL_KEY_REF_PID, session_id, ASL_QUERY_OP_EQUAL); - asl_set_query(query, ASL_KEY_TIME, "-1m", ASL_QUERY_OP_GREATER_EQUAL); - - // Log any messages found, and take note of any messages that may indicate - // the app crashed or did not exit cleanly. - aslresponse response = asl_search(NULL, query); - aslmsg entry; - while ((entry = aslresponse_next(response)) != NULL) { - const char* message = asl_get(entry, ASL_KEY_MSG); - LogWarning(@"Console message: %s", message); - // Some messages are harmless, so don't trigger a failure for them. - if (strstr(message, "The following job tried to hijack the service")) - continue; - badEntryFound = YES; - } - } else { - // Otherwise, the iOS Simulator's system logging is sandboxed, so parse the - // sandboxed system.log file for known errors. - NSString* path; - if (IsRunningWithXcode6OrLater()) { -#if defined(IOSSIM_USE_XCODE_6) - NSString* dataPath = session.sessionConfig.device.dataPath; - path = - [dataPath stringByAppendingPathComponent:@"Library/Logs/system.log"]; -#endif // IOSSIM_USE_XCODE_6 - } else { - NSString* relativePathToSystemLog = - [NSString stringWithFormat: - @"Library/Logs/iOS Simulator/%@/system.log", versionString]; - path = [simulatorHome_ - stringByAppendingPathComponent:relativePathToSystemLog]; - } - NSFileManager* fileManager = [NSFileManager defaultManager]; - if ([fileManager fileExistsAtPath:path]) { - NSString* content = - [NSString stringWithContentsOfFile:path - encoding:NSUTF8StringEncoding - error:NULL]; - NSArray* lines = [content componentsSeparatedByCharactersInSet: - [NSCharacterSet newlineCharacterSet]]; - NSString* simulatedAppPID = - [NSString stringWithFormat:@"%d", session.simulatedApplicationPID]; - NSArray* kErrorStrings = @[ - @"Service exited with abnormal code:", - @"Service exited due to signal:", - ]; - for (NSString* line in lines) { - if ([line rangeOfString:simulatedAppPID].location != NSNotFound) { - for (NSString* errorString in kErrorStrings) { - if ([line rangeOfString:errorString].location != NSNotFound) { - LogWarning(@"Console message: %@", line); - badEntryFound = YES; - break; - } - } - if (badEntryFound) { - break; - } - } - } - // Remove the log file so subsequent invocations of iossim won't be - // looking at stale logs. - remove([path fileSystemRepresentation]); - } else { - LogWarning(@"Unable to find system log at '%@'.", path); - } - } - - // If the query returned any nasty-looking results, iossim should exit with - // non-zero status. - if (badEntryFound) { - LogError(@"Simulated app crashed or exited with non-zero status"); - exit(kExitAppCrashed); - } - exit(kExitSuccess); -} -@end - -namespace { - -// Finds the developer dir via xcode-select or the DEVELOPER_DIR environment -// variable. -NSString* FindDeveloperDir() { - // Check the env first. - NSDictionary* env = [[NSProcessInfo processInfo] environment]; - NSString* developerDir = [env objectForKey:@"DEVELOPER_DIR"]; - if ([developerDir length] > 0) - return developerDir; - - // Go look for it via xcode-select. - NSString* output = GetOutputFromTask(@"/usr/bin/xcode-select", - @[ @"-print-path" ]); - output = [output stringByTrimmingCharactersInSet: - [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if ([output length] == 0) - output = nil; - return output; -} - -// Loads the Simulator framework from the given developer dir. -NSBundle* LoadSimulatorFramework(NSString* developerDir) { - // The Simulator framework depends on some of the other Xcode private - // frameworks; manually load them first so everything can be linked up. - NSString* dvtFoundationPath = [developerDir - stringByAppendingPathComponent:kDVTFoundationRelativePath]; - NSBundle* dvtFoundationBundle = - [NSBundle bundleWithPath:dvtFoundationPath]; - if (![dvtFoundationBundle load]) - return nil; - - NSString* devToolsFoundationPath = [developerDir - stringByAppendingPathComponent:kDevToolsFoundationRelativePath]; - NSBundle* devToolsFoundationBundle = - [NSBundle bundleWithPath:devToolsFoundationPath]; - if (![devToolsFoundationBundle load]) - return nil; - - // Prime DVTPlatform. - NSError* error; - Class DVTPlatformClass = FindClassByName(@"DVTPlatform"); - if (![DVTPlatformClass loadAllPlatformsReturningError:&error]) { - LogError(@"Unable to loadAllPlatformsReturningError. Error: %@", - [error localizedDescription]); - return nil; - } - - // The path within the developer dir of the private Simulator frameworks. - NSString* simulatorFrameworkRelativePath; - if (IsRunningWithXcode6OrLater()) { - simulatorFrameworkRelativePath = - @"../SharedFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; - NSString* const kCoreSimulatorRelativePath = - @"Library/PrivateFrameworks/CoreSimulator.framework"; - NSString* coreSimulatorPath = [developerDir - stringByAppendingPathComponent:kCoreSimulatorRelativePath]; - NSBundle* coreSimulatorBundle = - [NSBundle bundleWithPath:coreSimulatorPath]; - if (![coreSimulatorBundle load]) - return nil; - } else { - simulatorFrameworkRelativePath = - @"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/" - @"DVTiPhoneSimulatorRemoteClient.framework"; - } - NSString* simBundlePath = [developerDir - stringByAppendingPathComponent:simulatorFrameworkRelativePath]; - NSBundle* simBundle = [NSBundle bundleWithPath:simBundlePath]; - if (![simBundle load]) - return nil; - return simBundle; -} - -// Converts the given app path to an application spec, which requires an -// absolute path. -DTiPhoneSimulatorApplicationSpecifier* BuildAppSpec(NSString* appPath) { - Class applicationSpecifierClass = - FindClassByName(@"DTiPhoneSimulatorApplicationSpecifier"); - if (![appPath isAbsolutePath]) { - NSString* cwd = [[NSFileManager defaultManager] currentDirectoryPath]; - appPath = [cwd stringByAppendingPathComponent:appPath]; - } - appPath = [appPath stringByStandardizingPath]; - NSFileManager* fileManager = [NSFileManager defaultManager]; - if (![fileManager fileExistsAtPath:appPath]) { - LogError(@"File not found: %@", appPath); - exit(kExitInvalidArguments); - } - return [applicationSpecifierClass specifierWithApplicationPath:appPath]; -} - -// Returns the system root for the given SDK version. If sdkVersion is nil, the -// default system root is returned. Will return nil if the sdkVersion is not -// 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]; - - return systemRoot; -} - -// Builds a config object for starting the specified app. -DTiPhoneSimulatorSessionConfig* BuildSessionConfig( - DTiPhoneSimulatorApplicationSpecifier* appSpec, - DTiPhoneSimulatorSystemRoot* systemRoot, - NSString* stdoutPath, - NSString* stderrPath, - NSArray* appArgs, - NSDictionary* appEnv, - NSNumber* deviceFamily, - NSString* deviceName) { - Class sessionConfigClass = FindClassByName(@"DTiPhoneSimulatorSessionConfig"); - DTiPhoneSimulatorSessionConfig* sessionConfig = - [[[sessionConfigClass alloc] init] autorelease]; - sessionConfig.applicationToSimulateOnStart = appSpec; - sessionConfig.simulatedSystemRoot = systemRoot; - sessionConfig.localizedClientName = @"chromium"; - sessionConfig.simulatedApplicationStdErrPath = stderrPath; - sessionConfig.simulatedApplicationStdOutPath = stdoutPath; - sessionConfig.simulatedApplicationLaunchArgs = appArgs; - sessionConfig.simulatedApplicationLaunchEnvironment = appEnv; - sessionConfig.simulatedDeviceInfoName = deviceName; - sessionConfig.simulatedDeviceFamily = deviceFamily; - - if (IsRunningWithXcode6OrLater()) { -#if defined(IOSSIM_USE_XCODE_6) - Class simDeviceTypeClass = FindClassByName(@"SimDeviceType"); - id simDeviceType = - [simDeviceTypeClass supportedDeviceTypesByAlias][deviceName]; - Class simRuntimeClass = FindClassByName(@"SimRuntime"); - NSString* identifier = systemRoot.runtime.identifier; - id simRuntime = [simRuntimeClass supportedRuntimesByIdentifier][identifier]; - - // Attempt to use an existing device, but create one if a suitable match - // can't be found. For example, if the simulator is running with a - // non-default home directory (e.g. via iossim's -u command line arg) then - // there won't be any devices so one will have to be created. - Class simDeviceSetClass = FindClassByName(@"SimDeviceSet"); - id deviceSet = - [simDeviceSetClass setForSetPath:[simDeviceSetClass defaultSetPath]]; - id simDevice = nil; - for (id device in [deviceSet availableDevices]) { - if ([device runtime] == simRuntime && - [device deviceType] == simDeviceType) { - simDevice = device; - break; - } - } - if (!simDevice) { - NSError* error = nil; - // n.b. only the device name is necessary because the iOS Simulator menu - // already splits devices by runtime version. - NSString* name = [NSString stringWithFormat:@"iossim - %@ ", deviceName]; - simDevice = [deviceSet createDeviceWithType:simDeviceType - runtime:simRuntime - name:name - error:&error]; - if (error) { - LogError(@"Failed to create device: %@", error); - exit(kExitInitializationFailure); - } - } - sessionConfig.device = simDevice; -#endif // IOSSIM_USE_XCODE_6 - } - return sessionConfig; -} - -// Builds a simulator session that will use the given delegate. -DTiPhoneSimulatorSession* BuildSession(SimulatorDelegate* delegate) { - Class sessionClass = FindClassByName(@"DTiPhoneSimulatorSession"); - DTiPhoneSimulatorSession* session = - [[[sessionClass alloc] init] autorelease]; - session.delegate = delegate; - return session; -} - -// Creates a temporary directory with a unique name based on the provided -// template. The template should not contain any path separators and be suffixed -// with X's, which will be substituted with a unique alphanumeric string (see -// 'man mkdtemp' for details). The directory will be created as a subdirectory -// of NSTemporaryDirectory(). For example, if dirNameTemplate is 'test-XXX', -// this method would return something like '/path/to/tempdir/test-3n2'. -// -// Returns the absolute path of the newly-created directory, or nill if unable -// to create a unique directory. -NSString* CreateTempDirectory(NSString* dirNameTemplate) { - NSString* fullPathTemplate = - [NSTemporaryDirectory() stringByAppendingPathComponent:dirNameTemplate]; - char* fullPath = mkdtemp(const_cast([fullPathTemplate UTF8String])); - if (fullPath == NULL) - return nil; - - return [NSString stringWithUTF8String:fullPath]; -} - -// Creates the necessary directory structure under the given user home directory -// path. -// Returns YES if successful, NO if unable to create the directories. -BOOL CreateHomeDirSubDirs(NSString* userHomePath) { - NSFileManager* fileManager = [NSFileManager defaultManager]; - - // Create user home and subdirectories. - NSArray* subDirsToCreate = [NSArray arrayWithObjects: - @"Documents", - @"Library/Caches", - @"Library/Preferences", - nil]; - for (NSString* subDir in subDirsToCreate) { - NSString* path = [userHomePath stringByAppendingPathComponent:subDir]; - NSError* error; - if (![fileManager createDirectoryAtPath:path - withIntermediateDirectories:YES - attributes:nil - error:&error]) { - LogError(@"Unable to create directory: %@. Error: %@", - path, [error localizedDescription]); - return NO; - } - } - - return YES; -} - -// Creates the necessary directory structure under the given user home directory -// path, then sets the path in the appropriate environment variable. -// Returns YES if successful, NO if unable to create or initialize the given -// directory. -BOOL InitializeSimulatorUserHome(NSString* userHomePath) { - if (!CreateHomeDirSubDirs(userHomePath)) - return NO; - - // Update the environment to use the specified directory as the user home - // directory. - // Note: the third param of setenv specifies whether or not to overwrite the - // variable's value if it has already been set. - if ((setenv(kUserHomeEnvVariable, [userHomePath UTF8String], YES) == -1) || - (setenv(kHomeEnvVariable, [userHomePath UTF8String], YES) == -1)) { - LogError(@"Unable to set environment variables for home directory."); - return NO; - } - - return YES; -} - -// Performs a case-insensitive search to see if |stringToSearch| begins with -// |prefixToFind|. Returns true if a match is found. -BOOL CaseInsensitivePrefixSearch(NSString* stringToSearch, - NSString* prefixToFind) { - NSStringCompareOptions options = (NSAnchoredSearch | NSCaseInsensitiveSearch); - NSRange range = [stringToSearch rangeOfString:prefixToFind - options:options]; - return range.location != NSNotFound; -} - -// Prints the usage information to stderr. -void PrintUsage() { - fprintf(stderr, "Usage: iossim [-d device] [-s sdkVersion] [-u homeDir] " - "[-e envKey=value]* [-t startupTimeout] []\n" - " where is the path to the .app directory and appArgs are any" - " arguments to send the simulated app.\n" - "\n" - "Options:\n" - " -d Specifies the device (must be one of the values from the iOS" - " Simulator's Hardware -> Device menu. Defaults to 'iPhone'.\n" - " -s Specifies the SDK version to use (e.g '4.3')." - " Will use system default if not specified.\n" - " -u Specifies a user home directory for the simulator." - " Will create a new directory if not specified.\n" - " -e Specifies an environment key=value pair that will be" - " set in the simulated application's environment.\n" - " -t Specifies the session startup timeout (in seconds)." - " Defaults to %d.\n" - " -l List supported devices and iOS versions.\n", - static_cast(kDefaultSessionStartTimeoutSeconds)); -} -} // namespace - -void EnsureSupportForCurrentXcodeVersion() { - if (IsRunningWithXcode6OrLater()) { -#if !IOSSIM_USE_XCODE_6 - LogError(@"Running on Xcode 6, but Xcode 6 support was not compiled in."); - exit(kExitUnsupportedXcodeVersion); -#endif // IOSSIM_USE_XCODE_6 - } -} - -int main(int argc, char* const argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - - EnsureSupportForCurrentXcodeVersion(); - - // basename() may modify the passed in string and it returns a pointer to an - // internal buffer. Give it a copy to modify, and copy what it returns. - char* worker = strdup(argv[0]); - char* toolName = basename(worker); - if (toolName != NULL) { - toolName = strdup(toolName); - if (toolName != NULL) - gToolName = toolName; - } - if (worker != NULL) - free(worker); - - NSString* appPath = nil; - NSString* appName = nil; - NSString* sdkVersion = nil; - NSString* deviceName = - IsRunningWithXcode6OrLater() ? @"iPhone 5s" : @"iPhone"; - NSString* simHomePath = nil; - NSMutableArray* appArgs = [NSMutableArray array]; - NSMutableDictionary* appEnv = [NSMutableDictionary dictionary]; - NSTimeInterval sessionStartTimeout = kDefaultSessionStartTimeoutSeconds; - - NSString* developerDir = FindDeveloperDir(); - if (!developerDir) { - LogError(@"Unable to find developer directory."); - exit(kExitInitializationFailure); - } - - NSBundle* simulatorFramework = LoadSimulatorFramework(developerDir); - if (!simulatorFramework) { - LogError(@"Failed to load the Simulator Framework."); - exit(kExitInitializationFailure); - } - - // Parse the optional arguments - int c; - while ((c = getopt(argc, argv, "hs:d:u:e:t:l")) != -1) { - switch (c) { - case 's': - sdkVersion = [NSString stringWithUTF8String:optarg]; - break; - case 'd': - deviceName = [NSString stringWithUTF8String:optarg]; - break; - case 'u': - simHomePath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:optarg length:strlen(optarg)]; - break; - case 'e': { - NSString* envLine = [NSString stringWithUTF8String:optarg]; - NSRange range = [envLine rangeOfString:@"="]; - if (range.location == NSNotFound) { - LogError(@"Invalid key=value argument for -e."); - PrintUsage(); - exit(kExitInvalidArguments); - } - NSString* key = [envLine substringToIndex:range.location]; - NSString* value = [envLine substringFromIndex:(range.location + 1)]; - [appEnv setObject:value forKey:key]; - } - break; - case 't': { - int timeout = atoi(optarg); - if (timeout > 0) { - sessionStartTimeout = static_cast(timeout); - } else { - LogError(@"Invalid startup timeout (%s).", optarg); - PrintUsage(); - exit(kExitInvalidArguments); - } - } - break; - case 'l': - PrintSupportedDevices(); - exit(kExitSuccess); - break; - case 'h': - PrintUsage(); - exit(kExitSuccess); - default: - PrintUsage(); - exit(kExitInvalidArguments); - } - } - - // There should be at least one arg left, specifying the app path. Any - // additional args are passed as arguments to the app. - if (optind < argc) { - appPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; - appName = [appPath lastPathComponent]; - while (++optind < argc) { - [appArgs addObject:[NSString stringWithUTF8String:argv[optind]]]; - } - } else { - LogError(@"Unable to parse command line arguments."); - PrintUsage(); - exit(kExitInvalidArguments); - } - - // Make sure the app path provided is legit. - DTiPhoneSimulatorApplicationSpecifier* appSpec = BuildAppSpec(appPath); - if (!appSpec) { - LogError(@"Invalid app path: %@", appPath); - exit(kExitInitializationFailure); - } - - // Make sure the SDK path provided is legit (or nil). - DTiPhoneSimulatorSystemRoot* systemRoot = BuildSystemRoot(sdkVersion); - if (!systemRoot) { - LogError(@"Invalid SDK version: %@", sdkVersion); - PrintSupportedDevices(); - exit(kExitInitializationFailure); - } - - // Get the paths for stdout and stderr so the simulated app's output will show - // up in the caller's stdout/stderr. - NSString* outputDir = CreateTempDirectory(@"iossim-XXXXXX"); - NSString* stdioPath = [outputDir stringByAppendingPathComponent:@"stdio.txt"]; - - // Determine the deviceFamily based on the deviceName - NSNumber* deviceFamily = nil; - if (IsRunningWithXcode6OrLater()) { -#if defined(IOSSIM_USE_XCODE_6) - Class simDeviceTypeClass = FindClassByName(@"SimDeviceType"); - if ([simDeviceTypeClass supportedDeviceTypesByAlias][deviceName] == nil) { - LogError(@"Invalid device name: %@.", deviceName); - PrintSupportedDevices(); - exit(kExitInvalidArguments); - } -#endif // IOSSIM_USE_XCODE_6 - } else { - if (!deviceName || CaseInsensitivePrefixSearch(deviceName, @"iPhone")) { - deviceFamily = [NSNumber numberWithInt:kIPhoneFamily]; - } else if (CaseInsensitivePrefixSearch(deviceName, @"iPad")) { - deviceFamily = [NSNumber numberWithInt:kIPadFamily]; - } - else { - LogError(@"Invalid device name: %@. Must begin with 'iPhone' or 'iPad'", - deviceName); - exit(kExitInvalidArguments); - } - } - - // Set up the user home directory for the simulator only if a non-default - // value was specified. - if (simHomePath) { - if (!InitializeSimulatorUserHome(simHomePath)) { - LogError(@"Unable to initialize home directory for simulator: %@", - simHomePath); - exit(kExitInitializationFailure); - } - } else { - simHomePath = NSHomeDirectory(); - } - - // Create the config and simulator session. - DTiPhoneSimulatorSessionConfig* config = BuildSessionConfig(appSpec, - systemRoot, - stdioPath, - stdioPath, - appArgs, - appEnv, - deviceFamily, - deviceName); - SimulatorDelegate* delegate = - [[[SimulatorDelegate alloc] initWithStdioPath:stdioPath - developerDir:developerDir - simulatorHome:simHomePath] autorelease]; - DTiPhoneSimulatorSession* session = BuildSession(delegate); - - // Start the simulator session. - NSError* error; - BOOL started = [session requestStartWithConfig:config - timeout:sessionStartTimeout - error:&error]; - - // Spin the runtime indefinitely. When the delegate gets the message that the - // app has quit it will exit this program. - if (started) { - [[NSRunLoop mainRunLoop] run]; - } else { - LogError(@"Simulator failed request to start: \"%@\" (%@:%ld)", - [error localizedDescription], - [error domain], static_cast([error code])); - } - - // Note that this code is only executed if the simulator fails to start - // because once the main run loop is started, only the delegate calling - // exit() will end the program. - [pool drain]; - return kExitFailure; -} diff --git a/engine/src/flutter/testing/iossim/redirect-stdout.sh b/engine/src/flutter/testing/iossim/redirect-stdout.sh deleted file mode 100755 index 446550368b..0000000000 --- a/engine/src/flutter/testing/iossim/redirect-stdout.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Copyright (c) 2012 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 executes the command given as the first argument, strips -# cxx_destruct from stdout, and redirects the remaining stdout to the file given -# as the second argument. -# -# Example: Write the text 'foo' to a file called out.txt: -# RedirectStdout.sh "echo foo" out.txt -# -# This script is invoked from iossim.gyp in order to redirect the output of -# class-dump to a file (because gyp actions don't support redirecting output). -# This script also removes all lines with cxx_destruct. Perhaps newer versions -# of class-dump will fix this issue. As of 3.5, 'cxx_destruct' still exists. - -if [ ${#} -ne 2 ] ; then - echo "usage: ${0} " - exit 2 -fi - -echo "// Treat class-dump output as a system header." > $2 -echo "#pragma clang system_header" >> $2 -$1 | sed /cxx_destruct/d >> $2 diff --git a/engine/src/flutter/testing/legion/SimpleJSONRPCServer.py b/engine/src/flutter/testing/legion/SimpleJSONRPCServer.py deleted file mode 100644 index 4dbfd6e825..0000000000 --- a/engine/src/flutter/testing/legion/SimpleJSONRPCServer.py +++ /dev/null @@ -1,195 +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. - -"""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/__init__.py b/engine/src/flutter/testing/legion/__init__.py deleted file mode 100644 index 50b23dff63..0000000000 --- a/engine/src/flutter/testing/legion/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# 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. diff --git a/engine/src/flutter/testing/legion/common_lib.py b/engine/src/flutter/testing/legion/common_lib.py deleted file mode 100644 index 863f88730d..0000000000 --- a/engine/src/flutter/testing/legion/common_lib.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -"""Common library methods used by both coordinator and task machines.""" - -import argparse -import logging -import os -import socket - -LOGGING_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR'] -MY_IP = socket.gethostbyname(socket.gethostname()) -SERVER_ADDRESS = '' -SERVER_PORT = 31710 -DEFAULT_TIMEOUT_SECS = 20 * 60 # 30 minutes -THIS_DIR = os.path.dirname(os.path.abspath(__file__)) -SWARMING_DIR = os.path.join(THIS_DIR, '..', '..', 'tools', 'swarming_client') - - -def InitLogging(): - """Initialize the logging module. - - Raises: - argparse.ArgumentError if the --verbosity arg is incorrect. - """ - parser = argparse.ArgumentParser() - logging_action = parser.add_argument('--verbosity', default='INFO') - args, _ = parser.parse_known_args() - if args.verbosity not in LOGGING_LEVELS: - raise argparse.ArgumentError( - logging_action, 'Only levels %s supported' % str(LOGGING_LEVELS)) - logging.basicConfig( - format='%(asctime)s %(filename)s:%(lineno)s %(levelname)s] %(message)s', - datefmt='%H:%M:%S', level=args.verbosity) - - -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/hello_world/controller_test.isolate b/engine/src/flutter/testing/legion/examples/hello_world/controller_test.isolate deleted file mode 100644 index 0cc5a60166..0000000000 --- a/engine/src/flutter/testing/legion/examples/hello_world/controller_test.isolate +++ /dev/null @@ -1,21 +0,0 @@ -# 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. - -{ - 'includes': [ - '../../legion.isolate', - ], - 'conditions': [ - ['multi_machine == 1', { - 'variables': { - 'command': [ - 'controller_test.py', - ], - 'files': [ - 'controller_test.py', - ], - }, - }], - ] -} diff --git a/engine/src/flutter/testing/legion/examples/hello_world/controller_test.py b/engine/src/flutter/testing/legion/examples/hello_world/controller_test.py deleted file mode 100755 index 8253e9eb36..0000000000 --- a/engine/src/flutter/testing/legion/examples/hello_world/controller_test.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/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. - -"""A simple host test module. - -This module runs on the host machine and is responsible for creating 2 -task machines, waiting for them, and running RPC calls on them. -""" - -import argparse -import logging -import os -import sys -import time - -# Map the testing directory so we can import legion.legion_test. -TESTING_DIR = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - '..', '..', '..', '..', 'testing') -sys.path.append(TESTING_DIR) - -from legion import legion_test_case - - -class ExampleTestController(legion_test_case.TestCase): - """A simple example controller for a test.""" - - @classmethod - def CreateTestTask(cls): - """Create a new task.""" - parser = argparse.ArgumentParser() - parser.add_argument('--task-hash') - parser.add_argument('--os', default='Ubuntu-14.04') - args, _ = parser.parse_known_args() - - task = cls.CreateTask( - isolated_hash=args.task_hash, - dimensions={'os': args.os}, - idle_timeout_secs=90, - connection_timeout_secs=90, - verbosity=logging.DEBUG) - task.Create() - return task - - @classmethod - def setUpClass(cls): - """Creates the task machines and waits until they connect.""" - cls.task1 = cls.CreateTestTask() - cls.task2 = cls.CreateTestTask() - cls.task1.WaitForConnection() - cls.task2.WaitForConnection() - - def testCallEcho(self): - """Tests rpc.Echo on a task.""" - logging.info('Calling Echo on %s', self.task2.name) - self.assertEqual(self.task2.rpc.Echo('foo'), 'echo foo') - - def testLaunchTaskBinary(self): - """Call task_test.py 'name' on the tasks.""" - self.VerifyTaskBinaryLaunched(self.task1) - self.VerifyTaskBinaryLaunched(self.task2) - - def VerifyTaskBinaryLaunched(self, task): - logging.info( - 'Calling Process to run "./task_test.py %s"', task.name) - proc = task.Process(['./task_test.py', task.name]) - proc.Wait() - self.assertEqual(proc.GetReturncode(), 0) - self.assertIn(task.name, proc.ReadStdout()) - self.assertEquals(proc.ReadStderr(), '') - proc.Delete() - - -if __name__ == '__main__': - legion_test_case.main() diff --git a/engine/src/flutter/testing/legion/examples/hello_world/task_test.isolate b/engine/src/flutter/testing/legion/examples/hello_world/task_test.isolate deleted file mode 100644 index 1322f310f2..0000000000 --- a/engine/src/flutter/testing/legion/examples/hello_world/task_test.isolate +++ /dev/null @@ -1,23 +0,0 @@ -# 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. - -{ - 'includes': [ - '../../legion.isolate' - ], - 'conditions': [ - ['multi_machine == 1', { - 'variables': { - 'command': [ - 'python', - '../../run_task.py', - ], - 'files': [ - 'task_test.isolate', - 'task_test.py', - ], - }, - }], - ], -} diff --git a/engine/src/flutter/testing/legion/examples/hello_world/task_test.py b/engine/src/flutter/testing/legion/examples/hello_world/task_test.py deleted file mode 100755 index 0333f7bb0a..0000000000 --- a/engine/src/flutter/testing/legion/examples/hello_world/task_test.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/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. - -"""A simple client test module. - -This module is invoked by the host by calling the client controller's -Subprocess RPC method. The name is passed in as a required argument on the -command line. -""" - -import argparse -import os -import sys - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('name') - args = parser.parse_args() - print 'Hello world from', args.name - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.isolate b/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.isolate deleted file mode 100644 index 6bcf6924cc..0000000000 --- a/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.isolate +++ /dev/null @@ -1,21 +0,0 @@ -# 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. - -{ - 'includes': [ - '../../legion.isolate', - ], - 'conditions': [ - ['multi_machine == 1', { - 'variables': { - 'command': [ - 'subprocess_test.py', - ], - 'files': [ - 'subprocess_test.py', - ], - }, - }], - ] -} diff --git a/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py b/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py deleted file mode 100755 index 4b7fb6feec..0000000000 --- a/engine/src/flutter/testing/legion/examples/subprocess/subprocess_test.py +++ /dev/null @@ -1,131 +0,0 @@ -#!/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. - -"""A host test module demonstrating interacting with remote subprocesses.""" - -import argparse -import logging -import os -import sys -import time -import xmlrpclib - -# Map the testing directory so we can import legion.legion_test. -TESTING_DIR = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - '..', '..', '..', '..', 'testing') -sys.path.append(TESTING_DIR) - -from legion import legion_test_case -from legion import jsonrpclib - - -class ExampleTestController(legion_test_case.TestCase): - """An example controller using the remote subprocess functions.""" - - @classmethod - def setUpClass(cls): - """Creates the task machine and waits until it connects.""" - parser = argparse.ArgumentParser() - parser.add_argument('--task-hash') - parser.add_argument('--os', default='Ubuntu-14.04') - args, _ = parser.parse_known_args() - - cls.task = cls.CreateTask( - isolated_hash=args.task_hash, - dimensions={'os': args.os}, - idle_timeout_secs=90, - connection_timeout_secs=90, - verbosity=logging.DEBUG) - cls.task.Create() - cls.task.WaitForConnection() - - def testMultipleProcesses(self): - """Tests that processes can be run and controlled simultaneously.""" - start = time.time() - logging.info('Starting "sleep 10" and "sleep 20"') - sleep10 = self.task.Process(['sleep', '10']) - sleep20 = self.task.Process(['sleep', '20']) - - logging.info('Waiting for sleep 10 to finish and verifying timing') - sleep10.Wait() - elapsed = time.time() - start - self.assertGreaterEqual(elapsed, 10) - self.assertLess(elapsed, 11) - - logging.info('Waiting for sleep 20 to finish and verifying timing') - sleep20.Wait() - elapsed = time.time() - start - self.assertGreaterEqual(elapsed, 20) - - sleep10.Delete() - sleep20.Delete() - - def testTerminate(self): - """Tests that a process can be correctly terminated.""" - start = time.time() - - logging.info('Starting "sleep 20"') - sleep20 = self.task.Process(['sleep', '20']) - logging.info('Calling Terminate()') - sleep20.Terminate() - try: - logging.info('Trying to wait for sleep 20 to complete') - sleep20.Wait() - except xmlrpclib.Fault: - pass - finally: - sleep20.Delete() - logging.info('Checking to make sure sleep 20 was actually terminated') - self.assertLess(time.time() - start, 20) - - def testLs(self): - """Tests that the returned results from a process are correct.""" - logging.info('Calling "ls"') - ls = self.task.Process(['ls']) - logging.info('Trying to wait for ls to complete') - ls.Wait() - logging.info('Checking that ls completed and returned the correct results') - 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/examples/subprocess/task.isolate b/engine/src/flutter/testing/legion/examples/subprocess/task.isolate deleted file mode 100644 index 534275dfed..0000000000 --- a/engine/src/flutter/testing/legion/examples/subprocess/task.isolate +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -{ - 'includes': [ - '../../legion.isolate' - ], - 'conditions': [ - ['multi_machine == 1', { - 'variables': { - 'command': [ - 'python', - '../../run_task.py', - ], - 'files': [ - 'task.isolate' - ], - }, - }], - ], -} diff --git a/engine/src/flutter/testing/legion/jsonrpclib.py b/engine/src/flutter/testing/legion/jsonrpclib.py deleted file mode 100644 index 56b30e8dc3..0000000000 --- a/engine/src/flutter/testing/legion/jsonrpclib.py +++ /dev/null @@ -1,370 +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. - -"""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 deleted file mode 100644 index 63e3fc88d3..0000000000 --- a/engine/src/flutter/testing/legion/legion.isolate +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -{ - 'variables': { - '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 deleted file mode 100644 index c70d154919..0000000000 --- a/engine/src/flutter/testing/legion/legion_test_case.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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. - -"""Adds unittest-esque functionality to Legion.""" - -import argparse -import logging -import sys -import unittest - -#pylint: disable=relative-import -import common_lib -import task_controller -import task_registration_server - -BANNER_WIDTH = 80 - - -class TestCase(unittest.TestCase): - """Test case class with added Legion support.""" - - _registration_server = None - _initialized = False - - @classmethod - def __new__(cls, *args, **kwargs): - """Initialize the class and return a new instance.""" - cls._InitializeClass() - return super(TestCase, cls).__new__(*args, **kwargs) - - def __init__(self, test_name='runTest'): - super(TestCase, self).__init__(test_name) - method = getattr(self, test_name, None) - if method: - # 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.""" - self._LogInfoBanner(self._testMethodName, self.shortDescription()) - try: - return self._TestMethod() - except: - exc_info = sys.exc_info() - logging.error('', exc_info=exc_info) - raise exc_info[0], exc_info[1], exc_info[2] - - @classmethod - def _InitializeClass(cls): - """Handles class level initialization. - - There are 2 types of setup/teardown methods that always need to be run: - 1) Framework level setup/teardown - 2) Test case level setup/teardown - - This method installs handlers in place of setUpClass and tearDownClass that - will ensure both types of setup/teardown methods are called correctly. - """ - if cls._initialized: - return - cls._OriginalSetUpClassMethod = cls.setUpClass - cls.setUpClass = cls._HandleSetUpClass - cls._OriginalTearDownClassMethod = cls.tearDownClass - cls.tearDownClass = cls._HandleTearDownClass - cls._initialized = True - - @classmethod - def _LogInfoBanner(cls, method_name, method_doc=None): - """Formats and logs test case information.""" - logging.info('*' * BANNER_WIDTH) - logging.info(method_name.center(BANNER_WIDTH)) - if method_doc: - for line in method_doc.split('\n'): - logging.info(line.center(BANNER_WIDTH)) - logging.info('*' * BANNER_WIDTH) - - @classmethod - def CreateTask(cls, *args, **kwargs): - """Convenience method to create a new task.""" - task = task_controller.TaskController(*args, **kwargs) - cls._registration_server.RegisterTaskCallback( - task.otp, task.OnConnect) - return task - - @classmethod - def _SetUpFramework(cls): - """Perform the framework-specific setup operations.""" - cls._registration_server = ( - task_registration_server.TaskRegistrationServer()) - cls._registration_server.Start() - - @classmethod - def _TearDownFramework(cls): - """Perform the framework-specific teardown operations.""" - if cls._registration_server: - cls._registration_server.Shutdown() - task_controller.TaskController.ReleaseAllTasks() - - @classmethod - def _HandleSetUpClass(cls): - """Performs common class-level setup operations. - - This method performs test-wide setup such as starting the registration - server and then calls the original setUpClass method.""" - try: - common_lib.InitLogging() - cls._LogInfoBanner('setUpClass', 'Performs class level setup.') - cls._SetUpFramework() - cls._OriginalSetUpClassMethod() - except: - # Make sure we tear down in case of any exceptions - cls._HandleTearDownClass(setup_failed=True) - exc_info = sys.exc_info() - logging.error('', exc_info=exc_info) - raise exc_info[0], exc_info[1], exc_info[2] - - @classmethod - def _HandleTearDownClass(cls, setup_failed=False): - """Performs common class-level tear down operations. - - This method calls the original tearDownClass then performs test-wide - tear down such as stopping the registration server. - """ - cls._LogInfoBanner('tearDownClass', 'Performs class level tear down.') - try: - if not setup_failed: - cls._OriginalTearDownClassMethod() - finally: - cls._TearDownFramework() - - -def main(): - unittest.main(verbosity=0, argv=sys.argv[:1]) diff --git a/engine/src/flutter/testing/legion/process.py b/engine/src/flutter/testing/legion/process.py deleted file mode 100644 index f3cabb5d94..0000000000 --- a/engine/src/flutter/testing/legion/process.py +++ /dev/null @@ -1,267 +0,0 @@ -# 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. - -"""RPC compatible subprocess-type module. - -This module defined both a task-side process class as well as a controller-side -process wrapper for easier access and usage of the task-side process. -""" - -import logging -import os -import subprocess -import sys -import threading - -#pylint: disable=relative-import -import common_lib - -# Map swarming_client to use subprocess42 -sys.path.append(common_lib.SWARMING_DIR) - -from utils import subprocess42 - - -class ControllerProcessWrapper(object): - """Controller-side process wrapper class. - - This class provides a more intuitive interface to task-side processes - than calling the methods directly using the RPC object. - """ - - 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._key = rpc.subprocess.Process(cmd, key) - logging.info('Process created with key=%s', self._key) - if verbose: - self._rpc.subprocess.SetVerbose(self._key) - if detached: - self._rpc.subprocess.SetDetached(self._key) - if cwd: - self._rpc.subprocess.SetCwd(self._rpc, cwd) - self._rpc.subprocess.Start(self._key) - - @property - def key(self): - return self._key - - def Terminate(self): - logging.debug('Terminating process %s', self._key) - return self._rpc.subprocess.Terminate(self._key) - - def Kill(self): - logging.debug('Killing process %s', self._key) - self._rpc.subprocess.Kill(self._key) - - def Delete(self): - return self._rpc.subprocess.Delete(self._key) - - def GetReturncode(self): - return self._rpc.subprocess.GetReturncode(self._key) - - def ReadStdout(self): - """Returns all stdout since the last call to ReadStdout. - - This call allows the user to read stdout while the process is running. - However each call will flush the local stdout buffer. In order to make - 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._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._key) - - def ReadOutput(self): - """Returns the (stdout, stderr) since the last Read* call. - - See ReadStdout for additional details. - """ - return self._rpc.subprocess.ReadOutput(self._key) - - def Wait(self): - return self._rpc.subprocess.Wait(self._key) - - def Poll(self): - return self._rpc.subprocess.Poll(self._key) - - def GetPid(self): - return self._rpc.subprocess.GetPid(self._key) - - - -class Process(object): - """Implements a task-side non-blocking subprocess. - - This non-blocking subprocess allows the caller to continue operating while - also able to interact with this subprocess based on a key returned to - the caller at the time of creation. - - Creation args are set via Set* methods called after calling Process but - before calling Start. This is due to a limitation of the XML-RPC - implementation not supporting keyword arguments. - """ - - _processes = {} - _process_next_id = 0 - _creation_lock = threading.Lock() - - 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' % ( - self.cmd, self.cwd, self.verbose, self.detached) - - def _reader(self): - for pipe, data in self.proc.yield_any(): - 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) - - @classmethod - def KillAll(cls): - for key in cls._processes: - cls.Kill(key) - - @classmethod - def Process(cls, cmd, key=None): - with cls._creation_lock: - 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): - logging.info('Starting process %s', self) - self.proc = subprocess42.Popen(self.cmd, stdout=subprocess42.PIPE, - stderr=subprocess42.PIPE, - detached=self.detached, cwd=self.cwd) - threading.Thread(target=self._reader).start() - - @classmethod - def Start(cls, key): - cls._processes[key]._Start() - - @classmethod - def SetCwd(cls, key, cwd): - """Sets the process's cwd.""" - logging.debug('Setting %s cwd to %s', key, cwd) - cls._processes[key].cwd = cwd - - @classmethod - def SetDetached(cls, key): - """Creates a detached process.""" - logging.debug('Setting %s.detached = True', key) - cls._processes[key].detached = True - - @classmethod - def SetVerbose(cls, key): - """Sets the stdout and stderr to be emitted locally.""" - logging.debug('Setting %s.verbose = True', key) - cls._processes[key].verbose = True - - @classmethod - def Terminate(cls, key): - logging.debug('Terminating process %s', key) - cls._processes[key].proc.terminate() - - @classmethod - def Kill(cls, key): - logging.debug('Killing process %s', key) - cls._processes[key].proc.kill() - - @classmethod - def Delete(cls, key): - if cls.GetReturncode(key) is None: - logging.warning('Killing %s before deleting it', key) - cls.Kill(key) - logging.debug('Deleting process %s', key) - cls._processes.pop(key) - - @classmethod - def GetReturncode(cls, key): - return cls._processes[key].proc.returncode - - @classmethod - def ReadStdout(cls, key): - """Returns all stdout since the last call to ReadStdout. - - This call allows the user to read stdout while the process is running. - However each call will flush the local stdout buffer. In order to make - multiple calls to ReadStdout and to retain the entire output the results - of this call will need to be buffered in the calling code. - """ - proc = cls._processes[key] - with proc.data_lock: - # Perform a "read" on the stdout data - stdout = proc.stdout - proc.stdout = '' - return stdout - - @classmethod - def ReadStderr(cls, key): - """Returns all stderr read since the last call to ReadStderr. - - See ReadStdout for additional details. - """ - proc = cls._processes[key] - with proc.data_lock: - # Perform a "read" on the stderr data - stderr = proc.stderr - proc.stderr = '' - return stderr - - @classmethod - def ReadOutput(cls, key): - """Returns the (stdout, stderr) since the last Read* call. - - See ReadStdout for additional details. - """ - return cls.ReadStdout(key), cls.ReadStderr(key) - - @classmethod - def Wait(cls, key): - return cls._processes[key].proc.wait() - - @classmethod - def Poll(cls, key): - return cls._processes[key].proc.poll() - - @classmethod - def GetPid(cls, key): - return cls._processes[key].proc.pid diff --git a/engine/src/flutter/testing/legion/rpc_methods.py b/engine/src/flutter/testing/legion/rpc_methods.py deleted file mode 100644 index aaab7e018e..0000000000 --- a/engine/src/flutter/testing/legion/rpc_methods.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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. - -"""Defines the task RPC methods.""" - -import logging -import os -import sys -import threading - -#pylint: disable=relative-import -import common_lib -import process - - -class RPCMethods(object): - """Class exposing RPC methods.""" - - _dotted_whitelist = ['subprocess'] - - def __init__(self, server): - self._server = server - self.subprocess = process.Process - - def _dispatch(self, method, params): - obj = self - if '.' in method: - # Allow only white listed dotted names - name, method = method.split('.') - assert name in self._dotted_whitelist - obj = getattr(self, name) - return getattr(obj, method)(*params) - - def Echo(self, message): - """Simple RPC method to print and return a message.""" - logging.info('Echoing %s', message) - return 'echo %s' % str(message) - - def AbsPath(self, path): - """Returns the absolute path.""" - return os.path.abspath(path) - - def Quit(self): - """Call _server.shutdown in another thread. - - This is needed because server.shutdown waits for the server to actually - quit. However the server cannot shutdown until it completes handling this - call. Calling this in the same thread results in a deadlock. - """ - 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 deleted file mode 100644 index 24ebe250d6..0000000000 --- a/engine/src/flutter/testing/legion/rpc_server.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. - -"""The task RPC server code. - -This server is an XML-RPC server which serves code from -rpc_methods.RPCMethods. - -This server will run until shutdown is called on the server object. This can -be achieved in 2 ways: - -- Calling the Quit RPC method defined in RPCMethods -- Not receiving any calls within the idle_timeout_secs time. -""" - -import logging -import threading -import time -import SocketServer - -#pylint: disable=relative-import -import common_lib -import rpc_methods -import ssl_util -import SimpleJSONRPCServer - - -class RequestHandler(SimpleJSONRPCServer.SimpleJSONRPCRequestHandler): - """Restricts access to only specified IP address. - - This call assumes the server is RPCServer. - """ - - def do_POST(self): - """Verifies the task is authorized to perform RPCs.""" - if self.client_address[0] != self.server.authorized_address: - logging.error('Received unauthorized RPC request from %s', - self.task_address[0]) - self.send_response(403) - response = 'Forbidden' - self.send_header('Content-type', 'text/plain') - self.send_header('Content-length', str(len(response))) - self.end_headers() - self.wfile.write(response) - else: - return SimpleJSONRPCServer.SimpleJSONRPCRequestHandler.do_POST(self) - - -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): - 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)) - - self._shutdown_requested_event = threading.Event() - self._rpc_received_event = threading.Event() - self._idle_thread = threading.Thread(target=self._CheckForIdleQuit) - - def shutdown(self): - """Shutdown the server. - - This overloaded method sets the _shutdown_requested_event to allow the - idle timeout thread to quit. - """ - self._shutdown_requested_event.set() - SimpleJSONRPCServer.SimpleJSONRPCServer.shutdown(self) - logging.info('Server shutdown complete') - - def serve_forever(self, poll_interval=0.5): - """Serve forever. - - This overloaded method starts the idle timeout thread before calling - serve_forever. This ensures the idle timer thread doesn't get started - without the server running. - - Args: - poll_interval: The interval to poll for shutdown. - """ - logging.info('RPC server starting') - self._idle_thread.start() - SimpleJSONRPCServer.SimpleJSONRPCServer.serve_forever(self, poll_interval) - - def _dispatch(self, method, params): - """Dispatch the call to the correct method with the provided params. - - This overloaded method adds logging to help trace connection and - call problems. - - Args: - method: The method name to call. - params: A tuple of parameters to pass. - - Returns: - The result of the parent class' _dispatch method. - """ - logging.debug('Calling %s%s', method, params) - self._rpc_received_event.set() - return SimpleJSONRPCServer.SimpleJSONRPCServer._dispatch( - self, method, params) - - def _CheckForIdleQuit(self): - """Check for, and exit, if the server is idle for too long. - - This method must be run in a separate thread to avoid a deadlock when - calling server.shutdown. - """ - timeout = time.time() + self.idle_timeout_secs - while time.time() < timeout: - if self._shutdown_requested_event.is_set(): - # An external source called shutdown() - return - elif self._rpc_received_event.is_set(): - logging.debug('Resetting the idle timeout') - timeout = time.time() + self.idle_timeout_secs - self._rpc_received_event.clear() - time.sleep(1) - # We timed out, kill the server - logging.warning('Shutting down the server due to the idle timeout') - self.shutdown() diff --git a/engine/src/flutter/testing/legion/run_task.py b/engine/src/flutter/testing/legion/run_task.py deleted file mode 100755 index cb0b90fefd..0000000000 --- a/engine/src/flutter/testing/legion/run_task.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/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. - -"""The main task entrypoint.""" - -import argparse -import logging -import socket -import sys -import time - -#pylint: disable=relative-import -import common_lib -import rpc_server -import ssl_util - - -def main(): - print ' '.join(sys.argv) - common_lib.InitLogging() - logging.info('Task starting') - - parser = argparse.ArgumentParser() - parser.add_argument('--otp', - help='One time token used to authenticate with the host') - parser.add_argument('--controller', - help='The ip address of the controller machine') - parser.add_argument('--idle-timeout', type=int, - default=common_lib.DEFAULT_TIMEOUT_SECS, - help='The idle timeout for the rpc server in seconds') - args, _ = parser.parse_known_args() - - logging.info( - 'Registering with registration server at %s using OTP "%s"', - args.controller, args.otp) - ssl_util.SslRpcServer.Connect(args.controller).RegisterTask( - args.otp, common_lib.MY_IP) - - server = rpc_server.RpcServer(args.controller, args.idle_timeout) - - server.serve_forever() - logging.info('Server shutdown complete') - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/testing/legion/ssl_util.py b/engine/src/flutter/testing/legion/ssl_util.py deleted file mode 100644 index 41e1e75b2d..0000000000 --- a/engine/src/flutter/testing/legion/ssl_util.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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 deleted file mode 100644 index 7e0aa99bba..0000000000 --- a/engine/src/flutter/testing/legion/task_controller.py +++ /dev/null @@ -1,234 +0,0 @@ -# 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. - -"""Defines the task controller library.""" - -import argparse -import datetime -import logging -import os -import socket -import subprocess -import sys -import tempfile -import threading - -#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') - - -class Error(Exception): - pass - - -class ConnectionTimeoutError(Error): - pass - - -class TaskController(object): - """Provisions, configures, and controls a task machine. - - This class is an abstraction of a physical task machine. It provides an - end to end API for controlling a task machine. Operations on the task machine - are performed using the instance's "rpc" property. A simple end to end - scenario is as follows: - - task = TaskController(...) - task.Create() - task.WaitForConnection() - proc = task.rpc.subprocess.Popen(['ls']) - print task.rpc.subprocess.GetStdout(proc) - task.Release() - """ - - _task_count = 0 - _tasks = [] - - def __init__(self, isolated_hash, dimensions, priority=100, - idle_timeout_secs=common_lib.DEFAULT_TIMEOUT_SECS, - connection_timeout_secs=common_lib.DEFAULT_TIMEOUT_SECS, - verbosity='ERROR', name=None, run_id=None): - assert isinstance(dimensions, dict) - type(self)._tasks.append(self) - type(self)._task_count += 1 - self.verbosity = verbosity - self._name = name or 'Task%d' % type(self)._task_count - self._priority = priority - self._isolated_hash = isolated_hash - self._idle_timeout_secs = idle_timeout_secs - self._dimensions = dimensions - self._connect_event = threading.Event() - self._connected = False - 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' % ( - os.path.splitext(sys.argv[0])[0], self._name, run_id) - - parser = argparse.ArgumentParser() - parser.add_argument('--isolate-server') - parser.add_argument('--swarming-server') - parser.add_argument('--task-connection-timeout-secs', - default=common_lib.DEFAULT_TIMEOUT_SECS) - args, _ = parser.parse_known_args() - - self._isolate_server = args.isolate_server - self._swarming_server = args.swarming_server - self._connection_timeout_secs = (connection_timeout_secs or - args.task_connection_timeout_secs) - - @property - def name(self): - return self._name - - @property - def otp(self): - return self._otp - - @property - def connected(self): - return self._connected - - @property - def connect_event(self): - return self._connect_event - - @property - def rpc(self): - return self._rpc - - @property - def verbosity(self): - return self._verbosity - - @verbosity.setter - def verbosity(self, level): - """Sets the verbosity level as a string. - - Either a string ('INFO', 'DEBUG', etc) or a logging level (logging.INFO, - logging.DEBUG, etc) is allowed. - """ - assert isinstance(level, (str, int)) - if isinstance(level, int): - 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, *args, **kwargs): - return process.ControllerProcessWrapper(self.rpc, cmd, *args, **kwargs) - - def _CreateOTP(self): - """Creates the OTP.""" - controller_name = socket.gethostname() - test_name = os.path.basename(sys.argv[0]) - creation_time = datetime.datetime.utcnow() - otp = 'task:%s controller:%s test:%s creation:%s' % ( - self._name, controller_name, test_name, creation_time) - return otp - - def Create(self): - """Creates the task machine.""" - logging.info('Creating %s', self.name) - self._connect_event.clear() - self._ExecuteSwarming() - - def WaitForConnection(self): - """Waits for the task machine to connect. - - Raises: - ConnectionTimeoutError if the task doesn't connect in time. - """ - logging.info('Waiting for %s to connect with a timeout of %d seconds', - self._name, self._connection_timeout_secs) - self._connect_event.wait(self._connection_timeout_secs) - if not self._connect_event.is_set(): - raise ConnectionTimeoutError('%s failed to connect' % self.name) - - 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, jsonrpclib.Fault): - logging.error('Unable to connect to %s to call Quit', self.name) - self._rpc = None - self._connected = False - - def _ExecuteSwarming(self): - """Executes swarming.py.""" - cmd = [ - 'python', - SWARMING_PY, - 'trigger', - self._isolated_hash, - '--priority', str(self._priority), - '--task-name', self._task_name, - ] - - if self._isolate_server: - cmd.extend(['--isolate-server', self._isolate_server]) - if self._swarming_server: - cmd.extend(['--swarming', self._swarming_server]) - for key, value in self._dimensions.iteritems(): - cmd.extend(['--dimension', key, value]) - - cmd.extend([ - '--', - '--controller', common_lib.MY_IP, - '--otp', self._otp, - '--verbosity', self._verbosity, - '--idle-timeout', str(self._idle_timeout_secs), - '--output-dir', '${ISOLATED_OUTDIR}' - ]) - - self._ExecuteProcess(cmd) - - def _ExecuteProcess(self, cmd): - """Executes a process, waits for it to complete, and checks for success.""" - logging.debug('Running %s', ' '.join(cmd)) - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - _, stderr = p.communicate() - if p.returncode != 0: - raise Error(stderr) - - def OnConnect(self, ip_address): - """Receives task ip address on connection.""" - self._ip_address = ip_address - self._connected = True - 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 deleted file mode 100644 index 1b15952249..0000000000 --- a/engine/src/flutter/testing/legion/task_registration_server.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - -"""The registration server used to register tasks. - -The registration server is started by the test controller and allows the tasks -to register themselves when they start. Authentication of the tasks controllers -is based on an OTP passed to the run_task binary on startup. -""" - -import logging -import threading - -#pylint: disable=relative-import -import common_lib -import ssl_util - - -class TaskRegistrationServer(object): - """Discovery server run on the host.""" - - def __init__(self): - self._expected_tasks = {} - self._rpc_server = None - self._thread = None - - def _RegisterTaskRPC(self, otp, ip): - """The RPC used by a task to register with the registration server.""" - assert otp in self._expected_tasks - cb = self._expected_tasks.pop(otp) - cb(ip) - - def RegisterTaskCallback(self, otp, callback): - """Registers a callback associated with an OTP.""" - assert callable(callback) - self._expected_tasks[otp] = callback - - def Start(self): - """Starts the registration server.""" - logging.info('Starting task registration server') - self._rpc_server = ssl_util.SslRpcServer( - (common_lib.SERVER_ADDRESS, common_lib.SERVER_PORT), - allow_none=True, logRequests=False) - self._rpc_server.register_function( - self._RegisterTaskRPC, 'RegisterTask') - self._thread = threading.Thread(target=self._rpc_server.serve_forever) - self._thread.start() - - def Shutdown(self): - """Shuts the discovery server down.""" - if self._thread and self._thread.is_alive(): - logging.info('Shutting down task registration server') - self._rpc_server.shutdown() diff --git a/engine/src/flutter/testing/legion/test_controller.py b/engine/src/flutter/testing/legion/test_controller.py deleted file mode 100644 index 2703fadf09..0000000000 --- a/engine/src/flutter/testing/legion/test_controller.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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. - -"""Defines the test controller base library. - -This module is the basis on which test controllers are built and executed. -""" - -import logging -import sys - -#pylint: disable=relative-import -import common_lib -import task_controller -import task_registration_server - - -class TestController(object): - """The base test controller class.""" - - def __init__(self): - self._registration_server = ( - task_registration_server.TaskRegistrationServer()) - - def SetUp(self): - """Setup method used by the subclass.""" - pass - - def RunTest(self): - """Main test method used by the subclass.""" - raise NotImplementedError() - - def TearDown(self): - """Teardown method used by the subclass.""" - pass - - def CreateNewTask(self, *args, **kwargs): - task = task_controller.TaskController(*args, **kwargs) - self._registration_server.RegisterTaskCallback( - task.otp, task.OnConnect) - return task - - def RunController(self): - """Main entry point for the controller.""" - print ' '.join(sys.argv) - common_lib.InitLogging() - self._registration_server.Start() - - error = None - tb = None - try: - self.SetUp() - self.RunTest() - except Exception as e: - # Defer raising exceptions until after TearDown is called. - error = e - tb = sys.exc_info()[-1] - try: - self.TearDown() - except Exception as e: - if not tb: - error = e - tb = sys.exc_info()[-1] - - self._registration_server.Shutdown() - task_controller.TaskController.ReleaseAllTasks() - if error: - raise error, None, tb #pylint: disable=raising-bad-type diff --git a/engine/src/flutter/testing/legion/tools/legion.py b/engine/src/flutter/testing/legion/tools/legion.py deleted file mode 100755 index 4ddfc5e44a..0000000000 --- a/engine/src/flutter/testing/legion/tools/legion.py +++ /dev/null @@ -1,161 +0,0 @@ -#!/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. - -"""A helper module to run Legion multi-machine tests. - -Example usage with 1 task machine: -$ testing/legion/tools/legion.py run \ - --controller-isolated out/Release/example_test_controller.isolated \ - --dimension os Ubuntu-14.04 \ - --task-name test-task-name \ - --task task_machine out/Release/example_task_machine.isolated - -Example usage with 2 task machines with the same isolated file: -$ testing/legion/tools/legion.py run \ - --controller-isolated out/Release/example_test_controller.isolated \ - --dimension os Ubuntu-14.04 \ - --task-name test-task-name \ - --task task_machine_1 out/Release/example_task_machine.isolated \ - --task task_machine_2 out/Release/example_task_machine.isolated - -Example usage with 2 task machines with different isolated file: -$ testing/legion/tools/legion.py run \ - --controller-isolated out/Release/example_test_controller.isolated \ - --dimension os Ubuntu-14.04 \ - --task-name test-task-name \ - --task task_machine_1 out/Release/example_task_machine_1.isolated \ - --task task_machine_2 out/Release/example_task_machine_2.isolated -""" - -import argparse -import logging -import os -import subprocess -import sys - - -THIS_DIR = os.path.split(__file__)[0] -SWARMING_DIR = os.path.join(THIS_DIR, '..', '..', '..', 'tools', - 'swarming_client') -ISOLATE_PY = os.path.join(SWARMING_DIR, 'isolate.py') -SWARMING_PY = os.path.join(SWARMING_DIR, 'swarming.py') -LOGGING_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR'] - - -class Error(Exception): - pass - - -def GetArgs(): - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('action', choices=['run', 'trigger'], - help='The swarming action to perform.') - parser.add_argument('-f', '--format-only', action='store_true', - help='If true the .isolated files are archived but ' - 'swarming is not called, only the command line is built.') - parser.add_argument('--controller-isolated', required=True, - help='The isolated file for the test controller.') - parser.add_argument('--isolate-server', help='Optional. The isolated server ' - 'to use.') - parser.add_argument('--swarming-server', help='Optional. The swarming server ' - 'to use.') - parser.add_argument('--task-name', help='Optional. The swarming task name ' - 'to use.') - parser.add_argument('--dimension', action='append', dest='dimensions', - nargs=2, default=[], help='Dimensions to pass to ' - 'swarming.py. This is in the form of --dimension key ' - 'value. The minimum required is --dimension os ') - parser.add_argument('--task', action='append', dest='tasks', - nargs=2, default=[], help='List of task names used in ' - 'the test controller. This is in the form of --task name ' - '.isolated and is passed to the controller as --name ' - '.') - parser.add_argument('--controller-var', action='append', - dest='controller_vars', nargs=2, default=[], - help='Command line vars to pass to the controller. These ' - 'are in the form of --controller-var name value and are ' - 'passed to the controller as --name value.') - parser.add_argument('-v', '--verbosity', default=0, action='count') - return parser.parse_args() - - -def RunCommand(cmd, stream_stdout=False): - """Runs the command line and streams stdout if requested.""" - kwargs = { - 'args': cmd, - 'stderr': subprocess.PIPE, - } - if not stream_stdout: - kwargs['stdout'] = subprocess.PIPE - - p = subprocess.Popen(**kwargs) - stdout, stderr = p.communicate() - if p.returncode: - raise Error(stderr) - if not stream_stdout: - logging.debug(stdout) - return stdout - - -def Archive(isolated, isolate_server=None): - """Calls isolate.py archive with the given args.""" - cmd = [ - sys.executable, - ISOLATE_PY, - 'archive', - '--isolated', isolated, - ] - if isolate_server: - cmd.extend(['--isolate-server', isolate_server]) - print ' '.join(cmd) - return RunCommand(cmd).split()[0] # The isolated hash - - -def GetSwarmingCommandLine(args): - """Builds and returns the command line for swarming.py run|trigger.""" - cmd = [ - sys.executable, - SWARMING_PY, - args.action, - args.controller_isolated, - ] - if args.isolate_server: - cmd.extend(['--isolate-server', args.isolate_server]) - if args.swarming_server: - cmd.extend(['--swarming', args.swarming_server]) - if args.task_name: - cmd.extend(['--task-name', args.task_name]) - # swarming.py dimensions - for name, value in args.dimensions: - cmd.extend(['--dimension', name, value]) - - 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)]) - # Test controller args - for name, value in args.controller_vars: - cmd.extend(['--' + name, value]) - print ' '.join(cmd) - return cmd - - -def main(): - args = GetArgs() - logging.basicConfig( - format='%(asctime)s %(filename)s:%(lineno)s %(levelname)s] %(message)s', - datefmt='%H:%M:%S', - level=LOGGING_LEVELS[len(LOGGING_LEVELS)-args.verbosity-1]) - cmd = GetSwarmingCommandLine(args) - if not args.format_only: - RunCommand(cmd, True) - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/testing/multiprocess_func_list.cc b/engine/src/flutter/testing/multiprocess_func_list.cc deleted file mode 100644 index 49ae07dd3e..0000000000 --- a/engine/src/flutter/testing/multiprocess_func_list.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2012 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. - -#include "multiprocess_func_list.h" - -#include - -// Helper functions to maintain mapping of "test name"->test func. -// The information is accessed via a global map. -namespace multi_process_function_list { - -namespace { - -struct ProcessFunctions { - ProcessFunctions() : main(NULL), setup(NULL) {} - ProcessFunctions(TestMainFunctionPtr main, SetupFunctionPtr setup) - : main(main), - setup(setup) { - } - TestMainFunctionPtr main; - SetupFunctionPtr setup; -}; - -typedef std::map MultiProcessTestMap; - -// Retrieve a reference to the global 'func name' -> func ptr map. -MultiProcessTestMap& GetMultiprocessFuncMap() { - static MultiProcessTestMap test_name_to_func_ptr_map; - return test_name_to_func_ptr_map; -} - -} // namespace - -AppendMultiProcessTest::AppendMultiProcessTest( - std::string test_name, - TestMainFunctionPtr main_func_ptr, - SetupFunctionPtr setup_func_ptr) { - GetMultiprocessFuncMap()[test_name] = - ProcessFunctions(main_func_ptr, setup_func_ptr); -} - -int InvokeChildProcessTest(std::string test_name) { - MultiProcessTestMap& func_lookup_table = GetMultiprocessFuncMap(); - MultiProcessTestMap::iterator it = func_lookup_table.find(test_name); - if (it != func_lookup_table.end()) { - const ProcessFunctions& process_functions = it->second; - if (process_functions.setup) - (*process_functions.setup)(); - if (process_functions.main) - return (*process_functions.main)(); - } - - return -1; -} - -} // namespace multi_process_function_list diff --git a/engine/src/flutter/testing/multiprocess_func_list.h b/engine/src/flutter/testing/multiprocess_func_list.h deleted file mode 100644 index f806d53c93..0000000000 --- a/engine/src/flutter/testing/multiprocess_func_list.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef TESTING_MULTIPROCESS_FUNC_LIST_H_ -#define TESTING_MULTIPROCESS_FUNC_LIST_H_ - -#include - -// This file provides the plumbing to register functions to be executed -// as the main function of a child process in a multi-process test. -// This complements the MultiProcessTest class which provides facilities -// for launching such tests. -// -// The MULTIPROCESS_TEST_MAIN() macro registers a string -> func_ptr mapping -// by creating a new global instance of the AppendMultiProcessTest() class -// this means that by the time that we reach our main() function the mapping -// is already in place. -// -// Example usage: -// MULTIPROCESS_TEST_MAIN(a_test_func) { -// // Code here runs in a child process. -// return 0; -// } -// -// The prototype of a_test_func is implicitly -// int test_main_func_name(); - -namespace multi_process_function_list { - -// Type for child process main functions. -typedef int (*TestMainFunctionPtr)(); - -// Type for child setup functions. -typedef void (*SetupFunctionPtr)(); - -// Helper class to append a test function to the global mapping. -// Used by the MULTIPROCESS_TEST_MAIN macro. -class AppendMultiProcessTest { - public: - // |main_func_ptr| is the main function that is run in the child process. - // |setup_func_ptr| is a function run when the global mapping is added. - AppendMultiProcessTest(std::string test_name, - TestMainFunctionPtr main_func_ptr, - SetupFunctionPtr setup_func_ptr); -}; - -// Invoke the main function of a test previously registered with -// MULTIPROCESS_TEST_MAIN() -int InvokeChildProcessTest(std::string test_name); - -// This macro creates a global MultiProcessTest::AppendMultiProcessTest object -// whose constructor does the work of adding the global mapping. -#define MULTIPROCESS_TEST_MAIN(test_main) \ - MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, NULL) - -// Same as above but lets callers specify a setup method that is run in the -// child process, just before the main function is run. This facilitates -// adding a generic one-time setup function for multiple tests. -#define MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, test_setup) \ - int test_main(); \ - namespace { \ - multi_process_function_list::AppendMultiProcessTest \ - AddMultiProcessTest##_##test_main(#test_main, (test_main), (test_setup)); \ - } \ - int test_main() - -} // namespace multi_process_function_list - -#endif // TESTING_MULTIPROCESS_FUNC_LIST_H_ diff --git a/engine/src/flutter/testing/perf/BUILD.gn b/engine/src/flutter/testing/perf/BUILD.gn deleted file mode 100644 index 949f15abf1..0000000000 --- a/engine/src/flutter/testing/perf/BUILD.gn +++ /dev/null @@ -1,14 +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. - -source_set("perf") { - testonly = true - sources = [ - "perf_test.cc", - "perf_test.h", - ] - deps = [ - "//base", - ] -} diff --git a/engine/src/flutter/testing/perf/perf_test.cc b/engine/src/flutter/testing/perf/perf_test.cc deleted file mode 100644 index 0d5abc01cb..0000000000 --- a/engine/src/flutter/testing/perf/perf_test.cc +++ /dev/null @@ -1,204 +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. - -#include "testing/perf/perf_test.h" - -#include - -#include "base/logging.h" -#include "base/strings/string_number_conversions.h" -#include "base/strings/stringprintf.h" - -namespace { - -std::string ResultsToString(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& prefix, - const std::string& suffix, - const std::string& units, - bool important) { - // <*>RESULT : = - // <*>RESULT : = {, } - // <*>RESULT : = [,value,value,...,] - return base::StringPrintf("%sRESULT %s%s: %s= %s%s%s %s\n", - important ? "*" : "", measurement.c_str(), modifier.c_str(), - trace.c_str(), prefix.c_str(), values.c_str(), suffix.c_str(), - units.c_str()); -} - -void PrintResultsImpl(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& prefix, - const std::string& suffix, - const std::string& units, - bool important) { - fflush(stdout); - printf("%s", ResultsToString(measurement, modifier, trace, values, - prefix, suffix, units, important).c_str()); - fflush(stdout); -} - -} // namespace - -namespace perf_test { - -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - size_t value, - const std::string& units, - bool important) { - PrintResultsImpl(measurement, - modifier, - trace, - base::UintToString(static_cast(value)), - std::string(), - std::string(), - units, - important); -} - -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - double value, - const std::string& units, - bool important) { - PrintResultsImpl(measurement, - modifier, - trace, - base::DoubleToString(value), - std::string(), - std::string(), - units, - important); -} - -void AppendResult(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - size_t value, - const std::string& units, - bool important) { - output += ResultsToString( - measurement, - modifier, - trace, - base::UintToString(static_cast(value)), - std::string(), - std::string(), - units, - important); -} - -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& value, - const std::string& units, - bool important) { - PrintResultsImpl(measurement, - modifier, - trace, - value, - std::string(), - std::string(), - units, - important); -} - -void AppendResult(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& value, - const std::string& units, - bool important) { - output += ResultsToString(measurement, - modifier, - trace, - value, - std::string(), - std::string(), - units, - important); -} - -void PrintResultMeanAndError(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& mean_and_error, - const std::string& units, - bool important) { - PrintResultsImpl(measurement, modifier, trace, mean_and_error, - "{", "}", units, important); -} - -void AppendResultMeanAndError(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& mean_and_error, - const std::string& units, - bool important) { - output += ResultsToString(measurement, modifier, trace, mean_and_error, - "{", "}", units, important); -} - -void PrintResultList(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& units, - bool important) { - PrintResultsImpl(measurement, modifier, trace, values, - "[", "]", units, important); -} - -void AppendResultList(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& units, - bool important) { - output += ResultsToString(measurement, modifier, trace, values, - "[", "]", units, important); -} - -void PrintSystemCommitCharge(const std::string& test_name, - size_t charge, - bool important) { - PrintSystemCommitCharge(stdout, test_name, charge, important); -} - -void PrintSystemCommitCharge(FILE* target, - const std::string& test_name, - size_t charge, - bool important) { - fprintf(target, "%s", SystemCommitChargeToString(test_name, charge, - important).c_str()); -} - -std::string SystemCommitChargeToString(const std::string& test_name, - size_t charge, - bool important) { - std::string trace_name(test_name); - std::string output; - AppendResult(output, - "commit_charge", - std::string(), - "cc" + trace_name, - charge, - "kb", - important); - return output; -} - -} // namespace perf_test diff --git a/engine/src/flutter/testing/perf/perf_test.gyp b/engine/src/flutter/testing/perf/perf_test.gyp deleted file mode 100644 index 2065270c11..0000000000 --- a/engine/src/flutter/testing/perf/perf_test.gyp +++ /dev/null @@ -1,18 +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. - -{ - 'targets': [ - { - 'target_name': 'perf_test', - 'type': 'static_library', - 'sources': [ - 'perf_test.cc', - ], - 'dependencies': [ - '../../base/base.gyp:base', - ], - }, - ], -} diff --git a/engine/src/flutter/testing/perf/perf_test.h b/engine/src/flutter/testing/perf/perf_test.h deleted file mode 100644 index 36e2916c5f..0000000000 --- a/engine/src/flutter/testing/perf/perf_test.h +++ /dev/null @@ -1,116 +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. - -#ifndef TESTING_PERF_PERF_TEST_H_ -#define TESTING_PERF_PERF_TEST_H_ - -#include - -namespace perf_test { - -// Prints numerical information to stdout in a controlled format, for -// post-processing. |measurement| is a description of the quantity being -// measured, e.g. "vm_peak"; |modifier| is provided as a convenience and -// will be appended directly to the name of the |measurement|, e.g. -// "_browser"; |trace| is a description of the particular data point, e.g. -// "reference"; |value| is the measured value; and |units| is a description -// of the units of measure, e.g. "bytes". If |important| is true, the output -// line will be specially marked, to notify the post-processor. The strings -// may be empty. They should not contain any colons (:) or equals signs (=). -// A typical post-processing step would be to produce graphs of the data -// produced for various builds, using the combined |measurement| + |modifier| -// string to specify a particular graph and the |trace| to identify a trace -// (i.e., data series) on that graph. -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - size_t value, - const std::string& units, - bool important); -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - double value, - const std::string& units, - bool important); - -void AppendResult(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - size_t value, - const std::string& units, - bool important); - -// Like the above version of PrintResult(), but takes a std::string value -// instead of a size_t. -void PrintResult(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& value, - const std::string& units, - bool important); - -void AppendResult(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& value, - const std::string& units, - bool important); - -// Like PrintResult(), but prints a (mean, standard deviation) result pair. -// The || should be two comma-separated numbers, the mean and -// standard deviation (or other error metric) of the measurement. -void PrintResultMeanAndError(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& mean_and_error, - const std::string& units, - bool important); - -void AppendResultMeanAndError(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& mean_and_error, - const std::string& units, - bool important); - -// Like PrintResult(), but prints an entire list of results. The |values| -// will generally be a list of comma-separated numbers. A typical -// post-processing step might produce plots of their mean and standard -// deviation. -void PrintResultList(const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& units, - bool important); - -void AppendResultList(std::string& output, - const std::string& measurement, - const std::string& modifier, - const std::string& trace, - const std::string& values, - const std::string& units, - bool important); - -// Prints memory commit charge stats for use by perf graphs. -void PrintSystemCommitCharge(const std::string& test_name, - size_t charge, - bool important); - -void PrintSystemCommitCharge(FILE* target, - const std::string& test_name, - size_t charge, - bool important); - -std::string SystemCommitChargeToString(const std::string& test_name, - size_t charge, - bool important); - -} // namespace perf_test - -#endif // TESTING_PERF_PERF_TEST_H_ diff --git a/engine/src/flutter/testing/platform_test.h b/engine/src/flutter/testing/platform_test.h deleted file mode 100644 index 04fc845bd9..0000000000 --- a/engine/src/flutter/testing/platform_test.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2006-2008 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. - -#ifndef TESTING_PLATFORM_TEST_H_ -#define TESTING_PLATFORM_TEST_H_ - -#include - -#if defined(GTEST_OS_MAC) -#ifdef __OBJC__ -@class NSAutoreleasePool; -#else -class NSAutoreleasePool; -#endif - -// The purpose of this class us to provide a hook for platform-specific -// operations across unit tests. For example, on the Mac, it creates and -// releases an outer NSAutoreleasePool for each test case. For now, it's only -// implemented on the Mac. To enable this for another platform, just adjust -// the #ifdefs and add a platform_test_.cc implementation file. -class PlatformTest : public testing::Test { - public: - virtual ~PlatformTest(); - - protected: - PlatformTest(); - - private: - NSAutoreleasePool* pool_; -}; -#else -typedef testing::Test PlatformTest; -#endif // GTEST_OS_MAC - -#endif // TESTING_PLATFORM_TEST_H_ diff --git a/engine/src/flutter/testing/platform_test_mac.mm b/engine/src/flutter/testing/platform_test_mac.mm deleted file mode 100644 index bd22cd5b45..0000000000 --- a/engine/src/flutter/testing/platform_test_mac.mm +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2006-2008 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. - -#include "platform_test.h" - -#import - -PlatformTest::PlatformTest() - : pool_([[NSAutoreleasePool alloc] init]) { -} - -PlatformTest::~PlatformTest() { - [pool_ release]; -} diff --git a/engine/src/flutter/testing/scripts/OWNERS b/engine/src/flutter/testing/scripts/OWNERS deleted file mode 100644 index 9f378a2642..0000000000 --- a/engine/src/flutter/testing/scripts/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -# This is needed because of * in testing/OWNERS . -set noparent - -iannucci@chromium.org -phajdan.jr@chromium.org diff --git a/engine/src/flutter/testing/scripts/android_gtest_test.py b/engine/src/flutter/testing/scripts/android_gtest_test.py deleted file mode 100755 index 998a354135..0000000000 --- a/engine/src/flutter/testing/scripts/android_gtest_test.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/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/checkdeps.py b/engine/src/flutter/testing/scripts/checkdeps.py deleted file mode 100755 index d6140dac12..0000000000 --- a/engine/src/flutter/testing/scripts/checkdeps.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/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. - -import json -import os -import sys - - -import common - - -def main_run(args): - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - os.path.join(common.SRC_DIR, 'buildtools', 'checkdeps', 'checkdeps.py'), - '--json', tempfile_path - ]) - - with open(tempfile_path) as f: - checkdeps_results = json.load(f) - - result_set = set() - for result in checkdeps_results: - for violation in result['violations']: - result_set.add((result['dependee_path'], violation['include_path'])) - - json.dump({ - 'valid': True, - 'failures': ['%s: %s' % (r[0], r[1]) for r in result_set], - }, 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/checklicenses.py b/engine/src/flutter/testing/scripts/checklicenses.py deleted file mode 100755 index 43342d0254..0000000000 --- a/engine/src/flutter/testing/scripts/checklicenses.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/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): - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - os.path.join(common.SRC_DIR, 'tools', 'checklicenses', - 'checklicenses.py'), - '--json', tempfile_path - ]) - - with open(tempfile_path) as f: - checklicenses_results = json.load(f) - - result_set = set() - for result in checklicenses_results: - result_set.add((result['filename'], result['license'])) - - json.dump({ - 'valid': True, - 'failures': ['%s: %s' % (r[0], r[1]) for r in result_set], - }, 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/checkperms.py b/engine/src/flutter/testing/scripts/checkperms.py deleted file mode 100755 index 17e32c4f62..0000000000 --- a/engine/src/flutter/testing/scripts/checkperms.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/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): - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - os.path.join(common.SRC_DIR, 'tools', 'checkperms', 'checkperms.py'), - '--root', args.paths['checkout'], - '--json', tempfile_path - ]) - - with open(tempfile_path) as f: - checkperms_results = json.load(f) - - result_set = set() - for result in checkperms_results: - result_set.add((result['rel_path'], result['error'])) - - json.dump({ - 'valid': True, - 'failures': ['%s: %s' % (r[0], r[1]) for r in result_set], - }, 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/common.py b/engine/src/flutter/testing/scripts/common.py deleted file mode 100644 index 3697c4b737..0000000000 --- a/engine/src/flutter/testing/scripts/common.py +++ /dev/null @@ -1,171 +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 argparse -import contextlib -import json -import os -import subprocess -import sys -import tempfile - - -SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) -SRC_DIR = os.path.abspath( - os.path.join(SCRIPT_DIR, os.path.pardir, os.path.pardir)) - - -# run-webkit-tests returns the number of failures as the return -# code, but caps the return code at 101 to avoid overflow or colliding -# with reserved values from the shell. -MAX_FAILURES_EXIT_STATUS = 101 - - -def run_script(argv, funcs): - def parse_json(path): - with open(path) as f: - return json.load(f) - parser = argparse.ArgumentParser() - # TODO(phajdan.jr): Make build-config-fs required after passing it in recipe. - parser.add_argument('--build-config-fs') - parser.add_argument('--paths', type=parse_json, default={}) - # Properties describe the environment of the build, and are the same per - # script invocation. - parser.add_argument('--properties', type=parse_json, default={}) - # Args contains per-invocation arguments that potentially change the - # 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') - run_parser.add_argument( - '--output', type=argparse.FileType('w'), required=True) - run_parser.add_argument('--filter-file', type=argparse.FileType('r')) - run_parser.set_defaults(func=funcs['run']) - - run_parser = subparsers.add_parser('compile_targets') - run_parser.add_argument( - '--output', type=argparse.FileType('w'), required=True) - run_parser.set_defaults(func=funcs['compile_targets']) - - args = parser.parse_args(argv) - return args.func(args) - - -def run_command(argv): - print 'Running %r' % argv - rc = subprocess.call(argv) - print 'Command %r returned exit code %d' % (argv, rc) - return rc - - -def run_runtest(cmd_args, runtest_args): - 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'], - '--slave-name', cmd_args.properties['slavename'], - '--build-number', str(cmd_args.properties['buildnumber']), - '--build-properties', json.dumps(cmd_args.properties), - ] + runtest_args) - - -@contextlib.contextmanager -def temporary_file(): - fd, path = tempfile.mkstemp() - os.close(fd) - try: - yield path - finally: - os.remove(path) - - -def parse_common_test_results(json_results, test_separator='/'): - def convert_trie_to_flat_paths(trie, prefix=None): - # Also see webkitpy.layout_tests.layout_package.json_results_generator - result = {} - for name, data in trie.iteritems(): - if prefix: - name = prefix + test_separator + name - if len(data) and not 'actual' in data and not 'expected' in data: - result.update(convert_trie_to_flat_paths(data, name)) - else: - result[name] = data - return result - - results = { - 'passes': {}, - 'unexpected_passes': {}, - 'failures': {}, - 'unexpected_failures': {}, - 'flakes': {}, - 'unexpected_flakes': {}, - } - - # TODO(dpranke): crbug.com/357866 - we should simplify the handling of - # both the return code and parsing the actual results, below. - - passing_statuses = ('PASS', 'SLOW', 'NEEDSREBASELINE', - 'NEEDSMANUALREBASELINE') - - for test, result in convert_trie_to_flat_paths( - json_results['tests']).iteritems(): - key = 'unexpected_' if result.get('is_unexpected') else '' - data = result['actual'] - actual_results = data.split() - last_result = actual_results[-1] - expected_results = result['expected'].split() - - if (len(actual_results) > 1 and - (last_result in expected_results or last_result in passing_statuses)): - key += 'flakes' - elif last_result in passing_statuses: - key += 'passes' - # TODO(dpranke): crbug.com/357867 ... Why are we assigning result - # instead of actual_result here. Do we even need these things to be - # hashes, or just lists? - data = result - else: - key += 'failures' - 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/get_compile_targets.py b/engine/src/flutter/testing/scripts/get_compile_targets.py deleted file mode 100755 index 16cff95164..0000000000 --- a/engine/src/flutter/testing/scripts/get_compile_targets.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/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. - -import argparse -import json -import os -import sys - -import common - - -def main(argv): - parser = argparse.ArgumentParser() - parser.add_argument('--output', required=True) - parser.add_argument('args', nargs=argparse.REMAINDER) - - args = parser.parse_args(argv) - - passthrough_args = args.args - if passthrough_args[0] == '--': - passthrough_args = passthrough_args[1:] - - results = {} - - for filename in os.listdir(common.SCRIPT_DIR): - if not filename.endswith('.py'): - continue - if filename in ('common.py', 'get_compile_targets.py'): - continue - - with common.temporary_file() as tempfile_path: - rc = common.run_command( - [sys.executable, os.path.join(common.SCRIPT_DIR, filename)] + - passthrough_args + - [ - 'compile_targets', - '--output', tempfile_path - ] - ) - if rc != 0: - return rc - - with open(tempfile_path) as f: - results[filename] = json.load(f) - - with open(args.output, 'w') as f: - json.dump(results, f) - - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/testing/scripts/gn_check.py b/engine/src/flutter/testing/scripts/gn_check.py deleted file mode 100755 index 5feb166c5e..0000000000 --- a/engine/src/flutter/testing/scripts/gn_check.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/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. - -"""Wrap `gn check` for the bots. - -This script wraps the `gn check` command in the facade needed for the -'ScriptTest' step class of the chromium recipe_module -(see scripts/slave/recipe_modules/chromium/steps.py in the build repo). - -The script takes no arguments. -""" - - -import json -import os -import sys - - -import common - - -def main_run(args): - if sys.platform == 'win32': - exe = os.path.join(common.SRC_DIR, 'buildtools', 'win', 'gn.exe') - elif sys.platform == 'mac': - exe = os.path.join(common.SRC_DIR, 'buildtools', 'mac', 'gn') - else: - exe = os.path.join(common.SRC_DIR, 'buildtools', 'linux64', 'gn') - - rc = common.run_command([ - exe, - '--root=%s' % common.SRC_DIR, - 'check', - '//out/%s' % args.build_config_fs, - ]) - - # TODO(dpranke): Figure out how to get a list of failures out of gn check? - json.dump({ - 'valid': True, - 'failures': ['check_failed'] if rc else [], - }, 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/gtest_perf_test.py b/engine/src/flutter/testing/scripts/gtest_perf_test.py deleted file mode 100755 index af4380f657..0000000000 --- a/engine/src/flutter/testing/scripts/gtest_perf_test.py +++ /dev/null @@ -1,81 +0,0 @@ -#!/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 IsWindows(): - return sys.platform == 'cygwin' or sys.platform.startswith('win') - - -def main_run(args): - filter_tests = [] - if args.filter_file: - filter_tests = json.load(args.filter_file) - - perf_id = args.properties.get('perf-id') - script_args = args.args - test_suite = script_args[0] - if IsWindows(): - script_args[0] += '.exe' - - with common.temporary_file() as tempfile_path: - gtest_args = [ - '--target', args.build_config_fs, - '--annotate', 'graphing', - '--perf-id', perf_id, - '--perf-dashboard-id', test_suite, - '--results-url', args.properties.get('results-url'), - '--slave-name', args.properties.get('slavename'), - '--builder-name', args.properties.get('buildername'), - '--build-number', str(args.properties.get('buildnumber')), - '--log-processor-output-file', tempfile_path, - '--test-type', test_suite, - ] - - if 'android' == args.properties.get('target_platform'): - gtest_args.extend([ - '--no-xvfb', - '--run-python-script', os.path.join( - args.paths['checkout'], 'build', 'android', 'test_runner.py'), - 'gtest', '--release', - '--suite', test_suite, - '--verbose', - ]) - else: - gtest_args.extend(['--xvfb']) - gtest_args.extend(script_args) - - rc = common.run_runtest(args, gtest_args + filter_tests) - - with open(tempfile_path) as f: - results = json.load(f) - - json.dump({ - 'valid': bool(rc == 0), - 'failures': results['failed'], - }, args.output) - - return rc - - -def main_compile_targets(args): - if 'android' == args.properties.get('target_platform'): - json.dump(['${name}_apk'], args.output) - else: - json.dump(['$name'], 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/gyp_flag_compare.py b/engine/src/flutter/testing/scripts/gyp_flag_compare.py deleted file mode 100755 index 0b777d9adb..0000000000 --- a/engine/src/flutter/testing/scripts/gyp_flag_compare.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/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. - -"""Wrap //tools/gn/bin/gyp_flag_compare.py for the bots. - -This script wraps the GN test script in the facade needed for the -'ScriptTest' step class of the chromium recipe_module -(see scripts/slave/recipe_modules/chromium/steps.py in the build repo. - -The script takes N arguments, for the N targets to compare flags for. -""" - -import json -import os -import sys - - -import common - - -def main_run(args): - rc = common.run_command([sys.executable, - os.path.join(common.SRC_DIR, - 'tools', 'gn', 'bin', - 'gyp_flag_compare.py')] + args.args) - - # TODO(dpranke): Figure out how to get a list of failures out of - # gyp_flag_compare? - json.dump({ - 'valid': True, - 'failures': ['compare_failed'] if rc else [], - }, args.output) - - return rc - - -def main_compile_targets(args): - # TODO(dpranke): Figure out how to get args.args plumbed through to here. - 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/host_info.py b/engine/src/flutter/testing/scripts/host_info.py deleted file mode 100755 index b3131d8fb5..0000000000 --- a/engine/src/flutter/testing/scripts/host_info.py +++ /dev/null @@ -1,136 +0,0 @@ -#!/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 multiprocessing -import os -import platform -import subprocess -import sys - - -import common - - -def is_linux(): - return sys.platform.startswith('linux') - - -def get_free_disk_space(failures): - """Returns the amount of free space on the current disk, in GiB. - - Returns: - The amount of free space on the current disk, measured in GiB. - """ - if os.name == 'posix': - # Stat the current path for info on the current disk. - stat_result = os.statvfs('.') - # Multiply block size by number of free blocks, express in GiB. - return stat_result.f_frsize * stat_result.f_bavail / ( - 1024.0 / 1024.0 / 1024.0) - - failures.append('get_free_disk_space: OS %s not supported.' % os.name) - return 0 - - -def get_num_cpus(failures): - """Returns the number of logical CPUs on this machine. - - Returns: - The number of logical CPUs on this machine, or 'unknown' if indeterminate. - """ - try: - return multiprocessing.cpu_count() - except NotImplementedError: - failures.append('get_num_cpus') - return 'unknown' - - -def get_device_info(args, failures): - """Parses the device info for each attached device, and returns a summary - of the device info and any mismatches. - - Returns: - A dict indicating the result. - """ - if not is_linux(): - return {} - - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - sys.executable, - os.path.join(args.paths['checkout'], - 'build', - 'android', - 'buildbot', - 'bb_device_status_check.py'), - '--json-output', tempfile_path]) - - if rc: - failures.append('bb_device_status_check') - return {} - - with open(tempfile_path, 'r') as src: - device_info = json.load(src) - - results = {} - results['devices'] = sorted(v['serial'] for v in device_info) - - details = [v['build_detail'] for v in device_info] - - def unique_build_details(index): - return sorted(list(set([v.split(':')[index] for v in details]))) - - parsed_details = { - 'device_names': unique_build_details(0), - 'build_versions': unique_build_details(1), - 'build_types': unique_build_details(2), - } - - for k, v in parsed_details.iteritems(): - if len(v) == 1: - results[k] = v[0] - else: - results[k] = 'MISMATCH' - results['%s_list' % k] = v - failures.append(k) - - return results - - -def main_run(args): - failures = [] - host_info = {} - host_info['os_system'] = platform.system() - host_info['os_release'] = platform.release() - - host_info['processor'] = platform.processor() - host_info['num_cpus'] = get_num_cpus(failures) - host_info['free_disk_space'] = get_free_disk_space(failures) - - host_info['python_version'] = platform.python_version() - host_info['python_path'] = sys.executable - - host_info['devices'] = get_device_info(args, failures) - - json.dump({ - 'valid': True, - 'failures': failures, - '_host_info': host_info, - }, args.output) - - return len(failures) != 0 - - -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/mojo_apptests.py b/engine/src/flutter/testing/scripts/mojo_apptests.py deleted file mode 100755 index 49b855da2f..0000000000 --- a/engine/src/flutter/testing/scripts/mojo_apptests.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/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): - runner = os.path.join(common.SRC_DIR, 'mojo', 'tools', 'apptest_runner.py') - 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, build_dir, '--verbose', - '--write-full-results-to', tempfile_path]) - 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(['mandoline:tests'], 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/nacl_integration.py b/engine/src/flutter/testing/scripts/nacl_integration.py deleted file mode 100755 index f308b78b1c..0000000000 --- a/engine/src/flutter/testing/scripts/nacl_integration.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/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. - -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_command([ - sys.executable, - os.path.join(common.SRC_DIR, 'chrome', 'test', 'nacl_test_injection', - 'buildbot_nacl_integration.py'), - '--mode', args.build_config_fs, - '--json_build_results_output_file', tempfile_path, - ] + filter_tests) - - with open(tempfile_path) as f: - results = json.load(f) - - - json.dump({ - 'valid': True, - 'failures': [f['raw_name'] for f in results], - }, args.output) - - return rc - - -def main_compile_targets(args): - json.dump(['chrome'], 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_gpu_unittests.py b/engine/src/flutter/testing/scripts/telemetry_gpu_unittests.py deleted file mode 100755 index cf9862e3e2..0000000000 --- a/engine/src/flutter/testing/scripts/telemetry_gpu_unittests.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/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 deleted file mode 100755 index 0c6f08981e..0000000000 --- a/engine/src/flutter/testing/scripts/telemetry_perf_unittests.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/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. - -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) - - test_args = ['--retry-limit', '3'] - if 'android' == args.properties.get('target_platform'): - test_args += ['--browser', 'android-chrome-shell', '--device', 'android'] - else: - test_args += ['--browser', args.build_config_fs.lower()] - - with common.temporary_file() as tempfile_path: - test_args += ['--write-full-results-to', tempfile_path] - rc = common.run_runtest(args, [ - '--test-type', 'telemetry_perf_unittests', - '--run-python-script', - os.path.join(common.SRC_DIR, 'tools', 'perf', 'run_tests') - ] + test_args + 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): - if 'android' == args.properties.get('target_platform'): - json.dump(['chrome_shell_apk'], args.output) - else: - json.dump(['chrome'], 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_unittests.py b/engine/src/flutter/testing/scripts/telemetry_unittests.py deleted file mode 100755 index ad7e66f1bf..0000000000 --- a/engine/src/flutter/testing/scripts/telemetry_unittests.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/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. - -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_unittests', - '--run-python-script', - os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'), - '--browser', args.build_config_fs.lower(), - '--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(['chrome'], 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/webkit_lint.py b/engine/src/flutter/testing/scripts/webkit_lint.py deleted file mode 100755 index eeb9367099..0000000000 --- a/engine/src/flutter/testing/scripts/webkit_lint.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/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): - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - sys.executable, - os.path.join(common.SRC_DIR, 'third_party', 'WebKit', - 'Tools', 'Scripts', 'lint-test-expectations'), - '--json', tempfile_path - ]) - - with open(tempfile_path) as f: - failures = json.load(f) - - json.dump({ - 'valid': True, - 'failures': failures, - }, 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/webkit_python_tests.py b/engine/src/flutter/testing/scripts/webkit_python_tests.py deleted file mode 100755 index b0c2fbc1c7..0000000000 --- a/engine/src/flutter/testing/scripts/webkit_python_tests.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/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): - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - sys.executable, - os.path.join(common.SRC_DIR, 'third_party', 'WebKit', - 'Tools', 'Scripts', 'test-webkitpy'), - '--write-full-results-to', tempfile_path, - ]) - - with open(tempfile_path) as f: - results = json.load(f) - - parsed_results = common.parse_common_test_results(results) - 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/webview_licenses.py b/engine/src/flutter/testing/scripts/webview_licenses.py deleted file mode 100755 index 255c62e993..0000000000 --- a/engine/src/flutter/testing/scripts/webview_licenses.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/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): - with common.temporary_file() as tempfile_path: - rc = common.run_command([ - os.path.join(common.SRC_DIR, 'android_webview', 'tools', - 'webview_licenses.py'), - 'scan', - '--json', tempfile_path - ]) - - with open(tempfile_path) as f: - results = json.load(f) - - json.dump({ - 'valid': True, - 'failures': results, - }, 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/test.gni b/engine/src/flutter/testing/test.gni deleted file mode 100644 index c99df9036b..0000000000 --- a/engine/src/flutter/testing/test.gni +++ /dev/null @@ -1,256 +0,0 @@ -# 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. - -# ============================================================================== -# TEST SETUP -# ============================================================================== - -# Define a test as an executable (or apk on Android) with the "testonly" flag -# set. -template("test") { - if (is_android) { - import("//build/config/android/config.gni") - import("//build/config/android/rules.gni") - - main_target_name = target_name - library_name = "_${target_name}__library" - apk_name = "${target_name}_apk" - - shared_library(library_name) { - # Configs will always be defined since we set_defaults for a component - # in the main config. We want to use those rather than whatever came with - # the nested shared/static library inside the component. - configs = [] # Prevent list overwriting warning. - configs = invoker.configs - - # See above call. - set_sources_assignment_filter([]) - - testonly = true - - if (defined(invoker.all_dependent_configs)) { - all_dependent_configs = invoker.all_dependent_configs - } - if (defined(invoker.allow_circular_includes_from)) { - allow_circular_includes_from = invoker.allow_circular_includes_from - } - if (defined(invoker.cflags)) { - cflags = invoker.cflags - } - if (defined(invoker.cflags_c)) { - cflags_c = invoker.cflags_c - } - if (defined(invoker.cflags_cc)) { - cflags_cc = invoker.cflags_cc - } - if (defined(invoker.cflags_objc)) { - cflags_objc = invoker.cflags_objc - } - if (defined(invoker.cflags_objcc)) { - cflags_objcc = invoker.cflags_objcc - } - if (defined(invoker.check_includes)) { - check_includes = invoker.check_includes - } - if (defined(invoker.data)) { - data = invoker.data - } - if (defined(invoker.data_deps)) { - data_deps = invoker.data_deps - } - if (defined(invoker.datadeps)) { - datadeps = invoker.datadeps - } - if (defined(invoker.defines)) { - defines = invoker.defines - } - deps = [] - if (!defined(invoker.use_launcher) || invoker.use_launcher) { - deps += [ "//testing/android/native_test:native_test_native_code" ] - } - if (defined(invoker.deps)) { - deps += invoker.deps - } - if (defined(invoker.direct_dependent_configs)) { - direct_dependent_configs = invoker.direct_dependent_configs - } - if (defined(invoker.forward_dependent_configs_from)) { - forward_dependent_configs_from = invoker.forward_dependent_configs_from - } - if (defined(invoker.include_dirs)) { - include_dirs = invoker.include_dirs - } - if (defined(invoker.ldflags)) { - ldflags = invoker.ldflags - } - if (defined(invoker.lib_dirs)) { - lib_dirs = invoker.lib_dirs - } - if (defined(invoker.libs)) { - libs = invoker.libs - } - if (defined(invoker.output_extension)) { - output_extension = invoker.output_extension - } - if (defined(invoker.output_name)) { - output_name = invoker.output_name - } - if (defined(invoker.public)) { - public = invoker.public - } - if (defined(invoker.public_configs)) { - public_configs = invoker.public_configs - } - if (defined(invoker.public_deps)) { - public_deps = invoker.public_deps - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - } - - unittest_apk(apk_name) { - unittests_dep = ":$library_name" - apk_name = main_target_name - if (defined(invoker.output_name)) { - apk_name = invoker.output_name - unittests_binary = "lib${apk_name}.so" - } - deps = [ - ":$library_name", - ] - if (defined(invoker.apk_deps)) { - deps += invoker.apk_deps - } - if (defined(invoker.apk_asset_location)) { - asset_location = invoker.apk_asset_location - } - } - - test_name = main_target_name - if (defined(invoker.output_name)) { - test_name = invoker.output_name - } - test_runner_script_name = "${test_name}__test_runner_script" - test_runner_script(test_runner_script_name) { - test_name = test_name - test_type = "gtest" - test_suite = test_name - if (defined(invoker.isolate_file)) { - isolate_file = invoker.isolate_file - } - } - - group(target_name) { - testonly = true - datadeps = [ - ":$test_runner_script_name", - ] - deps = [ - ":$library_name", - ":$apk_name", - ] - } - } else { - executable(target_name) { - # See above. - configs = [] # Prevent list overwriting warning. - configs = invoker.configs - - # See above call. - set_sources_assignment_filter([]) - - testonly = true - - if (defined(invoker.all_dependent_configs)) { - all_dependent_configs = invoker.all_dependent_configs - } - if (defined(invoker.allow_circular_includes_from)) { - allow_circular_includes_from = invoker.allow_circular_includes_from - } - if (defined(invoker.cflags)) { - cflags = invoker.cflags - } - if (defined(invoker.cflags_c)) { - cflags_c = invoker.cflags_c - } - if (defined(invoker.cflags_cc)) { - cflags_cc = invoker.cflags_cc - } - if (defined(invoker.cflags_objc)) { - cflags_objc = invoker.cflags_objc - } - if (defined(invoker.cflags_objcc)) { - cflags_objcc = invoker.cflags_objcc - } - if (defined(invoker.check_includes)) { - check_includes = invoker.check_includes - } - if (defined(invoker.data)) { - data = invoker.data - } - if (defined(invoker.data_deps)) { - data_deps = invoker.data_deps - } - if (defined(invoker.datadeps)) { - datadeps = invoker.datadeps - } - if (defined(invoker.defines)) { - defines = invoker.defines - } - - # All shared libraries must have the sanitizer deps to properly link in - # asan mode (this target will be empty in other cases). - if (defined(invoker.deps)) { - deps = invoker.deps + [ "//build/config/sanitizers:deps" ] - } else { - deps = [ - "//build/config/sanitizers:deps", - ] - } - if (defined(invoker.direct_dependent_configs)) { - direct_dependent_configs = invoker.direct_dependent_configs - } - if (defined(invoker.forward_dependent_configs_from)) { - forward_dependent_configs_from = invoker.forward_dependent_configs_from - } - if (defined(invoker.include_dirs)) { - include_dirs = invoker.include_dirs - } - if (defined(invoker.ldflags)) { - ldflags = invoker.ldflags - } - if (defined(invoker.lib_dirs)) { - lib_dirs = invoker.lib_dirs - } - if (defined(invoker.libs)) { - libs = invoker.libs - } - if (defined(invoker.output_extension)) { - output_extension = invoker.output_extension - } - if (defined(invoker.output_name)) { - output_name = invoker.output_name - } - if (defined(invoker.public)) { - public = invoker.public - } - if (defined(invoker.public_configs)) { - public_configs = invoker.public_configs - } - if (defined(invoker.public_deps)) { - public_deps = invoker.public_deps - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - } - } -} diff --git a/engine/src/flutter/testing/test_env.py b/engine/src/flutter/testing/test_env.py deleted file mode 100755 index 052df6769b..0000000000 --- a/engine/src/flutter/testing/test_env.py +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Sets environment variables needed to run a chromium unit test.""" - -import os -import stat -import subprocess -import sys - -# This is hardcoded to be src/ relative to this script. -ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' -CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' - - -def get_sandbox_env(env): - """Returns the environment flags needed for the SUID sandbox to work.""" - extra_env = {} - chrome_sandbox_path = env.get(CHROME_SANDBOX_ENV, CHROME_SANDBOX_PATH) - # The above would silently disable the SUID sandbox if the env value were - # an empty string. We don't want to allow that. http://crbug.com/245376 - # TODO(jln): Remove this check once it's no longer possible to disable the - # sandbox that way. - if not chrome_sandbox_path: - chrome_sandbox_path = CHROME_SANDBOX_PATH - extra_env[CHROME_SANDBOX_ENV] = chrome_sandbox_path - - return extra_env - - -def trim_cmd(cmd): - """Removes internal flags from cmd since they're just used to communicate from - the host machine to this script running on the swarm slaves.""" - sanitizers = ['asan', 'lsan', 'msan', 'tsan'] - internal_flags = frozenset('--%s=%d' % (name, value) - for name in sanitizers - for value in [0, 1]) - return [i for i in cmd if i not in internal_flags] - - -def fix_python_path(cmd): - """Returns the fixed command line to call the right python executable.""" - out = cmd[:] - if out[0] == 'python': - out[0] = sys.executable - elif out[0].endswith('.py'): - out.insert(0, sys.executable) - return out - - -def get_sanitizer_env(cmd, asan, lsan, msan, tsan): - """Returns the envirnoment flags needed for sanitizer tools.""" - - extra_env = {} - - # Instruct GTK to use malloc while running sanitizer-instrumented tests. - extra_env['G_SLICE'] = 'always-malloc' - - extra_env['NSS_DISABLE_ARENA_FREE_LIST'] = '1' - extra_env['NSS_DISABLE_UNLOAD'] = '1' - - # TODO(glider): remove the symbolizer path once - # https://code.google.com/p/address-sanitizer/issues/detail?id=134 is fixed. - symbolizer_path = os.path.abspath(os.path.join(ROOT_DIR, 'third_party', - 'llvm-build', 'Release+Asserts', 'bin', 'llvm-symbolizer')) - - if lsan or tsan: - # LSan is not sandbox-compatible, so we can use online symbolization. In - # fact, it needs symbolization to be able to apply suppressions. - symbolization_options = ['symbolize=1', - 'external_symbolizer_path=%s' % symbolizer_path] - elif (asan or msan) and sys.platform not in ['win32', 'cygwin']: - # ASan uses a script for offline symbolization, except on Windows. - # Important note: when running ASan with leak detection enabled, we must use - # the LSan symbolization options above. - symbolization_options = ['symbolize=0'] - # Set the path to llvm-symbolizer to be used by asan_symbolize.py - extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path - else: - symbolization_options = [] - - if asan: - asan_options = symbolization_options[:] - if lsan: - asan_options.append('detect_leaks=1') - - if asan_options: - extra_env['ASAN_OPTIONS'] = ' '.join(asan_options) - - if sys.platform == 'darwin': - isolate_output_dir = os.path.abspath(os.path.dirname(cmd[0])) - # This is needed because the test binary has @executable_path embedded in - # it that the OS tries to resolve to the cache directory and not the - # mapped directory. - extra_env['DYLD_LIBRARY_PATH'] = str(isolate_output_dir) - - if lsan: - if asan or msan: - lsan_options = [] - else: - lsan_options = symbolization_options[:] - if sys.platform == 'linux2': - # Use the debug version of libstdc++ under LSan. If we don't, there will - # be a lot of incomplete stack traces in the reports. - extra_env['LD_LIBRARY_PATH'] = '/usr/lib/x86_64-linux-gnu/debug:' - - extra_env['LSAN_OPTIONS'] = ' '.join(lsan_options) - - if msan: - msan_options = symbolization_options[:] - if lsan: - msan_options.append('detect_leaks=1') - extra_env['MSAN_OPTIONS'] = ' '.join(msan_options) - - if tsan: - tsan_options = symbolization_options[:] - extra_env['TSAN_OPTIONS'] = ' '.join(tsan_options) - - return extra_env - - -def get_sanitizer_symbolize_command(json_path=None, executable_path=None): - """Construct the command to invoke offline symbolization script.""" - script_path = '../tools/valgrind/asan/asan_symbolize.py' - cmd = [sys.executable, script_path] - if json_path is not None: - cmd.append('--test-summary-json-file=%s' % json_path) - if executable_path is not None: - cmd.append('--executable-path=%s' % executable_path) - return cmd - - -def get_json_path(cmd): - """Extract the JSON test summary path from a command line.""" - json_path_flag = '--test-launcher-summary-output=' - for arg in cmd: - if arg.startswith(json_path_flag): - return arg.split(json_path_flag).pop() - return None - - -def symbolize_snippets_in_json(cmd, env): - """Symbolize output snippets inside the JSON test summary.""" - json_path = get_json_path(cmd) - if json_path is None: - return - - try: - symbolize_command = get_sanitizer_symbolize_command( - json_path=json_path, executable_path=cmd[0]) - p = subprocess.Popen(symbolize_command, stderr=subprocess.PIPE, env=env) - (_, stderr) = p.communicate() - except OSError as e: - print 'Exception while symbolizing snippets: %s' % e - - if p.returncode != 0: - print "Error: failed to symbolize snippets in JSON:\n" - print stderr - - -def run_executable(cmd, env): - """Runs an executable with: - - environment variable CR_SOURCE_ROOT set to the root directory. - - environment variable LANGUAGE to en_US.UTF-8. - - environment variable CHROME_DEVEL_SANDBOX set - - Reuses sys.executable automatically. - """ - extra_env = {} - # Many tests assume a English interface... - extra_env['LANG'] = 'en_US.UTF-8' - # Used by base/base_paths_linux.cc as an override. Just make sure the default - # logic is used. - env.pop('CR_SOURCE_ROOT', None) - extra_env.update(get_sandbox_env(env)) - - # Copy logic from tools/build/scripts/slave/runtest.py. - asan = '--asan=1' in cmd - lsan = '--lsan=1' in cmd - msan = '--msan=1' in cmd - tsan = '--tsan=1' in cmd - if sys.platform in ['win32', 'cygwin']: - # Symbolization works in-process on Windows even when sandboxed. - use_symbolization_script = False - else: - # LSan doesn't support sandboxing yet, so we use the in-process symbolizer. - # Note that ASan and MSan can work together with LSan. - use_symbolization_script = (asan or msan) and not lsan - - if asan or lsan or msan or tsan: - extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan)) - - if lsan or tsan: - # LSan and TSan are not sandbox-friendly. - cmd.append('--no-sandbox') - - cmd = trim_cmd(cmd) - - # Ensure paths are correctly separated on windows. - cmd[0] = cmd[0].replace('/', os.path.sep) - cmd = fix_python_path(cmd) - - print('Additional test environment:\n%s\n' - 'Command: %s\n' % ( - '\n'.join(' %s=%s' % - (k, v) for k, v in sorted(extra_env.iteritems())), - ' '.join(cmd))) - env.update(extra_env or {}) - try: - # See above comment regarding offline symbolization. - if use_symbolization_script: - # Need to pipe to the symbolizer script. - p1 = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE, - stderr=sys.stdout) - p2 = subprocess.Popen( - get_sanitizer_symbolize_command(executable_path=cmd[0]), - env=env, stdin=p1.stdout) - p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits. - p1.wait() - p2.wait() - # Also feed the out-of-band JSON output to the symbolizer script. - symbolize_snippets_in_json(cmd, env) - return p1.returncode - else: - return subprocess.call(cmd, env=env) - except OSError: - print >> sys.stderr, 'Failed to start %s' % cmd - raise - - -def main(): - return run_executable(sys.argv[1:], os.environ.copy()) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/testing/variations/PRESUBMIT.py b/engine/src/flutter/testing/variations/PRESUBMIT.py deleted file mode 100644 index 9e565e03d7..0000000000 --- a/engine/src/flutter/testing/variations/PRESUBMIT.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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. - -"""Presubmit script validating field trial configs. - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts -for more details on the presubmit API built into depot_tools. -""" - -def ValidateData(json_data, file_path, message_type): - """Validates the format of a fieldtrial configuration. - - Args: - json_data: Parsed JSON object representing the fieldtrial config. - file_path: String representing the path to the JSON file. - message_type: Type of message from |output_api| to return in the case of - errors/warnings. - - Returns: - A list of |message_type| messages. In the case of all tests passing with no - warnings/errors, this will return []. - """ - if not isinstance(json_data, dict): - return [message_type( - 'Malformed config file %s: Expecting dict' % file_path)] - for (study, groups) in json_data.iteritems(): - if not isinstance(study, unicode): - return [message_type( - 'Malformed config file %s: Expecting keys to be string, got %s' - % (file_path, type(study)))] - if not isinstance(groups, list): - return [message_type( - 'Malformed config file %s: Expecting list for study %s' - % (file_path, study))] - for group in groups: - if not isinstance(group, dict): - return [message_type( - 'Malformed config file %s: Expecting dict for group in ' - 'Study[%s]' % (file_path, study))] - if not 'group_name' in group or not isinstance(group['group_name'], - unicode): - return [message_type( - 'Malformed config file %s: Missing valid group_name for group' - ' in Study[%s]' % (file_path, study))] - if 'params' in group: - params = group['params'] - if not isinstance(params, dict): - return [message_type( - 'Malformed config file %s: Invalid params for Group[%s]' - ' in Study[%s]' % (file_path, group['group_name'], - study))] - for (key, value) in params.iteritems(): - if not isinstance(key, unicode) or not isinstance(value, - unicode): - return [message_type( - 'Malformed config file %s: Invalid params for Group[%s]' - ' in Study[%s]' % (file_path, group['group_name'], - study))] - return [] - -def CommonChecks(input_api, output_api): - affected_files = input_api.AffectedFiles( - include_deletes=False, - file_filter=lambda x: x.LocalPath().endswith('.json')) - for f in affected_files: - contents = input_api.ReadFile(f) - try: - json_data = input_api.json.loads(contents) - result = ValidateData(json_data, f.LocalPath(), - output_api.PresubmitError) - if len(result): - return result - except ValueError: - return [output_api.PresubmitError( - 'Malformed JSON file: %s' % f.LocalPath())] - return [] - -def CheckChangeOnUpload(input_api, output_api): - return CommonChecks(input_api, output_api) - -def CheckChangeOnCommit(input_api, output_api): - return CommonChecks(input_api, output_api) diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json deleted file mode 100644 index cdfc62c587..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_android.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "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 deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_chromeos.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_ios.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_linux.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_mac.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json b/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json deleted file mode 100644 index adb7a40766..0000000000 --- a/engine/src/flutter/testing/variations/fieldtrial_testing_config_win.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "BrowserBlacklist": [ - { - "group_name": "Enabled" - } - ], - "ChildAccountDetection": [ - { - "group_name": "Disabled" - } - ], - "ChromeDashboard": [ - { - "group_name": "Default" - } - ], - "EnableSessionCrashedBubbleUI": [ - { - "group_name": "Enabled" - } - ], - "ExtensionContentVerification": [ - { - "group_name": "Enforce" - } - ], - "ExtensionInstallVerification": [ - { - "group_name": "Enforce" - } - ], - "GoogleNow": [ - { - "group_name": "Enable" - } - ], - "IconNTP": [ - { - "group_name": "Default" - } - ], - "NewProfileManagement": [ - { - "group_name": "Enabled" - } - ], - "PasswordGeneration": [ - { - "group_name": "Disabled" - } - ], - "RefreshTokenDeviceId": [ - { - "group_name": "Enabled" - } - ], - "SRTPromptFieldTrial": [ - { - "group_name": "Default" - } - ], - "SettingsEnforcement": [ - { - "group_name": "enforce_always_with_extensions_and_dse" - } - ] -} diff --git a/engine/src/flutter/testing/xvfb.py b/engine/src/flutter/testing/xvfb.py deleted file mode 100755 index 67ef729fb7..0000000000 --- a/engine/src/flutter/testing/xvfb.py +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Runs tests with Xvfb and Openbox on Linux and normally on other platforms.""" - -import os -import platform -import signal -import subprocess -import sys - -import test_env - - -def kill(proc): - """Kills |proc| and ignores exceptions thrown for non-existent processes.""" - try: - if proc and proc.pid: - os.kill(proc.pid, signal.SIGKILL) - except OSError: - pass - - -def wait_for_xvfb(xdisplaycheck, env): - """Waits for xvfb to be fully initialized by using xdisplaycheck.""" - try: - 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 (code %d) according to %s' % - (e.returncode, xdisplaycheck)) - return False - - return True - - -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' - - -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. - """ - 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 - - try: - 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) - - 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) - - # 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: - kill(xvfb) - kill(openbox) - - -def main(): - if len(sys.argv) < 3: - print >> sys.stderr, ( - 'Usage: xvfb.py [path to build_dir] [command args...]') - return 2 - return run_executable(sys.argv[2:], sys.argv[1], os.environ.copy()) - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/engine/src/flutter/third_party/.dartignore b/engine/src/flutter/third_party/.dartignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/engine/src/flutter/third_party/BUILD.gn b/engine/src/flutter/third_party/BUILD.gn deleted file mode 100644 index 261cb1fece..0000000000 --- a/engine/src/flutter/third_party/BUILD.gn +++ /dev/null @@ -1,43 +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. - -if (is_android) { - import("//build/config/android/config.gni") -} - -declare_args() { - # Uses system libjpeg. If true, overrides use_libjpeg_turbo. - use_system_libjpeg = false - - # Uses libjpeg_turbo as the jpeg implementation. Has no effect if - # use_system_libjpeg is set. - use_libjpeg_turbo = true -} - -config("system_libjpeg_config") { - defines = [ "USE_SYSTEM_LIBJPEG" ] -} - -config("libjpeg_turbo_config") { - defines = [ "USE_LIBJPEG_TURBO" ] -} - -# This is a meta target that forwards to the system's libjpeg, -# third_party/libjpeg, or third_party/libjpeg_turbo depending on the build args -# declared in this file. -group("jpeg") { - if (use_system_libjpeg) { - libs = [ "jpeg" ] - public_configs = [ ":system_libjpeg_config" ] - } else if (use_libjpeg_turbo) { - deps = [ - "//third_party/libjpeg_turbo:libjpeg", - ] - public_configs = [ ":libjpeg_turbo_config" ] - } else { - deps = [ - "//third_party/libjpeg:libjpeg", - ] - } -} diff --git a/engine/src/flutter/third_party/README b/engine/src/flutter/third_party/README deleted file mode 100644 index e95a4e1076..0000000000 --- a/engine/src/flutter/third_party/README +++ /dev/null @@ -1,44 +0,0 @@ -This directory contains the Flutter engine's third-party dependencies, -except for: - - //base, which is required to be at the root of the repository, and - which is pulled in as part of the build system. - - //dart, which is also at the root of the repository, and which is - also pulled in as part of the build system. We plan to eventually - merge the Dart and Flutter repositories so it is not conceptually a - "third_party" package. - - //mojo, which contains our local copy of the Mojo SDK. Mojo is part - of the same overall project as Flutter, and they used to be in the - same repository. - -There are other third_party directories in the fully expanded -repository (as it stands after you've run the build system). The -following are brought in by our dependencies: - - //base/third_party - //dart/runtime/observatory/web/third_party - //dart/runtime/third_party - //dart/third_party - //mojo/public/third_party - //third_party/android_tools/ndk/sources/third_party - //third_party/skia/platform_tools/android/third_party - //third_party/skia/third_party - //third_party/tcmalloc/vendor/src/third_party - -The following are historical and will be moved to //third_party in due -course: - - //tools/android/asan/third_party - //tools/valgrind/asan/third_party - //buildtools/third_party - -To help build some of the third_party tools, we have build files in -the following directories: - - //build/secondary/third_party - //dart/build/secondary/third_party - -The latter are not actual third-party packages, they are tools for -building the third-party packages. diff --git a/engine/src/flutter/third_party/android_testrunner/LICENSE b/engine/src/flutter/third_party/android_testrunner/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/engine/src/flutter/third_party/android_testrunner/OWNERS b/engine/src/flutter/third_party/android_testrunner/OWNERS deleted file mode 100644 index 69f908a316..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -jbudorick@chromium.org -klundberg@chromium.org -perezju@chromium.org diff --git a/engine/src/flutter/third_party/android_testrunner/README.chromium b/engine/src/flutter/third_party/android_testrunner/README.chromium deleted file mode 100644 index 6ca8498f75..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/README.chromium +++ /dev/null @@ -1,36 +0,0 @@ -Name: Android Test runner script -URL: http://source.android.com -Version: 3.1.4 -License: Apache Version 2.0 -License File: NOT_SHIPPED -Security Critical: no - -Description: -This package is the scripts used to run the unit test for Android and from -Android Gingerbread. - -Local Modifications: -1. Added |silent_log| argument to |StartInstrumentation| so that output can be - suppressed. -2. Changed error message handling in |StartInstrumentation| from |shortMsg| to - |longMsg| to provide more information when debugging. -3. Applied the patch file patch.diff to fix a race condition and subproccess - bugs in run_command.py. -4. Fixed a bug where wait_time wasn't properly respected in - _WaitForShellCommandContents. -5. Added option to specify the ADB binary that should be used instead of always - using the ADB in the environment path. - -Here is the detail steps -1. Checkout Android source code - -$ repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread -$ repo sync -$ cd development -$ git reset --hard 76f63551d36b1de63c63f357e5f0646ed8c306bb - -2. Copy the related files from - /development/testrunner/ - -More information can be found in -http://source.android.com/source/downloading.html diff --git a/engine/src/flutter/third_party/android_testrunner/adb_interface.py b/engine/src/flutter/third_party/android_testrunner/adb_interface.py deleted file mode 100644 index 306f18690b..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/adb_interface.py +++ /dev/null @@ -1,522 +0,0 @@ -#!/usr/bin/python2.4 -# -# -# Copyright 2008, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Provides an interface to communicate with the device via the adb command. - -Assumes adb binary is currently on system path. -""" -# Python imports -import os -import string -import time - -# local imports -import am_instrument_parser -import errors -import logger -import run_command - - -class AdbInterface: - """Helper class for communicating with Android device via adb.""" - - DEVICE_TRACE_DIR = "/data/test_results/" - - def __init__(self, adb_path='adb'): - """Constructor. - - Args: - adb_path: Absolute path to the adb binary that should be used. Defaults - to the adb in the environment path. - """ - self._adb_path = adb_path - # argument to pass to adb, to direct command to specific device - self._target_arg = "" - - def SetEmulatorTarget(self): - """Direct all future commands to the only running emulator.""" - self._target_arg = "-e" - - def SetDeviceTarget(self): - """Direct all future commands to the only connected USB device.""" - self._target_arg = "-d" - - def SetTargetSerial(self, serial): - """Direct all future commands to Android target with the given serial.""" - self._target_arg = "-s %s" % serial - - def SendCommand(self, command_string, timeout_time=20, retry_count=3): - """Send a command via adb. - - Args: - command_string: adb command to run - timeout_time: number of seconds to wait for command to respond before - retrying - retry_count: number of times to retry command before raising - WaitForResponseTimedOutError - Returns: - string output of command - - Raises: - WaitForResponseTimedOutError if device does not respond to command within time - """ - adb_cmd = "%s %s %s" % (self._adb_path, self._target_arg, command_string) - logger.SilentLog("about to run %s" % adb_cmd) - return run_command.RunCommand(adb_cmd, timeout_time=timeout_time, - retry_count=retry_count) - - def SendShellCommand(self, cmd, timeout_time=20, retry_count=3): - """Send a adb shell command. - - Args: - cmd: adb shell command to run - timeout_time: number of seconds to wait for command to respond before - retrying - retry_count: number of times to retry command before raising - WaitForResponseTimedOutError - - Returns: - string output of command - - Raises: - WaitForResponseTimedOutError: if device does not respond to command - """ - return self.SendCommand("shell %s" % cmd, timeout_time=timeout_time, - retry_count=retry_count) - - def BugReport(self, path): - """Dumps adb bugreport to the file specified by the path. - - Args: - path: Path of the file where adb bugreport is dumped to. - """ - bug_output = self.SendShellCommand("bugreport", timeout_time=60) - bugreport_file = open(path, "w") - bugreport_file.write(bug_output) - bugreport_file.close() - - def Push(self, src, dest): - """Pushes the file src onto the device at dest. - - Args: - src: file path of host file to push - dest: destination absolute file path on device - """ - self.SendCommand("push %s %s" % (src, dest), timeout_time=60) - - def Pull(self, src, dest): - """Pulls the file src on the device onto dest on the host. - - Args: - src: absolute file path of file on device to pull - dest: destination file path on host - - Returns: - True if success and False otherwise. - """ - # Create the base dir if it doesn't exist already - if not os.path.exists(os.path.dirname(dest)): - os.makedirs(os.path.dirname(dest)) - - if self.DoesFileExist(src): - self.SendCommand("pull %s %s" % (src, dest), timeout_time=60) - return True - else: - logger.Log("ADB Pull Failed: Source file %s does not exist." % src) - return False - - def DoesFileExist(self, src): - """Checks if the given path exists on device target. - - Args: - src: file path to be checked. - - Returns: - True if file exists - """ - - output = self.SendShellCommand("ls %s" % src) - error = "No such file or directory" - - if error in output: - return False - return True - - def EnableAdbRoot(self): - """Enable adb root on device.""" - output = self.SendCommand("root") - if "adbd is already running as root" in output: - return True - elif "restarting adbd as root" in output: - # device will disappear from adb, wait for it to come back - self.SendCommand("wait-for-device") - return True - else: - logger.Log("Unrecognized output from adb root: %s" % output) - return False - - def StartInstrumentationForPackage( - self, package_name, runner_name, timeout_time=60*10, - no_window_animation=False, instrumentation_args={}): - """Run instrumentation test for given package and runner. - - Equivalent to StartInstrumentation, except instrumentation path is - separated into its package and runner components. - """ - instrumentation_path = "%s/%s" % (package_name, runner_name) - return self.StartInstrumentation(instrumentation_path, timeout_time=timeout_time, - no_window_animation=no_window_animation, - instrumentation_args=instrumentation_args) - - def StartInstrumentation( - self, instrumentation_path, timeout_time=60*10, no_window_animation=False, - profile=False, instrumentation_args={}, silent_log=False): - - """Runs an instrumentation class on the target. - - Returns a dictionary containing the key value pairs from the - instrumentations result bundle and a list of TestResults. Also handles the - interpreting of error output from the device and raises the necessary - exceptions. - - Args: - instrumentation_path: string. It should be the fully classified package - name, and instrumentation test runner, separated by "/" - e.g. com.android.globaltimelaunch/.GlobalTimeLaunch - timeout_time: Timeout value for the am command. - no_window_animation: boolean, Whether you want window animations enabled - or disabled - profile: If True, profiling will be turned on for the instrumentation. - instrumentation_args: Dictionary of key value bundle arguments to pass to - instrumentation. - silent_log: If True, the invocation of the instrumentation test runner - will not be logged. - - Returns: - (test_results, inst_finished_bundle) - - test_results: a list of TestResults - inst_finished_bundle (dict): Key/value pairs contained in the bundle that - is passed into ActivityManager.finishInstrumentation(). Included in this - bundle is the return code of the Instrumentation process, any error - codes reported by the activity manager, and any results explicitly added - by the instrumentation code. - - Raises: - WaitForResponseTimedOutError: if timeout occurred while waiting for - response to adb instrument command - DeviceUnresponsiveError: if device system process is not responding - InstrumentationError: if instrumentation failed to run - """ - - command_string = self._BuildInstrumentationCommandPath( - instrumentation_path, no_window_animation=no_window_animation, - profile=profile, raw_mode=True, - instrumentation_args=instrumentation_args) - if silent_log: - logger.SilentLog(command_string) - else: - logger.Log(command_string) - (test_results, inst_finished_bundle) = ( - am_instrument_parser.ParseAmInstrumentOutput( - self.SendShellCommand(command_string, timeout_time=timeout_time, - retry_count=2))) - if "code" not in inst_finished_bundle: - logger.Log('No code available. inst_finished_bundle contains: %s ' - % inst_finished_bundle) - raise errors.InstrumentationError("no test results... device setup " - "correctly?") - - if inst_finished_bundle["code"] == "0": - long_msg_result = "no error message" - if "longMsg" in inst_finished_bundle: - long_msg_result = inst_finished_bundle["longMsg"] - logger.Log("Error! Test run failed: %s" % long_msg_result) - raise errors.InstrumentationError(long_msg_result) - - if "INSTRUMENTATION_ABORTED" in inst_finished_bundle: - logger.Log("INSTRUMENTATION ABORTED!") - raise errors.DeviceUnresponsiveError - - return (test_results, inst_finished_bundle) - - def StartInstrumentationNoResults( - self, package_name, runner_name, no_window_animation=False, - raw_mode=False, instrumentation_args={}): - """Runs instrumentation and dumps output to stdout. - - Equivalent to StartInstrumentation, but will dump instrumentation - 'normal' output to stdout, instead of parsing return results. Command will - never timeout. - """ - adb_command_string = self.PreviewInstrumentationCommand( - package_name, runner_name, no_window_animation=no_window_animation, - raw_mode=raw_mode, instrumentation_args=instrumentation_args) - logger.Log(adb_command_string) - run_command.RunCommand(adb_command_string, return_output=False) - - def PreviewInstrumentationCommand( - self, package_name, runner_name, no_window_animation=False, - raw_mode=False, instrumentation_args={}): - """Returns a string of adb command that will be executed.""" - inst_command_string = self._BuildInstrumentationCommand( - package_name, runner_name, no_window_animation=no_window_animation, - raw_mode=raw_mode, instrumentation_args=instrumentation_args) - command_string = "adb %s shell %s" % (self._target_arg, inst_command_string) - return command_string - - def _BuildInstrumentationCommand( - self, package, runner_name, no_window_animation=False, profile=False, - raw_mode=True, instrumentation_args={}): - instrumentation_path = "%s/%s" % (package, runner_name) - - return self._BuildInstrumentationCommandPath( - instrumentation_path, no_window_animation=no_window_animation, - profile=profile, raw_mode=raw_mode, - instrumentation_args=instrumentation_args) - - def _BuildInstrumentationCommandPath( - self, instrumentation_path, no_window_animation=False, profile=False, - raw_mode=True, instrumentation_args={}): - command_string = "am instrument" - if no_window_animation: - command_string += " --no_window_animation" - if profile: - self._CreateTraceDir() - command_string += ( - " -p %s/%s.dmtrace" % - (self.DEVICE_TRACE_DIR, instrumentation_path.split(".")[-1])) - - for key, value in instrumentation_args.items(): - command_string += " -e %s '%s'" % (key, value) - if raw_mode: - command_string += " -r" - command_string += " -w %s" % instrumentation_path - return command_string - - def _CreateTraceDir(self): - ls_response = self.SendShellCommand("ls /data/trace") - if ls_response.strip("#").strip(string.whitespace) != "": - self.SendShellCommand("create /data/trace", "mkdir /data/trace") - self.SendShellCommand("make /data/trace world writeable", - "chmod 777 /data/trace") - - def WaitForDevicePm(self, wait_time=120): - """Waits for targeted device's package manager to be up. - - Args: - wait_time: time in seconds to wait - - Raises: - WaitForResponseTimedOutError if wait_time elapses and pm still does not - respond. - """ - logger.Log("Waiting for device package manager...") - self.SendCommand("wait-for-device", timeout_time=wait_time, retry_count=0) - # Now the device is there, but may not be running. - # Query the package manager with a basic command - try: - self._WaitForShellCommandContents("pm path android", "package:", - wait_time) - except errors.WaitForResponseTimedOutError: - raise errors.WaitForResponseTimedOutError( - "Package manager did not respond after %s seconds" % wait_time) - - def WaitForInstrumentation(self, package_name, runner_name, wait_time=120): - """Waits for given instrumentation to be present on device - - Args: - wait_time: time in seconds to wait - - Raises: - WaitForResponseTimedOutError if wait_time elapses and instrumentation - still not present. - """ - instrumentation_path = "%s/%s" % (package_name, runner_name) - logger.Log("Waiting for instrumentation to be present") - # Query the package manager - try: - command = "pm list instrumentation | grep %s" % instrumentation_path - self._WaitForShellCommandContents(command, "instrumentation:", wait_time, - raise_abort=False) - except errors.WaitForResponseTimedOutError : - logger.Log( - "Could not find instrumentation %s on device. Does the " - "instrumentation in test's AndroidManifest.xml match definition" - "in test_defs.xml?" % instrumentation_path) - raise - - def WaitForProcess(self, name, wait_time=120): - """Wait until a process is running on the device. - - Args: - name: the process name as it appears in `ps` - wait_time: time in seconds to wait - - Raises: - WaitForResponseTimedOutError if wait_time elapses and the process is - still not running - """ - logger.Log("Waiting for process %s" % name) - self.SendCommand("wait-for-device") - self._WaitForShellCommandContents("ps", name, wait_time) - - def WaitForProcessEnd(self, name, wait_time=120): - """Wait until a process is no longer running on the device. - - Args: - name: the process name as it appears in `ps` - wait_time: time in seconds to wait - - Raises: - WaitForResponseTimedOutError if wait_time elapses and the process is - still running - """ - logger.Log("Waiting for process %s to end" % name) - self._WaitForShellCommandContents("ps", name, wait_time, invert=True) - - def _WaitForShellCommandContents(self, command, expected, wait_time, - raise_abort=True, invert=False): - """Wait until the response to a command contains a given output. - - Assumes that a only successful execution of "adb shell " contains - the substring expected. Assumes that a device is present. - - Args: - command: adb shell command to execute - expected: the string that should appear to consider the - command successful. - wait_time: time in seconds to wait - raise_abort: if False, retry when executing the command raises an - AbortError, rather than failing. - invert: if True, wait until the command output no longer contains the - expected contents. - - Raises: - WaitForResponseTimedOutError: If wait_time elapses and the command has not - returned an output containing expected yet. - """ - # Query the device with the command - success = False - attempts = 0 - wait_period = 5 - while not success and (attempts*wait_period) < wait_time: - # assume the command will always contain expected in the success case - try: - output = self.SendShellCommand(command, retry_count=1, - timeout_time=wait_time) - if ((not invert and expected in output) - or (invert and expected not in output)): - success = True - except errors.AbortError, e: - if raise_abort: - raise - # ignore otherwise - - if not success: - time.sleep(wait_period) - attempts += 1 - - if not success: - raise errors.WaitForResponseTimedOutError() - - def WaitForBootComplete(self, wait_time=120): - """Waits for targeted device's bootcomplete flag to be set. - - Args: - wait_time: time in seconds to wait - - Raises: - WaitForResponseTimedOutError if wait_time elapses and pm still does not - respond. - """ - logger.Log("Waiting for boot complete...") - self.SendCommand("wait-for-device") - # Now the device is there, but may not be running. - # Query the package manager with a basic command - boot_complete = False - attempts = 0 - wait_period = 5 - while not boot_complete and (attempts*wait_period) < wait_time: - output = self.SendShellCommand("getprop dev.bootcomplete", retry_count=1) - output = output.strip() - if output == "1": - boot_complete = True - else: - time.sleep(wait_period) - attempts += 1 - if not boot_complete: - raise errors.WaitForResponseTimedOutError( - "dev.bootcomplete flag was not set after %s seconds" % wait_time) - - def Sync(self, retry_count=3, runtime_restart=False): - """Perform a adb sync. - - Blocks until device package manager is responding. - - Args: - retry_count: number of times to retry sync before failing - runtime_restart: stop runtime during sync and restart afterwards, useful - for syncing system libraries (core, framework etc) - - Raises: - WaitForResponseTimedOutError if package manager does not respond - AbortError if unrecoverable error occurred - """ - output = "" - error = None - if runtime_restart: - self.SendShellCommand("setprop ro.monkey 1", retry_count=retry_count) - # manual rest bootcomplete flag - self.SendShellCommand("setprop dev.bootcomplete 0", - retry_count=retry_count) - self.SendShellCommand("stop", retry_count=retry_count) - - try: - output = self.SendCommand("sync", retry_count=retry_count) - except errors.AbortError, e: - error = e - output = e.msg - if "Read-only file system" in output: - logger.SilentLog(output) - logger.Log("Remounting read-only filesystem") - self.SendCommand("remount") - output = self.SendCommand("sync", retry_count=retry_count) - elif "No space left on device" in output: - logger.SilentLog(output) - logger.Log("Restarting device runtime") - self.SendShellCommand("stop", retry_count=retry_count) - output = self.SendCommand("sync", retry_count=retry_count) - self.SendShellCommand("start", retry_count=retry_count) - elif error is not None: - # exception occurred that cannot be recovered from - raise error - logger.SilentLog(output) - if runtime_restart: - # start runtime and wait till boot complete flag is set - self.SendShellCommand("start", retry_count=retry_count) - self.WaitForBootComplete() - # press the MENU key, this will disable key guard if runtime is started - # with ro.monkey set to 1 - self.SendShellCommand("input keyevent 82", retry_count=retry_count) - else: - self.WaitForDevicePm() - return output - - def GetSerialNumber(self): - """Returns the serial number of the targeted device.""" - return self.SendCommand("get-serialno").strip() diff --git a/engine/src/flutter/third_party/android_testrunner/am_instrument_parser.py b/engine/src/flutter/third_party/android_testrunner/am_instrument_parser.py deleted file mode 100644 index 4554c4d565..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/am_instrument_parser.py +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/python2.4 -# -# -# Copyright 2008, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Module that assists in parsing the output of "am instrument" commands run on -the device.""" - -import re -import string - - -def ParseAmInstrumentOutput(result): - """Given the raw output of an "am instrument" command that targets and - InstrumentationTestRunner, return structured data. - - Args: - result (string): Raw output of "am instrument" - - Return - (test_results, inst_finished_bundle) - - test_results (list of am_output_parser.TestResult) - inst_finished_bundle (dict): Key/value pairs contained in the bundle that is - passed into ActivityManager.finishInstrumentation(). Included in this bundle is the return - code of the Instrumentation process, any error codes reported by the - activity manager, and any results explicity added by the instrumentation - code. - """ - - re_status_code = re.compile(r'INSTRUMENTATION_STATUS_CODE: (?P-?\d)$') - test_results = [] - inst_finished_bundle = {} - - result_block_string = "" - for line in result.splitlines(): - result_block_string += line + '\n' - - if "INSTRUMENTATION_STATUS_CODE:" in line: - test_result = TestResult(result_block_string) - if test_result.GetStatusCode() == 1: # The test started - pass - elif test_result.GetStatusCode() in [0, -1, -2]: - test_results.append(test_result) - else: - pass - result_block_string = "" - if "INSTRUMENTATION_CODE:" in line: - inst_finished_bundle = _ParseInstrumentationFinishedBundle(result_block_string) - result_block_string = "" - - return (test_results, inst_finished_bundle) - - -def _ParseInstrumentationFinishedBundle(result): - """Given the raw output of "am instrument" returns a dictionary of the - key/value pairs from the bundle passed into - ActivityManager.finishInstrumentation(). - - Args: - result (string): Raw output of "am instrument" - - Return: - inst_finished_bundle (dict): Key/value pairs contained in the bundle that is - passed into ActivityManager.finishInstrumentation(). Included in this bundle is the return - code of the Instrumentation process, any error codes reported by the - activity manager, and any results explicity added by the instrumentation - code. - """ - - re_result = re.compile(r'INSTRUMENTATION_RESULT: ([^=]+)=(.*)$') - re_code = re.compile(r'INSTRUMENTATION_CODE: (\-?\d)$') - result_dict = {} - key = '' - val = '' - last_tag = '' - - for line in result.split('\n'): - line = line.strip(string.whitespace) - if re_result.match(line): - last_tag = 'INSTRUMENTATION_RESULT' - key = re_result.search(line).group(1).strip(string.whitespace) - if key.startswith('performance.'): - key = key[len('performance.'):] - val = re_result.search(line).group(2).strip(string.whitespace) - try: - result_dict[key] = float(val) - except ValueError: - result_dict[key] = val - except TypeError: - result_dict[key] = val - elif re_code.match(line): - last_tag = 'INSTRUMENTATION_CODE' - key = 'code' - val = re_code.search(line).group(1).strip(string.whitespace) - result_dict[key] = val - elif 'INSTRUMENTATION_ABORTED:' in line: - last_tag = 'INSTRUMENTATION_ABORTED' - key = 'INSTRUMENTATION_ABORTED' - val = '' - result_dict[key] = val - elif last_tag == 'INSTRUMENTATION_RESULT': - result_dict[key] += '\n' + line - - if not result_dict.has_key('code'): - result_dict['code'] = '0' - result_dict['shortMsg'] = "No result returned from instrumentation" - - return result_dict - - -class TestResult(object): - """A class that contains information about a single test result.""" - - def __init__(self, result_block_string): - """ - Args: - result_block_string (string): Is a single "block" of output. A single - "block" would be either a "test started" status report, or a "test - finished" status report. - """ - - self._test_name = None - self._status_code = None - self._failure_reason = None - self._fields_map = {} - - re_status_code = re.search(r'INSTRUMENTATION_STATUS_CODE: ' - '(?P1|0|-1|-2)', result_block_string) - re_fields = re.compile(r'INSTRUMENTATION_STATUS: ' - '(?P[\w.]+)=(?P.*?)(?=\nINSTRUMENTATION_STATUS)', re.DOTALL) - - for field in re_fields.finditer(result_block_string): - key, value = (field.group('key').strip(), field.group('value').strip()) - if key.startswith('performance.'): - key = key[len('performance.'):] - self._fields_map[key] = value - self._fields_map.setdefault('class') - self._fields_map.setdefault('test') - - self._test_name = '%s:%s' % (self._fields_map['class'], - self._fields_map['test']) - self._status_code = int(re_status_code.group('status_code')) - if 'stack' in self._fields_map: - self._failure_reason = self._fields_map['stack'] - - def GetTestName(self): - return self._test_name - - def GetStatusCode(self): - return self._status_code - - def GetFailureReason(self): - return self._failure_reason - - def GetResultFields(self): - return self._fields_map diff --git a/engine/src/flutter/third_party/android_testrunner/errors.py b/engine/src/flutter/third_party/android_testrunner/errors.py deleted file mode 100644 index e163dd45b3..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/errors.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/python2.4 -# -# -# Copyright 2008, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Defines common exception classes for this package.""" - - -class MsgException(Exception): - """Generic exception with an optional string msg.""" - def __init__(self, msg=""): - self.msg = msg - - -class WaitForResponseTimedOutError(Exception): - """We sent a command and had to wait too long for response.""" - - -class DeviceUnresponsiveError(Exception): - """Device is unresponsive to command.""" - - -class InstrumentationError(Exception): - """Failed to run instrumentation.""" - - -class AbortError(MsgException): - """Generic exception that indicates a fatal error has occurred and program - execution should be aborted.""" - - -class ParseError(MsgException): - """Raised when xml data to parse has unrecognized format.""" - diff --git a/engine/src/flutter/third_party/android_testrunner/logger.py b/engine/src/flutter/third_party/android_testrunner/logger.py deleted file mode 100644 index 61463a198c..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/logger.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/python2.4 -# -# -# Copyright 2007, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Simple logging utility. Dumps log messages to stdout, and optionally, to a -log file. - -Init(path) must be called to enable logging to a file -""" - -import datetime - -_LOG_FILE = None -_verbose = False -_log_time = True - -def Init(log_file_path): - """Set the path to the log file""" - global _LOG_FILE - _LOG_FILE = log_file_path - print "Using log file: %s" % _LOG_FILE - -def GetLogFilePath(): - """Returns the path and name of the Log file""" - global _LOG_FILE - return _LOG_FILE - -def Log(new_str): - """Appends new_str to the end of _LOG_FILE and prints it to stdout. - - Args: - # new_str is a string. - new_str: 'some message to log' - """ - msg = _PrependTimeStamp(new_str) - print msg - _WriteLog(msg) - -def _WriteLog(msg): - global _LOG_FILE - if _LOG_FILE is not None: - file_handle = file(_LOG_FILE, 'a') - file_handle.write('\n' + str(msg)) - file_handle.close() - -def _PrependTimeStamp(log_string): - """Returns the log_string prepended with current timestamp """ - global _log_time - if _log_time: - return "# %s: %s" % (datetime.datetime.now().strftime("%m/%d/%y %H:%M:%S"), - log_string) - else: - # timestamp logging disabled - return log_string - -def SilentLog(new_str): - """Silently log new_str. Unless verbose mode is enabled, will log new_str - only to the log file - Args: - # new_str is a string. - new_str: 'some message to log' - """ - global _verbose - msg = _PrependTimeStamp(new_str) - if _verbose: - print msg - _WriteLog(msg) - -def SetVerbose(new_verbose=True): - """ Enable or disable verbose logging""" - global _verbose - _verbose = new_verbose - -def SetTimestampLogging(new_timestamp=True): - """ Enable or disable outputting a timestamp with each log entry""" - global _log_time - _log_time = new_timestamp - -def main(): - pass - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/third_party/android_testrunner/patch.diff b/engine/src/flutter/third_party/android_testrunner/patch.diff deleted file mode 100644 index 9b067cd50b..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/patch.diff +++ /dev/null @@ -1,104 +0,0 @@ -diff --git a/third_party/android_testrunner/run_command.py b/third_party/android_testrunner/run_command.py -index d398daa..6b84156 100644 ---- a/third_party/android_testrunner/run_command.py -+++ b/third_party/android_testrunner/run_command.py -@@ -19,6 +19,7 @@ - import os - import signal - import subprocess -+import tempfile - import threading - import time - -@@ -80,31 +81,36 @@ def RunOnce(cmd, timeout_time=None, return_output=True, stdin_input=None): - """ - start_time = time.time() - so = [] -- pid = [] - global _abort_on_error, error_occurred - error_occurred = False - -+ if return_output: -+ output_dest = tempfile.TemporaryFile(bufsize=0) -+ else: -+ # None means direct to stdout -+ output_dest = None -+ if stdin_input: -+ stdin_dest = subprocess.PIPE -+ else: -+ stdin_dest = None -+ pipe = subprocess.Popen( -+ cmd, -+ executable='/bin/bash', -+ stdin=stdin_dest, -+ stdout=output_dest, -+ stderr=subprocess.STDOUT, -+ shell=True, close_fds=True, -+ preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL)) -+ - def Run(): - global error_occurred -- if return_output: -- output_dest = subprocess.PIPE -- else: -- # None means direct to stdout -- output_dest = None -- if stdin_input: -- stdin_dest = subprocess.PIPE -- else: -- stdin_dest = None -- pipe = subprocess.Popen( -- cmd, -- executable='/bin/bash', -- stdin=stdin_dest, -- stdout=output_dest, -- stderr=subprocess.STDOUT, -- shell=True) -- pid.append(pipe.pid) - try: -- output = pipe.communicate(input=stdin_input)[0] -+ pipe.communicate(input=stdin_input) -+ output = None -+ if return_output: -+ output_dest.seek(0) -+ output = output_dest.read() -+ output_dest.close() - if output is not None and len(output) > 0: - so.append(output) - except OSError, e: -@@ -119,27 +125,17 @@ def RunOnce(cmd, timeout_time=None, return_output=True, stdin_input=None): - - t = threading.Thread(target=Run) - t.start() -- -- break_loop = False -- while not break_loop: -- if not t.isAlive(): -- break_loop = True -- -- # Check the timeout -- if (not break_loop and timeout_time is not None -- and time.time() > start_time + timeout_time): -- try: -- os.kill(pid[0], signal.SIGKILL) -- except OSError: -- # process already dead. No action required. -- pass -- -+ t.join(timeout_time) -+ if t.isAlive(): -+ try: -+ pipe.kill() -+ except OSError: -+ # Can't kill a dead process. -+ pass -+ finally: - logger.SilentLog("about to raise a timeout for: %s" % cmd) - raise errors.WaitForResponseTimedOutError -- if not break_loop: -- time.sleep(0.1) - -- t.join() - output = "".join(so) - if _abort_on_error and error_occurred: - raise errors.AbortError(msg=output) diff --git a/engine/src/flutter/third_party/android_testrunner/run_command.py b/engine/src/flutter/third_party/android_testrunner/run_command.py deleted file mode 100644 index 6b84156fe0..0000000000 --- a/engine/src/flutter/third_party/android_testrunner/run_command.py +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/python2.4 -# -# -# Copyright 2007, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# System imports -import os -import signal -import subprocess -import tempfile -import threading -import time - -# local imports -import errors -import logger - -_abort_on_error = False - -def SetAbortOnError(abort=True): - """Sets behavior of RunCommand to throw AbortError if command process returns - a negative error code""" - global _abort_on_error - _abort_on_error = abort - -def RunCommand(cmd, timeout_time=None, retry_count=3, return_output=True, - stdin_input=None): - """Spawn and retry a subprocess to run the given shell command. - - Args: - cmd: shell command to run - timeout_time: time in seconds to wait for command to run before aborting. - retry_count: number of times to retry command - return_output: if True return output of command as string. Otherwise, - direct output of command to stdout. - stdin_input: data to feed to stdin - Returns: - output of command - """ - result = None - while True: - try: - result = RunOnce(cmd, timeout_time=timeout_time, - return_output=return_output, stdin_input=stdin_input) - except errors.WaitForResponseTimedOutError: - if retry_count == 0: - raise - retry_count -= 1 - logger.Log("No response for %s, retrying" % cmd) - else: - # Success - return result - -def RunOnce(cmd, timeout_time=None, return_output=True, stdin_input=None): - """Spawns a subprocess to run the given shell command. - - Args: - cmd: shell command to run - timeout_time: time in seconds to wait for command to run before aborting. - return_output: if True return output of command as string. Otherwise, - direct output of command to stdout. - stdin_input: data to feed to stdin - Returns: - output of command - Raises: - errors.WaitForResponseTimedOutError if command did not complete within - timeout_time seconds. - errors.AbortError is command returned error code and SetAbortOnError is on. - """ - start_time = time.time() - so = [] - global _abort_on_error, error_occurred - error_occurred = False - - if return_output: - output_dest = tempfile.TemporaryFile(bufsize=0) - else: - # None means direct to stdout - output_dest = None - if stdin_input: - stdin_dest = subprocess.PIPE - else: - stdin_dest = None - pipe = subprocess.Popen( - cmd, - executable='/bin/bash', - stdin=stdin_dest, - stdout=output_dest, - stderr=subprocess.STDOUT, - shell=True, close_fds=True, - preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL)) - - def Run(): - global error_occurred - try: - pipe.communicate(input=stdin_input) - output = None - if return_output: - output_dest.seek(0) - output = output_dest.read() - output_dest.close() - if output is not None and len(output) > 0: - so.append(output) - except OSError, e: - logger.SilentLog("failed to retrieve stdout from: %s" % cmd) - logger.Log(e) - so.append("ERROR") - error_occurred = True - if pipe.returncode: - logger.SilentLog("Error: %s returned %d error code" %(cmd, - pipe.returncode)) - error_occurred = True - - t = threading.Thread(target=Run) - t.start() - t.join(timeout_time) - if t.isAlive(): - try: - pipe.kill() - except OSError: - # Can't kill a dead process. - pass - finally: - logger.SilentLog("about to raise a timeout for: %s" % cmd) - raise errors.WaitForResponseTimedOutError - - output = "".join(so) - if _abort_on_error and error_occurred: - raise errors.AbortError(msg=output) - - return "".join(so) - - -def RunHostCommand(binary, valgrind=False): - """Run a command on the host (opt using valgrind). - - Runs the host binary and returns the exit code. - If successfull, the output (stdout and stderr) are discarded, - but printed in case of error. - The command can be run under valgrind in which case all the - output are always discarded. - - Args: - binary: full path of the file to be run. - valgrind: If True the command will be run under valgrind. - - Returns: - The command exit code (int) - """ - if not valgrind: - subproc = subprocess.Popen(binary, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - subproc.wait() - if subproc.returncode != 0: # In case of error print the output - print subproc.communicate()[0] - return subproc.returncode - else: - # Need the full path to valgrind to avoid other versions on the system. - subproc = subprocess.Popen(["/usr/bin/valgrind", "--tool=memcheck", - "--leak-check=yes", "-q", binary], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - # Cannot rely on the retcode of valgrind. Instead look for an empty output. - valgrind_out = subproc.communicate()[0].strip() - if valgrind_out: - print valgrind_out - return 1 - else: - return 0 - - -def HasValgrind(): - """Check that /usr/bin/valgrind exists. - - We look for the fullpath to avoid picking up 'alternative' valgrind - on the system. - - Returns: - True if a system valgrind was found. - """ - return os.path.exists("/usr/bin/valgrind") diff --git a/engine/src/flutter/third_party/apple_apsl/CFBase.h b/engine/src/flutter/third_party/apple_apsl/CFBase.h deleted file mode 100644 index d74360afcd..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/CFBase.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2011 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* CFBase.c - Copyright (c) 1998-2011, Apple Inc. All rights reserved. - Responsibility: Christopher Kane -*/ - -#ifndef THIRD_PARTY_APPLE_APSL_CFBASE_H_ -#define THIRD_PARTY_APPLE_APSL_CFBASE_H_ - -#include "CFRuntime.h" - -struct ChromeCFAllocatorLeopards { - ChromeCFRuntimeBase _base; -#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED - size_t (*size)(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */ - void *(*malloc)(struct _malloc_zone_t *zone, size_t size); - void *(*calloc)(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */ - void *(*valloc)(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */ - void (*free)(struct _malloc_zone_t *zone, void *ptr); - void *(*realloc)(struct _malloc_zone_t *zone, void *ptr, size_t size); - void (*destroy)(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */ - const char *zone_name; - unsigned (*batch_malloc)(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */ - void (*batch_free)(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */ - struct malloc_introspection_t *introspect; - void *reserved5; -#endif - CFAllocatorRef _allocator; - CFAllocatorContext _context; -}; - -struct ChromeCFAllocatorLions { - ChromeCFRuntimeBase _base; -#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED - size_t (*size)(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */ - void *(*malloc)(struct _malloc_zone_t *zone, size_t size); - void *(*calloc)(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */ - void *(*valloc)(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */ - void (*free)(struct _malloc_zone_t *zone, void *ptr); - void *(*realloc)(struct _malloc_zone_t *zone, void *ptr, size_t size); - void (*destroy)(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */ - const char *zone_name; - - /* Optional batch callbacks; these may be NULL */ - unsigned (*batch_malloc)(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */ - void (*batch_free)(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */ - - struct malloc_introspection_t *introspect; - unsigned version; - - /* aligned memory allocation. The callback may be NULL. */ - void *(*memalign)(struct _malloc_zone_t *zone, size_t alignment, size_t size); - - /* free a pointer known to be in zone and known to have the given size. The callback may be NULL. */ - void (*free_definite_size)(struct _malloc_zone_t *zone, void *ptr, size_t size); -#endif - CFAllocatorRef _allocator; - CFAllocatorContext _context; -}; - -#endif // THIRD_PARTY_APPLE_APSL_CFBASE_H_ diff --git a/engine/src/flutter/third_party/apple_apsl/CFRuntime.h b/engine/src/flutter/third_party/apple_apsl/CFRuntime.h deleted file mode 100644 index 69ae991c29..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/CFRuntime.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2009 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* CFRuntime.h - Copyright (c) 1999-2009, Apple Inc. All rights reserved. -*/ - -#ifndef THIRD_PARTY_APPLE_APSL_CFRUNTIME_H_ -#define THIRD_PARTY_APPLE_APSL_CFRUNTIME_H_ - -/* All CF "instances" start with this structure. Never refer to - * these fields directly -- they are for CF's use and may be added - * to or removed or change format without warning. Binary - * compatibility for uses of this struct is not guaranteed from - * release to release. - */ -typedef struct __ChromeCFRuntimeBase { - uintptr_t _cfisa; - uint8_t _cfinfo[4]; -#if __LP64__ - uint32_t _rc; -#endif -} ChromeCFRuntimeBase; - -#endif // THIRD_PARTY_APPLE_APSL_CFRUNTIME_H_ diff --git a/engine/src/flutter/third_party/apple_apsl/LICENSE b/engine/src/flutter/third_party/apple_apsl/LICENSE deleted file mode 100644 index 9fb3c2cee3..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/LICENSE +++ /dev/null @@ -1,327 +0,0 @@ -APPLE PUBLIC SOURCE LICENSE Version 2.0 - August 6, 2003 - -Please read this License carefully before downloading this software. By -downloading or using this software, you are agreeing to be bound by the terms of -this License. If you do not or cannot agree to the terms of this License, -please do not download or use the software. - -Apple Note: In January 2007, Apple changed its corporate name from "Apple -Computer, Inc." to "Apple Inc." This change has been reflected below and -copyright years updated, but no other changes have been made to the APSL 2.0. - -1. General; Definitions. This License applies to any program or other work -which Apple Inc. ("Apple") makes publicly available and which contains a notice -placed by Apple identifying such program or work as "Original Code" and stating -that it is subject to the terms of this Apple Public Source License version 2.0 -("License"). As used in this License: - -1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the -grantor of rights, (i) claims of patents that are now or hereafter acquired, -owned by or assigned to Apple and (ii) that cover subject matter contained in -the Original Code, but only to the extent necessary to use, reproduce and/or -distribute the Original Code without infringement; and (b) in the case where You -are the grantor of rights, (i) claims of patents that are now or hereafter -acquired, owned by or assigned to You and (ii) that cover subject matter in Your -Modifications, taken alone or in combination with Original Code. - -1.2 "Contributor" means any person or entity that creates or contributes to the -creation of Modifications. - -1.3 "Covered Code" means the Original Code, Modifications, the combination of -Original Code and any Modifications, and/or any respective portions thereof. - -1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make -Covered Code available, directly or indirectly, to anyone other than You; and/or -(b) to use Covered Code, alone or as part of a Larger Work, in any way to -provide a service, including but not limited to delivery of content, through -electronic communication with a client other than You. - -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. - -1.6 "Modifications" mean any addition to, deletion from, and/or change to, the -substance and/or structure of the Original Code, any previous Modifications, the -combination of Original Code and any previous Modifications, and/or any -respective portions thereof. When code is released as a series of files, a -Modification is: (a) any addition to or deletion from the contents of a file -containing Covered Code; and/or (b) any new file or other representation of -computer program statements that contains any part of Covered Code. - -1.7 "Original Code" means (a) the Source Code of a program or other work as -originally made available by Apple under this License, including the Source Code -of any updates or upgrades to such programs or works made available by Apple -under this License, and that has been expressly identified by Apple as such in -the header file(s) of such work; and (b) the object code compiled from such -Source Code and originally made available by Apple under this License - -1.8 "Source Code" means the human readable form of a program or other work that -is suitable for making modifications to it, including all modules it contains, -plus any associated interface definition files, scripts used to control -compilation and installation of an executable (object code). - -1.9 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction or -management of such entity, whether by contract or otherwise, or (b) ownership of -fifty percent (50%) or more of the outstanding shares or beneficial ownership of -such entity. - -2. Permitted Uses; Conditions & Restrictions. Subject to the terms and -conditions of this License, Apple hereby grants You, effective on the date You -accept this License and download the Original Code, a world-wide, royalty-free, -non-exclusive license, to the extent of Apple's Applicable Patent Rights and -copyrights covering the Original Code, to do the following: - -2.1 Unmodified Code. You may use, reproduce, display, perform, internally -distribute within Your organization, and Externally Deploy verbatim, unmodified -copies of the Original Code, for commercial or non-commercial purposes, provided -that in each instance: - -(a) You must retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Apple as they appear in the -Original Code, and keep intact all notices in the Original Code that refer to -this License; and - -(b) You must include a copy of this License with every copy of Source Code of -Covered Code and documentation You distribute or Externally Deploy, and You may -not offer or impose any terms on such Source Code that alter or restrict this -License or the recipients' rights hereunder, except as permitted under Section -6. - -2.2 Modified Code. You may modify Covered Code and use, reproduce, display, -perform, internally distribute within Your organization, and Externally Deploy -Your Modifications and Covered Code, for commercial or non-commercial purposes, -provided that in each instance You also meet all of these conditions: - -(a) You must satisfy all the conditions of Section 2.1 with respect to the -Source Code of the Covered Code; - -(b) You must duplicate, to the extent it does not already exist, the notice in -Exhibit A in each file of the Source Code of all Your Modifications, and cause -the modified files to carry prominent notices stating that You changed the files -and the date of any change; and - -(c) If You Externally Deploy Your Modifications, You must make Source Code of -all Your Externally Deployed Modifications either available to those to whom You -have Externally Deployed Your Modifications, or publicly available. Source Code -of Your Externally Deployed Modifications must be released under the terms set -forth in this License, including the license grants set forth in Section 3 -below, for as long as you Externally Deploy the Covered Code or twelve (12) -months from the date of initial External Deployment, whichever is longer. You -should preferably distribute the Source Code of Your Externally Deployed -Modifications electronically (e.g. download from a web site). - -2.3 Distribution of Executable Versions. In addition, if You Externally Deploy -Covered Code (Original Code and/or Modifications) in object code, executable -form only, You must include a prominent notice, in the code itself as well as in -related documentation, stating that Source Code of the Covered Code is available -under the terms of this License with information on how and where to obtain such -Source Code. - -2.4 Third Party Rights. You expressly acknowledge and agree that although -Apple and each Contributor grants the licenses to their respective portions of -the Covered Code set forth herein, no assurances are provided by Apple or any -Contributor that the Covered Code does not infringe the patent or other -intellectual property rights of any other entity. Apple and each Contributor -disclaim any liability to You for claims brought by any other entity based on -infringement of intellectual property rights or otherwise. As a condition to -exercising the rights and licenses granted hereunder, You hereby assume sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow You to -distribute the Covered Code, it is Your responsibility to acquire that license -before distributing the Covered Code. - -3. Your Grants. In consideration of, and as a condition to, the licenses -granted to You under this License, You hereby grant to any person or entity -receiving or distributing Covered Code under this License a non-exclusive, -royalty-free, perpetual, irrevocable license, under Your Applicable Patent -Rights and other intellectual property rights (other than patent) owned or -controlled by You, to use, reproduce, display, perform, modify, sublicense, -distribute and Externally Deploy Your Modifications of the same scope and extent -as Apple's licenses under Sections 2.1 and 2.2 above. - -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the -requirements of this License are fulfilled for the Covered Code or any portion -thereof. - -5. Limitations on Patent License. Except as expressly stated in Section 2, no -other patent rights, express or implied, are granted by Apple herein. -Modifications and/or Larger Works may require additional patent licenses from -Apple which Apple may grant in its sole discretion. - -6. Additional Terms. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations and/or other rights -consistent with the scope of the license granted herein ("Additional Terms") to -one or more recipients of Covered Code. However, You may do so only on Your own -behalf and as Your sole responsibility, and not on behalf of Apple or any -Contributor. You must obtain the recipient's agreement that any such Additional -Terms are offered by You alone, and You hereby agree to indemnify, defend and -hold Apple and every Contributor harmless for any liability incurred by or -claims asserted against Apple or such Contributor by reason of any such -Additional Terms. - -7. Versions of the License. Apple may publish revised and/or new versions of -this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular -version of this License, You may continue to use it under the terms of that -version. You may also choose to use such Original Code under the terms of any -subsequent version of this License published by Apple. No one other than Apple -has the right to modify the terms applicable to Covered Code created under this -License. - -8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Covered Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Covered Code, or any portion thereof, is at Your sole and entire risk. THE -COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF -ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" -FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM -ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY -QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, -AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT -WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE -FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE -OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT -DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION -OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR -SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended -for use in the operation of nuclear facilities, aircraft navigation, -communication systems, or air traffic control machines in which case the failure -of the Covered Code could lead to death, personal injury, or severe physical or -environmental damage. - -9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT -SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT -OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE -OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A -THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR -OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY -REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF -INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In -no event shall Apple's total liability to You for all damages (other than as may -be required by applicable law) under this License exceed the amount of fifty -dollars ($50.00). - -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming -Server" or any other trademarks, service marks, logos or trade names belonging -to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or -trade name belonging to any Contributor. You agree not to use any Apple Marks -in or as part of the name of products derived from the Original Code or to -endorse or promote products derived from the Original Code other than as -expressly permitted by and in strict compliance at all times with Apple's third -party trademark usage guidelines which are posted at -http://www.apple.com/legal/guidelinesfor3rdparties.html. - -11. Ownership. Subject to the licenses granted under this License, each -Contributor retains all rights, title and interest in and to any Modifications -made by such Contributor. Apple retains all rights, title and interest in and -to the Original Code and any Modifications made by or on behalf of Apple ("Apple -Modifications"), and such Apple Modifications will not be automatically subject -to this License. Apple may, at its sole discretion, choose to license such -Apple Modifications under this License, or on different terms from those -contained in this License or may choose not to license them at all. - -12. Termination. - -12.1 Termination. This License and the rights granted hereunder will -terminate: - -(a) automatically without notice from Apple if You fail to comply with any -term(s) of this License and fail to cure such breach within 30 days of becoming -aware of such breach; (b) immediately in the event of the circumstances -described in Section 13.5(b); or (c) automatically without notice from Apple if -You, at any time during the term of this License, commence an action for patent -infringement against Apple; provided that Apple did not first commence an action -for patent infringement against You in that instance. - -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution of -the Covered Code. All sublicenses to the Covered Code which have been properly -granted prior to termination shall survive any termination of this License. -Provisions which, by their nature, should remain in effect beyond the -termination of this License shall survive, including but not limited to Sections -3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for -compensation, indemnity or damages of any sort solely as a result of terminating -this License in accordance with its terms, and termination of this License will -be without prejudice to any other right or remedy of any party. - -13. Miscellaneous. - -13.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered Code -include only those rights customarily provided to the public as defined in this -License. This customary commercial license in technical data and software is -provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End Users -acquire Covered Code with only those rights set forth herein. - -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between or among You, Apple or any Contributor, and You will not represent to -the contrary, whether expressly, by implication, appearance or otherwise. - -13.3 Independent Development. Nothing in this License will impair Apple's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions as, -or otherwise compete with, Modifications, Larger Works, technology or products -that You may develop, produce, market or distribute. - -13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any -provision of this License will not be deemed a waiver of future enforcement of -that or any other provision. Any law or regulation which provides that the -language of a contract shall be construed against the drafter will not apply to -this License. - -13.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the -remainder of this License will continue in full force and effect. (b) -Notwithstanding the foregoing, if applicable law prohibits or restricts You from -fully and/or specifically complying with Sections 2 and/or 3 or prevents the -enforceability of either of those Sections, this License will immediately -terminate and You must immediately discontinue any use of the Covered Code and -destroy all copies of it that are in your possession or control. - -13.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Apple relating to this License shall take place in the Northern District -of California, and You and Apple hereby consent to the personal jurisdiction of, -and venue in, the state and federal courts within that District with respect to -this License. The application of the United Nations Convention on Contracts for -the International Sale of Goods is expressly excluded. - -13.7 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. - -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exigé que le -présent contrat et tous les documents connexes soient rédigés en anglais. - -EXHIBIT A. - -"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. - -This file contains Original Code and/or Modifications of Original Code as -defined in and that are subject to the Apple Public Source License Version 2.0 -(the 'License'). You may not use this file except in compliance with the -License. Please obtain a copy of the License at -http://www.opensource.apple.com/apsl/ and read it before using this file. - -The Original Code and all software distributed under the License are distributed -on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET -ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language -governing rights and limitations under the License." diff --git a/engine/src/flutter/third_party/apple_apsl/OWNERS b/engine/src/flutter/third_party/apple_apsl/OWNERS deleted file mode 100644 index f7103d31bb..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -avi@chromium.org -mark@chromium.org diff --git a/engine/src/flutter/third_party/apple_apsl/README.chromium b/engine/src/flutter/third_party/apple_apsl/README.chromium deleted file mode 100644 index ad337235e3..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/README.chromium +++ /dev/null @@ -1,61 +0,0 @@ -Name: Darwin -URL: http://www.opensource.apple.com/ -Version: unknown -Security Critical: yes -License: Apple Public Source License 2.0 - -Four files are excerpted here: - -malloc.h from: -http://www.opensource.apple.com/source/Libc/Libc-763.11/include/malloc/malloc.h - -Modifications: -- Modified #ifdef guards. -- Removed everything but the definition of malloc_zone_t. -- Renamed _malloc_zone_t to ChromeMallocZone to avoid possible name conflicts. - -CFRuntime.h from: -http://www.opensource.apple.com/source/CF/CF-635/CFRuntime.h - -Modifications: -- Modified #ifdef guards. -- Removed everything but the definition of CFRuntimeBase. -- Renamed CFRuntimeBase to ChromeCFRuntimeBase to avoid possible name conflicts. - -CFBase.h from: -http://www.opensource.apple.com/source/CF/CF-550/CFBase.c -http://www.opensource.apple.com/source/CF/CF-635/CFBase.c - -Modifications: -- Renamed the file to CFBase.h. -- Added #ifdef guards. -- Added an #include of the CFRuntime.h file. -- Removed everything but the definition of __CFAllocator. -- Modified the reference of CFRuntimeBase to ChromeCFRuntimeBase. -- Renamed __CFAllocator to ChromeCFAllocatorLeopards (from CF-550) and to - ChromeCFAllocatorLions (from CF-635) to avoid possible name conflicts. - -cssmapplePriv.h from: -http://www.opensource.apple.com/source/libsecurity_cssm/libsecurity_cssm-31536/lib/cssmapplePriv.h - -Warning: Technically, this is a private Apple header, and as such provides no -guarantee for API stability. However, the use of this header is the only way -to implement OCSP checking per Apple's public documentation on the usage of -their Trust Policy Module. Further, the use of this private header is the -recommended approach from Apple for modifying OCSP policies. - -See: http://developer.apple.com/documentation/Security/Reference/SecAppleTrustPolicyModuleSpec/Apple_Trust_Policy_Module_Functional_Specification.pdf -and http://lists.apple.com/archives/apple-cdsa/2008/Aug/msg00008.html - -Modifications: -- Removed unneeded definitions for internal Apple CSP DL enums and structs - -dnsinfo.h from: -http://www.opensource.apple.com/source/configd/configd-453.19/dnsinfo/dnsinfo.h - -Provides dns_config_t which is used by /net/dns/dns_config_service_posix.cc to -obtain system DNS configuration on Mac OS X. This private header is also used by -Apple's open source mDNSResponder. - -Modifications: -- Removed Availability.h and the corresponding macros. diff --git a/engine/src/flutter/third_party/apple_apsl/cssmapplePriv.h b/engine/src/flutter/third_party/apple_apsl/cssmapplePriv.h deleted file mode 100644 index 18092bdfae..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/cssmapplePriv.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2000-2004 Apple Computer, Inc. All Rights Reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - * - * cssmapplePriv.h -- Private CSSM features specific to Apple's Implementation - */ - -#ifndef _CSSMAPPLE_PRIV_H_ -#define _CSSMAPPLE_PRIV_H_ 1 - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Options for X509TP's CSSM_TP_CertGroupVerify for policy - * CSSMOID_APPLE_TP_REVOCATION_OCSP. A pointer to, and length of, one - * of these is optionally placed in - * CSSM_TP_VERIFY_CONTEXT.Cred->Policy.PolicyIds[n].FieldValue. - */ - -#define CSSM_APPLE_TP_OCSP_OPTS_VERSION 0 - -typedef uint32 CSSM_APPLE_TP_OCSP_OPT_FLAGS; -enum { - // require OCSP verification for each cert; default is "try" - CSSM_TP_ACTION_OCSP_REQUIRE_PER_CERT = 0x00000001, - // require OCSP verification for certs which claim an OCSP responder - CSSM_TP_ACTION_OCSP_REQUIRE_IF_RESP_PRESENT = 0x00000002, - // disable network OCSP transactions - CSSM_TP_ACTION_OCSP_DISABLE_NET = 0x00000004, - // disable reads from local OCSP cache - CSSM_TP_ACTION_OCSP_CACHE_READ_DISABLE = 0x00000008, - // disable reads from local OCSP cache - CSSM_TP_ACTION_OCSP_CACHE_WRITE_DISABLE = 0x00000010, - // if set and positive OCSP verify for given cert, no further revocation - // checking need be done on that cert - CSSM_TP_ACTION_OCSP_SUFFICIENT = 0x00000020, - // generate nonce in OCSP request - CSSM_TP_OCSP_GEN_NONCE = 0x00000040, - // when generating nonce, require matching nonce in response - CSSM_TP_OCSP_REQUIRE_RESP_NONCE = 0x00000080 -}; - -typedef struct { - uint32 Version; - CSSM_APPLE_TP_OCSP_OPT_FLAGS Flags; - CSSM_DATA_PTR LocalResponder; /* URI */ - CSSM_DATA_PTR LocalResponderCert; /* X509 DER encoded cert */ -} CSSM_APPLE_TP_OCSP_OPTIONS; - -#ifdef __cplusplus -} -#endif - -#endif /* _CSSMAPPLE_PRIV_H_ */ diff --git a/engine/src/flutter/third_party/apple_apsl/dnsinfo.h b/engine/src/flutter/third_party/apple_apsl/dnsinfo.h deleted file mode 100644 index db2ad90272..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/dnsinfo.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2004-2006, 2008, 2009, 2011 Apple Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef __DNSINFO_H__ -#define __DNSINFO_H__ - -/* - * These routines provide access to the systems DNS configuration - */ - -#include -#include -#include -#include -#include - -#define DNSINFO_VERSION 20111104 - -#define DEFAULT_SEARCH_ORDER 200000 /* search order for the "default" resolver domain name */ - -#define DNS_PTR(type, name) \ - union { \ - type name; \ - uint64_t _ ## name ## _p; \ - } - -#define DNS_VAR(type, name) \ - type name - - -#pragma pack(4) -typedef struct { - struct in_addr address; - struct in_addr mask; -} dns_sortaddr_t; -#pragma pack() - - -#pragma pack(4) -typedef struct { - DNS_PTR(char *, domain); /* domain */ - DNS_VAR(int32_t, n_nameserver); /* # nameserver */ - DNS_PTR(struct sockaddr **, nameserver); - DNS_VAR(uint16_t, port); /* port (in host byte order) */ - DNS_VAR(int32_t, n_search); /* # search */ - DNS_PTR(char **, search); - DNS_VAR(int32_t, n_sortaddr); /* # sortaddr */ - DNS_PTR(dns_sortaddr_t **, sortaddr); - DNS_PTR(char *, options); /* options */ - DNS_VAR(uint32_t, timeout); /* timeout */ - DNS_VAR(uint32_t, search_order); /* search_order */ - DNS_VAR(uint32_t, if_index); - DNS_VAR(uint32_t, flags); - DNS_VAR(uint32_t, reach_flags); /* SCNetworkReachabilityFlags */ - DNS_VAR(uint32_t, reserved[5]); -} dns_resolver_t; -#pragma pack() - - -#define DNS_RESOLVER_FLAGS_SCOPED 1 /* configuration is for scoped questions */ - - -#pragma pack(4) -typedef struct { - DNS_VAR(int32_t, n_resolver); /* resolver configurations */ - DNS_PTR(dns_resolver_t **, resolver); - DNS_VAR(int32_t, n_scoped_resolver); /* "scoped" resolver configurations */ - DNS_PTR(dns_resolver_t **, scoped_resolver); - DNS_VAR(uint32_t, reserved[5]); -} dns_config_t; -#pragma pack() - - -__BEGIN_DECLS - -/* - * DNS configuration access APIs - */ -const char * -dns_configuration_notify_key (); - -dns_config_t * -dns_configuration_copy (); - -void -dns_configuration_free (dns_config_t *config); - -void -_dns_configuration_ack (dns_config_t *config, - const char *bundle_id); - -__END_DECLS - -#endif /* __DNSINFO_H__ */ diff --git a/engine/src/flutter/third_party/apple_apsl/malloc.h b/engine/src/flutter/third_party/apple_apsl/malloc.h deleted file mode 100644 index 9fd1d5d470..0000000000 --- a/engine/src/flutter/third_party/apple_apsl/malloc.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ - -#ifndef THIRD_PARTY_APPLE_APSL_MALLOC_H_ -#define THIRD_PARTY_APPLE_APSL_MALLOC_H_ - -typedef struct _ChromeMallocZone { - /* Only zone implementors should depend on the layout of this structure; - Regular callers should use the access functions below */ - void *reserved1; /* RESERVED FOR CFAllocator DO NOT USE */ - void *reserved2; /* RESERVED FOR CFAllocator DO NOT USE */ - size_t (*size)(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */ - void *(*malloc)(struct _malloc_zone_t *zone, size_t size); - void *(*calloc)(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */ - void *(*valloc)(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */ - void (*free)(struct _malloc_zone_t *zone, void *ptr); - void *(*realloc)(struct _malloc_zone_t *zone, void *ptr, size_t size); - void (*destroy)(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */ - const char *zone_name; - - /* Optional batch callbacks; these may be NULL */ - unsigned (*batch_malloc)(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */ - void (*batch_free)(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */ - - struct malloc_introspection_t *introspect; - unsigned version; - - /* aligned memory allocation. The callback may be NULL. Present in version >= 5. */ - void *(*memalign)(struct _malloc_zone_t *zone, size_t alignment, size_t size); - - /* free a pointer known to be in zone and known to have the given size. The callback may be NULL. Present in version >= 6.*/ - void (*free_definite_size)(struct _malloc_zone_t *zone, void *ptr, size_t size); - - /* Empty out caches in the face of memory pressure. The callback may be NULL. Present in version >= 8. */ - size_t (*pressure_relief)(struct _malloc_zone_t *zone, size_t goal); -} ChromeMallocZone; - -#endif // THIRD_PARTY_APPLE_APSL_MALLOC_H_ diff --git a/engine/src/flutter/third_party/ashmem/BUILD.gn b/engine/src/flutter/third_party/ashmem/BUILD.gn deleted file mode 100644 index 5e92b3773f..0000000000 --- a/engine/src/flutter/third_party/ashmem/BUILD.gn +++ /dev/null @@ -1,12 +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. - -assert(is_android) - -source_set("ashmem") { - sources = [ - "ashmem-dev.c", - "ashmem.h", - ] -} diff --git a/engine/src/flutter/third_party/ashmem/LICENSE b/engine/src/flutter/third_party/ashmem/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/engine/src/flutter/third_party/ashmem/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/engine/src/flutter/third_party/ashmem/OWNERS b/engine/src/flutter/third_party/ashmem/OWNERS deleted file mode 100644 index 938d2b5c48..0000000000 --- a/engine/src/flutter/third_party/ashmem/OWNERS +++ /dev/null @@ -1 +0,0 @@ -digit@chromium.org diff --git a/engine/src/flutter/third_party/ashmem/README.chromium b/engine/src/flutter/third_party/ashmem/README.chromium deleted file mode 100644 index 833e1f5b01..0000000000 --- a/engine/src/flutter/third_party/ashmem/README.chromium +++ /dev/null @@ -1,6 +0,0 @@ -Name: Android -URL: http://source.android.com -Description: Android shared memory implementation. Only applies to OS_ANDROID. -Version: 7203eb2a8a29a7b721a48cd291700f38f3da1456 -Security Critical: yes -License: Apache 2.0 diff --git a/engine/src/flutter/third_party/ashmem/ashmem-dev.c b/engine/src/flutter/third_party/ashmem/ashmem-dev.c deleted file mode 100644 index 2303369d81..0000000000 --- a/engine/src/flutter/third_party/ashmem/ashmem-dev.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Implementation of the user-space ashmem API for devices, which have our - * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version, - * used by the simulator. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include "ashmem.h" - -#define ASHMEM_DEVICE "/dev/ashmem" - -/* - * ashmem_create_region - creates a new ashmem region and returns the file - * descriptor, or <0 on error - * - * `name' is an optional label to give the region (visible in /proc/pid/maps) - * `size' is the size of the region, in page-aligned bytes - */ -int ashmem_create_region(const char *name, size_t size) -{ - int fd, ret; - - fd = open(ASHMEM_DEVICE, O_RDWR); - if (fd < 0) - return fd; - - if (name) { - char buf[ASHMEM_NAME_LEN]; - - strlcpy(buf, name, sizeof(buf)); - ret = ioctl(fd, ASHMEM_SET_NAME, buf); - if (ret < 0) - goto error; - } - - ret = ioctl(fd, ASHMEM_SET_SIZE, size); - if (ret < 0) - goto error; - - return fd; - -error: - close(fd); - return ret; -} - -int ashmem_set_prot_region(int fd, int prot) -{ - return ioctl(fd, ASHMEM_SET_PROT_MASK, prot); -} - -int ashmem_pin_region(int fd, size_t offset, size_t len) -{ - struct ashmem_pin pin = { offset, len }; - return ioctl(fd, ASHMEM_PIN, &pin); -} - -int ashmem_unpin_region(int fd, size_t offset, size_t len) -{ - struct ashmem_pin pin = { offset, len }; - return ioctl(fd, ASHMEM_UNPIN, &pin); -} - -int ashmem_get_size_region(int fd) -{ - return ioctl(fd, ASHMEM_GET_SIZE, NULL); -} - -int ashmem_purge_all(void) -{ - const int fd = open(ASHMEM_DEVICE, O_RDWR); - if (fd < 0) - return fd; - const int ret = ioctl(fd, ASHMEM_PURGE_ALL_CACHES, 0); - close(fd); - return ret; -} diff --git a/engine/src/flutter/third_party/ashmem/ashmem.gyp b/engine/src/flutter/third_party/ashmem/ashmem.gyp deleted file mode 100644 index e26ac18f58..0000000000 --- a/engine/src/flutter/third_party/ashmem/ashmem.gyp +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -{ - 'targets': [ - { - 'target_name': 'ashmem', - 'type': 'static_library', - 'sources': [ - 'ashmem.h', - 'ashmem-dev.c' - ], - }, - ], -} diff --git a/engine/src/flutter/third_party/ashmem/ashmem.h b/engine/src/flutter/third_party/ashmem/ashmem.h deleted file mode 100644 index 7d411cc064..0000000000 --- a/engine/src/flutter/third_party/ashmem/ashmem.h +++ /dev/null @@ -1,46 +0,0 @@ -/* third_party/ashmem/ashmem.h - ** - ** Copyright 2008 The Android Open Source Project - ** - ** This file is dual licensed. It may be redistributed and/or modified - ** under the terms of the Apache 2.0 License OR version 2 of the GNU - ** General Public License. - */ - -#ifndef _THIRD_PARTY_ASHMEM_H -#define _THIRD_PARTY_ASHMEM_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -int ashmem_create_region(const char *name, size_t size); -int ashmem_set_prot_region(int fd, int prot); -int ashmem_pin_region(int fd, size_t offset, size_t len); -int ashmem_unpin_region(int fd, size_t offset, size_t len); -int ashmem_get_size_region(int fd); -int ashmem_purge_all(void); - -#ifdef __cplusplus -} -#endif - -#ifndef __ASHMEMIOC /* in case someone included too */ - -#define ASHMEM_NAME_LEN 256 - -#define ASHMEM_NAME_DEF "dev/ashmem" - -/* Return values from ASHMEM_PIN: Was the mapping purged while unpinned? */ -#define ASHMEM_NOT_PURGED 0 -#define ASHMEM_WAS_PURGED 1 - -/* Return values from ASHMEM_UNPIN: Is the mapping now pinned or unpinned? */ -#define ASHMEM_IS_UNPINNED 0 -#define ASHMEM_IS_PINNED 1 - -#endif /* ! __ASHMEMIOC */ - -#endif /* _THIRD_PARTY_ASHMEM_H */ diff --git a/engine/src/flutter/third_party/binutils/.gitignore b/engine/src/flutter/third_party/binutils/.gitignore deleted file mode 100644 index 5605b2f711..0000000000 --- a/engine/src/flutter/third_party/binutils/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -binutils-* -*-chroot-* -output-* -Linux_ia32/*stamp* -Linux_ia32/*tar.bz2 -Linux_x64/*stamp* -Linux_x64/*tar.bz2 -*/Release diff --git a/engine/src/flutter/third_party/binutils/LICENSE b/engine/src/flutter/third_party/binutils/LICENSE deleted file mode 100644 index 4a1bd6f39f..0000000000 --- a/engine/src/flutter/third_party/binutils/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/engine/src/flutter/third_party/binutils/Linux_ia32/binutils.tar.bz2.sha1 b/engine/src/flutter/third_party/binutils/Linux_ia32/binutils.tar.bz2.sha1 deleted file mode 100644 index 94c02d294a..0000000000 --- a/engine/src/flutter/third_party/binutils/Linux_ia32/binutils.tar.bz2.sha1 +++ /dev/null @@ -1 +0,0 @@ -e73c227c9cfacfc5fecaa22ee3555b90925f96c2 \ No newline at end of file diff --git a/engine/src/flutter/third_party/binutils/Linux_x64/binutils.tar.bz2.sha1 b/engine/src/flutter/third_party/binutils/Linux_x64/binutils.tar.bz2.sha1 deleted file mode 100644 index b415234821..0000000000 --- a/engine/src/flutter/third_party/binutils/Linux_x64/binutils.tar.bz2.sha1 +++ /dev/null @@ -1 +0,0 @@ -05497e34b29c01dd82df76d2fbdf017d4a2c4214 \ No newline at end of file diff --git a/engine/src/flutter/third_party/binutils/OWNERS b/engine/src/flutter/third_party/binutils/OWNERS deleted file mode 100644 index 41edd86745..0000000000 --- a/engine/src/flutter/third_party/binutils/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -thakis@chromium.org -thestig@chromium.org -mithro@mithis.com diff --git a/engine/src/flutter/third_party/binutils/README.chromium b/engine/src/flutter/third_party/binutils/README.chromium deleted file mode 100644 index d20934b0a1..0000000000 --- a/engine/src/flutter/third_party/binutils/README.chromium +++ /dev/null @@ -1,29 +0,0 @@ -Name: binutils -URL: http://www.gnu.org/software/binutils/ -Version: 2.24 -License: GPL v2 -License File: NOT_SHIPPED -Security Critical: no - -Description: -This directory contains i386 and amd64 binaries of the binutils tools -(including gold linker). - -They were built from binutils-2.24 using the "build-all.sh" script on a Ubuntu -Precise. - -The script creates chroots for 32bit and 64bit Ubuntu Lucid and then builds -binutils inside the roots. - -Local patches: - * ehframe-race.patch for http://crbug.com/161942 from upstream change - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=635aa30e3ae9735e362cfd1cda2be9f7b65b32a2 - - * unlock-thin.patch for http://crbug.com/453195 from upstream change - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2cfbf2fece582c29df348104b28677c38a8301f4 - - * plugin-dso-fix.patch for http://crbug.com/453195 from upstream change - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=3c537f7fdb11f02f7082749f3f21dfdd2c2025e8 - - * (build-all.sh|build-one.sh|upload.sh) scripts for building the binutils - binaries and uploading them to Google storage. diff --git a/engine/src/flutter/third_party/binutils/build-all.sh b/engine/src/flutter/third_party/binutils/build-all.sh deleted file mode 100755 index a39984ca2b..0000000000 --- a/engine/src/flutter/third_party/binutils/build-all.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# 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 build binutils for both i386 and AMD64 Linux architectures. -# Must be run on an AMD64 supporting machine which has debootstrap and sudo -# installed. -# Uses Ubuntu Lucid chroots as build environment. - -set -e - -if [ x"$(whoami)" = x"root" ]; then - echo "Script must not be run as root." - exit 1 -fi -sudo -v - -OUTPUTDIR="${1:-$PWD/output-$(date +%Y%m%d-%H%M%S)}" -if [ ! -d "$OUTPUTDIR" ]; then - mkdir -p "$OUTPUTDIR" -fi - -# Download the source -VERSION=2.24 -wget -c http://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.bz2 - -# Verify the signature -wget -c -q http://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.bz2.sig -if ! gpg --verify binutils-$VERSION.tar.bz2.sig; then - echo "GPG Signature failed to verify." - echo "" - echo "You may need to import the vendor GPG key with:" - echo "# gpg --keyserver pgp.mit.edu --recv-key 4AE55E93" - exit 1 -fi - - -if [ ! -d binutils-$VERSION ]; then - # Extract the source - tar jxf binutils-$VERSION.tar.bz2 - - # Patch the source - ( - cd binutils-$VERSION - patch -p1 < ../ehframe-race.patch - patch -p1 < ../unlock-thin.patch - patch -p1 < ../plugin-dso-fix.patch - ) -fi - -for ARCH in i386 amd64; do - if [ ! -d lucid-chroot-$ARCH ]; then - # Refresh sudo credentials - sudo -v - - # Create the chroot - echo "" - echo "Building chroot for $ARCH" - echo "=============================" - sudo debootstrap \ - --arch=$ARCH \ - --include=build-essential,flex,bison \ - lucid lucid-chroot-$ARCH - echo "=============================" - fi - - BUILDDIR=lucid-chroot-$ARCH/build - - # Clean up any previous failed build attempts inside chroot - if [ -d "$BUILDDIR" ]; then - sudo rm -rf "$BUILDDIR" - fi - - # Copy data into the chroot - sudo mkdir -p "$BUILDDIR" - sudo cp -a binutils-$VERSION "$BUILDDIR" - sudo cp -a build-one.sh "$BUILDDIR" - - # Do the build - PREFIX= - case $ARCH in - i386) - PREFIX="setarch linux32" - ARCHNAME=i686-pc-linux-gnu - ;; - amd64) - PREFIX="setarch linux64" - ARCHNAME=x86_64-unknown-linux-gnu - ;; - esac - echo "" - echo "Building binutils for $ARCH" - LOGFILE="$OUTPUTDIR/build-$ARCH.log" - if ! sudo $PREFIX chroot lucid-chroot-$ARCH /build/build-one.sh /build/binutils-$VERSION > $LOGFILE 2>&1; then - echo "Build failed! See $LOGFILE for details." - exit 1 - fi - - # Copy data out of the chroot - sudo chown -R $(whoami) "$BUILDDIR/output/" - - # Strip the output binaries - for i in "$BUILDDIR/output/$ARCHNAME/bin/*"; do - strip $i - done - - # Copy them out of the chroot - cp -a "$BUILDDIR/output/$ARCHNAME" "$OUTPUTDIR" - - # Copy plugin header out of the chroot - mkdir "$OUTPUTDIR/$ARCHNAME/include" - cp "$BUILDDIR/binutils-$VERSION/include/plugin-api.h" "$OUTPUTDIR/$ARCHNAME/include/" - - # Clean up chroot - sudo rm -rf "$BUILDDIR" -done - -echo "Check you are happy with the binaries in" -echo " $OUTPUTDIR" -echo "Then" -echo " * upload to Google Storage using the upload.sh script" -echo " * roll dependencies" diff --git a/engine/src/flutter/third_party/binutils/build-one.sh b/engine/src/flutter/third_party/binutils/build-one.sh deleted file mode 100755 index 1ae62d10c7..0000000000 --- a/engine/src/flutter/third_party/binutils/build-one.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# 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 build binutils found in /build/binutils-XXXX when inside a chroot. -# Don't call this script yourself, instead use the build-all.sh script. - -set -e - -if [ -z "$1" ]; then - echo "Directory of binutils not given." - exit 1 -fi - -cd "$1" -./configure --enable-gold=default --enable-threads --enable-plugins \ - --prefix=/build/output -make -j8 all -make install diff --git a/engine/src/flutter/third_party/binutils/download.py b/engine/src/flutter/third_party/binutils/download.py deleted file mode 100755 index 6a760dfd06..0000000000 --- a/engine/src/flutter/third_party/binutils/download.py +++ /dev/null @@ -1,118 +0,0 @@ -#!/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. -# vim: set ts=2 sw=2 et sts=2 ai: - -"""Minimal tool to download binutils from Google storage. - -TODO(mithro): Replace with generic download_and_extract tool. -""" - -import os -import platform -import re -import shutil -import subprocess -import sys - - -BINUTILS_DIR = os.path.abspath(os.path.dirname(__file__)) -BINUTILS_FILE = 'binutils.tar.bz2' -BINUTILS_TOOLS = ['bin/ld.gold', 'bin/objcopy', 'bin/objdump'] -BINUTILS_OUT = 'Release' - -DETECT_HOST_ARCH = os.path.abspath(os.path.join( - BINUTILS_DIR, '../../build/detect_host_arch.py')) - - -def ReadFile(filename): - with file(filename, 'r') as f: - return f.read().strip() - - -def WriteFile(filename, content): - assert not os.path.exists(filename) - with file(filename, 'w') as f: - f.write(content) - f.write('\n') - - -def GetArch(): - gyp_host_arch = re.search( - 'host_arch=(\S*)', os.environ.get('GYP_DEFINES', '')) - if gyp_host_arch: - arch = gyp_host_arch.group(1) - # This matches detect_host_arch.py. - if arch == 'x86_64': - return 'x64' - return arch - - return subprocess.check_output(['python', DETECT_HOST_ARCH]).strip() - - -def FetchAndExtract(arch): - archdir = os.path.join(BINUTILS_DIR, 'Linux_' + arch) - tarball = os.path.join(archdir, BINUTILS_FILE) - outdir = os.path.join(archdir, BINUTILS_OUT) - - sha1file = tarball + '.sha1' - if not os.path.exists(sha1file): - print "WARNING: No binutils found for your architecture (%s)!" % arch - return 0 - - checksum = ReadFile(sha1file) - - stampfile = tarball + '.stamp' - if os.path.exists(stampfile): - if (os.path.exists(tarball) and - os.path.exists(outdir) and - checksum == ReadFile(stampfile)): - return 0 - else: - os.unlink(stampfile) - - print "Downloading", tarball - subprocess.check_call([ - 'download_from_google_storage', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-binutils', - '-s', sha1file]) - assert os.path.exists(tarball) - - if os.path.exists(outdir): - shutil.rmtree(outdir) - assert not os.path.exists(outdir) - os.makedirs(outdir) - assert os.path.exists(outdir) - - print "Extracting", tarball - subprocess.check_call(['tar', 'axf', tarball], cwd=outdir) - - for tool in BINUTILS_TOOLS: - assert os.path.exists(os.path.join(outdir, tool)) - - WriteFile(stampfile, checksum) - return 0 - - -def main(args): - if not sys.platform.startswith('linux'): - return 0 - - arch = GetArch() - if arch == 'x64': - return FetchAndExtract(arch) - if arch == 'ia32': - ret = FetchAndExtract(arch) - if ret != 0: - return ret - # Fetch the x64 toolchain as well for official bots with 64-bit kernels. - return FetchAndExtract('x64') - print "Host architecture %s is not supported." % arch - return 1 - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/engine/src/flutter/third_party/binutils/ehframe-race.patch b/engine/src/flutter/third_party/binutils/ehframe-race.patch deleted file mode 100644 index ab0d01eaaf..0000000000 --- a/engine/src/flutter/third_party/binutils/ehframe-race.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/gold/gold.cc b/gold/gold.cc -index 4833aec..bdfb33d 100644 ---- a/gold/gold.cc -+++ b/gold/gold.cc -@@ -808,6 +808,8 @@ queue_final_tasks(const General_options& options, - if (!any_postprocessing_sections) - { - input_sections_blocker = new Task_token(true); -+ // Write_symbols_task, Relocate_tasks. -+ input_sections_blocker->add_blocker(); - input_sections_blocker->add_blockers(input_objects->number_of_relobjs()); - } - -@@ -836,6 +838,7 @@ queue_final_tasks(const General_options& options, - - // Queue a task to write out the output sections. - workqueue->queue(new Write_sections_task(layout, of, output_sections_blocker, -+ input_sections_blocker, - final_blocker)); - - // Queue a task to write out everything else. -diff --git a/gold/layout.cc b/gold/layout.cc -index 82db775..ef0a879 100644 ---- a/gold/layout.cc -+++ b/gold/layout.cc -@@ -5532,6 +5532,8 @@ void - Write_sections_task::locks(Task_locker* tl) - { - tl->add(this, this->output_sections_blocker_); -+ if (this->input_sections_blocker_ != NULL) -+ tl->add(this, this->input_sections_blocker_); - tl->add(this, this->final_blocker_); - } - -diff --git a/gold/layout.h b/gold/layout.h -index 7c0113c..032f5f3 100644 ---- a/gold/layout.h -+++ b/gold/layout.h -@@ -1454,9 +1454,11 @@ class Write_sections_task : public Task - public: - Write_sections_task(const Layout* layout, Output_file* of, - Task_token* output_sections_blocker, -+ Task_token* input_sections_blocker, - Task_token* final_blocker) - : layout_(layout), of_(of), - output_sections_blocker_(output_sections_blocker), -+ input_sections_blocker_(input_sections_blocker), - final_blocker_(final_blocker) - { } - -@@ -1481,6 +1483,7 @@ class Write_sections_task : public Task - const Layout* layout_; - Output_file* of_; - Task_token* output_sections_blocker_; -+ Task_token* input_sections_blocker_; - Task_token* final_blocker_; - }; - -diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am -index dd06d5f..35cd013 100644 ---- a/gold/testsuite/Makefile.am -+++ b/gold/testsuite/Makefile.am -@@ -2380,10 +2380,9 @@ endif DEFAULT_TARGET_X86_64 - if DEFAULT_TARGET_X86_64 - check_PROGRAMS += exception_x86_64_bnd_test - exception_x86_64_bnd_test_SOURCES = exception_test_main.cc --exception_x86_64_bnd_test_DEPENDENCIES = exception_x86_64_bnd_1.o \ -- exception_x86_64_bnd_2.o -+exception_x86_64_bnd_test_DEPENDENCIES = gcctestdir/ld exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o - exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS) --exception_x86_64_bnd_test_LDADD = $(exception_x86_64_bnd_test_DEPENDENCIES) -+exception_x86_64_bnd_test_LDADD = exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o - exception_x86_64_bnd_1.o: exception_test_1.cc gcctestdir/as - $(CXXCOMPILE) -c -fpic -Bgcctestdir/ -Wa,-madd-bnd-prefix -o $@ $< - exception_x86_64_bnd_2.o: exception_test_2.cc gcctestdir/as -diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in -index fed610f..8fbb644 100644 ---- a/gold/testsuite/Makefile.in -+++ b/gold/testsuite/Makefile.in -@@ -2732,11 +2732,9 @@ LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \ - @GCC_TRUE@@NATIVE_LINKER_TRUE@ehdr_start_test_5_LDFLAGS = -Bgcctestdir/ - @GCC_TRUE@@NATIVE_LINKER_TRUE@ehdr_start_test_5_LDADD = - @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_SOURCES = exception_test_main.cc --@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_DEPENDENCIES = exception_x86_64_bnd_1.o \ --@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_x86_64_bnd_2.o -- -+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_DEPENDENCIES = gcctestdir/ld exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o - @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS) --@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDADD = $(exception_x86_64_bnd_test_DEPENDENCIES) -+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDADD = exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o - @DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 - @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200 - all: $(BUILT_SOURCES) --- -1.7.1 - diff --git a/engine/src/flutter/third_party/binutils/plugin-dso-fix.patch b/engine/src/flutter/third_party/binutils/plugin-dso-fix.patch deleted file mode 100644 index 558975686d..0000000000 --- a/engine/src/flutter/third_party/binutils/plugin-dso-fix.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit 3c537f7fdb11f02f7082749f3f21dfdd2c2025e8 -Author: Peter Collingbourne -Date: Wed Feb 4 09:47:28 2015 -0800 - - Resolve forwarding symbols in plugins. - - 2015-02-04 Peter Collingbourne - - * plugin.cc (Pluginobj::get_symbol_resolution_info): Resolve - forwarding symbols when computing symbol resolution info for plugins. - -diff --git a/gold/plugin.cc b/gold/plugin.cc -index bde8c78..68da8e3 100644 ---- a/gold/plugin.cc -+++ b/gold/plugin.cc -@@ -914,7 +914,8 @@ is_visible_from_outside(Symbol* lsym) - // Get symbol resolution info. - - ld_plugin_status --Pluginobj::get_symbol_resolution_info(int nsyms, -+Pluginobj::get_symbol_resolution_info(Symbol_table* symtab, -+ int nsyms, - ld_plugin_symbol* syms, - int version) const - { -@@ -943,6 +944,8 @@ Pluginobj::get_symbol_resolution_info(int nsyms, - { - ld_plugin_symbol* isym = &syms[i]; - Symbol* lsym = this->symbols_[i]; -+ if (lsym->is_forwarder()) -+ lsym = symtab->resolve_forwards(lsym); - ld_plugin_symbol_resolution res = LDPR_UNKNOWN; - - if (lsym->is_undefined()) -@@ -1511,14 +1514,16 @@ static enum ld_plugin_status - get_symbols(const void* handle, int nsyms, ld_plugin_symbol* syms) - { - gold_assert(parameters->options().has_plugins()); -- Object* obj = parameters->options().plugins()->object( -+ Plugin_manager* plugins = parameters->options().plugins(); -+ Object* obj = plugins->object( - static_cast(reinterpret_cast(handle))); - if (obj == NULL) - return LDPS_ERR; - Pluginobj* plugin_obj = obj->pluginobj(); - if (plugin_obj == NULL) - return LDPS_ERR; -- return plugin_obj->get_symbol_resolution_info(nsyms, syms, 1); -+ Symbol_table* symtab = plugins->symtab(); -+ return plugin_obj->get_symbol_resolution_info(symtab, nsyms, syms, 1); - } - - // Version 2 of the above. The only difference is that this version -@@ -1528,14 +1533,16 @@ static enum ld_plugin_status - get_symbols_v2(const void* handle, int nsyms, ld_plugin_symbol* syms) - { - gold_assert(parameters->options().has_plugins()); -- Object* obj = parameters->options().plugins()->object( -+ Plugin_manager* plugins = parameters->options().plugins(); -+ Object* obj = plugins->object( - static_cast(reinterpret_cast(handle))); - if (obj == NULL) - return LDPS_ERR; - Pluginobj* plugin_obj = obj->pluginobj(); - if (plugin_obj == NULL) - return LDPS_ERR; -- return plugin_obj->get_symbol_resolution_info(nsyms, syms, 2); -+ Symbol_table* symtab = plugins->symtab(); -+ return plugin_obj->get_symbol_resolution_info(symtab, nsyms, syms, 2); - } - - // Add a new (real) input file generated by a plugin. -diff --git a/gold/plugin.h b/gold/plugin.h -index ef78b84..f926879 100644 ---- a/gold/plugin.h -+++ b/gold/plugin.h -@@ -282,6 +282,10 @@ class Plugin_manager - input_objects() const - { return this->input_objects_; } - -+ Symbol_table* -+ symtab() -+ { return this->symtab_; } -+ - Layout* - layout() - { return this->layout_; } -@@ -396,7 +400,8 @@ class Pluginobj : public Object - - // Fill in the symbol resolution status for the given plugin symbols. - ld_plugin_status -- get_symbol_resolution_info(int nsyms, -+ get_symbol_resolution_info(Symbol_table* symtab, -+ int nsyms, - ld_plugin_symbol* syms, - int version) const; - diff --git a/engine/src/flutter/third_party/binutils/unlock-thin.patch b/engine/src/flutter/third_party/binutils/unlock-thin.patch deleted file mode 100644 index 6a4b6a7c98..0000000000 --- a/engine/src/flutter/third_party/binutils/unlock-thin.patch +++ /dev/null @@ -1,129 +0,0 @@ -commit 2cfbf2fece582c29df348104b28677c38a8301f4 -Author: Cary Coutant -Date: Tue Feb 3 19:54:57 2015 -0800 - - Fix a file descriptor leak in gold. - - When an LTO linker plugin claims an external member of a thin archive, gold - does not properly unlock the file and make its file descriptor available for - reuse. This patch fixes the problem by modifying Archive::include_member to - unlock the object file via an RAII class instance, ensuring that it will be - unlocked no matter what path is taken through the function. - - gold/ - PR gold/15660 - * archive.cc (Thin_archive_object_unlocker): New class. - (Archive::include_member): Unlock external members of thin archives. - * testsuite/Makefile.am (plugin_test_1): Rename .syms files. - (plugin_test_2): Likewise. - (plugin_test_3): Likewise. - (plugin_test_4): Likewise. - (plugin_test_5): Likewise. - (plugin_test_6): Likewise. - (plugin_test_7): Likewise. - (plugin_test_8): Likewise. - (plugin_test_9): Likewise. - (plugin_test_10): Likewise. - (plugin_test_11): New test case. - * testsuite/Makefile.in: Regenerate. - * testsuite/plugin_test.c (claim_file_hook): Check for parallel .syms - file to decide whether to claim file. - (all_symbols_read_hook): Likewise. - * testsuite/plugin_test_1.sh: Adjust expected output. - * testsuite/plugin_test_2.sh: Likewise. - * testsuite/plugin_test_3.sh: Likewise. - * testsuite/plugin_test_6.sh: Likewise. - * testsuite/plugin_test_tls.sh: Likewise. - * testsuite/plugin_test_11.sh: New testcase. - -diff --git a/gold/archive.cc b/gold/archive.cc -index 69107f5..6d25980 100644 ---- a/gold/archive.cc -+++ b/gold/archive.cc -@@ -930,6 +930,32 @@ Archive::count_members() - return ret; - } - -+// RAII class to ensure we unlock the object if it's a member of a -+// thin archive. We can't use Task_lock_obj in Archive::include_member -+// because the object file is already locked when it's opened by -+// get_elf_object_for_member. -+ -+class Thin_archive_object_unlocker -+{ -+ public: -+ Thin_archive_object_unlocker(const Task *task, Object* obj) -+ : task_(task), obj_(obj) -+ { } -+ -+ ~Thin_archive_object_unlocker() -+ { -+ if (this->obj_->offset() == 0) -+ this->obj_->unlock(this->task_); -+ } -+ -+ private: -+ Thin_archive_object_unlocker(const Thin_archive_object_unlocker&); -+ Thin_archive_object_unlocker& operator=(const Thin_archive_object_unlocker&); -+ -+ const Task* task_; -+ Object* obj_; -+}; -+ - // Include an archive member in the link. OFF is the file offset of - // the member header. WHY is the reason we are including this member. - // Return true if we added the member or if we had an error, return -@@ -978,6 +1004,10 @@ Archive::include_member(Symbol_table* symtab, Layout* layout, - return unconfigured ? false : true; - } - -+ // If the object is an external member of a thin archive, -+ // unlock it when we're done here. -+ Thin_archive_object_unlocker unlocker(this->task_, obj); -+ - if (mapfile != NULL) - mapfile->report_include_archive_member(obj->name(), sym, why); - -@@ -991,31 +1021,21 @@ Archive::include_member(Symbol_table* symtab, Layout* layout, - - if (!input_objects->add_object(obj)) - { -- // If this is an external member of a thin archive, unlock the -- // file. -- if (obj->offset() == 0) -- obj->unlock(this->task_); - delete obj; -+ return true; - } -- else -- { -- { -- if (layout->incremental_inputs() != NULL) -- layout->incremental_inputs()->report_object(obj, 0, this, NULL); -- Read_symbols_data sd; -- obj->read_symbols(&sd); -- obj->layout(symtab, layout, &sd); -- obj->add_symbols(symtab, &sd, layout); -- } -- -- // If this is an external member of a thin archive, unlock the file -- // for the next task. -- if (obj->offset() == 0) -- obj->unlock(this->task_); - -- this->included_member_ = true; -- } -+ if (layout->incremental_inputs() != NULL) -+ layout->incremental_inputs()->report_object(obj, 0, this, NULL); -+ -+ { -+ Read_symbols_data sd; -+ obj->read_symbols(&sd); -+ obj->layout(symtab, layout, &sd); -+ obj->add_symbols(symtab, &sd, layout); -+ } - -+ this->included_member_ = true; - return true; - } - diff --git a/engine/src/flutter/third_party/binutils/upload.sh b/engine/src/flutter/third_party/binutils/upload.sh deleted file mode 100755 index 5ff10aad3a..0000000000 --- a/engine/src/flutter/third_party/binutils/upload.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# 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. - -# Upload the generated output to Google storage. - -set -e - -if [ ! -d "$1" ]; then - echo "update.sh " - exit 1 -fi - -if echo "$PWD" | grep -qE "/src/third_party/binutils$"; then - echo -n -else - echo "update.sh should be run in src/third_party/binutils" - exit 1 -fi - -if [ ! -f ~/.boto ]; then - echo "You need to run 'gsutil config' to set up authentication before running this script." - exit 1 -fi - -for DIR in $1/*; do - # Skip if not directory - if [ ! -d "$DIR" ]; then - continue - fi - - case "$DIR" in - */i686-pc-linux-gnu) - export ARCH="Linux_ia32" - ;; - - */x86_64-unknown-linux-gnu) - export ARCH="Linux_x64" - ;; - - *) - echo "Unknown architecture directory $DIR" - exit 1 - ;; - esac - - if [ ! -d "$ARCH" ]; then - mkdir -p "$ARCH" - fi - - BINUTILS_TAR_BZ2="$ARCH/binutils.tar.bz2" - FULL_BINUTILS_TAR_BZ2="$PWD/$BINUTILS_TAR_BZ2" - if [ -f "${BINUTILS_TAR_BZ2}.sha1" ]; then - rm "${BINUTILS_TAR_BZ2}.sha1" - fi - (cd "$DIR"; tar jcf "$FULL_BINUTILS_TAR_BZ2" .) - - upload_to_google_storage.py --bucket chromium-binutils "$BINUTILS_TAR_BZ2" - git add -f "${BINUTILS_TAR_BZ2}.sha1" -done - -echo "Please commit the new .sha1 to the Chromium repository" -echo "" -echo "# git commit" diff --git a/engine/src/flutter/third_party/freetype-android/BUILD.gn b/engine/src/flutter/third_party/freetype-android/BUILD.gn deleted file mode 100644 index e8b3aa8095..0000000000 --- a/engine/src/flutter/third_party/freetype-android/BUILD.gn +++ /dev/null @@ -1,56 +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. - -assert(is_android, "This library is only used on Android") - -config("freetype_config") { - include_dirs = [ - "include", - "src/include", - ] -} - -source_set("freetype") { - sources = [ - # The following files are not sorted alphabetically, but in the - # 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/ftbase.c", - "src/src/base/ftsystem.c", - "src/src/base/ftinit.c", - "src/src/base/ftgasp.c", - "src/src/base/ftmm.c", - "src/src/gzip/ftgzip.c", - "src/src/raster/raster.c", - "src/src/sfnt/sfnt.c", - "src/src/smooth/smooth.c", - "src/src/autofit/autofit.c", - "src/src/truetype/truetype.c", - "src/src/cff/cff.c", - "src/src/psnames/psnames.c", - "src/src/pshinter/pshinter.c", - ] - - 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" ] - - deps = [ - "//third_party/libpng", - "//third_party/zlib", - ] -} diff --git a/engine/src/flutter/third_party/freetype-android/OWNERS b/engine/src/flutter/third_party/freetype-android/OWNERS deleted file mode 100644 index a5ce419f26..0000000000 --- a/engine/src/flutter/third_party/freetype-android/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 72d405af41..0000000000 --- a/engine/src/flutter/third_party/freetype-android/README.chromium +++ /dev/null @@ -1,26 +0,0 @@ -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/docs/FTL.TXT -Security Critical: yes -License Android Compatible: yes - -Description: -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. 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 deleted file mode 100644 index 169f132f1f..0000000000 --- a/engine/src/flutter/third_party/freetype-android/freetype.gyp +++ /dev/null @@ -1,67 +0,0 @@ -# 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 deleted file mode 100644 index 8ec70b8082..0000000000 --- a/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftmodule.h +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************/ -/* */ -/* 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 deleted file mode 100644 index 24991961cc..0000000000 --- a/engine/src/flutter/third_party/freetype-android/include/freetype-android-config/ftoption.h +++ /dev/null @@ -1,886 +0,0 @@ -/***************************************************************************/ -/* */ -/* 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/iccjpeg/BUILD.gn b/engine/src/flutter/third_party/iccjpeg/BUILD.gn deleted file mode 100644 index 4c4a995977..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/BUILD.gn +++ /dev/null @@ -1,19 +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. - -config("iccjpeg_config") { - include_dirs = [ "." ] -} - -source_set("iccjpeg") { - sources = [ - "iccjpeg.c", - "iccjpeg.h", - ] - - public_configs = [ ":iccjpeg_config" ] - deps = [ - "//third_party:jpeg", - ] -} diff --git a/engine/src/flutter/third_party/iccjpeg/LICENSE b/engine/src/flutter/third_party/iccjpeg/LICENSE deleted file mode 100644 index 49b65d36bf..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/LICENSE +++ /dev/null @@ -1,49 +0,0 @@ -LICENSE extracted from IJG's jpeg distribution: ------------------------------------------------ - -In plain English: - -1. We don't promise that this software works. (But if you find any bugs, - please let us know!) -2. You can use this software for whatever you want. You don't have to pay us. -3. You may not pretend that you wrote this software. If you use it in a - program, you must acknowledge somewhere in your documentation that - you've used the IJG code. - -In legalese: - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-1998, Thomas G. Lane. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - diff --git a/engine/src/flutter/third_party/iccjpeg/OWNERS b/engine/src/flutter/third_party/iccjpeg/OWNERS deleted file mode 100644 index 082e626289..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/OWNERS +++ /dev/null @@ -1 +0,0 @@ -fbarchard@chromium.org diff --git a/engine/src/flutter/third_party/iccjpeg/README.chromium b/engine/src/flutter/third_party/iccjpeg/README.chromium deleted file mode 100644 index 5722ecca99..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/README.chromium +++ /dev/null @@ -1,20 +0,0 @@ -Name: iccjpeg -URL: http://www.ijg.org -Version: unknown -License: Custom license -License File: LICENSE -Security Critical: yes -License Android Compatible: yes - -Description: -Contain support for ICC color profile on top of jpeg6b (and up) library. -Original author is Tom Lane, from the IJG group. -We include the relevant part of the original IJG licensing term -in the file LICENSE. - -Documentation for ICC profile can be found at: http://www.color.org - -Local Modifications: -* On BSD platforms we might need to include to correct header file from - the system, so a USE_SYSTEM_LIBJPEG ifdef is added to iccjpeg.h in order - to be able to decide which jpeglib.h header to include. diff --git a/engine/src/flutter/third_party/iccjpeg/iccjpeg.c b/engine/src/flutter/third_party/iccjpeg/iccjpeg.c deleted file mode 100644 index aa96c8bebf..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/iccjpeg.c +++ /dev/null @@ -1,248 +0,0 @@ -/* - * iccprofile.c - * - * This file provides code to read and write International Color Consortium - * (ICC) device profiles embedded in JFIF JPEG image files. The ICC has - * defined a standard format for including such data in JPEG "APP2" markers. - * The code given here does not know anything about the internal structure - * of the ICC profile data; it just knows how to put the profile data into - * a JPEG file being written, or get it back out when reading. - * - * This code depends on new features added to the IJG JPEG library as of - * IJG release 6b; it will not compile or work with older IJG versions. - * - * NOTE: this code would need surgery to work on 16-bit-int machines - * with ICC profiles exceeding 64K bytes in size. If you need to do that, - * change all the "unsigned int" variables to "INT32". You'll also need - * to find a malloc() replacement that can allocate more than 64K. - */ - -#include "iccjpeg.h" -#include /* define malloc() */ - - -/* - * Since an ICC profile can be larger than the maximum size of a JPEG marker - * (64K), we need provisions to split it into multiple markers. The format - * defined by the ICC specifies one or more APP2 markers containing the - * following data: - * Identifying string ASCII "ICC_PROFILE\0" (12 bytes) - * Marker sequence number 1 for first APP2, 2 for next, etc (1 byte) - * Number of markers Total number of APP2's used (1 byte) - * Profile data (remainder of APP2 data) - * Decoders should use the marker sequence numbers to reassemble the profile, - * rather than assuming that the APP2 markers appear in the correct sequence. - */ - -#define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ -#define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ -#define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ -#define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) - - -/* - * This routine writes the given ICC profile data into a JPEG file. - * It *must* be called AFTER calling jpeg_start_compress() and BEFORE - * the first call to jpeg_write_scanlines(). - * (This ordering ensures that the APP2 marker(s) will appear after the - * SOI and JFIF or Adobe markers, but before all else.) - */ - -void -write_icc_profile (j_compress_ptr cinfo, - const JOCTET *icc_data_ptr, - unsigned int icc_data_len) -{ - unsigned int num_markers; /* total number of markers we'll write */ - int cur_marker = 1; /* per spec, counting starts at 1 */ - unsigned int length; /* number of bytes to write in this marker */ - - /* Calculate the number of markers we'll need, rounding up of course */ - num_markers = icc_data_len / MAX_DATA_BYTES_IN_MARKER; - if (num_markers * MAX_DATA_BYTES_IN_MARKER != icc_data_len) - num_markers++; - - while (icc_data_len > 0) { - /* length of profile to put in this marker */ - length = icc_data_len; - if (length > MAX_DATA_BYTES_IN_MARKER) - length = MAX_DATA_BYTES_IN_MARKER; - icc_data_len -= length; - - /* Write the JPEG marker header (APP2 code and marker length) */ - jpeg_write_m_header(cinfo, ICC_MARKER, - (unsigned int) (length + ICC_OVERHEAD_LEN)); - - /* Write the marker identifying string "ICC_PROFILE" (null-terminated). - * We code it in this less-than-transparent way so that the code works - * even if the local character set is not ASCII. - */ - jpeg_write_m_byte(cinfo, 0x49); - jpeg_write_m_byte(cinfo, 0x43); - jpeg_write_m_byte(cinfo, 0x43); - jpeg_write_m_byte(cinfo, 0x5F); - jpeg_write_m_byte(cinfo, 0x50); - jpeg_write_m_byte(cinfo, 0x52); - jpeg_write_m_byte(cinfo, 0x4F); - jpeg_write_m_byte(cinfo, 0x46); - jpeg_write_m_byte(cinfo, 0x49); - jpeg_write_m_byte(cinfo, 0x4C); - jpeg_write_m_byte(cinfo, 0x45); - jpeg_write_m_byte(cinfo, 0x0); - - /* Add the sequencing info */ - jpeg_write_m_byte(cinfo, cur_marker); - jpeg_write_m_byte(cinfo, (int) num_markers); - - /* Add the profile data */ - while (length--) { - jpeg_write_m_byte(cinfo, *icc_data_ptr); - icc_data_ptr++; - } - cur_marker++; - } -} - - -/* - * Prepare for reading an ICC profile - */ - -void -setup_read_icc_profile (j_decompress_ptr cinfo) -{ - /* Tell the library to keep any APP2 data it may find */ - jpeg_save_markers(cinfo, ICC_MARKER, 0xFFFF); -} - - -/* - * Handy subroutine to test whether a saved marker is an ICC profile marker. - */ - -static boolean -marker_is_icc (jpeg_saved_marker_ptr marker) -{ - return - marker->marker == ICC_MARKER && - marker->data_length >= ICC_OVERHEAD_LEN && - /* verify the identifying string */ - GETJOCTET(marker->data[0]) == 0x49 && - GETJOCTET(marker->data[1]) == 0x43 && - GETJOCTET(marker->data[2]) == 0x43 && - GETJOCTET(marker->data[3]) == 0x5F && - GETJOCTET(marker->data[4]) == 0x50 && - GETJOCTET(marker->data[5]) == 0x52 && - GETJOCTET(marker->data[6]) == 0x4F && - GETJOCTET(marker->data[7]) == 0x46 && - GETJOCTET(marker->data[8]) == 0x49 && - GETJOCTET(marker->data[9]) == 0x4C && - GETJOCTET(marker->data[10]) == 0x45 && - GETJOCTET(marker->data[11]) == 0x0; -} - - -/* - * See if there was an ICC profile in the JPEG file being read; - * if so, reassemble and return the profile data. - * - * TRUE is returned if an ICC profile was found, FALSE if not. - * If TRUE is returned, *icc_data_ptr is set to point to the - * returned data, and *icc_data_len is set to its length. - * - * IMPORTANT: the data at **icc_data_ptr has been allocated with malloc() - * and must be freed by the caller with free() when the caller no longer - * needs it. (Alternatively, we could write this routine to use the - * IJG library's memory allocator, so that the data would be freed implicitly - * at jpeg_finish_decompress() time. But it seems likely that many apps - * will prefer to have the data stick around after decompression finishes.) - * - * NOTE: if the file contains invalid ICC APP2 markers, we just silently - * return FALSE. You might want to issue an error message instead. - */ - -boolean -read_icc_profile (j_decompress_ptr cinfo, - JOCTET **icc_data_ptr, - unsigned int *icc_data_len) -{ - jpeg_saved_marker_ptr marker; - int num_markers = 0; - int seq_no; - JOCTET *icc_data; - unsigned int total_length; -#define MAX_SEQ_NO 255 /* sufficient since marker numbers are bytes */ - char marker_present[MAX_SEQ_NO+1]; /* 1 if marker found */ - unsigned int data_length[MAX_SEQ_NO+1]; /* size of profile data in marker */ - unsigned int data_offset[MAX_SEQ_NO+1]; /* offset for data in marker */ - - *icc_data_ptr = NULL; /* avoid confusion if FALSE return */ - *icc_data_len = 0; - - /* This first pass over the saved markers discovers whether there are - * any ICC markers and verifies the consistency of the marker numbering. - */ - - for (seq_no = 1; seq_no <= MAX_SEQ_NO; seq_no++) - marker_present[seq_no] = 0; - - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { - if (marker_is_icc(marker)) { - if (num_markers == 0) - num_markers = GETJOCTET(marker->data[13]); - else if (num_markers != GETJOCTET(marker->data[13])) - return FALSE; /* inconsistent num_markers fields */ - seq_no = GETJOCTET(marker->data[12]); - if (seq_no <= 0 || seq_no > num_markers) - return FALSE; /* bogus sequence number */ - if (marker_present[seq_no]) - return FALSE; /* duplicate sequence numbers */ - marker_present[seq_no] = 1; - data_length[seq_no] = marker->data_length - ICC_OVERHEAD_LEN; - } - } - - if (num_markers == 0) - return FALSE; - - /* Check for missing markers, count total space needed, - * compute offset of each marker's part of the data. - */ - - total_length = 0; - for (seq_no = 1; seq_no <= num_markers; seq_no++) { - if (marker_present[seq_no] == 0) - return FALSE; /* missing sequence number */ - data_offset[seq_no] = total_length; - total_length += data_length[seq_no]; - } - - if (total_length <= 0) - return FALSE; /* found only empty markers? */ - - /* Allocate space for assembled data */ - icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); - if (icc_data == NULL) - return FALSE; /* oops, out of memory */ - - /* and fill it in */ - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { - if (marker_is_icc(marker)) { - JOCTET FAR *src_ptr; - JOCTET *dst_ptr; - unsigned int length; - seq_no = GETJOCTET(marker->data[12]); - dst_ptr = icc_data + data_offset[seq_no]; - src_ptr = marker->data + ICC_OVERHEAD_LEN; - length = data_length[seq_no]; - while (length--) { - *dst_ptr++ = *src_ptr++; - } - } - } - - *icc_data_ptr = icc_data; - *icc_data_len = total_length; - - return TRUE; -} diff --git a/engine/src/flutter/third_party/iccjpeg/iccjpeg.gyp b/engine/src/flutter/third_party/iccjpeg/iccjpeg.gyp deleted file mode 100644 index 780114858a..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/iccjpeg.gyp +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -{ - 'targets': [ - { - 'target_name': 'iccjpeg', - 'type': 'static_library', - 'dependencies': [ - '<(libjpeg_gyp_path):libjpeg', - ], - 'sources': [ - 'iccjpeg.c', - 'iccjpeg.h', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '.', - ], - }, - }, - ], -} diff --git a/engine/src/flutter/third_party/iccjpeg/iccjpeg.h b/engine/src/flutter/third_party/iccjpeg/iccjpeg.h deleted file mode 100644 index 25dd42e737..0000000000 --- a/engine/src/flutter/third_party/iccjpeg/iccjpeg.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * iccprofile.h - * - * This file provides code to read and write International Color Consortium - * (ICC) device profiles embedded in JFIF JPEG image files. The ICC has - * defined a standard format for including such data in JPEG "APP2" markers. - * The code given here does not know anything about the internal structure - * of the ICC profile data; it just knows how to put the profile data into - * a JPEG file being written, or get it back out when reading. - * - * This code depends on new features added to the IJG JPEG library as of - * IJG release 6b; it will not compile or work with older IJG versions. - * - * NOTE: this code would need surgery to work on 16-bit-int machines - * with ICC profiles exceeding 64K bytes in size. See iccprofile.c - * for details. - */ - -#include /* needed to define "FILE", "NULL" */ - -#if defined(USE_SYSTEM_LIBJPEG) -#include -#else -#include "jpeglib.h" -#endif - - -/* - * This routine writes the given ICC profile data into a JPEG file. - * It *must* be called AFTER calling jpeg_start_compress() and BEFORE - * the first call to jpeg_write_scanlines(). - * (This ordering ensures that the APP2 marker(s) will appear after the - * SOI and JFIF or Adobe markers, but before all else.) - */ - -extern void write_icc_profile JPP((j_compress_ptr cinfo, - const JOCTET *icc_data_ptr, - unsigned int icc_data_len)); - - -/* - * Reading a JPEG file that may contain an ICC profile requires two steps: - * - * 1. After jpeg_create_decompress() but before jpeg_read_header(), - * call setup_read_icc_profile(). This routine tells the IJG library - * to save in memory any APP2 markers it may find in the file. - * - * 2. After jpeg_read_header(), call read_icc_profile() to find out - * whether there was a profile and obtain it if so. - */ - - -/* - * Prepare for reading an ICC profile - */ - -extern void setup_read_icc_profile JPP((j_decompress_ptr cinfo)); - - -/* - * See if there was an ICC profile in the JPEG file being read; - * if so, reassemble and return the profile data. - * - * TRUE is returned if an ICC profile was found, FALSE if not. - * If TRUE is returned, *icc_data_ptr is set to point to the - * returned data, and *icc_data_len is set to its length. - * - * IMPORTANT: the data at **icc_data_ptr has been allocated with malloc() - * and must be freed by the caller with free() when the caller no longer - * needs it. (Alternatively, we could write this routine to use the - * IJG library's memory allocator, so that the data would be freed implicitly - * at jpeg_finish_decompress() time. But it seems likely that many apps - * will prefer to have the data stick around after decompression finishes.) - */ - -extern boolean read_icc_profile JPP((j_decompress_ptr cinfo, - JOCTET **icc_data_ptr, - unsigned int *icc_data_len)); diff --git a/engine/src/flutter/third_party/instrumented_libraries/BUILD.gn b/engine/src/flutter/third_party/instrumented_libraries/BUILD.gn deleted file mode 100644 index 8d113ef091..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/BUILD.gn +++ /dev/null @@ -1,67 +0,0 @@ -# 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 deleted file mode 100644 index 4ec7dc6d01..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/OWNERS +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 222a25c929..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/README.chromium +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index d177d9a553..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/binaries/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# 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 deleted file mode 100644 index 71e2def757..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-precise.tgz.sha1 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 193be3422d..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9f17c0d636..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-precise.tgz.sha1 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index bbe6657162..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1 +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 8989568893..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/blacklists/asan/libglib2.0-0.txt +++ /dev/null @@ -1,2 +0,0 @@ -# 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 deleted file mode 100644 index 45c66832ee..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libglib2.0-0.txt +++ /dev/null @@ -1,2 +0,0 @@ -# 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 deleted file mode 100644 index a72a39d1a4..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/blacklists/msan/libx11-6.txt +++ /dev/null @@ -1,2 +0,0 @@ -# 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 deleted file mode 100644 index 307aed1940..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/instrumented_libraries.gyp +++ /dev/null @@ -1,860 +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. - -{ - '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 deleted file mode 100644 index 7cfeba5e70..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/libfontconfig.trusty.diff +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 75f4f64206..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.precise.diff +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 2a8295b8b1..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/libgtk2.0-0.trusty.diff +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index a5599a4a42..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/libpixman-1-0.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- 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 deleted file mode 100644 index 2e4ca7358e..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/libva1.diff +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index aeb486ebf6..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/libxcb1.precise.diff +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 1275e5afb7..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/nss.diff +++ /dev/null @@ -1,30 +0,0 @@ -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 deleted file mode 100644 index fc2ca0d297..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/pulseaudio.precise.diff +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 18a6a3319b..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/patches/zlib1g.diff +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100755 index 0de0c914df..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/build_and_package.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/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 deleted file mode 100755 index 83ec7b6aa8..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/download_binaries.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/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 deleted file mode 100755 index 56c4014914..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/download_build_install.py +++ /dev/null @@ -1,436 +0,0 @@ -#!/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 deleted file mode 100755 index 578243f430..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/fix_rpaths.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/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 deleted file mode 100755 index 7b8c3cbddd..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/install-build-deps.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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 deleted file mode 100755 index 7b3b39035d..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autogen.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/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 deleted file mode 100755 index 138fabec33..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index 2a3ac3fca2..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/freetype.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 deleted file mode 100755 index d7c59a4df4..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 deleted file mode 100755 index 254804ab81..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 deleted file mode 100755 index adaf38f56e..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 deleted file mode 100755 index 07b790800c..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 deleted file mode 100755 index d28002ac5b..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/libva1.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 deleted file mode 100755 index a74f1a7ad8..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/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 deleted file mode 100755 index 921b59068e..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/pre-build/udev.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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 deleted file mode 100755 index 3e1779069d..0000000000 --- a/engine/src/flutter/third_party/instrumented_libraries/scripts/unpack_binaries.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/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 deleted file mode 100644 index fdea260639..0000000000 --- a/engine/src/flutter/third_party/jsr-305/BUILD.gn +++ /dev/null @@ -1,38 +0,0 @@ -import("//build/config/android/rules.gni") - -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", - "src/ri/src/main/java/javax/annotation/Detainted.java", - "src/ri/src/main/java/javax/annotation/Untainted.java", - "src/ri/src/main/java/javax/annotation/Signed.java", - "src/ri/src/main/java/javax/annotation/Nonnull.java", - "src/ri/src/main/java/javax/annotation/Nullable.java", - "src/ri/src/main/java/javax/annotation/ParametersAreNullableByDefault.java", - "src/ri/src/main/java/javax/annotation/OverridingMethodsMustInvokeSuper.java", - "src/ri/src/main/java/javax/annotation/Tainted.java", - "src/ri/src/main/java/javax/annotation/CheckReturnValue.java", - "src/ri/src/main/java/javax/annotation/Nonnegative.java", - "src/ri/src/main/java/javax/annotation/WillCloseWhenClosed.java", - "src/ri/src/main/java/javax/annotation/RegEx.java", - "src/ri/src/main/java/javax/annotation/Syntax.java", - "src/ri/src/main/java/javax/annotation/meta/TypeQualifierValidator.java", - "src/ri/src/main/java/javax/annotation/meta/Exclusive.java", - "src/ri/src/main/java/javax/annotation/meta/Exhaustive.java", - "src/ri/src/main/java/javax/annotation/meta/TypeQualifier.java", - "src/ri/src/main/java/javax/annotation/meta/TypeQualifierNickname.java", - "src/ri/src/main/java/javax/annotation/meta/TypeQualifierDefault.java", - "src/ri/src/main/java/javax/annotation/meta/When.java", - "src/ri/src/main/java/javax/annotation/CheckForNull.java", - "src/ri/src/main/java/javax/annotation/MatchesPattern.java", - "src/ri/src/main/java/javax/annotation/concurrent/Immutable.java", - "src/ri/src/main/java/javax/annotation/concurrent/NotThreadSafe.java", - "src/ri/src/main/java/javax/annotation/concurrent/ThreadSafe.java", - "src/ri/src/main/java/javax/annotation/concurrent/GuardedBy.java", - "src/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java", - "src/ri/src/main/java/javax/annotation/WillClose.java", - "src/ri/src/main/java/javax/annotation/WillNotClose.java", - ] -} diff --git a/engine/src/flutter/third_party/jsr-305/README.chromium b/engine/src/flutter/third_party/jsr-305/README.chromium deleted file mode 100644 index cecbc52be0..0000000000 --- a/engine/src/flutter/third_party/jsr-305/README.chromium +++ /dev/null @@ -1,16 +0,0 @@ -Name: JSR 305: Annotations for Software Defect Detection in Java -Short Name: jsr-305 -URL: https://code.google.com/p/jsr-305/ -Version: r51 -License: BSD 2-Clause License -License File: src/ri/LICENSE -Security Critical: no - -Description: -This project contains reference implementations, test cases, and other -documents under source code control for Java Specification Request 305: -Annotations for Software Defect Detection. More information at the Google -group: http://groups.google.com/group/jsr-305 - -Local Modifications: -None. diff --git a/engine/src/flutter/third_party/jsr-305/jsr-305.gyp b/engine/src/flutter/third_party/jsr-305/jsr-305.gyp deleted file mode 100644 index 37af4b20a5..0000000000 --- a/engine/src/flutter/third_party/jsr-305/jsr-305.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'targets': [ - { - 'target_name': 'jsr_305_javalib', - 'type': 'none', - 'variables': { - # The sources are not located in a folder that is called src/, so we - # need to set it in additional_src_dirs parameter instead. - 'java_in_dir': '../../build/android/empty', - 'additional_src_dirs': [ 'src/ri/' ], - }, - 'includes': [ '../../build/java.gypi' ], - }, - ] -} diff --git a/engine/src/flutter/third_party/junit/BUILD.gn b/engine/src/flutter/third_party/junit/BUILD.gn deleted file mode 100644 index babe0f2bdd..0000000000 --- a/engine/src/flutter/third_party/junit/BUILD.gn +++ /dev/null @@ -1,20 +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("//build/config/android/rules.gni") - -# GYP: //third_party/junit.gyp:hamcrest_jar -java_prebuilt("hamcrest") { - jar_path = "src/lib/hamcrest-core-1.1.jar" -} - -# GYP: //third_party/junit.gyp:junit_jar -java_library("junit") { - chromium_code = false - testonly = true - deps = [ - ":hamcrest", - ] - DEPRECATED_java_in_dir = "src/src/main/java" -} diff --git a/engine/src/flutter/third_party/junit/LICENSE b/engine/src/flutter/third_party/junit/LICENSE deleted file mode 100644 index 1aba77acf1..0000000000 --- a/engine/src/flutter/third_party/junit/LICENSE +++ /dev/null @@ -1,218 +0,0 @@ -JUnit - -Common Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are -not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and -such derivative works, in source code and object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under -Licensed Patents to make, use, sell, offer to sell, import and otherwise -transfer the Contribution of such Contributor, if any, in source code and -object code form. This patent license shall apply to the combination of the -Contribution and the Program if, at the time the Contribution is added by the -Contributor, such addition of the Contribution causes such combination to be -covered by the Licensed Patents. The patent license shall not apply to any -other combinations which include the Contribution. No hardware per se is -licensed hereunder. - - c) Recipient understands that although each Contributor grants the -licenses to its Contributions set forth herein, no assurances are provided by -any Contributor that the Program does not infringe the patent or other -intellectual property rights of any other entity. Each Contributor disclaims -any liability to Recipient for claims brought by any other entity based on -infringement of intellectual property rights or otherwise. As a condition to -exercising the rights and licenses granted hereunder, each Recipient hereby -assumes sole responsibility to secure any other intellectual property rights -needed, if any. For example, if a third party patent license is required to -allow Recipient to distribute the Program, it is Recipient's responsibility to -acquire that license before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient -copyright rights in its Contribution, if any, to grant the copyright license -set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are -offered by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on -or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the -Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense and -any related settlement negotiations. The Indemnified Contributor may -participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using -and distributing the Program and assumes all risks associated with its exercise -of rights under this Agreement, including but not limited to the risks and -costs of program errors, compliance with applicable laws, damage to or loss of -data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect to -a patent applicable to software (including a cross-claim or counterclaim in a -lawsuit), then any patent licenses granted by that Contributor to such -Recipient under this Agreement shall terminate as of the date such litigation -is filed. In addition, if Recipient institutes patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging that the -Program itself (excluding combinations of the Program with other software or -hardware) infringes such Recipient's patent(s), then such Recipient's rights -granted under Section 2(b) shall terminate as of the date such litigation is -filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue -and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -IBM is the initial Agreement Steward. IBM may assign the responsibility to -serve as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The Program -(including Contributions) may always be distributed subject to the version of -the Agreement under which it was received. In addition, after a new version of -the Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly stated -in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to -the intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial -in any resulting litigation. - diff --git a/engine/src/flutter/third_party/junit/OWNERS b/engine/src/flutter/third_party/junit/OWNERS deleted file mode 100644 index 212ffdf244..0000000000 --- a/engine/src/flutter/third_party/junit/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -jbudorick@chromium.org -klundberg@chromium.org - diff --git a/engine/src/flutter/third_party/junit/README.chromium b/engine/src/flutter/third_party/junit/README.chromium deleted file mode 100644 index 5a1651bb74..0000000000 --- a/engine/src/flutter/third_party/junit/README.chromium +++ /dev/null @@ -1,10 +0,0 @@ -Name: JUnit -URL: http://junit.org -Version: 4.10 -License: Common Public License 1.0 -License File: NOT_SHIPPED -Security Critical: no -License Android Compatible: yes -Description: JUnit is a java unit testing library. -Local Modifications: None - diff --git a/engine/src/flutter/third_party/junit/junit.gyp b/engine/src/flutter/third_party/junit/junit.gyp deleted file mode 100644 index 9fa92b8286..0000000000 --- a/engine/src/flutter/third_party/junit/junit.gyp +++ /dev/null @@ -1,36 +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. - -{ - 'targets': [ - { - # GN: //third_party/junit:hamcrest - 'target_name': 'hamcrest_jar', - 'type': 'none', - 'variables': { - 'jar_path': 'src/lib/hamcrest-core-1.1.jar', - 'enable_errorprone': '0', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - { - # GN: //third_party/junit:junit - 'target_name': 'junit_jar', - 'type': 'none', - 'dependencies': [ - 'hamcrest_jar', - ], - 'variables': { - 'src_paths': [ 'src/src/main/java' ], - 'enable_errorprone': '0', - }, - 'includes': [ - '../../build/host_jar.gypi', - ], - }, - ], -} - diff --git a/engine/src/flutter/third_party/markupsafe/AUTHORS b/engine/src/flutter/third_party/markupsafe/AUTHORS deleted file mode 100644 index f7e2942ecc..0000000000 --- a/engine/src/flutter/third_party/markupsafe/AUTHORS +++ /dev/null @@ -1,13 +0,0 @@ -MarkupSafe is written and maintained by Armin Ronacher and -various contributors: - -Development Lead -```````````````` - -- Armin Ronacher - -Patches and Suggestions -``````````````````````` - -- Georg Brandl -- Mickaël Guérin diff --git a/engine/src/flutter/third_party/markupsafe/LICENSE b/engine/src/flutter/third_party/markupsafe/LICENSE deleted file mode 100644 index 5d2693890d..0000000000 --- a/engine/src/flutter/third_party/markupsafe/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Copyright (c) 2010 by Armin Ronacher and contributors. See AUTHORS -for more details. - -Some rights reserved. - -Redistribution and use in source and binary forms of the software as well -as documentation, with or without modification, are permitted provided -that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -* The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.md5 b/engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.md5 deleted file mode 100644 index 1348d1eea1..0000000000 --- a/engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.md5 +++ /dev/null @@ -1 +0,0 @@ -f8d252fd05371e51dec2fe9a36890687 MarkupSafe-0.18.tar.gz diff --git a/engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.sha512 b/engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.sha512 deleted file mode 100644 index ab752200d5..0000000000 --- a/engine/src/flutter/third_party/markupsafe/MarkupSafe-0.18.tar.gz.sha512 +++ /dev/null @@ -1 +0,0 @@ -0438ddf0fdab465c40d9afba8c14ad346be0868df654c11130d05e329992d456a9bc278551970cbd09244a29c77213885d0c363c951b0cfd4d9aa95b248ecff5 MarkupSafe-0.18.tar.gz diff --git a/engine/src/flutter/third_party/markupsafe/OWNERS b/engine/src/flutter/third_party/markupsafe/OWNERS deleted file mode 100644 index 8edbdf893c..0000000000 --- a/engine/src/flutter/third_party/markupsafe/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -timloh@chromium.org -haraken@chromium.org -nbarth@chromium.org diff --git a/engine/src/flutter/third_party/markupsafe/README.chromium b/engine/src/flutter/third_party/markupsafe/README.chromium deleted file mode 100644 index 0fcab52fa2..0000000000 --- a/engine/src/flutter/third_party/markupsafe/README.chromium +++ /dev/null @@ -1,24 +0,0 @@ -Name: MarkupSafe Python Safe String Class -Short Name: markupsafe -URL: https://github.com/mitsuhiko/markupsafe -Version: 0.18 -License: BSD 3-clause License -License File: NOT_SHIPPED -Security Critical: no - -Description: -Safe string class, used by Jinja2 template engine. - -Source: -https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.18.tar.gz -MD5: f8d252fd05371e51dec2fe9a36890687 -SHA-512: 0438ddf0fdab465c40d9afba8c14ad346be0868df654c11130d05e329992d456 - a9bc278551970cbd09244a29c77213885d0c363c951b0cfd4d9aa95b248ecff5 - -Local Modifications: -This only includes the markup directory from the tarball and the LICENSE and -AUTHORS files, removing the unneeded unit tests (tests.py). -Also includes install script (get_markupsafe.sh) and files of hashes (MD5 is -also posted on website, SHA-512 computed locally); script checks hash then -unpacks archive and installs desired files. -Retrieve or update by executing markupsafe/get_markupsafe.sh from third_party. diff --git a/engine/src/flutter/third_party/markupsafe/__init__.py b/engine/src/flutter/third_party/markupsafe/__init__.py deleted file mode 100644 index 25f00d3a4f..0000000000 --- a/engine/src/flutter/third_party/markupsafe/__init__.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -""" - markupsafe - ~~~~~~~~~~ - - Implements a Markup string. - - :copyright: (c) 2010 by Armin Ronacher. - :license: BSD, see LICENSE for more details. -""" -import re -from markupsafe._compat import text_type, string_types, int_types, \ - unichr, PY2 - - -__all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent'] - - -_striptags_re = re.compile(r'(|<[^>]*>)') -_entity_re = re.compile(r'&([^;]+);') - - -class Markup(text_type): - r"""Marks a string as being safe for inclusion in HTML/XML output without - needing to be escaped. This implements the `__html__` interface a couple - of frameworks and web applications use. :class:`Markup` is a direct - subclass of `unicode` and provides all the methods of `unicode` just that - it escapes arguments passed and always returns `Markup`. - - The `escape` function returns markup objects so that double escaping can't - happen. - - The constructor of the :class:`Markup` class can be used for three - different things: When passed an unicode object it's assumed to be safe, - when passed an object with an HTML representation (has an `__html__` - method) that representation is used, otherwise the object passed is - converted into a unicode string and then assumed to be safe: - - >>> Markup("Hello World!") - Markup(u'Hello World!') - >>> class Foo(object): - ... def __html__(self): - ... return 'foo' - ... - >>> Markup(Foo()) - Markup(u'foo') - - If you want object passed being always treated as unsafe you can use the - :meth:`escape` classmethod to create a :class:`Markup` object: - - >>> Markup.escape("Hello World!") - Markup(u'Hello <em>World</em>!') - - Operations on a markup string are markup aware which means that all - arguments are passed through the :func:`escape` function: - - >>> em = Markup("%s") - >>> em % "foo & bar" - Markup(u'foo & bar') - >>> strong = Markup("%(text)s") - >>> strong % {'text': 'hacker here'} - Markup(u'<blink>hacker here</blink>') - >>> Markup("Hello ") + "" - Markup(u'Hello <foo>') - """ - __slots__ = () - - def __new__(cls, base=u'', encoding=None, errors='strict'): - if hasattr(base, '__html__'): - base = base.__html__() - if encoding is None: - return text_type.__new__(cls, base) - return text_type.__new__(cls, base, encoding, errors) - - def __html__(self): - return self - - def __add__(self, other): - if isinstance(other, string_types) or hasattr(other, '__html__'): - return self.__class__(super(Markup, self).__add__(self.escape(other))) - return NotImplemented - - def __radd__(self, other): - if hasattr(other, '__html__') or isinstance(other, string_types): - return self.escape(other).__add__(self) - return NotImplemented - - def __mul__(self, num): - if isinstance(num, int_types): - return self.__class__(text_type.__mul__(self, num)) - return NotImplemented - __rmul__ = __mul__ - - def __mod__(self, arg): - if isinstance(arg, tuple): - arg = tuple(_MarkupEscapeHelper(x, self.escape) for x in arg) - else: - arg = _MarkupEscapeHelper(arg, self.escape) - return self.__class__(text_type.__mod__(self, arg)) - - def __repr__(self): - return '%s(%s)' % ( - self.__class__.__name__, - text_type.__repr__(self) - ) - - def join(self, seq): - return self.__class__(text_type.join(self, map(self.escape, seq))) - join.__doc__ = text_type.join.__doc__ - - def split(self, *args, **kwargs): - return list(map(self.__class__, text_type.split(self, *args, **kwargs))) - split.__doc__ = text_type.split.__doc__ - - def rsplit(self, *args, **kwargs): - return list(map(self.__class__, text_type.rsplit(self, *args, **kwargs))) - rsplit.__doc__ = text_type.rsplit.__doc__ - - def splitlines(self, *args, **kwargs): - return list(map(self.__class__, text_type.splitlines(self, *args, **kwargs))) - splitlines.__doc__ = text_type.splitlines.__doc__ - - def unescape(self): - r"""Unescape markup again into an text_type string. This also resolves - known HTML4 and XHTML entities: - - >>> Markup("Main » About").unescape() - u'Main \xbb About' - """ - from markupsafe._constants import HTML_ENTITIES - def handle_match(m): - name = m.group(1) - if name in HTML_ENTITIES: - return unichr(HTML_ENTITIES[name]) - try: - if name[:2] in ('#x', '#X'): - return unichr(int(name[2:], 16)) - elif name.startswith('#'): - return unichr(int(name[1:])) - except ValueError: - pass - return u'' - return _entity_re.sub(handle_match, text_type(self)) - - def striptags(self): - r"""Unescape markup into an text_type string and strip all tags. This - also resolves known HTML4 and XHTML entities. Whitespace is - normalized to one: - - >>> Markup("Main » About").striptags() - u'Main \xbb About' - """ - stripped = u' '.join(_striptags_re.sub('', self).split()) - return Markup(stripped).unescape() - - @classmethod - def escape(cls, s): - """Escape the string. Works like :func:`escape` with the difference - that for subclasses of :class:`Markup` this function would return the - correct subclass. - """ - rv = escape(s) - if rv.__class__ is not cls: - return cls(rv) - return rv - - def make_wrapper(name): - orig = getattr(text_type, name) - def func(self, *args, **kwargs): - args = _escape_argspec(list(args), enumerate(args), self.escape) - #_escape_argspec(kwargs, kwargs.iteritems(), None) - return self.__class__(orig(self, *args, **kwargs)) - func.__name__ = orig.__name__ - func.__doc__ = orig.__doc__ - return func - - for method in '__getitem__', 'capitalize', \ - 'title', 'lower', 'upper', 'replace', 'ljust', \ - 'rjust', 'lstrip', 'rstrip', 'center', 'strip', \ - 'translate', 'expandtabs', 'swapcase', 'zfill': - locals()[method] = make_wrapper(method) - - # new in python 2.5 - if hasattr(text_type, 'partition'): - def partition(self, sep): - return tuple(map(self.__class__, - text_type.partition(self, self.escape(sep)))) - def rpartition(self, sep): - return tuple(map(self.__class__, - text_type.rpartition(self, self.escape(sep)))) - - # new in python 2.6 - if hasattr(text_type, 'format'): - format = make_wrapper('format') - - # not in python 3 - if hasattr(text_type, '__getslice__'): - __getslice__ = make_wrapper('__getslice__') - - del method, make_wrapper - - -def _escape_argspec(obj, iterable, escape): - """Helper for various string-wrapped functions.""" - for key, value in iterable: - if hasattr(value, '__html__') or isinstance(value, string_types): - obj[key] = escape(value) - return obj - - -class _MarkupEscapeHelper(object): - """Helper for Markup.__mod__""" - - def __init__(self, obj, escape): - self.obj = obj - self.escape = escape - - __getitem__ = lambda s, x: _MarkupEscapeHelper(s.obj[x], s.escape) - __unicode__ = __str__ = lambda s: text_type(s.escape(s.obj)) - __repr__ = lambda s: str(s.escape(repr(s.obj))) - __int__ = lambda s: int(s.obj) - __float__ = lambda s: float(s.obj) - - -# we have to import it down here as the speedups and native -# modules imports the markup type which is define above. -try: - from markupsafe._speedups import escape, escape_silent, soft_unicode -except ImportError: - from markupsafe._native import escape, escape_silent, soft_unicode - -if not PY2: - soft_str = soft_unicode - __all__.append('soft_str') diff --git a/engine/src/flutter/third_party/markupsafe/_compat.py b/engine/src/flutter/third_party/markupsafe/_compat.py deleted file mode 100644 index 29e4a3dac1..0000000000 --- a/engine/src/flutter/third_party/markupsafe/_compat.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -""" - markupsafe._compat - ~~~~~~~~~~~~~~~~~~ - - Compatibility module for different Python versions. - - :copyright: (c) 2013 by Armin Ronacher. - :license: BSD, see LICENSE for more details. -""" -import sys - -PY2 = sys.version_info[0] == 2 - -if not PY2: - text_type = str - string_types = (str,) - unichr = chr - int_types = (int,) -else: - text_type = unicode - string_types = (str, unicode) - unichr = unichr - int_types = (int, long) diff --git a/engine/src/flutter/third_party/markupsafe/_constants.py b/engine/src/flutter/third_party/markupsafe/_constants.py deleted file mode 100644 index 919bf03c50..0000000000 --- a/engine/src/flutter/third_party/markupsafe/_constants.py +++ /dev/null @@ -1,267 +0,0 @@ -# -*- coding: utf-8 -*- -""" - markupsafe._constants - ~~~~~~~~~~~~~~~~~~~~~ - - Highlevel implementation of the Markup string. - - :copyright: (c) 2010 by Armin Ronacher. - :license: BSD, see LICENSE for more details. -""" - - -HTML_ENTITIES = { - 'AElig': 198, - 'Aacute': 193, - 'Acirc': 194, - 'Agrave': 192, - 'Alpha': 913, - 'Aring': 197, - 'Atilde': 195, - 'Auml': 196, - 'Beta': 914, - 'Ccedil': 199, - 'Chi': 935, - 'Dagger': 8225, - 'Delta': 916, - 'ETH': 208, - 'Eacute': 201, - 'Ecirc': 202, - 'Egrave': 200, - 'Epsilon': 917, - 'Eta': 919, - 'Euml': 203, - 'Gamma': 915, - 'Iacute': 205, - 'Icirc': 206, - 'Igrave': 204, - 'Iota': 921, - 'Iuml': 207, - 'Kappa': 922, - 'Lambda': 923, - 'Mu': 924, - 'Ntilde': 209, - 'Nu': 925, - 'OElig': 338, - 'Oacute': 211, - 'Ocirc': 212, - 'Ograve': 210, - 'Omega': 937, - 'Omicron': 927, - 'Oslash': 216, - 'Otilde': 213, - 'Ouml': 214, - 'Phi': 934, - 'Pi': 928, - 'Prime': 8243, - 'Psi': 936, - 'Rho': 929, - 'Scaron': 352, - 'Sigma': 931, - 'THORN': 222, - 'Tau': 932, - 'Theta': 920, - 'Uacute': 218, - 'Ucirc': 219, - 'Ugrave': 217, - 'Upsilon': 933, - 'Uuml': 220, - 'Xi': 926, - 'Yacute': 221, - 'Yuml': 376, - 'Zeta': 918, - 'aacute': 225, - 'acirc': 226, - 'acute': 180, - 'aelig': 230, - 'agrave': 224, - 'alefsym': 8501, - 'alpha': 945, - 'amp': 38, - 'and': 8743, - 'ang': 8736, - 'apos': 39, - 'aring': 229, - 'asymp': 8776, - 'atilde': 227, - 'auml': 228, - 'bdquo': 8222, - 'beta': 946, - 'brvbar': 166, - 'bull': 8226, - 'cap': 8745, - 'ccedil': 231, - 'cedil': 184, - 'cent': 162, - 'chi': 967, - 'circ': 710, - 'clubs': 9827, - 'cong': 8773, - 'copy': 169, - 'crarr': 8629, - 'cup': 8746, - 'curren': 164, - 'dArr': 8659, - 'dagger': 8224, - 'darr': 8595, - 'deg': 176, - 'delta': 948, - 'diams': 9830, - 'divide': 247, - 'eacute': 233, - 'ecirc': 234, - 'egrave': 232, - 'empty': 8709, - 'emsp': 8195, - 'ensp': 8194, - 'epsilon': 949, - 'equiv': 8801, - 'eta': 951, - 'eth': 240, - 'euml': 235, - 'euro': 8364, - 'exist': 8707, - 'fnof': 402, - 'forall': 8704, - 'frac12': 189, - 'frac14': 188, - 'frac34': 190, - 'frasl': 8260, - 'gamma': 947, - 'ge': 8805, - 'gt': 62, - 'hArr': 8660, - 'harr': 8596, - 'hearts': 9829, - 'hellip': 8230, - 'iacute': 237, - 'icirc': 238, - 'iexcl': 161, - 'igrave': 236, - 'image': 8465, - 'infin': 8734, - 'int': 8747, - 'iota': 953, - 'iquest': 191, - 'isin': 8712, - 'iuml': 239, - 'kappa': 954, - 'lArr': 8656, - 'lambda': 955, - 'lang': 9001, - 'laquo': 171, - 'larr': 8592, - 'lceil': 8968, - 'ldquo': 8220, - 'le': 8804, - 'lfloor': 8970, - 'lowast': 8727, - 'loz': 9674, - 'lrm': 8206, - 'lsaquo': 8249, - 'lsquo': 8216, - 'lt': 60, - 'macr': 175, - 'mdash': 8212, - 'micro': 181, - 'middot': 183, - 'minus': 8722, - 'mu': 956, - 'nabla': 8711, - 'nbsp': 160, - 'ndash': 8211, - 'ne': 8800, - 'ni': 8715, - 'not': 172, - 'notin': 8713, - 'nsub': 8836, - 'ntilde': 241, - 'nu': 957, - 'oacute': 243, - 'ocirc': 244, - 'oelig': 339, - 'ograve': 242, - 'oline': 8254, - 'omega': 969, - 'omicron': 959, - 'oplus': 8853, - 'or': 8744, - 'ordf': 170, - 'ordm': 186, - 'oslash': 248, - 'otilde': 245, - 'otimes': 8855, - 'ouml': 246, - 'para': 182, - 'part': 8706, - 'permil': 8240, - 'perp': 8869, - 'phi': 966, - 'pi': 960, - 'piv': 982, - 'plusmn': 177, - 'pound': 163, - 'prime': 8242, - 'prod': 8719, - 'prop': 8733, - 'psi': 968, - 'quot': 34, - 'rArr': 8658, - 'radic': 8730, - 'rang': 9002, - 'raquo': 187, - 'rarr': 8594, - 'rceil': 8969, - 'rdquo': 8221, - 'real': 8476, - 'reg': 174, - 'rfloor': 8971, - 'rho': 961, - 'rlm': 8207, - 'rsaquo': 8250, - 'rsquo': 8217, - 'sbquo': 8218, - 'scaron': 353, - 'sdot': 8901, - 'sect': 167, - 'shy': 173, - 'sigma': 963, - 'sigmaf': 962, - 'sim': 8764, - 'spades': 9824, - 'sub': 8834, - 'sube': 8838, - 'sum': 8721, - 'sup': 8835, - 'sup1': 185, - 'sup2': 178, - 'sup3': 179, - 'supe': 8839, - 'szlig': 223, - 'tau': 964, - 'there4': 8756, - 'theta': 952, - 'thetasym': 977, - 'thinsp': 8201, - 'thorn': 254, - 'tilde': 732, - 'times': 215, - 'trade': 8482, - 'uArr': 8657, - 'uacute': 250, - 'uarr': 8593, - 'ucirc': 251, - 'ugrave': 249, - 'uml': 168, - 'upsih': 978, - 'upsilon': 965, - 'uuml': 252, - 'weierp': 8472, - 'xi': 958, - 'yacute': 253, - 'yen': 165, - 'yuml': 255, - 'zeta': 950, - 'zwj': 8205, - 'zwnj': 8204 -} diff --git a/engine/src/flutter/third_party/markupsafe/_native.py b/engine/src/flutter/third_party/markupsafe/_native.py deleted file mode 100644 index 5e83f10a11..0000000000 --- a/engine/src/flutter/third_party/markupsafe/_native.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -""" - markupsafe._native - ~~~~~~~~~~~~~~~~~~ - - Native Python implementation the C module is not compiled. - - :copyright: (c) 2010 by Armin Ronacher. - :license: BSD, see LICENSE for more details. -""" -from markupsafe import Markup -from markupsafe._compat import text_type - - -def escape(s): - """Convert the characters &, <, >, ' and " in string s to HTML-safe - sequences. Use this if you need to display text that might contain - such characters in HTML. Marks return value as markup string. - """ - if hasattr(s, '__html__'): - return s.__html__() - return Markup(text_type(s) - .replace('&', '&') - .replace('>', '>') - .replace('<', '<') - .replace("'", ''') - .replace('"', '"') - ) - - -def escape_silent(s): - """Like :func:`escape` but converts `None` into an empty - markup string. - """ - if s is None: - return Markup() - return escape(s) - - -def soft_unicode(s): - """Make a string unicode if it isn't already. That way a markup - string is not converted back to unicode. - """ - if not isinstance(s, text_type): - s = text_type(s) - return s diff --git a/engine/src/flutter/third_party/markupsafe/_speedups.c b/engine/src/flutter/third_party/markupsafe/_speedups.c deleted file mode 100644 index f349febf22..0000000000 --- a/engine/src/flutter/third_party/markupsafe/_speedups.c +++ /dev/null @@ -1,239 +0,0 @@ -/** - * markupsafe._speedups - * ~~~~~~~~~~~~~~~~~~~~ - * - * This module implements functions for automatic escaping in C for better - * performance. - * - * :copyright: (c) 2010 by Armin Ronacher. - * :license: BSD. - */ - -#include - -#define ESCAPED_CHARS_TABLE_SIZE 63 -#define UNICHR(x) (PyUnicode_AS_UNICODE((PyUnicodeObject*)PyUnicode_DecodeASCII(x, strlen(x), NULL))); - -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#endif - - -static PyObject* markup; -static Py_ssize_t escaped_chars_delta_len[ESCAPED_CHARS_TABLE_SIZE]; -static Py_UNICODE *escaped_chars_repl[ESCAPED_CHARS_TABLE_SIZE]; - -static int -init_constants(void) -{ - PyObject *module; - /* happing of characters to replace */ - escaped_chars_repl['"'] = UNICHR("""); - escaped_chars_repl['\''] = UNICHR("'"); - escaped_chars_repl['&'] = UNICHR("&"); - escaped_chars_repl['<'] = UNICHR("<"); - escaped_chars_repl['>'] = UNICHR(">"); - - /* lengths of those characters when replaced - 1 */ - memset(escaped_chars_delta_len, 0, sizeof (escaped_chars_delta_len)); - escaped_chars_delta_len['"'] = escaped_chars_delta_len['\''] = \ - escaped_chars_delta_len['&'] = 4; - escaped_chars_delta_len['<'] = escaped_chars_delta_len['>'] = 3; - - /* import markup type so that we can mark the return value */ - module = PyImport_ImportModule("markupsafe"); - if (!module) - return 0; - markup = PyObject_GetAttrString(module, "Markup"); - Py_DECREF(module); - - return 1; -} - -static PyObject* -escape_unicode(PyUnicodeObject *in) -{ - PyUnicodeObject *out; - Py_UNICODE *inp = PyUnicode_AS_UNICODE(in); - const Py_UNICODE *inp_end = PyUnicode_AS_UNICODE(in) + PyUnicode_GET_SIZE(in); - Py_UNICODE *next_escp; - Py_UNICODE *outp; - Py_ssize_t delta=0, erepl=0, delta_len=0; - - /* First we need to figure out how long the escaped string will be */ - while (*(inp) || inp < inp_end) { - if (*inp < ESCAPED_CHARS_TABLE_SIZE) { - delta += escaped_chars_delta_len[*inp]; - erepl += !!escaped_chars_delta_len[*inp]; - } - ++inp; - } - - /* Do we need to escape anything at all? */ - if (!erepl) { - Py_INCREF(in); - return (PyObject*)in; - } - - out = (PyUnicodeObject*)PyUnicode_FromUnicode(NULL, PyUnicode_GET_SIZE(in) + delta); - if (!out) - return NULL; - - outp = PyUnicode_AS_UNICODE(out); - inp = PyUnicode_AS_UNICODE(in); - while (erepl-- > 0) { - /* look for the next substitution */ - next_escp = inp; - while (next_escp < inp_end) { - if (*next_escp < ESCAPED_CHARS_TABLE_SIZE && - (delta_len = escaped_chars_delta_len[*next_escp])) { - ++delta_len; - break; - } - ++next_escp; - } - - if (next_escp > inp) { - /* copy unescaped chars between inp and next_escp */ - Py_UNICODE_COPY(outp, inp, next_escp-inp); - outp += next_escp - inp; - } - - /* escape 'next_escp' */ - Py_UNICODE_COPY(outp, escaped_chars_repl[*next_escp], delta_len); - outp += delta_len; - - inp = next_escp + 1; - } - if (inp < inp_end) - Py_UNICODE_COPY(outp, inp, PyUnicode_GET_SIZE(in) - (inp - PyUnicode_AS_UNICODE(in))); - - return (PyObject*)out; -} - - -static PyObject* -escape(PyObject *self, PyObject *text) -{ - PyObject *s = NULL, *rv = NULL, *html; - - /* we don't have to escape integers, bools or floats */ - if (PyLong_CheckExact(text) || -#if PY_MAJOR_VERSION < 3 - PyInt_CheckExact(text) || -#endif - PyFloat_CheckExact(text) || PyBool_Check(text) || - text == Py_None) - return PyObject_CallFunctionObjArgs(markup, text, NULL); - - /* if the object has an __html__ method that performs the escaping */ - html = PyObject_GetAttrString(text, "__html__"); - if (html) { - rv = PyObject_CallObject(html, NULL); - Py_DECREF(html); - return rv; - } - - /* otherwise make the object unicode if it isn't, then escape */ - PyErr_Clear(); - if (!PyUnicode_Check(text)) { -#if PY_MAJOR_VERSION < 3 - PyObject *unicode = PyObject_Unicode(text); -#else - PyObject *unicode = PyObject_Str(text); -#endif - if (!unicode) - return NULL; - s = escape_unicode((PyUnicodeObject*)unicode); - Py_DECREF(unicode); - } - else - s = escape_unicode((PyUnicodeObject*)text); - - /* convert the unicode string into a markup object. */ - rv = PyObject_CallFunctionObjArgs(markup, (PyObject*)s, NULL); - Py_DECREF(s); - return rv; -} - - -static PyObject* -escape_silent(PyObject *self, PyObject *text) -{ - if (text != Py_None) - return escape(self, text); - return PyObject_CallFunctionObjArgs(markup, NULL); -} - - -static PyObject* -soft_unicode(PyObject *self, PyObject *s) -{ - if (!PyUnicode_Check(s)) -#if PY_MAJOR_VERSION < 3 - return PyObject_Unicode(s); -#else - return PyObject_Str(s); -#endif - Py_INCREF(s); - return s; -} - - -static PyMethodDef module_methods[] = { - {"escape", (PyCFunction)escape, METH_O, - "escape(s) -> markup\n\n" - "Convert the characters &, <, >, ', and \" in string s to HTML-safe\n" - "sequences. Use this if you need to display text that might contain\n" - "such characters in HTML. Marks return value as markup string."}, - {"escape_silent", (PyCFunction)escape_silent, METH_O, - "escape_silent(s) -> markup\n\n" - "Like escape but converts None to an empty string."}, - {"soft_unicode", (PyCFunction)soft_unicode, METH_O, - "soft_unicode(object) -> string\n\n" - "Make a string unicode if it isn't already. That way a markup\n" - "string is not converted back to unicode."}, - {NULL, NULL, 0, NULL} /* Sentinel */ -}; - - -#if PY_MAJOR_VERSION < 3 - -#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ -#define PyMODINIT_FUNC void -#endif -PyMODINIT_FUNC -init_speedups(void) -{ - if (!init_constants()) - return; - - Py_InitModule3("markupsafe._speedups", module_methods, ""); -} - -#else /* Python 3.x module initialization */ - -static struct PyModuleDef module_definition = { - PyModuleDef_HEAD_INIT, - "markupsafe._speedups", - NULL, - -1, - module_methods, - NULL, - NULL, - NULL, - NULL -}; - -PyMODINIT_FUNC -PyInit__speedups(void) -{ - if (!init_constants()) - return NULL; - - return PyModule_Create(&module_definition); -} - -#endif diff --git a/engine/src/flutter/third_party/markupsafe/get_markupsafe.sh b/engine/src/flutter/third_party/markupsafe/get_markupsafe.sh deleted file mode 100755 index d268832df8..0000000000 --- a/engine/src/flutter/third_party/markupsafe/get_markupsafe.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash -# Download and extract MarkupSafe -# Homepage: -# https://github.com/mitsuhiko/markupsafe -# Download page: -# https://pypi.python.org/pypi/MarkupSafe -PACKAGE='MarkupSafe' -VERSION='0.18' -PACKAGE_DIR='markupsafe' - -CHROMIUM_FILES="README.chromium OWNERS get_markupsafe.sh" -EXTRA_FILES='LICENSE AUTHORS' -REMOVE_FILES='tests.py' - -SRC_URL='https://pypi.python.org/packages/source/' -SRC_URL+="${PACKAGE:0:1}/$PACKAGE/$PACKAGE-$VERSION.tar.gz" -FILENAME="$(basename $SRC_URL)" -MD5_FILENAME="$FILENAME.md5" -SHA512_FILENAME="$FILENAME.sha512" -CHROMIUM_FILES+=" $MD5_FILENAME $SHA512_FILENAME" - -BUILD_DIR="$PACKAGE-$VERSION" -THIRD_PARTY="$(dirname $(realpath $(dirname "${BASH_SOURCE[0]}")))" -INSTALL_DIR="$THIRD_PARTY/$PACKAGE_DIR" -OUT_DIR="$INSTALL_DIR/$BUILD_DIR/$PACKAGE_DIR" -OLD_DIR="$THIRD_PARTY/$PACKAGE_DIR.old" - -function check_hashes { - # Hashes generated via: - # FILENAME=MarkupSafe-0.18.tar.gz - # md5sum "$FILENAME" > "$FILENAME.md5" - # sha512sum "$FILENAME" > "$FILENAME.sha512" - # unset FILENAME - - # MD5 - if ! [ -f "$MD5_FILENAME" ] - then - echo "MD5 hash file $MD5_FILENAME not found, could not verify archive" - exit 1 - fi - - # 32-digit hash, followed by filename - MD5_HASHFILE_REGEX="^[0-9a-f]{32} $FILENAME" - if ! grep --extended-regex --line-regex --silent \ - "$MD5_HASHFILE_REGEX" "$MD5_FILENAME" - then - echo "MD5 hash file $MD5_FILENAME does not contain hash for $FILENAME," \ - 'could not verify archive' - echo 'Hash file contents are:' - cat "$MD5_FILENAME" - exit 1 - fi - - if ! md5sum --check "$MD5_FILENAME" - then - echo 'MD5 hash does not match,' \ - "archive file $FILENAME corrupt or compromised!" - exit 1 - fi - - # SHA-512 - if ! [ -f "$SHA512_FILENAME" ] - then - echo "SHA-512 hash file $SHA512_FILENAME not found," \ - 'could not verify archive' - exit 1 - fi - - # 128-digit hash, followed by filename - SHA512_HASHFILE_REGEX="^[0-9a-f]{128} $FILENAME" - if ! grep --extended-regex --line-regex --silent \ - "$SHA512_HASHFILE_REGEX" "$SHA512_FILENAME" - then - echo "SHA-512 hash file $SHA512_FILENAME does not contain hash for" \ - "$FILENAME, could not verify archive" - echo 'Hash file contents are:' - cat "$SHA512_FILENAME" - exit 1 - fi - - if ! sha512sum --check "$SHA512_FILENAME" - then - echo 'SHA-512 hash does not match,' \ - "archive file $FILENAME corrupt or compromised!" - exit 1 - fi -} - - -################################################################################ -# Body - -cd "$INSTALL_DIR" -echo "Downloading $SRC_URL" -curl --remote-name "$SRC_URL" -check_hashes -tar xvzf "$FILENAME" -# Copy extra files over -for FILE in $CHROMIUM_FILES -do - cp "$FILE" "$OUT_DIR" -done - -cd "$BUILD_DIR" -for FILE in $EXTRA_FILES -do - cp "$FILE" "$OUT_DIR" -done - -cd "$OUT_DIR" -for FILE in $REMOVE_FILES -do - rm -fr "$FILE" -done - -# Replace with new directory -cd .. -mv "$INSTALL_DIR" "$OLD_DIR" -mv "$PACKAGE_DIR" "$INSTALL_DIR" -cd "$INSTALL_DIR" -rm -fr "$OLD_DIR" diff --git a/engine/src/flutter/third_party/mockito/BUILD.gn b/engine/src/flutter/third_party/mockito/BUILD.gn deleted file mode 100644 index 2f03b7c789..0000000000 --- a/engine/src/flutter/third_party/mockito/BUILD.gn +++ /dev/null @@ -1,28 +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("//build/config/android/rules.gni") - -# GYP: //third_party/mockito.gyp:cglib_and_asm_jar -java_prebuilt("cglib_and_asm_java") { - jar_path = "src/lib/repackaged/cglib-and-asm-1.0.jar" -} - -# GYP: //third_party/mockito.gyp:objenesis_jar -java_prebuilt("objenesis_java") { - jar_path = "src/lib/run/objenesis-2.1.jar" -} - -# GYP: //third_party/mockito.gyp:mockito_jar -java_library("mockito_java") { - chromium_code = false - testonly = true - deps = [ - ":cglib_and_asm_java", - ":objenesis_java", - "../junit:junit", - "../junit:hamcrest", - ] - DEPRECATED_java_in_dir = "src/src" -} diff --git a/engine/src/flutter/third_party/mockito/LICENSE b/engine/src/flutter/third_party/mockito/LICENSE deleted file mode 100644 index 5a311f7c5c..0000000000 --- a/engine/src/flutter/third_party/mockito/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/engine/src/flutter/third_party/mockito/OWNERS b/engine/src/flutter/third_party/mockito/OWNERS deleted file mode 100644 index 64c090fa89..0000000000 --- a/engine/src/flutter/third_party/mockito/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -jbudorick@chromium.org -mikecase@chromium.org diff --git a/engine/src/flutter/third_party/mockito/README.chromium b/engine/src/flutter/third_party/mockito/README.chromium deleted file mode 100644 index 1d932add92..0000000000 --- a/engine/src/flutter/third_party/mockito/README.chromium +++ /dev/null @@ -1,9 +0,0 @@ -Name: Mockito -URL: https://code.google.com/p/mockito -Version: 1.10.5 -License: MIT -License File: NOT_SHIPPED -Security Critical: no -License Android Compatible: yes -Description: Mockito is a java mocking framework. -Local Modifications: None diff --git a/engine/src/flutter/third_party/mockito/mockito.gyp b/engine/src/flutter/third_party/mockito/mockito.gyp deleted file mode 100644 index 03adb06e70..0000000000 --- a/engine/src/flutter/third_party/mockito/mockito.gyp +++ /dev/null @@ -1,50 +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. - -{ - 'targets': [ - { - # GN: //third_party/mockito:cglib_and_asm_java - 'target_name': 'cglib_and_asm_jar', - 'type': 'none', - 'variables': { - 'jar_path': 'src/lib/repackaged/cglib-and-asm-1.0.jar', - 'enable_errorprone': '0', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - { - # GN: //third_party/mockito:objenesis_java - 'target_name': 'objenesis_jar', - 'type': 'none', - 'variables': { - 'jar_path': 'src/lib/run/objenesis-2.1.jar', - 'enable_errorprone': '0', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - { - # GN: //third_party/mockito:mockito_java - 'target_name': 'mockito_jar', - 'type': 'none', - 'dependencies': [ - 'cglib_and_asm_jar', - 'objenesis_jar', - '../junit/junit.gyp:junit_jar', - ], - 'variables': { - 'src_paths': [ 'src/src' ], - 'enable_errorprone': '0', - }, - 'includes': [ - '../../build/host_jar.gypi', - ], - }, - ], -} - diff --git a/engine/src/flutter/third_party/modp_b64/BUILD.gn b/engine/src/flutter/third_party/modp_b64/BUILD.gn deleted file mode 100644 index 2ec992b4c9..0000000000 --- a/engine/src/flutter/third_party/modp_b64/BUILD.gn +++ /dev/null @@ -1,11 +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. - -source_set("modp_b64") { - sources = [ - "modp_b64.cc", - "modp_b64.h", - "modp_b64_data.h", - ] -} diff --git a/engine/src/flutter/third_party/modp_b64/DEPS b/engine/src/flutter/third_party/modp_b64/DEPS deleted file mode 100644 index 8061b5a3f3..0000000000 --- a/engine/src/flutter/third_party/modp_b64/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - '+build', -] \ No newline at end of file diff --git a/engine/src/flutter/third_party/modp_b64/LICENSE b/engine/src/flutter/third_party/modp_b64/LICENSE deleted file mode 100644 index 55af76f3eb..0000000000 --- a/engine/src/flutter/third_party/modp_b64/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ - * MODP_B64 - High performance base64 encoder/decoder - * Version 1.3 -- 17-Mar-2006 - * http://modp.com/release/base64 - * - * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the modp.com nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/engine/src/flutter/third_party/modp_b64/OWNERS b/engine/src/flutter/third_party/modp_b64/OWNERS deleted file mode 100644 index 0144bacf05..0000000000 --- a/engine/src/flutter/third_party/modp_b64/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -jschuh@chromium.org -rsleevi@chromium.org diff --git a/engine/src/flutter/third_party/modp_b64/README.chromium b/engine/src/flutter/third_party/modp_b64/README.chromium deleted file mode 100644 index 35b9e54840..0000000000 --- a/engine/src/flutter/third_party/modp_b64/README.chromium +++ /dev/null @@ -1,15 +0,0 @@ -Name: modp base64 decoder -Short Name: stringencoders -URL: http://code.google.com/p/stringencoders/ -Version: unknown -License: BSD -Security Critical: yes - -Description: -The modp_b64.c file was modified to remove the inclusion of modp's config.h -and to fix compilation errors that occur under VC8. The file was renamed -modp_b64.cc to force it to be compiled as C++ so that the inclusion of -basictypes.h could be possible. - -The modp_b64.cc and modp_b64.h files were modified to make them safe on -64-bit systems. diff --git a/engine/src/flutter/third_party/modp_b64/modp_b64.cc b/engine/src/flutter/third_party/modp_b64/modp_b64.cc deleted file mode 100644 index e5f6cf1024..0000000000 --- a/engine/src/flutter/third_party/modp_b64/modp_b64.cc +++ /dev/null @@ -1,265 +0,0 @@ -/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */ -/* vi: set expandtab shiftwidth=4 tabstop=4: */ -/** - * \file - *
- * MODP_B64 - High performance base64 encoder/decoder
- * Version 1.3 -- 17-Mar-2006
- * http://modp.com/release/base64
- *
- * Copyright © 2005, 2006  Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *   Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- *   Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- *   Neither the name of the modp.com nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * This is the standard "new" BSD license:
- * http://www.opensource.org/licenses/bsd-license.php
- * 
- */ - -/* public header */ -#include "modp_b64.h" - -/* - * If you are ripping this out of the library, comment out the next - * line and uncomment the next lines as approrpiate - */ -//#include "config.h" - -/* if on motoral, sun, ibm; uncomment this */ -/* #define WORDS_BIGENDIAN 1 */ -/* else for Intel, Amd; uncomment this */ -/* #undef WORDS_BIGENDIAN */ - -#include "modp_b64_data.h" - -#define BADCHAR 0x01FFFFFF - -/** - * you can control if we use padding by commenting out this - * next line. However, I highly recommend you use padding and not - * using it should only be for compatability with a 3rd party. - * Also, 'no padding' is not tested! - */ -#define DOPAD 1 - -/* - * if we aren't doing padding - * set the pad character to NULL - */ -#ifndef DOPAD -#undef CHARPAD -#define CHARPAD '\0' -#endif - -size_t modp_b64_encode(char* dest, const char* str, size_t len) -{ - size_t i = 0; - uint8_t* p = (uint8_t*) dest; - - /* unsigned here is important! */ - uint8_t t1, t2, t3; - - if (len > 2) { - for (; i < len - 2; i += 3) { - t1 = str[i]; t2 = str[i+1]; t3 = str[i+2]; - *p++ = e0[t1]; - *p++ = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)]; - *p++ = e1[((t2 & 0x0F) << 2) | ((t3 >> 6) & 0x03)]; - *p++ = e2[t3]; - } - } - - switch (len - i) { - case 0: - break; - case 1: - t1 = str[i]; - *p++ = e0[t1]; - *p++ = e1[(t1 & 0x03) << 4]; - *p++ = CHARPAD; - *p++ = CHARPAD; - break; - default: /* case 2 */ - t1 = str[i]; t2 = str[i+1]; - *p++ = e0[t1]; - *p++ = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)]; - *p++ = e2[(t2 & 0x0F) << 2]; - *p++ = CHARPAD; - } - - *p = '\0'; - return p - (uint8_t*)dest; -} - -#ifdef WORDS_BIGENDIAN /* BIG ENDIAN -- SUN / IBM / MOTOROLA */ -int modp_b64_decode(char* dest, const char* src, int len) -{ - if (len == 0) return 0; - -#ifdef DOPAD - /* if padding is used, then the message must be at least - 4 chars and be a multiple of 4. - there can be at most 2 pad chars at the end */ - if (len < 4 || (len % 4 != 0)) return MODP_B64_ERROR; - if (src[len-1] == CHARPAD) { - len--; - if (src[len -1] == CHARPAD) { - len--; - } - } -#endif /* DOPAD */ - - size_t i; - int leftover = len % 4; - size_t chunks = (leftover == 0) ? len / 4 - 1 : len /4; - - uint8_t* p = (uint8_t*) dest; - uint32_t x = 0; - uint32_t* destInt = (uint32_t*) p; - uint32_t* srcInt = (uint32_t*) src; - uint32_t y = *srcInt++; - for (i = 0; i < chunks; ++i) { - x = d0[y >> 24 & 0xff] | d1[y >> 16 & 0xff] | - d2[y >> 8 & 0xff] | d3[y & 0xff]; - - if (x >= BADCHAR) return MODP_B64_ERROR; - *destInt = x << 8; - p += 3; - destInt = (uint32_t*)p; - y = *srcInt++; - } - - switch (leftover) { - case 0: - x = d0[y >> 24 & 0xff] | d1[y >> 16 & 0xff] | - d2[y >> 8 & 0xff] | d3[y & 0xff]; - if (x >= BADCHAR) return MODP_B64_ERROR; - *p++ = ((uint8_t*)&x)[1]; - *p++ = ((uint8_t*)&x)[2]; - *p = ((uint8_t*)&x)[3]; - return (chunks+1)*3; - case 1: - x = d3[y >> 24]; - *p = (uint8_t)x; - break; - case 2: - x = d3[y >> 24] *64 + d3[(y >> 16) & 0xff]; - *p = (uint8_t)(x >> 4); - break; - default: /* case 3 */ - x = (d3[y >> 24] *64 + d3[(y >> 16) & 0xff])*64 + - d3[(y >> 8) & 0xff]; - *p++ = (uint8_t) (x >> 10); - *p = (uint8_t) (x >> 2); - break; - } - - if (x >= BADCHAR) return MODP_B64_ERROR; - return 3*chunks + (6*leftover)/8; -} - -#else /* LITTLE ENDIAN -- INTEL AND FRIENDS */ - -size_t modp_b64_decode(char* dest, const char* src, size_t len) -{ - if (len == 0) return 0; - -#ifdef DOPAD - /* - * if padding is used, then the message must be at least - * 4 chars and be a multiple of 4 - */ - if (len < 4 || (len % 4 != 0)) return MODP_B64_ERROR; /* error */ - /* there can be at most 2 pad chars at the end */ - if (src[len-1] == CHARPAD) { - len--; - if (src[len -1] == CHARPAD) { - len--; - } - } -#endif - - size_t i; - int leftover = len % 4; - size_t chunks = (leftover == 0) ? len / 4 - 1 : len /4; - - uint8_t* p = (uint8_t*)dest; - uint32_t x = 0; - uint32_t* destInt = (uint32_t*) p; - uint32_t* srcInt = (uint32_t*) src; - uint32_t y = *srcInt++; - for (i = 0; i < chunks; ++i) { - x = d0[y & 0xff] | - d1[(y >> 8) & 0xff] | - d2[(y >> 16) & 0xff] | - d3[(y >> 24) & 0xff]; - - if (x >= BADCHAR) return MODP_B64_ERROR; - *destInt = x ; - p += 3; - destInt = (uint32_t*)p; - y = *srcInt++;} - - - switch (leftover) { - case 0: - x = d0[y & 0xff] | - d1[(y >> 8) & 0xff] | - d2[(y >> 16) & 0xff] | - d3[(y >> 24) & 0xff]; - - if (x >= BADCHAR) return MODP_B64_ERROR; - *p++ = ((uint8_t*)(&x))[0]; - *p++ = ((uint8_t*)(&x))[1]; - *p = ((uint8_t*)(&x))[2]; - return (chunks+1)*3; - break; - case 1: /* with padding this is an impossible case */ - x = d0[y & 0xff]; - *p = *((uint8_t*)(&x)); // i.e. first char/byte in int - break; - case 2: // * case 2, 1 output byte */ - x = d0[y & 0xff] | d1[y >> 8 & 0xff]; - *p = *((uint8_t*)(&x)); // i.e. first char - break; - default: /* case 3, 2 output bytes */ - x = d0[y & 0xff] | - d1[y >> 8 & 0xff ] | - d2[y >> 16 & 0xff]; /* 0x3c */ - *p++ = ((uint8_t*)(&x))[0]; - *p = ((uint8_t*)(&x))[1]; - break; - } - - if (x >= BADCHAR) return MODP_B64_ERROR; - - return 3*chunks + (6*leftover)/8; -} - -#endif /* if bigendian / else / endif */ diff --git a/engine/src/flutter/third_party/modp_b64/modp_b64.h b/engine/src/flutter/third_party/modp_b64/modp_b64.h deleted file mode 100644 index 3270e5fdf1..0000000000 --- a/engine/src/flutter/third_party/modp_b64/modp_b64.h +++ /dev/null @@ -1,171 +0,0 @@ -/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */ -/* vi: set expandtab shiftwidth=4 tabstop=4: */ - -/** - * \file - *
- * High performance base64 encoder / decoder
- * Version 1.3 -- 17-Mar-2006
- *
- * Copyright © 2005, 2006, Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * http://modp.com/release/base64
- *
- * Released under bsd license.  See modp_b64.c for details.
- * 
- * - * The default implementation is the standard b64 encoding with padding. - * It's easy to change this to use "URL safe" characters and to remove - * padding. See the modp_b64.c source code for details. - * - */ - -#ifndef MODP_B64 -#define MODP_B64 - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Encode a raw binary string into base 64. - * src contains the bytes - * len contains the number of bytes in the src - * dest should be allocated by the caller to contain - * at least modp_b64_encode_len(len) bytes (see below) - * This will contain the null-terminated b64 encoded result - * returns length of the destination string plus the ending null byte - * i.e. the result will be equal to strlen(dest) + 1 - * - * Example - * - * \code - * char* src = ...; - * int srclen = ...; //the length of number of bytes in src - * char* dest = (char*) malloc(modp_b64_encode_len); - * int len = modp_b64_encode(dest, src, sourcelen); - * if (len == -1) { - * printf("Error\n"); - * } else { - * printf("b64 = %s\n", dest); - * } - * \endcode - * - */ -size_t modp_b64_encode(char* dest, const char* str, size_t len); - -/** - * Decode a base64 encoded string - * - * src should contain exactly len bytes of b64 characters. - * if src contains -any- non-base characters (such as white - * space, -1 is returned. - * - * dest should be allocated by the caller to contain at least - * len * 3 / 4 bytes. - * - * Returns the length (strlen) of the output, or -1 if unable to - * decode - * - * \code - * char* src = ...; - * int srclen = ...; // or if you don't know use strlen(src) - * char* dest = (char*) malloc(modp_b64_decode_len(srclen)); - * int len = modp_b64_decode(dest, src, sourcelen); - * if (len == -1) { error } - * \endcode - */ -size_t modp_b64_decode(char* dest, const char* src, size_t len); - -/** - * Given a source string of length len, this returns the amount of - * memory the destination string should have. - * - * remember, this is integer math - * 3 bytes turn into 4 chars - * ceiling[len / 3] * 4 + 1 - * - * +1 is for any extra null. - */ -#define modp_b64_encode_len(A) ((A+2)/3 * 4 + 1) - -/** - * Given a base64 string of length len, - * this returns the amount of memory required for output string - * It maybe be more than the actual number of bytes written. - * NOTE: remember this is integer math - * this allocates a bit more memory than traditional versions of b64 - * decode 4 chars turn into 3 bytes - * floor[len * 3/4] + 2 - */ -#define modp_b64_decode_len(A) (A / 4 * 3 + 2) - -/** - * Will return the strlen of the output from encoding. - * This may be less than the required number of bytes allocated. - * - * This allows you to 'deserialized' a struct - * \code - * char* b64encoded = "..."; - * int len = strlen(b64encoded); - * - * struct datastuff foo; - * if (modp_b64_encode_strlen(sizeof(struct datastuff)) != len) { - * // wrong size - * return false; - * } else { - * // safe to do; - * if (modp_b64_decode((char*) &foo, b64encoded, len) == -1) { - * // bad characters - * return false; - * } - * } - * // foo is filled out now - * \endcode - */ -#define modp_b64_encode_strlen(A) ((A + 2)/ 3 * 4) - -#define MODP_B64_ERROR ((size_t)-1) - -#ifdef __cplusplus -} - -#include - -inline std::string& modp_b64_encode(std::string& s) -{ - std::string x(modp_b64_encode_len(s.size()), '\0'); - size_t d = modp_b64_encode(const_cast(x.data()), s.data(), (int)s.size()); - x.erase(d, std::string::npos); - s.swap(x); - return s; -} - -/** - * base 64 decode a string (self-modifing) - * On failure, the string is empty. - * - * This function is for C++ only (duh) - * - * \param[in,out] s the string to be decoded - * \return a reference to the input string - */ -inline std::string& modp_b64_decode(std::string& s) -{ - std::string x(modp_b64_decode_len(s.size()), '\0'); - size_t d = modp_b64_decode(const_cast(x.data()), s.data(), (int)s.size()); - if (d == MODP_B64_ERROR) { - x.clear(); - } else { - x.erase(d, std::string::npos); - } - s.swap(x); - return s; -} - -#endif /* __cplusplus */ - -#endif /* MODP_B64 */ diff --git a/engine/src/flutter/third_party/modp_b64/modp_b64_data.h b/engine/src/flutter/third_party/modp_b64/modp_b64_data.h deleted file mode 100644 index fb85890d9d..0000000000 --- a/engine/src/flutter/third_party/modp_b64/modp_b64_data.h +++ /dev/null @@ -1,482 +0,0 @@ -#include "build/build_config.h" -#include - -#define CHAR62 '+' -#define CHAR63 '/' -#define CHARPAD '=' -static const char e0[256] = { - 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', - 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', - 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H', - 'H', 'H', 'I', 'I', 'I', 'I', 'J', 'J', 'J', 'J', - 'K', 'K', 'K', 'K', 'L', 'L', 'L', 'L', 'M', 'M', - 'M', 'M', 'N', 'N', 'N', 'N', 'O', 'O', 'O', 'O', - 'P', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'Q', 'R', 'R', - 'R', 'R', 'S', 'S', 'S', 'S', 'T', 'T', 'T', 'T', - 'U', 'U', 'U', 'U', 'V', 'V', 'V', 'V', 'W', 'W', - 'W', 'W', 'X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y', - 'Z', 'Z', 'Z', 'Z', 'a', 'a', 'a', 'a', 'b', 'b', - 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', - 'e', 'e', 'e', 'e', 'f', 'f', 'f', 'f', 'g', 'g', - 'g', 'g', 'h', 'h', 'h', 'h', 'i', 'i', 'i', 'i', - 'j', 'j', 'j', 'j', 'k', 'k', 'k', 'k', 'l', 'l', - 'l', 'l', 'm', 'm', 'm', 'm', 'n', 'n', 'n', 'n', - 'o', 'o', 'o', 'o', 'p', 'p', 'p', 'p', 'q', 'q', - 'q', 'q', 'r', 'r', 'r', 'r', 's', 's', 's', 's', - 't', 't', 't', 't', 'u', 'u', 'u', 'u', 'v', 'v', - 'v', 'v', 'w', 'w', 'w', 'w', 'x', 'x', 'x', 'x', - 'y', 'y', 'y', 'y', 'z', 'z', 'z', 'z', '0', '0', - '0', '0', '1', '1', '1', '1', '2', '2', '2', '2', - '3', '3', '3', '3', '4', '4', '4', '4', '5', '5', - '5', '5', '6', '6', '6', '6', '7', '7', '7', '7', - '8', '8', '8', '8', '9', '9', '9', '9', '+', '+', - '+', '+', '/', '/', '/', '/' -}; - -static const char e1[256] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', - 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', - 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', - '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', - 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', - 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', - 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', - 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', - 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', - 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', - 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', - '6', '7', '8', '9', '+', '/' -}; - -static const char e2[256] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', - 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', - 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', - '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', - 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', - 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', - 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', - 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', - 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', - 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', - 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', - '6', '7', '8', '9', '+', '/' -}; - - - -#ifdef WORDS_BIGENDIAN - - -/* SPECIAL DECODE TABLES FOR BIG ENDIAN (IBM/MOTOROLA/SUN) CPUS */ - -static const uint32_t d0[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00f80000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00fc0000, -0x00d00000, 0x00d40000, 0x00d80000, 0x00dc0000, 0x00e00000, 0x00e40000, -0x00e80000, 0x00ec0000, 0x00f00000, 0x00f40000, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00040000, 0x00080000, 0x000c0000, 0x00100000, 0x00140000, 0x00180000, -0x001c0000, 0x00200000, 0x00240000, 0x00280000, 0x002c0000, 0x00300000, -0x00340000, 0x00380000, 0x003c0000, 0x00400000, 0x00440000, 0x00480000, -0x004c0000, 0x00500000, 0x00540000, 0x00580000, 0x005c0000, 0x00600000, -0x00640000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00680000, 0x006c0000, 0x00700000, 0x00740000, 0x00780000, -0x007c0000, 0x00800000, 0x00840000, 0x00880000, 0x008c0000, 0x00900000, -0x00940000, 0x00980000, 0x009c0000, 0x00a00000, 0x00a40000, 0x00a80000, -0x00ac0000, 0x00b00000, 0x00b40000, 0x00b80000, 0x00bc0000, 0x00c00000, -0x00c40000, 0x00c80000, 0x00cc0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -static const uint32_t d1[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x0003e000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0003f000, -0x00034000, 0x00035000, 0x00036000, 0x00037000, 0x00038000, 0x00039000, -0x0003a000, 0x0003b000, 0x0003c000, 0x0003d000, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, -0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, -0x0000d000, 0x0000e000, 0x0000f000, 0x00010000, 0x00011000, 0x00012000, -0x00013000, 0x00014000, 0x00015000, 0x00016000, 0x00017000, 0x00018000, -0x00019000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x0001a000, 0x0001b000, 0x0001c000, 0x0001d000, 0x0001e000, -0x0001f000, 0x00020000, 0x00021000, 0x00022000, 0x00023000, 0x00024000, -0x00025000, 0x00026000, 0x00027000, 0x00028000, 0x00029000, 0x0002a000, -0x0002b000, 0x0002c000, 0x0002d000, 0x0002e000, 0x0002f000, 0x00030000, -0x00031000, 0x00032000, 0x00033000, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -static const uint32_t d2[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00000f80, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000fc0, -0x00000d00, 0x00000d40, 0x00000d80, 0x00000dc0, 0x00000e00, 0x00000e40, -0x00000e80, 0x00000ec0, 0x00000f00, 0x00000f40, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00000040, 0x00000080, 0x000000c0, 0x00000100, 0x00000140, 0x00000180, -0x000001c0, 0x00000200, 0x00000240, 0x00000280, 0x000002c0, 0x00000300, -0x00000340, 0x00000380, 0x000003c0, 0x00000400, 0x00000440, 0x00000480, -0x000004c0, 0x00000500, 0x00000540, 0x00000580, 0x000005c0, 0x00000600, -0x00000640, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00000680, 0x000006c0, 0x00000700, 0x00000740, 0x00000780, -0x000007c0, 0x00000800, 0x00000840, 0x00000880, 0x000008c0, 0x00000900, -0x00000940, 0x00000980, 0x000009c0, 0x00000a00, 0x00000a40, 0x00000a80, -0x00000ac0, 0x00000b00, 0x00000b40, 0x00000b80, 0x00000bc0, 0x00000c00, -0x00000c40, 0x00000c80, 0x00000cc0, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -static const uint32_t d3[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x0000003e, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000003f, -0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, -0x0000003a, 0x0000003b, 0x0000003c, 0x0000003d, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, -0x00000007, 0x00000008, 0x00000009, 0x0000000a, 0x0000000b, 0x0000000c, -0x0000000d, 0x0000000e, 0x0000000f, 0x00000010, 0x00000011, 0x00000012, -0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, -0x00000019, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x0000001a, 0x0000001b, 0x0000001c, 0x0000001d, 0x0000001e, -0x0000001f, 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, -0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002a, -0x0000002b, 0x0000002c, 0x0000002d, 0x0000002e, 0x0000002f, 0x00000030, -0x00000031, 0x00000032, 0x00000033, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -#else - - -/* SPECIAL DECODE TABLES FOR LITTLE ENDIAN (INTEL) CPUS */ - -static const uint32_t d0[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x000000f8, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x000000fc, -0x000000d0, 0x000000d4, 0x000000d8, 0x000000dc, 0x000000e0, 0x000000e4, -0x000000e8, 0x000000ec, 0x000000f0, 0x000000f4, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00000004, 0x00000008, 0x0000000c, 0x00000010, 0x00000014, 0x00000018, -0x0000001c, 0x00000020, 0x00000024, 0x00000028, 0x0000002c, 0x00000030, -0x00000034, 0x00000038, 0x0000003c, 0x00000040, 0x00000044, 0x00000048, -0x0000004c, 0x00000050, 0x00000054, 0x00000058, 0x0000005c, 0x00000060, -0x00000064, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00000068, 0x0000006c, 0x00000070, 0x00000074, 0x00000078, -0x0000007c, 0x00000080, 0x00000084, 0x00000088, 0x0000008c, 0x00000090, -0x00000094, 0x00000098, 0x0000009c, 0x000000a0, 0x000000a4, 0x000000a8, -0x000000ac, 0x000000b0, 0x000000b4, 0x000000b8, 0x000000bc, 0x000000c0, -0x000000c4, 0x000000c8, 0x000000cc, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -static const uint32_t d1[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x0000e003, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000f003, -0x00004003, 0x00005003, 0x00006003, 0x00007003, 0x00008003, 0x00009003, -0x0000a003, 0x0000b003, 0x0000c003, 0x0000d003, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, -0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, -0x0000d000, 0x0000e000, 0x0000f000, 0x00000001, 0x00001001, 0x00002001, -0x00003001, 0x00004001, 0x00005001, 0x00006001, 0x00007001, 0x00008001, -0x00009001, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x0000a001, 0x0000b001, 0x0000c001, 0x0000d001, 0x0000e001, -0x0000f001, 0x00000002, 0x00001002, 0x00002002, 0x00003002, 0x00004002, -0x00005002, 0x00006002, 0x00007002, 0x00008002, 0x00009002, 0x0000a002, -0x0000b002, 0x0000c002, 0x0000d002, 0x0000e002, 0x0000f002, 0x00000003, -0x00001003, 0x00002003, 0x00003003, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -static const uint32_t d2[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00800f00, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00c00f00, -0x00000d00, 0x00400d00, 0x00800d00, 0x00c00d00, 0x00000e00, 0x00400e00, -0x00800e00, 0x00c00e00, 0x00000f00, 0x00400f00, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00400000, 0x00800000, 0x00c00000, 0x00000100, 0x00400100, 0x00800100, -0x00c00100, 0x00000200, 0x00400200, 0x00800200, 0x00c00200, 0x00000300, -0x00400300, 0x00800300, 0x00c00300, 0x00000400, 0x00400400, 0x00800400, -0x00c00400, 0x00000500, 0x00400500, 0x00800500, 0x00c00500, 0x00000600, -0x00400600, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x00800600, 0x00c00600, 0x00000700, 0x00400700, 0x00800700, -0x00c00700, 0x00000800, 0x00400800, 0x00800800, 0x00c00800, 0x00000900, -0x00400900, 0x00800900, 0x00c00900, 0x00000a00, 0x00400a00, 0x00800a00, -0x00c00a00, 0x00000b00, 0x00400b00, 0x00800b00, 0x00c00b00, 0x00000c00, -0x00400c00, 0x00800c00, 0x00c00c00, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -static const uint32_t d3[256] = { -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x003e0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x003f0000, -0x00340000, 0x00350000, 0x00360000, 0x00370000, 0x00380000, 0x00390000, -0x003a0000, 0x003b0000, 0x003c0000, 0x003d0000, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, -0x00010000, 0x00020000, 0x00030000, 0x00040000, 0x00050000, 0x00060000, -0x00070000, 0x00080000, 0x00090000, 0x000a0000, 0x000b0000, 0x000c0000, -0x000d0000, 0x000e0000, 0x000f0000, 0x00100000, 0x00110000, 0x00120000, -0x00130000, 0x00140000, 0x00150000, 0x00160000, 0x00170000, 0x00180000, -0x00190000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x001a0000, 0x001b0000, 0x001c0000, 0x001d0000, 0x001e0000, -0x001f0000, 0x00200000, 0x00210000, 0x00220000, 0x00230000, 0x00240000, -0x00250000, 0x00260000, 0x00270000, 0x00280000, 0x00290000, 0x002a0000, -0x002b0000, 0x002c0000, 0x002d0000, 0x002e0000, 0x002f0000, 0x00300000, -0x00310000, 0x00320000, 0x00330000, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, -0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff -}; - - -#endif diff --git a/engine/src/flutter/third_party/pymock/LICENSE.txt b/engine/src/flutter/third_party/pymock/LICENSE.txt deleted file mode 100644 index 7891703b13..0000000000 --- a/engine/src/flutter/third_party/pymock/LICENSE.txt +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2003-2012, Michael Foord -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/engine/src/flutter/third_party/pymock/OWNERS b/engine/src/flutter/third_party/pymock/OWNERS deleted file mode 100644 index 9946560376..0000000000 --- a/engine/src/flutter/third_party/pymock/OWNERS +++ /dev/null @@ -1 +0,0 @@ -sbc@chromium.org diff --git a/engine/src/flutter/third_party/pymock/README.chromium b/engine/src/flutter/third_party/pymock/README.chromium deleted file mode 100644 index aaf355d79b..0000000000 --- a/engine/src/flutter/third_party/pymock/README.chromium +++ /dev/null @@ -1,10 +0,0 @@ -Name: mock -URL: http://pypi.python.org/pypi/mock -Version: 1.0.1 -Security Critical: no -License: BSD -License File: LICENSE.txt -Description: -Python mock library, currently used by native_client_sdk. This is the -same mock library that is now part of python 3.3 where it is know as -unittest.mock. diff --git a/engine/src/flutter/third_party/pymock/mock.py b/engine/src/flutter/third_party/pymock/mock.py deleted file mode 100644 index c8fc5d1d25..0000000000 --- a/engine/src/flutter/third_party/pymock/mock.py +++ /dev/null @@ -1,2367 +0,0 @@ -# mock.py -# Test tools for mocking and patching. -# Copyright (C) 2007-2012 Michael Foord & the mock team -# E-mail: fuzzyman AT voidspace DOT org DOT uk - -# mock 1.0 -# http://www.voidspace.org.uk/python/mock/ - -# Released subject to the BSD License -# Please see http://www.voidspace.org.uk/python/license.shtml - -# Scripts maintained at http://www.voidspace.org.uk/python/index.shtml -# Comments, suggestions and bug reports welcome. - - -__all__ = ( - 'Mock', - 'MagicMock', - 'patch', - 'sentinel', - 'DEFAULT', - 'ANY', - 'call', - 'create_autospec', - 'FILTER_DIR', - 'NonCallableMock', - 'NonCallableMagicMock', - 'mock_open', - 'PropertyMock', -) - - -__version__ = '1.0.1' - - -import pprint -import sys - -try: - import inspect -except ImportError: - # for alternative platforms that - # may not have inspect - inspect = None - -try: - from functools import wraps as original_wraps -except ImportError: - # Python 2.4 compatibility - def wraps(original): - def inner(f): - f.__name__ = original.__name__ - f.__doc__ = original.__doc__ - f.__module__ = original.__module__ - f.__wrapped__ = original - return f - return inner -else: - if sys.version_info[:2] >= (3, 3): - wraps = original_wraps - else: - def wraps(func): - def inner(f): - f = original_wraps(func)(f) - f.__wrapped__ = func - return f - return inner - -try: - unicode -except NameError: - # Python 3 - basestring = unicode = str - -try: - long -except NameError: - # Python 3 - long = int - -try: - BaseException -except NameError: - # Python 2.4 compatibility - BaseException = Exception - -try: - next -except NameError: - def next(obj): - return obj.next() - - -BaseExceptions = (BaseException,) -if 'java' in sys.platform: - # jython - import java - BaseExceptions = (BaseException, java.lang.Throwable) - -try: - _isidentifier = str.isidentifier -except AttributeError: - # Python 2.X - import keyword - import re - regex = re.compile(r'^[a-z_][a-z0-9_]*$', re.I) - def _isidentifier(string): - if string in keyword.kwlist: - return False - return regex.match(string) - - -inPy3k = sys.version_info[0] == 3 - -# Needed to work around Python 3 bug where use of "super" interferes with -# defining __class__ as a descriptor -_super = super - -self = 'im_self' -builtin = '__builtin__' -if inPy3k: - self = '__self__' - builtin = 'builtins' - -FILTER_DIR = True - - -def _is_instance_mock(obj): - # can't use isinstance on Mock objects because they override __class__ - # The base class for all mocks is NonCallableMock - return issubclass(type(obj), NonCallableMock) - - -def _is_exception(obj): - return ( - isinstance(obj, BaseExceptions) or - isinstance(obj, ClassTypes) and issubclass(obj, BaseExceptions) - ) - - -class _slotted(object): - __slots__ = ['a'] - - -DescriptorTypes = ( - type(_slotted.a), - property, -) - - -def _getsignature(func, skipfirst, instance=False): - if inspect is None: - raise ImportError('inspect module not available') - - if isinstance(func, ClassTypes) and not instance: - try: - func = func.__init__ - except AttributeError: - return - skipfirst = True - elif not isinstance(func, FunctionTypes): - # for classes where instance is True we end up here too - try: - func = func.__call__ - except AttributeError: - return - - if inPy3k: - try: - argspec = inspect.getfullargspec(func) - except TypeError: - # C function / method, possibly inherited object().__init__ - return - regargs, varargs, varkw, defaults, kwonly, kwonlydef, ann = argspec - else: - try: - regargs, varargs, varkwargs, defaults = inspect.getargspec(func) - except TypeError: - # C function / method, possibly inherited object().__init__ - return - - # instance methods and classmethods need to lose the self argument - if getattr(func, self, None) is not None: - regargs = regargs[1:] - if skipfirst: - # this condition and the above one are never both True - why? - regargs = regargs[1:] - - if inPy3k: - signature = inspect.formatargspec( - regargs, varargs, varkw, defaults, - kwonly, kwonlydef, ann, formatvalue=lambda value: "") - else: - signature = inspect.formatargspec( - regargs, varargs, varkwargs, defaults, - formatvalue=lambda value: "") - return signature[1:-1], func - - -def _check_signature(func, mock, skipfirst, instance=False): - if not _callable(func): - return - - result = _getsignature(func, skipfirst, instance) - if result is None: - return - signature, func = result - - # can't use self because "self" is common as an argument name - # unfortunately even not in the first place - src = "lambda _mock_self, %s: None" % signature - checksig = eval(src, {}) - _copy_func_details(func, checksig) - type(mock)._mock_check_sig = checksig - - -def _copy_func_details(func, funcopy): - funcopy.__name__ = func.__name__ - funcopy.__doc__ = func.__doc__ - #funcopy.__dict__.update(func.__dict__) - funcopy.__module__ = func.__module__ - if not inPy3k: - funcopy.func_defaults = func.func_defaults - return - funcopy.__defaults__ = func.__defaults__ - funcopy.__kwdefaults__ = func.__kwdefaults__ - - -def _callable(obj): - if isinstance(obj, ClassTypes): - return True - if getattr(obj, '__call__', None) is not None: - return True - return False - - -def _is_list(obj): - # checks for list or tuples - # XXXX badly named! - return type(obj) in (list, tuple) - - -def _instance_callable(obj): - """Given an object, return True if the object is callable. - For classes, return True if instances would be callable.""" - if not isinstance(obj, ClassTypes): - # already an instance - return getattr(obj, '__call__', None) is not None - - klass = obj - # uses __bases__ instead of __mro__ so that we work with old style classes - if klass.__dict__.get('__call__') is not None: - return True - - for base in klass.__bases__: - if _instance_callable(base): - return True - return False - - -def _set_signature(mock, original, instance=False): - # creates a function with signature (*args, **kwargs) that delegates to a - # mock. It still does signature checking by calling a lambda with the same - # signature as the original. - if not _callable(original): - return - - skipfirst = isinstance(original, ClassTypes) - result = _getsignature(original, skipfirst, instance) - if result is None: - # was a C function (e.g. object().__init__ ) that can't be mocked - return - - signature, func = result - - src = "lambda %s: None" % signature - checksig = eval(src, {}) - _copy_func_details(func, checksig) - - name = original.__name__ - if not _isidentifier(name): - name = 'funcopy' - context = {'_checksig_': checksig, 'mock': mock} - src = """def %s(*args, **kwargs): - _checksig_(*args, **kwargs) - return mock(*args, **kwargs)""" % name - exec (src, context) - funcopy = context[name] - _setup_func(funcopy, mock) - return funcopy - - -def _setup_func(funcopy, mock): - funcopy.mock = mock - - # can't use isinstance with mocks - if not _is_instance_mock(mock): - return - - def assert_called_with(*args, **kwargs): - return mock.assert_called_with(*args, **kwargs) - def assert_called_once_with(*args, **kwargs): - return mock.assert_called_once_with(*args, **kwargs) - def assert_has_calls(*args, **kwargs): - return mock.assert_has_calls(*args, **kwargs) - def assert_any_call(*args, **kwargs): - return mock.assert_any_call(*args, **kwargs) - def reset_mock(): - funcopy.method_calls = _CallList() - funcopy.mock_calls = _CallList() - mock.reset_mock() - ret = funcopy.return_value - if _is_instance_mock(ret) and not ret is mock: - ret.reset_mock() - - funcopy.called = False - funcopy.call_count = 0 - funcopy.call_args = None - funcopy.call_args_list = _CallList() - funcopy.method_calls = _CallList() - funcopy.mock_calls = _CallList() - - funcopy.return_value = mock.return_value - funcopy.side_effect = mock.side_effect - funcopy._mock_children = mock._mock_children - - funcopy.assert_called_with = assert_called_with - funcopy.assert_called_once_with = assert_called_once_with - funcopy.assert_has_calls = assert_has_calls - funcopy.assert_any_call = assert_any_call - funcopy.reset_mock = reset_mock - - mock._mock_delegate = funcopy - - -def _is_magic(name): - return '__%s__' % name[2:-2] == name - - -class _SentinelObject(object): - "A unique, named, sentinel object." - def __init__(self, name): - self.name = name - - def __repr__(self): - return 'sentinel.%s' % self.name - - -class _Sentinel(object): - """Access attributes to return a named object, usable as a sentinel.""" - def __init__(self): - self._sentinels = {} - - def __getattr__(self, name): - if name == '__bases__': - # Without this help(mock) raises an exception - raise AttributeError - return self._sentinels.setdefault(name, _SentinelObject(name)) - - -sentinel = _Sentinel() - -DEFAULT = sentinel.DEFAULT -_missing = sentinel.MISSING -_deleted = sentinel.DELETED - - -class OldStyleClass: - pass -ClassType = type(OldStyleClass) - - -def _copy(value): - if type(value) in (dict, list, tuple, set): - return type(value)(value) - return value - - -ClassTypes = (type,) -if not inPy3k: - ClassTypes = (type, ClassType) - -_allowed_names = set( - [ - 'return_value', '_mock_return_value', 'side_effect', - '_mock_side_effect', '_mock_parent', '_mock_new_parent', - '_mock_name', '_mock_new_name' - ] -) - - -def _delegating_property(name): - _allowed_names.add(name) - _the_name = '_mock_' + name - def _get(self, name=name, _the_name=_the_name): - sig = self._mock_delegate - if sig is None: - return getattr(self, _the_name) - return getattr(sig, name) - def _set(self, value, name=name, _the_name=_the_name): - sig = self._mock_delegate - if sig is None: - self.__dict__[_the_name] = value - else: - setattr(sig, name, value) - - return property(_get, _set) - - - -class _CallList(list): - - def __contains__(self, value): - if not isinstance(value, list): - return list.__contains__(self, value) - len_value = len(value) - len_self = len(self) - if len_value > len_self: - return False - - for i in range(0, len_self - len_value + 1): - sub_list = self[i:i+len_value] - if sub_list == value: - return True - return False - - def __repr__(self): - return pprint.pformat(list(self)) - - -def _check_and_set_parent(parent, value, name, new_name): - if not _is_instance_mock(value): - return False - if ((value._mock_name or value._mock_new_name) or - (value._mock_parent is not None) or - (value._mock_new_parent is not None)): - return False - - _parent = parent - while _parent is not None: - # setting a mock (value) as a child or return value of itself - # should not modify the mock - if _parent is value: - return False - _parent = _parent._mock_new_parent - - if new_name: - value._mock_new_parent = parent - value._mock_new_name = new_name - if name: - value._mock_parent = parent - value._mock_name = name - return True - - - -class Base(object): - _mock_return_value = DEFAULT - _mock_side_effect = None - def __init__(self, *args, **kwargs): - pass - - - -class NonCallableMock(Base): - """A non-callable version of `Mock`""" - - def __new__(cls, *args, **kw): - # every instance has its own class - # so we can create magic methods on the - # class without stomping on other mocks - new = type(cls.__name__, (cls,), {'__doc__': cls.__doc__}) - instance = object.__new__(new) - return instance - - - def __init__( - self, spec=None, wraps=None, name=None, spec_set=None, - parent=None, _spec_state=None, _new_name='', _new_parent=None, - **kwargs - ): - if _new_parent is None: - _new_parent = parent - - __dict__ = self.__dict__ - __dict__['_mock_parent'] = parent - __dict__['_mock_name'] = name - __dict__['_mock_new_name'] = _new_name - __dict__['_mock_new_parent'] = _new_parent - - if spec_set is not None: - spec = spec_set - spec_set = True - - self._mock_add_spec(spec, spec_set) - - __dict__['_mock_children'] = {} - __dict__['_mock_wraps'] = wraps - __dict__['_mock_delegate'] = None - - __dict__['_mock_called'] = False - __dict__['_mock_call_args'] = None - __dict__['_mock_call_count'] = 0 - __dict__['_mock_call_args_list'] = _CallList() - __dict__['_mock_mock_calls'] = _CallList() - - __dict__['method_calls'] = _CallList() - - if kwargs: - self.configure_mock(**kwargs) - - _super(NonCallableMock, self).__init__( - spec, wraps, name, spec_set, parent, - _spec_state - ) - - - def attach_mock(self, mock, attribute): - """ - Attach a mock as an attribute of this one, replacing its name and - parent. Calls to the attached mock will be recorded in the - `method_calls` and `mock_calls` attributes of this one.""" - mock._mock_parent = None - mock._mock_new_parent = None - mock._mock_name = '' - mock._mock_new_name = None - - setattr(self, attribute, mock) - - - def mock_add_spec(self, spec, spec_set=False): - """Add a spec to a mock. `spec` can either be an object or a - list of strings. Only attributes on the `spec` can be fetched as - attributes from the mock. - - If `spec_set` is True then only attributes on the spec can be set.""" - self._mock_add_spec(spec, spec_set) - - - def _mock_add_spec(self, spec, spec_set): - _spec_class = None - - if spec is not None and not _is_list(spec): - if isinstance(spec, ClassTypes): - _spec_class = spec - else: - _spec_class = _get_class(spec) - - spec = dir(spec) - - __dict__ = self.__dict__ - __dict__['_spec_class'] = _spec_class - __dict__['_spec_set'] = spec_set - __dict__['_mock_methods'] = spec - - - def __get_return_value(self): - ret = self._mock_return_value - if self._mock_delegate is not None: - ret = self._mock_delegate.return_value - - if ret is DEFAULT: - ret = self._get_child_mock( - _new_parent=self, _new_name='()' - ) - self.return_value = ret - return ret - - - def __set_return_value(self, value): - if self._mock_delegate is not None: - self._mock_delegate.return_value = value - else: - self._mock_return_value = value - _check_and_set_parent(self, value, None, '()') - - __return_value_doc = "The value to be returned when the mock is called." - return_value = property(__get_return_value, __set_return_value, - __return_value_doc) - - - @property - def __class__(self): - if self._spec_class is None: - return type(self) - return self._spec_class - - called = _delegating_property('called') - call_count = _delegating_property('call_count') - call_args = _delegating_property('call_args') - call_args_list = _delegating_property('call_args_list') - mock_calls = _delegating_property('mock_calls') - - - def __get_side_effect(self): - sig = self._mock_delegate - if sig is None: - return self._mock_side_effect - return sig.side_effect - - def __set_side_effect(self, value): - value = _try_iter(value) - sig = self._mock_delegate - if sig is None: - self._mock_side_effect = value - else: - sig.side_effect = value - - side_effect = property(__get_side_effect, __set_side_effect) - - - def reset_mock(self): - "Restore the mock object to its initial state." - self.called = False - self.call_args = None - self.call_count = 0 - self.mock_calls = _CallList() - self.call_args_list = _CallList() - self.method_calls = _CallList() - - for child in self._mock_children.values(): - if isinstance(child, _SpecState): - continue - child.reset_mock() - - ret = self._mock_return_value - if _is_instance_mock(ret) and ret is not self: - ret.reset_mock() - - - def configure_mock(self, **kwargs): - """Set attributes on the mock through keyword arguments. - - Attributes plus return values and side effects can be set on child - mocks using standard dot notation and unpacking a dictionary in the - method call: - - >>> attrs = {'method.return_value': 3, 'other.side_effect': KeyError} - >>> mock.configure_mock(**attrs)""" - for arg, val in sorted(kwargs.items(), - # we sort on the number of dots so that - # attributes are set before we set attributes on - # attributes - key=lambda entry: entry[0].count('.')): - args = arg.split('.') - final = args.pop() - obj = self - for entry in args: - obj = getattr(obj, entry) - setattr(obj, final, val) - - - def __getattr__(self, name): - if name == '_mock_methods': - raise AttributeError(name) - elif self._mock_methods is not None: - if name not in self._mock_methods or name in _all_magics: - raise AttributeError("Mock object has no attribute %r" % name) - elif _is_magic(name): - raise AttributeError(name) - - result = self._mock_children.get(name) - if result is _deleted: - raise AttributeError(name) - elif result is None: - wraps = None - if self._mock_wraps is not None: - # XXXX should we get the attribute without triggering code - # execution? - wraps = getattr(self._mock_wraps, name) - - result = self._get_child_mock( - parent=self, name=name, wraps=wraps, _new_name=name, - _new_parent=self - ) - self._mock_children[name] = result - - elif isinstance(result, _SpecState): - result = create_autospec( - result.spec, result.spec_set, result.instance, - result.parent, result.name - ) - self._mock_children[name] = result - - return result - - - def __repr__(self): - _name_list = [self._mock_new_name] - _parent = self._mock_new_parent - last = self - - dot = '.' - if _name_list == ['()']: - dot = '' - seen = set() - while _parent is not None: - last = _parent - - _name_list.append(_parent._mock_new_name + dot) - dot = '.' - if _parent._mock_new_name == '()': - dot = '' - - _parent = _parent._mock_new_parent - - # use ids here so as not to call __hash__ on the mocks - if id(_parent) in seen: - break - seen.add(id(_parent)) - - _name_list = list(reversed(_name_list)) - _first = last._mock_name or 'mock' - if len(_name_list) > 1: - if _name_list[1] not in ('()', '().'): - _first += '.' - _name_list[0] = _first - name = ''.join(_name_list) - - name_string = '' - if name not in ('mock', 'mock.'): - name_string = ' name=%r' % name - - spec_string = '' - if self._spec_class is not None: - spec_string = ' spec=%r' - if self._spec_set: - spec_string = ' spec_set=%r' - spec_string = spec_string % self._spec_class.__name__ - return "<%s%s%s id='%s'>" % ( - type(self).__name__, - name_string, - spec_string, - id(self) - ) - - - def __dir__(self): - """Filter the output of `dir(mock)` to only useful members. - XXXX - """ - extras = self._mock_methods or [] - from_type = dir(type(self)) - from_dict = list(self.__dict__) - - if FILTER_DIR: - from_type = [e for e in from_type if not e.startswith('_')] - from_dict = [e for e in from_dict if not e.startswith('_') or - _is_magic(e)] - return sorted(set(extras + from_type + from_dict + - list(self._mock_children))) - - - def __setattr__(self, name, value): - if name in _allowed_names: - # property setters go through here - return object.__setattr__(self, name, value) - elif (self._spec_set and self._mock_methods is not None and - name not in self._mock_methods and - name not in self.__dict__): - raise AttributeError("Mock object has no attribute '%s'" % name) - elif name in _unsupported_magics: - msg = 'Attempting to set unsupported magic method %r.' % name - raise AttributeError(msg) - elif name in _all_magics: - if self._mock_methods is not None and name not in self._mock_methods: - raise AttributeError("Mock object has no attribute '%s'" % name) - - if not _is_instance_mock(value): - setattr(type(self), name, _get_method(name, value)) - original = value - value = lambda *args, **kw: original(self, *args, **kw) - else: - # only set _new_name and not name so that mock_calls is tracked - # but not method calls - _check_and_set_parent(self, value, None, name) - setattr(type(self), name, value) - self._mock_children[name] = value - elif name == '__class__': - self._spec_class = value - return - else: - if _check_and_set_parent(self, value, name, name): - self._mock_children[name] = value - return object.__setattr__(self, name, value) - - - def __delattr__(self, name): - if name in _all_magics and name in type(self).__dict__: - delattr(type(self), name) - if name not in self.__dict__: - # for magic methods that are still MagicProxy objects and - # not set on the instance itself - return - - if name in self.__dict__: - object.__delattr__(self, name) - - obj = self._mock_children.get(name, _missing) - if obj is _deleted: - raise AttributeError(name) - if obj is not _missing: - del self._mock_children[name] - self._mock_children[name] = _deleted - - - - def _format_mock_call_signature(self, args, kwargs): - name = self._mock_name or 'mock' - return _format_call_signature(name, args, kwargs) - - - def _format_mock_failure_message(self, args, kwargs): - message = 'Expected call: %s\nActual call: %s' - expected_string = self._format_mock_call_signature(args, kwargs) - call_args = self.call_args - if len(call_args) == 3: - call_args = call_args[1:] - actual_string = self._format_mock_call_signature(*call_args) - return message % (expected_string, actual_string) - - - def assert_called_with(_mock_self, *args, **kwargs): - """assert that the mock was called with the specified arguments. - - Raises an AssertionError if the args and keyword args passed in are - different to the last call to the mock.""" - self = _mock_self - if self.call_args is None: - expected = self._format_mock_call_signature(args, kwargs) - raise AssertionError('Expected call: %s\nNot called' % (expected,)) - - if self.call_args != (args, kwargs): - msg = self._format_mock_failure_message(args, kwargs) - raise AssertionError(msg) - - - def assert_called_once_with(_mock_self, *args, **kwargs): - """assert that the mock was called exactly once and with the specified - arguments.""" - self = _mock_self - if not self.call_count == 1: - msg = ("Expected to be called once. Called %s times." % - self.call_count) - raise AssertionError(msg) - return self.assert_called_with(*args, **kwargs) - - - def assert_has_calls(self, calls, any_order=False): - """assert the mock has been called with the specified calls. - The `mock_calls` list is checked for the calls. - - If `any_order` is False (the default) then the calls must be - sequential. There can be extra calls before or after the - specified calls. - - If `any_order` is True then the calls can be in any order, but - they must all appear in `mock_calls`.""" - if not any_order: - if calls not in self.mock_calls: - raise AssertionError( - 'Calls not found.\nExpected: %r\n' - 'Actual: %r' % (calls, self.mock_calls) - ) - return - - all_calls = list(self.mock_calls) - - not_found = [] - for kall in calls: - try: - all_calls.remove(kall) - except ValueError: - not_found.append(kall) - if not_found: - raise AssertionError( - '%r not all found in call list' % (tuple(not_found),) - ) - - - def assert_any_call(self, *args, **kwargs): - """assert the mock has been called with the specified arguments. - - The assert passes if the mock has *ever* been called, unlike - `assert_called_with` and `assert_called_once_with` that only pass if - the call is the most recent one.""" - kall = call(*args, **kwargs) - if kall not in self.call_args_list: - expected_string = self._format_mock_call_signature(args, kwargs) - raise AssertionError( - '%s call not found' % expected_string - ) - - - def _get_child_mock(self, **kw): - """Create the child mocks for attributes and return value. - By default child mocks will be the same type as the parent. - Subclasses of Mock may want to override this to customize the way - child mocks are made. - - For non-callable mocks the callable variant will be used (rather than - any custom subclass).""" - _type = type(self) - if not issubclass(_type, CallableMixin): - if issubclass(_type, NonCallableMagicMock): - klass = MagicMock - elif issubclass(_type, NonCallableMock) : - klass = Mock - else: - klass = _type.__mro__[1] - return klass(**kw) - - - -def _try_iter(obj): - if obj is None: - return obj - if _is_exception(obj): - return obj - if _callable(obj): - return obj - try: - return iter(obj) - except TypeError: - # XXXX backwards compatibility - # but this will blow up on first call - so maybe we should fail early? - return obj - - - -class CallableMixin(Base): - - def __init__(self, spec=None, side_effect=None, return_value=DEFAULT, - wraps=None, name=None, spec_set=None, parent=None, - _spec_state=None, _new_name='', _new_parent=None, **kwargs): - self.__dict__['_mock_return_value'] = return_value - - _super(CallableMixin, self).__init__( - spec, wraps, name, spec_set, parent, - _spec_state, _new_name, _new_parent, **kwargs - ) - - self.side_effect = side_effect - - - def _mock_check_sig(self, *args, **kwargs): - # stub method that can be replaced with one with a specific signature - pass - - - def __call__(_mock_self, *args, **kwargs): - # can't use self in-case a function / method we are mocking uses self - # in the signature - _mock_self._mock_check_sig(*args, **kwargs) - return _mock_self._mock_call(*args, **kwargs) - - - def _mock_call(_mock_self, *args, **kwargs): - self = _mock_self - self.called = True - self.call_count += 1 - self.call_args = _Call((args, kwargs), two=True) - self.call_args_list.append(_Call((args, kwargs), two=True)) - - _new_name = self._mock_new_name - _new_parent = self._mock_new_parent - self.mock_calls.append(_Call(('', args, kwargs))) - - seen = set() - skip_next_dot = _new_name == '()' - do_method_calls = self._mock_parent is not None - name = self._mock_name - while _new_parent is not None: - this_mock_call = _Call((_new_name, args, kwargs)) - if _new_parent._mock_new_name: - dot = '.' - if skip_next_dot: - dot = '' - - skip_next_dot = False - if _new_parent._mock_new_name == '()': - skip_next_dot = True - - _new_name = _new_parent._mock_new_name + dot + _new_name - - if do_method_calls: - if _new_name == name: - this_method_call = this_mock_call - else: - this_method_call = _Call((name, args, kwargs)) - _new_parent.method_calls.append(this_method_call) - - do_method_calls = _new_parent._mock_parent is not None - if do_method_calls: - name = _new_parent._mock_name + '.' + name - - _new_parent.mock_calls.append(this_mock_call) - _new_parent = _new_parent._mock_new_parent - - # use ids here so as not to call __hash__ on the mocks - _new_parent_id = id(_new_parent) - if _new_parent_id in seen: - break - seen.add(_new_parent_id) - - ret_val = DEFAULT - effect = self.side_effect - if effect is not None: - if _is_exception(effect): - raise effect - - if not _callable(effect): - result = next(effect) - if _is_exception(result): - raise result - return result - - ret_val = effect(*args, **kwargs) - if ret_val is DEFAULT: - ret_val = self.return_value - - if (self._mock_wraps is not None and - self._mock_return_value is DEFAULT): - return self._mock_wraps(*args, **kwargs) - if ret_val is DEFAULT: - ret_val = self.return_value - return ret_val - - - -class Mock(CallableMixin, NonCallableMock): - """ - Create a new `Mock` object. `Mock` takes several optional arguments - that specify the behaviour of the Mock object: - - * `spec`: This can be either a list of strings or an existing object (a - class or instance) that acts as the specification for the mock object. If - you pass in an object then a list of strings is formed by calling dir on - the object (excluding unsupported magic attributes and methods). Accessing - any attribute not in this list will raise an `AttributeError`. - - If `spec` is an object (rather than a list of strings) then - `mock.__class__` returns the class of the spec object. This allows mocks - to pass `isinstance` tests. - - * `spec_set`: A stricter variant of `spec`. If used, attempting to *set* - or get an attribute on the mock that isn't on the object passed as - `spec_set` will raise an `AttributeError`. - - * `side_effect`: A function to be called whenever the Mock is called. See - the `side_effect` attribute. Useful for raising exceptions or - dynamically changing return values. The function is called with the same - arguments as the mock, and unless it returns `DEFAULT`, the return - value of this function is used as the return value. - - Alternatively `side_effect` can be an exception class or instance. In - this case the exception will be raised when the mock is called. - - If `side_effect` is an iterable then each call to the mock will return - the next value from the iterable. If any of the members of the iterable - are exceptions they will be raised instead of returned. - - * `return_value`: The value returned when the mock is called. By default - this is a new Mock (created on first access). See the - `return_value` attribute. - - * `wraps`: Item for the mock object to wrap. If `wraps` is not None then - calling the Mock will pass the call through to the wrapped object - (returning the real result). Attribute access on the mock will return a - Mock object that wraps the corresponding attribute of the wrapped object - (so attempting to access an attribute that doesn't exist will raise an - `AttributeError`). - - If the mock has an explicit `return_value` set then calls are not passed - to the wrapped object and the `return_value` is returned instead. - - * `name`: If the mock has a name then it will be used in the repr of the - mock. This can be useful for debugging. The name is propagated to child - mocks. - - Mocks can also be called with arbitrary keyword arguments. These will be - used to set attributes on the mock after it is created. - """ - - - -def _dot_lookup(thing, comp, import_path): - try: - return getattr(thing, comp) - except AttributeError: - __import__(import_path) - return getattr(thing, comp) - - -def _importer(target): - components = target.split('.') - import_path = components.pop(0) - thing = __import__(import_path) - - for comp in components: - import_path += ".%s" % comp - thing = _dot_lookup(thing, comp, import_path) - return thing - - -def _is_started(patcher): - # XXXX horrible - return hasattr(patcher, 'is_local') - - -class _patch(object): - - attribute_name = None - _active_patches = set() - - def __init__( - self, getter, attribute, new, spec, create, - spec_set, autospec, new_callable, kwargs - ): - if new_callable is not None: - if new is not DEFAULT: - raise ValueError( - "Cannot use 'new' and 'new_callable' together" - ) - if autospec is not None: - raise ValueError( - "Cannot use 'autospec' and 'new_callable' together" - ) - - self.getter = getter - self.attribute = attribute - self.new = new - self.new_callable = new_callable - self.spec = spec - self.create = create - self.has_local = False - self.spec_set = spec_set - self.autospec = autospec - self.kwargs = kwargs - self.additional_patchers = [] - - - def copy(self): - patcher = _patch( - self.getter, self.attribute, self.new, self.spec, - self.create, self.spec_set, - self.autospec, self.new_callable, self.kwargs - ) - patcher.attribute_name = self.attribute_name - patcher.additional_patchers = [ - p.copy() for p in self.additional_patchers - ] - return patcher - - - def __call__(self, func): - if isinstance(func, ClassTypes): - return self.decorate_class(func) - return self.decorate_callable(func) - - - def decorate_class(self, klass): - for attr in dir(klass): - if not attr.startswith(patch.TEST_PREFIX): - continue - - attr_value = getattr(klass, attr) - if not hasattr(attr_value, "__call__"): - continue - - patcher = self.copy() - setattr(klass, attr, patcher(attr_value)) - return klass - - - def decorate_callable(self, func): - if hasattr(func, 'patchings'): - func.patchings.append(self) - return func - - @wraps(func) - def patched(*args, **keywargs): - # don't use a with here (backwards compatability with Python 2.4) - extra_args = [] - entered_patchers = [] - - # can't use try...except...finally because of Python 2.4 - # compatibility - exc_info = tuple() - try: - try: - for patching in patched.patchings: - arg = patching.__enter__() - entered_patchers.append(patching) - if patching.attribute_name is not None: - keywargs.update(arg) - elif patching.new is DEFAULT: - extra_args.append(arg) - - args += tuple(extra_args) - return func(*args, **keywargs) - except: - if (patching not in entered_patchers and - _is_started(patching)): - # the patcher may have been started, but an exception - # raised whilst entering one of its additional_patchers - entered_patchers.append(patching) - # Pass the exception to __exit__ - exc_info = sys.exc_info() - # re-raise the exception - raise - finally: - for patching in reversed(entered_patchers): - patching.__exit__(*exc_info) - - patched.patchings = [self] - if hasattr(func, 'func_code'): - # not in Python 3 - patched.compat_co_firstlineno = getattr( - func, "compat_co_firstlineno", - func.func_code.co_firstlineno - ) - return patched - - - def get_original(self): - target = self.getter() - name = self.attribute - - original = DEFAULT - local = False - - try: - original = target.__dict__[name] - except (AttributeError, KeyError): - original = getattr(target, name, DEFAULT) - else: - local = True - - if not self.create and original is DEFAULT: - raise AttributeError( - "%s does not have the attribute %r" % (target, name) - ) - return original, local - - - def __enter__(self): - """Perform the patch.""" - new, spec, spec_set = self.new, self.spec, self.spec_set - autospec, kwargs = self.autospec, self.kwargs - new_callable = self.new_callable - self.target = self.getter() - - # normalise False to None - if spec is False: - spec = None - if spec_set is False: - spec_set = None - if autospec is False: - autospec = None - - if spec is not None and autospec is not None: - raise TypeError("Can't specify spec and autospec") - if ((spec is not None or autospec is not None) and - spec_set not in (True, None)): - raise TypeError("Can't provide explicit spec_set *and* spec or autospec") - - original, local = self.get_original() - - if new is DEFAULT and autospec is None: - inherit = False - if spec is True: - # set spec to the object we are replacing - spec = original - if spec_set is True: - spec_set = original - spec = None - elif spec is not None: - if spec_set is True: - spec_set = spec - spec = None - elif spec_set is True: - spec_set = original - - if spec is not None or spec_set is not None: - if original is DEFAULT: - raise TypeError("Can't use 'spec' with create=True") - if isinstance(original, ClassTypes): - # If we're patching out a class and there is a spec - inherit = True - - Klass = MagicMock - _kwargs = {} - if new_callable is not None: - Klass = new_callable - elif spec is not None or spec_set is not None: - this_spec = spec - if spec_set is not None: - this_spec = spec_set - if _is_list(this_spec): - not_callable = '__call__' not in this_spec - else: - not_callable = not _callable(this_spec) - if not_callable: - Klass = NonCallableMagicMock - - if spec is not None: - _kwargs['spec'] = spec - if spec_set is not None: - _kwargs['spec_set'] = spec_set - - # add a name to mocks - if (isinstance(Klass, type) and - issubclass(Klass, NonCallableMock) and self.attribute): - _kwargs['name'] = self.attribute - - _kwargs.update(kwargs) - new = Klass(**_kwargs) - - if inherit and _is_instance_mock(new): - # we can only tell if the instance should be callable if the - # spec is not a list - this_spec = spec - if spec_set is not None: - this_spec = spec_set - if (not _is_list(this_spec) and not - _instance_callable(this_spec)): - Klass = NonCallableMagicMock - - _kwargs.pop('name') - new.return_value = Klass(_new_parent=new, _new_name='()', - **_kwargs) - elif autospec is not None: - # spec is ignored, new *must* be default, spec_set is treated - # as a boolean. Should we check spec is not None and that spec_set - # is a bool? - if new is not DEFAULT: - raise TypeError( - "autospec creates the mock for you. Can't specify " - "autospec and new." - ) - if original is DEFAULT: - raise TypeError("Can't use 'autospec' with create=True") - spec_set = bool(spec_set) - if autospec is True: - autospec = original - - new = create_autospec(autospec, spec_set=spec_set, - _name=self.attribute, **kwargs) - elif kwargs: - # can't set keyword args when we aren't creating the mock - # XXXX If new is a Mock we could call new.configure_mock(**kwargs) - raise TypeError("Can't pass kwargs to a mock we aren't creating") - - new_attr = new - - self.temp_original = original - self.is_local = local - setattr(self.target, self.attribute, new_attr) - if self.attribute_name is not None: - extra_args = {} - if self.new is DEFAULT: - extra_args[self.attribute_name] = new - for patching in self.additional_patchers: - arg = patching.__enter__() - if patching.new is DEFAULT: - extra_args.update(arg) - return extra_args - - return new - - - def __exit__(self, *exc_info): - """Undo the patch.""" - if not _is_started(self): - raise RuntimeError('stop called on unstarted patcher') - - if self.is_local and self.temp_original is not DEFAULT: - setattr(self.target, self.attribute, self.temp_original) - else: - delattr(self.target, self.attribute) - if not self.create and not hasattr(self.target, self.attribute): - # needed for proxy objects like django settings - setattr(self.target, self.attribute, self.temp_original) - - del self.temp_original - del self.is_local - del self.target - for patcher in reversed(self.additional_patchers): - if _is_started(patcher): - patcher.__exit__(*exc_info) - - - def start(self): - """Activate a patch, returning any created mock.""" - result = self.__enter__() - self._active_patches.add(self) - return result - - - def stop(self): - """Stop an active patch.""" - self._active_patches.discard(self) - return self.__exit__() - - - -def _get_target(target): - try: - target, attribute = target.rsplit('.', 1) - except (TypeError, ValueError): - raise TypeError("Need a valid target to patch. You supplied: %r" % - (target,)) - getter = lambda: _importer(target) - return getter, attribute - - -def _patch_object( - target, attribute, new=DEFAULT, spec=None, - create=False, spec_set=None, autospec=None, - new_callable=None, **kwargs - ): - """ - patch.object(target, attribute, new=DEFAULT, spec=None, create=False, - spec_set=None, autospec=None, new_callable=None, **kwargs) - - patch the named member (`attribute`) on an object (`target`) with a mock - object. - - `patch.object` can be used as a decorator, class decorator or a context - manager. Arguments `new`, `spec`, `create`, `spec_set`, - `autospec` and `new_callable` have the same meaning as for `patch`. Like - `patch`, `patch.object` takes arbitrary keyword arguments for configuring - the mock object it creates. - - When used as a class decorator `patch.object` honours `patch.TEST_PREFIX` - for choosing which methods to wrap. - """ - getter = lambda: target - return _patch( - getter, attribute, new, spec, create, - spec_set, autospec, new_callable, kwargs - ) - - -def _patch_multiple(target, spec=None, create=False, spec_set=None, - autospec=None, new_callable=None, **kwargs): - """Perform multiple patches in a single call. It takes the object to be - patched (either as an object or a string to fetch the object by importing) - and keyword arguments for the patches:: - - with patch.multiple(settings, FIRST_PATCH='one', SECOND_PATCH='two'): - ... - - Use `DEFAULT` as the value if you want `patch.multiple` to create - mocks for you. In this case the created mocks are passed into a decorated - function by keyword, and a dictionary is returned when `patch.multiple` is - used as a context manager. - - `patch.multiple` can be used as a decorator, class decorator or a context - manager. The arguments `spec`, `spec_set`, `create`, - `autospec` and `new_callable` have the same meaning as for `patch`. These - arguments will be applied to *all* patches done by `patch.multiple`. - - When used as a class decorator `patch.multiple` honours `patch.TEST_PREFIX` - for choosing which methods to wrap. - """ - if type(target) in (unicode, str): - getter = lambda: _importer(target) - else: - getter = lambda: target - - if not kwargs: - raise ValueError( - 'Must supply at least one keyword argument with patch.multiple' - ) - # need to wrap in a list for python 3, where items is a view - items = list(kwargs.items()) - attribute, new = items[0] - patcher = _patch( - getter, attribute, new, spec, create, spec_set, - autospec, new_callable, {} - ) - patcher.attribute_name = attribute - for attribute, new in items[1:]: - this_patcher = _patch( - getter, attribute, new, spec, create, spec_set, - autospec, new_callable, {} - ) - this_patcher.attribute_name = attribute - patcher.additional_patchers.append(this_patcher) - return patcher - - -def patch( - target, new=DEFAULT, spec=None, create=False, - spec_set=None, autospec=None, new_callable=None, **kwargs - ): - """ - `patch` acts as a function decorator, class decorator or a context - manager. Inside the body of the function or with statement, the `target` - is patched with a `new` object. When the function/with statement exits - the patch is undone. - - If `new` is omitted, then the target is replaced with a - `MagicMock`. If `patch` is used as a decorator and `new` is - omitted, the created mock is passed in as an extra argument to the - decorated function. If `patch` is used as a context manager the created - mock is returned by the context manager. - - `target` should be a string in the form `'package.module.ClassName'`. The - `target` is imported and the specified object replaced with the `new` - object, so the `target` must be importable from the environment you are - calling `patch` from. The target is imported when the decorated function - is executed, not at decoration time. - - The `spec` and `spec_set` keyword arguments are passed to the `MagicMock` - if patch is creating one for you. - - In addition you can pass `spec=True` or `spec_set=True`, which causes - patch to pass in the object being mocked as the spec/spec_set object. - - `new_callable` allows you to specify a different class, or callable object, - that will be called to create the `new` object. By default `MagicMock` is - used. - - A more powerful form of `spec` is `autospec`. If you set `autospec=True` - then the mock with be created with a spec from the object being replaced. - All attributes of the mock will also have the spec of the corresponding - attribute of the object being replaced. Methods and functions being - mocked will have their arguments checked and will raise a `TypeError` if - they are called with the wrong signature. For mocks replacing a class, - their return value (the 'instance') will have the same spec as the class. - - Instead of `autospec=True` you can pass `autospec=some_object` to use an - arbitrary object as the spec instead of the one being replaced. - - By default `patch` will fail to replace attributes that don't exist. If - you pass in `create=True`, and the attribute doesn't exist, patch will - create the attribute for you when the patched function is called, and - delete it again afterwards. This is useful for writing tests against - attributes that your production code creates at runtime. It is off by by - default because it can be dangerous. With it switched on you can write - passing tests against APIs that don't actually exist! - - Patch can be used as a `TestCase` class decorator. It works by - decorating each test method in the class. This reduces the boilerplate - code when your test methods share a common patchings set. `patch` finds - tests by looking for method names that start with `patch.TEST_PREFIX`. - By default this is `test`, which matches the way `unittest` finds tests. - You can specify an alternative prefix by setting `patch.TEST_PREFIX`. - - Patch can be used as a context manager, with the with statement. Here the - patching applies to the indented block after the with statement. If you - use "as" then the patched object will be bound to the name after the - "as"; very useful if `patch` is creating a mock object for you. - - `patch` takes arbitrary keyword arguments. These will be passed to - the `Mock` (or `new_callable`) on construction. - - `patch.dict(...)`, `patch.multiple(...)` and `patch.object(...)` are - available for alternate use-cases. - """ - getter, attribute = _get_target(target) - return _patch( - getter, attribute, new, spec, create, - spec_set, autospec, new_callable, kwargs - ) - - -class _patch_dict(object): - """ - Patch a dictionary, or dictionary like object, and restore the dictionary - to its original state after the test. - - `in_dict` can be a dictionary or a mapping like container. If it is a - mapping then it must at least support getting, setting and deleting items - plus iterating over keys. - - `in_dict` can also be a string specifying the name of the dictionary, which - will then be fetched by importing it. - - `values` can be a dictionary of values to set in the dictionary. `values` - can also be an iterable of `(key, value)` pairs. - - If `clear` is True then the dictionary will be cleared before the new - values are set. - - `patch.dict` can also be called with arbitrary keyword arguments to set - values in the dictionary:: - - with patch.dict('sys.modules', mymodule=Mock(), other_module=Mock()): - ... - - `patch.dict` can be used as a context manager, decorator or class - decorator. When used as a class decorator `patch.dict` honours - `patch.TEST_PREFIX` for choosing which methods to wrap. - """ - - def __init__(self, in_dict, values=(), clear=False, **kwargs): - if isinstance(in_dict, basestring): - in_dict = _importer(in_dict) - self.in_dict = in_dict - # support any argument supported by dict(...) constructor - self.values = dict(values) - self.values.update(kwargs) - self.clear = clear - self._original = None - - - def __call__(self, f): - if isinstance(f, ClassTypes): - return self.decorate_class(f) - @wraps(f) - def _inner(*args, **kw): - self._patch_dict() - try: - return f(*args, **kw) - finally: - self._unpatch_dict() - - return _inner - - - def decorate_class(self, klass): - for attr in dir(klass): - attr_value = getattr(klass, attr) - if (attr.startswith(patch.TEST_PREFIX) and - hasattr(attr_value, "__call__")): - decorator = _patch_dict(self.in_dict, self.values, self.clear) - decorated = decorator(attr_value) - setattr(klass, attr, decorated) - return klass - - - def __enter__(self): - """Patch the dict.""" - self._patch_dict() - - - def _patch_dict(self): - values = self.values - in_dict = self.in_dict - clear = self.clear - - try: - original = in_dict.copy() - except AttributeError: - # dict like object with no copy method - # must support iteration over keys - original = {} - for key in in_dict: - original[key] = in_dict[key] - self._original = original - - if clear: - _clear_dict(in_dict) - - try: - in_dict.update(values) - except AttributeError: - # dict like object with no update method - for key in values: - in_dict[key] = values[key] - - - def _unpatch_dict(self): - in_dict = self.in_dict - original = self._original - - _clear_dict(in_dict) - - try: - in_dict.update(original) - except AttributeError: - for key in original: - in_dict[key] = original[key] - - - def __exit__(self, *args): - """Unpatch the dict.""" - self._unpatch_dict() - return False - - start = __enter__ - stop = __exit__ - - -def _clear_dict(in_dict): - try: - in_dict.clear() - except AttributeError: - keys = list(in_dict) - for key in keys: - del in_dict[key] - - -def _patch_stopall(): - """Stop all active patches.""" - for patch in list(_patch._active_patches): - patch.stop() - - -patch.object = _patch_object -patch.dict = _patch_dict -patch.multiple = _patch_multiple -patch.stopall = _patch_stopall -patch.TEST_PREFIX = 'test' - -magic_methods = ( - "lt le gt ge eq ne " - "getitem setitem delitem " - "len contains iter " - "hash str sizeof " - "enter exit " - "divmod neg pos abs invert " - "complex int float index " - "trunc floor ceil " -) - -numerics = "add sub mul div floordiv mod lshift rshift and xor or pow " -inplace = ' '.join('i%s' % n for n in numerics.split()) -right = ' '.join('r%s' % n for n in numerics.split()) -extra = '' -if inPy3k: - extra = 'bool next ' -else: - extra = 'unicode long nonzero oct hex truediv rtruediv ' - -# not including __prepare__, __instancecheck__, __subclasscheck__ -# (as they are metaclass methods) -# __del__ is not supported at all as it causes problems if it exists - -_non_defaults = set('__%s__' % method for method in [ - 'cmp', 'getslice', 'setslice', 'coerce', 'subclasses', - 'format', 'get', 'set', 'delete', 'reversed', - 'missing', 'reduce', 'reduce_ex', 'getinitargs', - 'getnewargs', 'getstate', 'setstate', 'getformat', - 'setformat', 'repr', 'dir' -]) - - -def _get_method(name, func): - "Turns a callable object (like a mock) into a real function" - def method(self, *args, **kw): - return func(self, *args, **kw) - method.__name__ = name - return method - - -_magics = set( - '__%s__' % method for method in - ' '.join([magic_methods, numerics, inplace, right, extra]).split() -) - -_all_magics = _magics | _non_defaults - -_unsupported_magics = set([ - '__getattr__', '__setattr__', - '__init__', '__new__', '__prepare__' - '__instancecheck__', '__subclasscheck__', - '__del__' -]) - -_calculate_return_value = { - '__hash__': lambda self: object.__hash__(self), - '__str__': lambda self: object.__str__(self), - '__sizeof__': lambda self: object.__sizeof__(self), - '__unicode__': lambda self: unicode(object.__str__(self)), -} - -_return_values = { - '__lt__': NotImplemented, - '__gt__': NotImplemented, - '__le__': NotImplemented, - '__ge__': NotImplemented, - '__int__': 1, - '__contains__': False, - '__len__': 0, - '__exit__': False, - '__complex__': 1j, - '__float__': 1.0, - '__bool__': True, - '__nonzero__': True, - '__oct__': '1', - '__hex__': '0x1', - '__long__': long(1), - '__index__': 1, -} - - -def _get_eq(self): - def __eq__(other): - ret_val = self.__eq__._mock_return_value - if ret_val is not DEFAULT: - return ret_val - return self is other - return __eq__ - -def _get_ne(self): - def __ne__(other): - if self.__ne__._mock_return_value is not DEFAULT: - return DEFAULT - return self is not other - return __ne__ - -def _get_iter(self): - def __iter__(): - ret_val = self.__iter__._mock_return_value - if ret_val is DEFAULT: - return iter([]) - # if ret_val was already an iterator, then calling iter on it should - # return the iterator unchanged - return iter(ret_val) - return __iter__ - -_side_effect_methods = { - '__eq__': _get_eq, - '__ne__': _get_ne, - '__iter__': _get_iter, -} - - - -def _set_return_value(mock, method, name): - fixed = _return_values.get(name, DEFAULT) - if fixed is not DEFAULT: - method.return_value = fixed - return - - return_calulator = _calculate_return_value.get(name) - if return_calulator is not None: - try: - return_value = return_calulator(mock) - except AttributeError: - # XXXX why do we return AttributeError here? - # set it as a side_effect instead? - return_value = AttributeError(name) - method.return_value = return_value - return - - side_effector = _side_effect_methods.get(name) - if side_effector is not None: - method.side_effect = side_effector(mock) - - - -class MagicMixin(object): - def __init__(self, *args, **kw): - _super(MagicMixin, self).__init__(*args, **kw) - self._mock_set_magics() - - - def _mock_set_magics(self): - these_magics = _magics - - if self._mock_methods is not None: - these_magics = _magics.intersection(self._mock_methods) - - remove_magics = set() - remove_magics = _magics - these_magics - - for entry in remove_magics: - if entry in type(self).__dict__: - # remove unneeded magic methods - delattr(self, entry) - - # don't overwrite existing attributes if called a second time - these_magics = these_magics - set(type(self).__dict__) - - _type = type(self) - for entry in these_magics: - setattr(_type, entry, MagicProxy(entry, self)) - - - -class NonCallableMagicMock(MagicMixin, NonCallableMock): - """A version of `MagicMock` that isn't callable.""" - def mock_add_spec(self, spec, spec_set=False): - """Add a spec to a mock. `spec` can either be an object or a - list of strings. Only attributes on the `spec` can be fetched as - attributes from the mock. - - If `spec_set` is True then only attributes on the spec can be set.""" - self._mock_add_spec(spec, spec_set) - self._mock_set_magics() - - - -class MagicMock(MagicMixin, Mock): - """ - MagicMock is a subclass of Mock with default implementations - of most of the magic methods. You can use MagicMock without having to - configure the magic methods yourself. - - If you use the `spec` or `spec_set` arguments then *only* magic - methods that exist in the spec will be created. - - Attributes and the return value of a `MagicMock` will also be `MagicMocks`. - """ - def mock_add_spec(self, spec, spec_set=False): - """Add a spec to a mock. `spec` can either be an object or a - list of strings. Only attributes on the `spec` can be fetched as - attributes from the mock. - - If `spec_set` is True then only attributes on the spec can be set.""" - self._mock_add_spec(spec, spec_set) - self._mock_set_magics() - - - -class MagicProxy(object): - def __init__(self, name, parent): - self.name = name - self.parent = parent - - def __call__(self, *args, **kwargs): - m = self.create_mock() - return m(*args, **kwargs) - - def create_mock(self): - entry = self.name - parent = self.parent - m = parent._get_child_mock(name=entry, _new_name=entry, - _new_parent=parent) - setattr(parent, entry, m) - _set_return_value(parent, m, entry) - return m - - def __get__(self, obj, _type=None): - return self.create_mock() - - - -class _ANY(object): - "A helper object that compares equal to everything." - - def __eq__(self, other): - return True - - def __ne__(self, other): - return False - - def __repr__(self): - return '' - -ANY = _ANY() - - - -def _format_call_signature(name, args, kwargs): - message = '%s(%%s)' % name - formatted_args = '' - args_string = ', '.join([repr(arg) for arg in args]) - kwargs_string = ', '.join([ - '%s=%r' % (key, value) for key, value in kwargs.items() - ]) - if args_string: - formatted_args = args_string - if kwargs_string: - if formatted_args: - formatted_args += ', ' - formatted_args += kwargs_string - - return message % formatted_args - - - -class _Call(tuple): - """ - A tuple for holding the results of a call to a mock, either in the form - `(args, kwargs)` or `(name, args, kwargs)`. - - If args or kwargs are empty then a call tuple will compare equal to - a tuple without those values. This makes comparisons less verbose:: - - _Call(('name', (), {})) == ('name',) - _Call(('name', (1,), {})) == ('name', (1,)) - _Call(((), {'a': 'b'})) == ({'a': 'b'},) - - The `_Call` object provides a useful shortcut for comparing with call:: - - _Call(((1, 2), {'a': 3})) == call(1, 2, a=3) - _Call(('foo', (1, 2), {'a': 3})) == call.foo(1, 2, a=3) - - If the _Call has no name then it will match any name. - """ - def __new__(cls, value=(), name=None, parent=None, two=False, - from_kall=True): - name = '' - args = () - kwargs = {} - _len = len(value) - if _len == 3: - name, args, kwargs = value - elif _len == 2: - first, second = value - if isinstance(first, basestring): - name = first - if isinstance(second, tuple): - args = second - else: - kwargs = second - else: - args, kwargs = first, second - elif _len == 1: - value, = value - if isinstance(value, basestring): - name = value - elif isinstance(value, tuple): - args = value - else: - kwargs = value - - if two: - return tuple.__new__(cls, (args, kwargs)) - - return tuple.__new__(cls, (name, args, kwargs)) - - - def __init__(self, value=(), name=None, parent=None, two=False, - from_kall=True): - self.name = name - self.parent = parent - self.from_kall = from_kall - - - def __eq__(self, other): - if other is ANY: - return True - try: - len_other = len(other) - except TypeError: - return False - - self_name = '' - if len(self) == 2: - self_args, self_kwargs = self - else: - self_name, self_args, self_kwargs = self - - other_name = '' - if len_other == 0: - other_args, other_kwargs = (), {} - elif len_other == 3: - other_name, other_args, other_kwargs = other - elif len_other == 1: - value, = other - if isinstance(value, tuple): - other_args = value - other_kwargs = {} - elif isinstance(value, basestring): - other_name = value - other_args, other_kwargs = (), {} - else: - other_args = () - other_kwargs = value - else: - # len 2 - # could be (name, args) or (name, kwargs) or (args, kwargs) - first, second = other - if isinstance(first, basestring): - other_name = first - if isinstance(second, tuple): - other_args, other_kwargs = second, {} - else: - other_args, other_kwargs = (), second - else: - other_args, other_kwargs = first, second - - if self_name and other_name != self_name: - return False - - # this order is important for ANY to work! - return (other_args, other_kwargs) == (self_args, self_kwargs) - - - def __ne__(self, other): - return not self.__eq__(other) - - - def __call__(self, *args, **kwargs): - if self.name is None: - return _Call(('', args, kwargs), name='()') - - name = self.name + '()' - return _Call((self.name, args, kwargs), name=name, parent=self) - - - def __getattr__(self, attr): - if self.name is None: - return _Call(name=attr, from_kall=False) - name = '%s.%s' % (self.name, attr) - return _Call(name=name, parent=self, from_kall=False) - - - def __repr__(self): - if not self.from_kall: - name = self.name or 'call' - if name.startswith('()'): - name = 'call%s' % name - return name - - if len(self) == 2: - name = 'call' - args, kwargs = self - else: - name, args, kwargs = self - if not name: - name = 'call' - elif not name.startswith('()'): - name = 'call.%s' % name - else: - name = 'call%s' % name - return _format_call_signature(name, args, kwargs) - - - def call_list(self): - """For a call object that represents multiple calls, `call_list` - returns a list of all the intermediate calls as well as the - final call.""" - vals = [] - thing = self - while thing is not None: - if thing.from_kall: - vals.append(thing) - thing = thing.parent - return _CallList(reversed(vals)) - - -call = _Call(from_kall=False) - - - -def create_autospec(spec, spec_set=False, instance=False, _parent=None, - _name=None, **kwargs): - """Create a mock object using another object as a spec. Attributes on the - mock will use the corresponding attribute on the `spec` object as their - spec. - - Functions or methods being mocked will have their arguments checked - to check that they are called with the correct signature. - - If `spec_set` is True then attempting to set attributes that don't exist - on the spec object will raise an `AttributeError`. - - If a class is used as a spec then the return value of the mock (the - instance of the class) will have the same spec. You can use a class as the - spec for an instance object by passing `instance=True`. The returned mock - will only be callable if instances of the mock are callable. - - `create_autospec` also takes arbitrary keyword arguments that are passed to - the constructor of the created mock.""" - if _is_list(spec): - # can't pass a list instance to the mock constructor as it will be - # interpreted as a list of strings - spec = type(spec) - - is_type = isinstance(spec, ClassTypes) - - _kwargs = {'spec': spec} - if spec_set: - _kwargs = {'spec_set': spec} - elif spec is None: - # None we mock with a normal mock without a spec - _kwargs = {} - - _kwargs.update(kwargs) - - Klass = MagicMock - if type(spec) in DescriptorTypes: - # descriptors don't have a spec - # because we don't know what type they return - _kwargs = {} - elif not _callable(spec): - Klass = NonCallableMagicMock - elif is_type and instance and not _instance_callable(spec): - Klass = NonCallableMagicMock - - _new_name = _name - if _parent is None: - # for a top level object no _new_name should be set - _new_name = '' - - mock = Klass(parent=_parent, _new_parent=_parent, _new_name=_new_name, - name=_name, **_kwargs) - - if isinstance(spec, FunctionTypes): - # should only happen at the top level because we don't - # recurse for functions - mock = _set_signature(mock, spec) - else: - _check_signature(spec, mock, is_type, instance) - - if _parent is not None and not instance: - _parent._mock_children[_name] = mock - - if is_type and not instance and 'return_value' not in kwargs: - mock.return_value = create_autospec(spec, spec_set, instance=True, - _name='()', _parent=mock) - - for entry in dir(spec): - if _is_magic(entry): - # MagicMock already does the useful magic methods for us - continue - - if isinstance(spec, FunctionTypes) and entry in FunctionAttributes: - # allow a mock to actually be a function - continue - - # XXXX do we need a better way of getting attributes without - # triggering code execution (?) Probably not - we need the actual - # object to mock it so we would rather trigger a property than mock - # the property descriptor. Likewise we want to mock out dynamically - # provided attributes. - # XXXX what about attributes that raise exceptions other than - # AttributeError on being fetched? - # we could be resilient against it, or catch and propagate the - # exception when the attribute is fetched from the mock - try: - original = getattr(spec, entry) - except AttributeError: - continue - - kwargs = {'spec': original} - if spec_set: - kwargs = {'spec_set': original} - - if not isinstance(original, FunctionTypes): - new = _SpecState(original, spec_set, mock, entry, instance) - mock._mock_children[entry] = new - else: - parent = mock - if isinstance(spec, FunctionTypes): - parent = mock.mock - - new = MagicMock(parent=parent, name=entry, _new_name=entry, - _new_parent=parent, **kwargs) - mock._mock_children[entry] = new - skipfirst = _must_skip(spec, entry, is_type) - _check_signature(original, new, skipfirst=skipfirst) - - # so functions created with _set_signature become instance attributes, - # *plus* their underlying mock exists in _mock_children of the parent - # mock. Adding to _mock_children may be unnecessary where we are also - # setting as an instance attribute? - if isinstance(new, FunctionTypes): - setattr(mock, entry, new) - - return mock - - -def _must_skip(spec, entry, is_type): - if not isinstance(spec, ClassTypes): - if entry in getattr(spec, '__dict__', {}): - # instance attribute - shouldn't skip - return False - spec = spec.__class__ - if not hasattr(spec, '__mro__'): - # old style class: can't have descriptors anyway - return is_type - - for klass in spec.__mro__: - result = klass.__dict__.get(entry, DEFAULT) - if result is DEFAULT: - continue - if isinstance(result, (staticmethod, classmethod)): - return False - return is_type - - # shouldn't get here unless function is a dynamically provided attribute - # XXXX untested behaviour - return is_type - - -def _get_class(obj): - try: - return obj.__class__ - except AttributeError: - # in Python 2, _sre.SRE_Pattern objects have no __class__ - return type(obj) - - -class _SpecState(object): - - def __init__(self, spec, spec_set=False, parent=None, - name=None, ids=None, instance=False): - self.spec = spec - self.ids = ids - self.spec_set = spec_set - self.parent = parent - self.instance = instance - self.name = name - - -FunctionTypes = ( - # python function - type(create_autospec), - # instance method - type(ANY.__eq__), - # unbound method - type(_ANY.__eq__), -) - -FunctionAttributes = set([ - 'func_closure', - 'func_code', - 'func_defaults', - 'func_dict', - 'func_doc', - 'func_globals', - 'func_name', -]) - - -file_spec = None - - -def mock_open(mock=None, read_data=''): - """ - A helper function to create a mock to replace the use of `open`. It works - for `open` called directly or used as a context manager. - - The `mock` argument is the mock object to configure. If `None` (the - default) then a `MagicMock` will be created for you, with the API limited - to methods or attributes available on standard file handles. - - `read_data` is a string for the `read` method of the file handle to return. - This is an empty string by default. - """ - global file_spec - if file_spec is None: - # set on first use - if inPy3k: - import _io - file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))) - else: - file_spec = file - - if mock is None: - mock = MagicMock(name='open', spec=open) - - handle = MagicMock(spec=file_spec) - handle.write.return_value = None - handle.__enter__.return_value = handle - handle.read.return_value = read_data - - mock.return_value = handle - return mock - - -class PropertyMock(Mock): - """ - A mock intended to be used as a property, or other descriptor, on a class. - `PropertyMock` provides `__get__` and `__set__` methods so you can specify - a return value when it is fetched. - - Fetching a `PropertyMock` instance from an object calls the mock, with - no args. Setting it calls the mock with the value being set. - """ - def _get_child_mock(self, **kwargs): - return MagicMock(**kwargs) - - def __get__(self, obj, obj_type): - return self() - def __set__(self, obj, val): - self(val) diff --git a/engine/src/flutter/third_party/robolectric/BUILD.gn b/engine/src/flutter/third_party/robolectric/BUILD.gn deleted file mode 100644 index 211c3d63b2..0000000000 --- a/engine/src/flutter/third_party/robolectric/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# 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/android/rules.gni") - -# GYP: //third_party/robolectric/robolectric.gyp:android-all-4.3_r2-robolectric-0 -java_prebuilt("android-all-4.3_r2-robolectric-0") { - jar_path = "lib/android-all-4.3_r2-robolectric-0.jar" -} - -# GYP: //third_party/robolectric/robolectric.gyp:tagsoup-1.2 -java_prebuilt("tagsoup-1.2") { - jar_path = "lib/tagsoup-1.2.jar" -} - -# GYP: //third_party/robolectric/robolectric.gyp:json-20080701 -java_prebuilt("json-20080701") { - jar_path = "lib/json-20080701.jar" -} - -# GYP: //third_party/robolectric/robolectric.gyp:robolectric_jar -java_prebuilt("robolectric_java") { - testonly = true - jar_path = "lib/robolectric-2.4-jar-with-dependencies.jar" - deps = [ - ":android-all-4.3_r2-robolectric-0", - ":tagsoup-1.2", - ":json-20080701", - ] -} diff --git a/engine/src/flutter/third_party/robolectric/LICENSE b/engine/src/flutter/third_party/robolectric/LICENSE deleted file mode 100644 index f433b1a53f..0000000000 --- a/engine/src/flutter/third_party/robolectric/LICENSE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/engine/src/flutter/third_party/robolectric/OWNERS b/engine/src/flutter/third_party/robolectric/OWNERS deleted file mode 100644 index 64c090fa89..0000000000 --- a/engine/src/flutter/third_party/robolectric/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -jbudorick@chromium.org -mikecase@chromium.org diff --git a/engine/src/flutter/third_party/robolectric/README.chromium b/engine/src/flutter/third_party/robolectric/README.chromium deleted file mode 100644 index 10aeba31e8..0000000000 --- a/engine/src/flutter/third_party/robolectric/README.chromium +++ /dev/null @@ -1,11 +0,0 @@ -Name: Robolectric -URL: http://robolectric.org -Version: 2.4 -License: Apache 2.0 -License File: NOT_SHIPPED -Security Critical: no -License Android Compatible: yes -Description: Robolectric is a unit test framework for Android. To update the -robolectric jars, go to robolectric.org/download and follow link to -robolectric-X.X.X-jar-with-dependencies.jar. -Local Modifications: None diff --git a/engine/src/flutter/third_party/robolectric/licenses/extreme.indiana.edu.license.txt b/engine/src/flutter/third_party/robolectric/licenses/extreme.indiana.edu.license.txt deleted file mode 100644 index c74315554a..0000000000 --- a/engine/src/flutter/third_party/robolectric/licenses/extreme.indiana.edu.license.txt +++ /dev/null @@ -1,47 +0,0 @@ -Indiana University Extreme! Lab Software License - -Version 1.1.1 - -Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if any, - must include the following acknowledgment: - - "This product includes software developed by the Indiana University - Extreme! Lab (http://www.extreme.indiana.edu/)." - -Alternately, this acknowledgment may appear in the software itself, -if and wherever such third-party acknowledgments normally appear. - -4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" -must not be used to endorse or promote products derived from this -software without prior written permission. For written permission, -please contact http://www.extreme.indiana.edu/. - -5. Products derived from this software may not use "Indiana Univeristy" -name nor may "Indiana Univeristy" appear in their name, without prior -written permission of the Indiana University. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/engine/src/flutter/third_party/robolectric/licenses/javolution.license.txt b/engine/src/flutter/third_party/robolectric/licenses/javolution.license.txt deleted file mode 100644 index 0633749e4a..0000000000 --- a/engine/src/flutter/third_party/robolectric/licenses/javolution.license.txt +++ /dev/null @@ -1,23 +0,0 @@ -Javolution - Java(TM) Solution for Real-Time and Embedded Systems -Copyright (c) 2006, Javolution (http://javolution.org) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/engine/src/flutter/third_party/robolectric/licenses/pivotal.labs.license.txt b/engine/src/flutter/third_party/robolectric/licenses/pivotal.labs.license.txt deleted file mode 100644 index c9dccb8d80..0000000000 --- a/engine/src/flutter/third_party/robolectric/licenses/pivotal.labs.license.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2010 Xtreme Labs and Pivotal Labs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/engine/src/flutter/third_party/robolectric/robolectric.gyp b/engine/src/flutter/third_party/robolectric/robolectric.gyp deleted file mode 100644 index 7c3d785813..0000000000 --- a/engine/src/flutter/third_party/robolectric/robolectric.gyp +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - -{ - 'targets': [ - { - # GN: //third_party/robolectric:android-all-4.3_r2-robolectric-0 - 'target_name': 'android-all-4.3_r2-robolectric-0', - 'type': 'none', - 'variables': { - 'jar_path': 'lib/android-all-4.3_r2-robolectric-0.jar', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - { - # GN: //third_party/robolectric:tagsoup-1.2 - 'target_name': 'tagsoup-1.2', - 'type': 'none', - 'variables': { - 'jar_path': 'lib/tagsoup-1.2.jar', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - { - # GN: //third_party/robolectric:json-20080701 - 'target_name': 'json-20080701', - 'type': 'none', - 'variables': { - 'jar_path': 'lib/json-20080701.jar', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - { - # GN: //third_party/robolectric:robolectric_java - 'target_name': 'robolectric_jar', - 'type': 'none', - 'dependencies': [ - 'android-all-4.3_r2-robolectric-0', - 'tagsoup-1.2', - 'json-20080701', - ], - 'variables': { - 'jar_path': 'lib/robolectric-2.4-jar-with-dependencies.jar', - }, - 'includes': [ - '../../build/host_prebuilt_jar.gypi', - ] - }, - ], -} - diff --git a/engine/src/flutter/tools/checkperms/OWNERS b/engine/src/flutter/tools/checkperms/OWNERS deleted file mode 100644 index 1967bf567e..0000000000 --- a/engine/src/flutter/tools/checkperms/OWNERS +++ /dev/null @@ -1 +0,0 @@ -thestig@chromium.org diff --git a/engine/src/flutter/tools/checkperms/PRESUBMIT.py b/engine/src/flutter/tools/checkperms/PRESUBMIT.py deleted file mode 100644 index c2f93567da..0000000000 --- a/engine/src/flutter/tools/checkperms/PRESUBMIT.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2012 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. - -"""Top-level presubmit script for checkperms. - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for -details on the presubmit API built into gcl. -""" - - -def CommonChecks(input_api, output_api): - output = [] - output.extend(input_api.canned_checks.RunPylint(input_api, output_api)) - # Run it like if it were a unit test. - output.extend( - input_api.canned_checks.RunUnitTests( - input_api, output_api, ['./checkperms.py'])) - return output - - -def CheckChangeOnUpload(input_api, output_api): - return CommonChecks(input_api, output_api) - - -def CheckChangeOnCommit(input_api, output_api): - return CommonChecks(input_api, output_api) diff --git a/engine/src/flutter/tools/checkperms/checkperms.py b/engine/src/flutter/tools/checkperms/checkperms.py deleted file mode 100755 index e2807c73c5..0000000000 --- a/engine/src/flutter/tools/checkperms/checkperms.py +++ /dev/null @@ -1,480 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Makes sure files have the right permissions. - -Some developers have broken SCM configurations that flip the executable -permission on for no good reason. Unix developers who run ls --color will then -see .cc files in green and get confused. - -- For file extensions that must be executable, add it to EXECUTABLE_EXTENSIONS. -- For file extensions that must not be executable, add it to - NOT_EXECUTABLE_EXTENSIONS. -- To ignore all the files inside a directory, add it to IGNORED_PATHS. -- For file base name with ambiguous state and that should not be checked for - shebang, add it to IGNORED_FILENAMES. - -Any file not matching the above will be opened and looked if it has a shebang -or an ELF header. If this does not match the executable bit on the file, the -file will be flagged. - -Note that all directory separators must be slashes (Unix-style) and not -backslashes. All directories should be relative to the source root and all -file paths should be only lowercase. -""" - -import json -import logging -import optparse -import os -import stat -import string -import subprocess -import sys - -#### USER EDITABLE SECTION STARTS HERE #### - -# Files with these extensions must have executable bit set. -# -# Case-sensitive. -EXECUTABLE_EXTENSIONS = ( - 'bat', - 'dll', - 'dylib', - 'exe', -) - -# These files must have executable bit set. -# -# Case-insensitive, lower-case only. -EXECUTABLE_PATHS = ( - 'chrome/test/data/app_shim/app_shim_32_bit.app/contents/' - 'macos/app_mode_loader', - 'chrome/test/data/extensions/uitest/plugins/plugin.plugin/contents/' - 'macos/testnetscapeplugin', - 'chrome/test/data/extensions/uitest/plugins_private/plugin.plugin/contents/' - 'macos/testnetscapeplugin', -) - -# These files must not have the executable bit set. This is mainly a performance -# optimization as these files are not checked for shebang. The list was -# partially generated from: -# git ls-files | grep "\\." | sed 's/.*\.//' | sort | uniq -c | sort -b -g -# -# Case-sensitive. -NON_EXECUTABLE_EXTENSIONS = ( - '1', - '3ds', - 'S', - 'am', - 'applescript', - 'asm', - 'c', - 'cc', - 'cfg', - 'chromium', - 'cpp', - 'crx', - 'cs', - 'css', - 'cur', - 'def', - 'der', - 'expected', - 'gif', - 'grd', - 'gyp', - 'gypi', - 'h', - 'hh', - 'htm', - 'html', - 'hyph', - 'ico', - 'idl', - 'java', - 'jpg', - 'js', - 'json', - 'm', - 'm4', - 'mm', - 'mms', - 'mock-http-headers', - 'nexe', - 'nmf', - 'onc', - 'pat', - 'patch', - 'pdf', - 'pem', - 'plist', - 'png', - 'proto', - 'rc', - 'rfx', - 'rgs', - 'rules', - 'spec', - 'sql', - 'srpc', - 'svg', - 'tcl', - 'test', - 'tga', - 'txt', - 'vcproj', - 'vsprops', - 'webm', - 'word', - 'xib', - 'xml', - 'xtb', - 'zip', -) - -# These files must not have executable bit set. -# -# Case-insensitive, lower-case only. -NON_EXECUTABLE_PATHS = ( - 'build/android/tests/symbolize/liba.so', - 'build/android/tests/symbolize/libb.so', - 'chrome/installer/mac/sign_app.sh.in', - 'chrome/installer/mac/sign_versioned_dir.sh.in', - 'chrome/test/data/extensions/uitest/plugins/plugin32.so', - 'chrome/test/data/extensions/uitest/plugins/plugin64.so', - 'chrome/test/data/extensions/uitest/plugins_private/plugin32.so', - 'chrome/test/data/extensions/uitest/plugins_private/plugin64.so', - 'components/test/data/component_updater/ihfokbkgjpifnbbojhneepfflplebdkc/' - 'ihfokbkgjpifnbbojhneepfflplebdkc_1/a_changing_binary_file', - 'components/test/data/component_updater/ihfokbkgjpifnbbojhneepfflplebdkc/' - 'ihfokbkgjpifnbbojhneepfflplebdkc_2/a_changing_binary_file', - 'courgette/testdata/elf-32-1', - 'courgette/testdata/elf-32-2', - 'courgette/testdata/elf-64', -) - -# File names that are always whitelisted. (These are mostly autoconf spew.) -# -# Case-sensitive. -IGNORED_FILENAMES = ( - 'config.guess', - 'config.sub', - 'configure', - 'depcomp', - 'install-sh', - 'missing', - 'mkinstalldirs', - 'naclsdk', - 'scons', -) - -# File paths starting with one of these will be ignored as well. -# Please consider fixing your file permissions, rather than adding to this list. -# -# Case-insensitive, lower-case only. -IGNORED_PATHS = ( - 'native_client_sdk/src/build_tools/sdk_tools/third_party/fancy_urllib/' - '__init__.py', - 'out/', - # TODO(maruel): Fix these. - 'third_party/android_testrunner/', - 'third_party/bintrees/', - 'third_party/closure_linter/', - 'third_party/devscripts/licensecheck.pl.vanilla', - 'third_party/hyphen/', - 'third_party/jemalloc/', - 'third_party/lcov-1.9/contrib/galaxy/conglomerate_functions.pl', - 'third_party/lcov-1.9/contrib/galaxy/gen_makefile.sh', - 'third_party/lcov/contrib/galaxy/conglomerate_functions.pl', - 'third_party/lcov/contrib/galaxy/gen_makefile.sh', - 'third_party/libevent/autogen.sh', - 'third_party/libevent/test/test.sh', - 'third_party/libxml/linux/xml2-config', - 'third_party/libxml/src/ltmain.sh', - 'third_party/mesa/', - 'third_party/protobuf/', - 'third_party/python_gflags/gflags.py', - 'third_party/sqlite/', - 'third_party/talloc/script/mksyms.sh', - 'third_party/tcmalloc/', - 'third_party/tlslite/setup.py', -) - -#### USER EDITABLE SECTION ENDS HERE #### - -assert set(EXECUTABLE_EXTENSIONS) & set(NON_EXECUTABLE_EXTENSIONS) == set() -assert set(EXECUTABLE_PATHS) & set(NON_EXECUTABLE_PATHS) == set() - -VALID_CHARS = set(string.ascii_lowercase + string.digits + '/-_.') -for paths in (EXECUTABLE_PATHS, NON_EXECUTABLE_PATHS, IGNORED_PATHS): - assert all([set(path).issubset(VALID_CHARS) for path in paths]) - - -def capture(cmd, cwd): - """Returns the output of a command. - - Ignores the error code or stderr. - """ - logging.debug('%s; cwd=%s' % (' '.join(cmd), cwd)) - env = os.environ.copy() - env['LANGUAGE'] = 'en_US.UTF-8' - p = subprocess.Popen( - cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd, env=env) - return p.communicate()[0] - - -def get_git_root(dir_path): - """Returns the git checkout root or None.""" - root = capture(['git', 'rev-parse', '--show-toplevel'], dir_path).strip() - if root: - return root - - -def is_ignored(rel_path): - """Returns True if rel_path is in our whitelist of files to ignore.""" - rel_path = rel_path.lower() - return ( - os.path.basename(rel_path) in IGNORED_FILENAMES or - rel_path.lower().startswith(IGNORED_PATHS)) - - -def must_be_executable(rel_path): - """The file name represents a file type that must have the executable bit - set. - """ - return (os.path.splitext(rel_path)[1][1:] in EXECUTABLE_EXTENSIONS or - rel_path.lower() in EXECUTABLE_PATHS) - - -def must_not_be_executable(rel_path): - """The file name represents a file type that must not have the executable - bit set. - """ - return (os.path.splitext(rel_path)[1][1:] in NON_EXECUTABLE_EXTENSIONS or - rel_path.lower() in NON_EXECUTABLE_PATHS) - - -def has_executable_bit(full_path): - """Returns if any executable bit is set.""" - permission = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH - return bool(permission & os.stat(full_path).st_mode) - - -def has_shebang_or_is_elf(full_path): - """Returns if the file starts with #!/ or is an ELF binary. - - full_path is the absolute path to the file. - """ - with open(full_path, 'rb') as f: - data = f.read(4) - return (data[:3] == '#!/' or data == '#! /', data == '\x7fELF') - - -def check_file(root_path, rel_path): - """Checks the permissions of the file whose path is root_path + rel_path and - returns an error if it is inconsistent. Returns None on success. - - It is assumed that the file is not ignored by is_ignored(). - - If the file name is matched with must_be_executable() or - must_not_be_executable(), only its executable bit is checked. - Otherwise, the first few bytes of the file are read to verify if it has a - shebang or ELF header and compares this with the executable bit on the file. - """ - full_path = os.path.join(root_path, rel_path) - def result_dict(error): - return { - 'error': error, - 'full_path': full_path, - 'rel_path': rel_path, - } - try: - bit = has_executable_bit(full_path) - except OSError: - # It's faster to catch exception than call os.path.islink(). Chromium - # tree happens to have invalid symlinks under - # third_party/openssl/openssl/test/. - return None - - if must_be_executable(rel_path): - if not bit: - return result_dict('Must have executable bit set') - return - if must_not_be_executable(rel_path): - if bit: - return result_dict('Must not have executable bit set') - return - - # For the others, it depends on the file header. - (shebang, elf) = has_shebang_or_is_elf(full_path) - if bit != (shebang or elf): - if bit: - return result_dict('Has executable bit but not shebang or ELF header') - if shebang: - return result_dict('Has shebang but not executable bit') - return result_dict('Has ELF header but not executable bit') - - -def check_files(root, files): - gen = (check_file(root, f) for f in files if not is_ignored(f)) - return filter(None, gen) - - -class ApiBase(object): - def __init__(self, root_dir, bare_output): - self.root_dir = root_dir - self.bare_output = bare_output - self.count = 0 - self.count_read_header = 0 - - def check_file(self, rel_path): - logging.debug('check_file(%s)' % rel_path) - self.count += 1 - - if (not must_be_executable(rel_path) and - not must_not_be_executable(rel_path)): - self.count_read_header += 1 - - return check_file(self.root_dir, rel_path) - - def check_dir(self, rel_path): - return self.check(rel_path) - - def check(self, start_dir): - """Check the files in start_dir, recursively check its subdirectories.""" - errors = [] - items = self.list_dir(start_dir) - logging.info('check(%s) -> %d' % (start_dir, len(items))) - for item in items: - full_path = os.path.join(self.root_dir, start_dir, item) - rel_path = full_path[len(self.root_dir) + 1:] - if is_ignored(rel_path): - continue - if os.path.isdir(full_path): - # Depth first. - errors.extend(self.check_dir(rel_path)) - else: - error = self.check_file(rel_path) - if error: - errors.append(error) - return errors - - def list_dir(self, start_dir): - """Lists all the files and directory inside start_dir.""" - return sorted( - x for x in os.listdir(os.path.join(self.root_dir, start_dir)) - if not x.startswith('.') - ) - - -class ApiAllFilesAtOnceBase(ApiBase): - _files = None - - def list_dir(self, start_dir): - """Lists all the files and directory inside start_dir.""" - if self._files is None: - self._files = sorted(self._get_all_files()) - if not self.bare_output: - print 'Found %s files' % len(self._files) - start_dir = start_dir[len(self.root_dir) + 1:] - return [ - x[len(start_dir):] for x in self._files if x.startswith(start_dir) - ] - - def _get_all_files(self): - """Lists all the files and directory inside self._root_dir.""" - raise NotImplementedError() - - -class ApiGit(ApiAllFilesAtOnceBase): - def _get_all_files(self): - return capture(['git', 'ls-files'], cwd=self.root_dir).splitlines() - - -def get_scm(dir_path, bare): - """Returns a properly configured ApiBase instance.""" - cwd = os.getcwd() - root = get_git_root(dir_path or cwd) - if root: - if not bare: - print('Found git repository at %s' % root) - return ApiGit(dir_path or root, bare) - - # Returns a non-scm aware checker. - if not bare: - print('Failed to determine the SCM for %s' % dir_path) - return ApiBase(dir_path or cwd, bare) - - -def main(): - usage = """Usage: python %prog [--root ] [tocheck] - tocheck Specifies the directory, relative to root, to check. This defaults - to "." so it checks everything. - -Examples: - python %prog - python %prog --root /path/to/source chrome""" - - parser = optparse.OptionParser(usage=usage) - parser.add_option( - '--root', - help='Specifies the repository root. This defaults ' - 'to the checkout repository root') - parser.add_option( - '-v', '--verbose', action='count', default=0, help='Print debug logging') - parser.add_option( - '--bare', - action='store_true', - default=False, - help='Prints the bare filename triggering the checks') - parser.add_option( - '--file', action='append', dest='files', - help='Specifics a list of files to check the permissions of. Only these ' - 'files will be checked') - parser.add_option('--json', help='Path to JSON output file') - options, args = parser.parse_args() - - levels = [logging.ERROR, logging.INFO, logging.DEBUG] - logging.basicConfig(level=levels[min(len(levels) - 1, options.verbose)]) - - if len(args) > 1: - parser.error('Too many arguments used') - - if options.root: - options.root = os.path.abspath(options.root) - - if options.files: - # --file implies --bare (for PRESUBMIT.py). - options.bare = True - - errors = check_files(options.root, options.files) - else: - api = get_scm(options.root, options.bare) - start_dir = args[0] if args else api.root_dir - errors = api.check(start_dir) - - if not options.bare: - print('Processed %s files, %d files where tested for shebang/ELF ' - 'header' % (api.count, api.count_read_header)) - - if options.json: - with open(options.json, 'w') as f: - json.dump(errors, f) - - if errors: - if options.bare: - print '\n'.join(e['full_path'] for e in errors) - else: - print '\nFAILED\n' - print '\n'.join('%s: %s' % (e['full_path'], e['error']) for e in errors) - return 1 - if not options.bare: - print '\nSUCCESS\n' - return 0 - - -if '__main__' == __name__: - sys.exit(main()) diff --git a/engine/src/flutter/tools/dart/update.py b/engine/src/flutter/tools/dart/update.py deleted file mode 100755 index 41532ab72d..0000000000 --- a/engine/src/flutter/tools/dart/update.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/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. - -"""Pulls down the current dart sdk to third_party/dart-sdk/. - -You can manually force this to run again by removing -third_party/dart-sdk/STAMP_FILE, which contains the URL of the SDK that -was downloaded. Rolling works by updating LINUX_64_SDK to a new URL. -""" - -import os -import shutil -import subprocess -import sys - -# How to roll the dart sdk: Just change this url! We write this to the stamp -# file after we download, and then check the stamp file for differences. -SDK_URL_BASE = ('http://gsdview.appspot.com/dart-archive/channels/stable/raw/' - '1.14.1/sdk/') - -LINUX_64_SDK = 'dartsdk-linux-x64-release.zip' -MACOS_64_SDK = 'dartsdk-macos-x64-release.zip' - -# Path constants. (All of these should be absolute paths.) -THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -MOJO_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) -DART_SDK_DIR = os.path.join(MOJO_DIR, 'third_party', 'dart-sdk') -STAMP_FILE = os.path.join(DART_SDK_DIR, 'STAMP_FILE') -LIBRARIES_FILE = os.path.join(DART_SDK_DIR,'dart-sdk', - 'lib', '_internal', 'libraries.dart') -PATCH_FILE = os.path.join(MOJO_DIR, 'tools', 'dart', 'patch_sdk.diff') - -def RunCommand(command, fail_hard=True): - """Run command and return success (True) or failure; or if fail_hard is - True, exit on failure.""" - - print 'Running %s' % (str(command)) - if subprocess.call(command, shell=False) == 0: - return True - print 'Failed.' - if fail_hard: - sys.exit(1) - return False - -def main(): - # Only get the SDK if we don't have a stamp for or have an out of date stamp - # file. - get_sdk = False - if sys.platform.startswith('linux'): - sdk_url = SDK_URL_BASE + LINUX_64_SDK - output_file = os.path.join(DART_SDK_DIR, LINUX_64_SDK) - elif sys.platform.startswith('darwin'): - sdk_url = SDK_URL_BASE + MACOS_64_SDK - output_file = os.path.join(DART_SDK_DIR, MACOS_64_SDK) - else: - print "Platform not supported" - return 1 - - if not os.path.exists(STAMP_FILE): - get_sdk = True - else: - # Get the contents of the stamp file. - with open(STAMP_FILE, "r") as stamp_file: - stamp_url = stamp_file.read().replace('\n', '') - if stamp_url != sdk_url: - get_sdk = True - - if get_sdk: - # Completely remove all traces of the previous SDK. - if os.path.exists(DART_SDK_DIR): - shutil.rmtree(DART_SDK_DIR) - os.mkdir(DART_SDK_DIR) - - # Download the Linux x64 based Dart SDK. - # '-C -': Resume transfer if possible. - # '--location': Follow Location: redirects. - # '-o': Output file. - curl_command = ['curl', - '-C', '-', - '--location', - '-o', output_file, - sdk_url] - if not RunCommand(curl_command, fail_hard=False): - print "Failed to get dart sdk from server." - return 1 - - # Write our stamp file so we don't redownload the sdk. - with open(STAMP_FILE, "w") as stamp_file: - stamp_file.write(sdk_url) - - unzip_command = ['unzip', '-o', '-q', output_file, '-d', DART_SDK_DIR] - if not RunCommand(unzip_command, fail_hard=False): - print "Failed to unzip the dart sdk." - return 1 - - return 0 - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/tools/find_depot_tools.py b/engine/src/flutter/tools/find_depot_tools.py deleted file mode 100644 index 1f91866279..0000000000 --- a/engine/src/flutter/tools/find_depot_tools.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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. -"""Small utility function to find depot_tools and add it to the python path. - -Will throw an ImportError exception if depot_tools can't be found since it -imports breakpad. -""" - -import os -import sys - - -def IsRealDepotTools(path): - return os.path.isfile(os.path.join(path, 'gclient.py')) - - -def add_depot_tools_to_path(): - """Search for depot_tools and add it to sys.path.""" - # First look if depot_tools is already in PYTHONPATH. - for i in sys.path: - if i.rstrip(os.sep).endswith('depot_tools') and IsRealDepotTools(i): - return i - # Then look if depot_tools is in PATH, common case. - for i in os.environ['PATH'].split(os.pathsep): - if IsRealDepotTools(i): - sys.path.append(i.rstrip(os.sep)) - return i - # Rare case, it's not even in PATH, look upward up to root. - root_dir = os.path.dirname(os.path.abspath(__file__)) - previous_dir = os.path.abspath(__file__) - while root_dir and root_dir != previous_dir: - i = os.path.join(root_dir, 'depot_tools') - if IsRealDepotTools(i): - sys.path.append(i) - return i - previous_dir = root_dir - root_dir = os.path.dirname(root_dir) - print >> sys.stderr, 'Failed to find depot_tools' - return None - -add_depot_tools_to_path() - -# pylint: disable=W0611 -import breakpad diff --git a/engine/src/flutter/tools/gdb/gdb_chrome.py b/engine/src/flutter/tools/gdb/gdb_chrome.py deleted file mode 100644 index 2ba7ce8b1d..0000000000 --- a/engine/src/flutter/tools/gdb/gdb_chrome.py +++ /dev/null @@ -1,331 +0,0 @@ -# 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. - -"""GDB support for Chrome types. - -Add this to your gdb by amending your ~/.gdbinit as follows: - python - import sys - sys.path.insert(0, "/path/to/tools/gdb/") - import gdb_chrome - end - -Use - (gdb) p /r any_variable -to print |any_variable| without using any printers. -""" - -import datetime -import gdb -import gdb.printing -import os -import sys - -sys.path.insert(0, os.path.join( - os.path.dirname(os.path.abspath(__file__)), - '..', '..', 'third_party', 'WebKit', 'Tools', 'gdb')) -try: - import webkit -finally: - sys.path.pop(0) - -# When debugging this module, set the below variable to True, and then use -# (gdb) python del sys.modules['gdb_chrome'] -# (gdb) python import gdb_chrome -# to reload. -_DEBUGGING = False - - -pp_set = gdb.printing.RegexpCollectionPrettyPrinter("chromium") - - -def typed_ptr(ptr): - """Prints a pointer along with its exact type. - - By default, gdb would print just the address, which takes more - steps to interpret. - """ - # Returning this as a cast expression surrounded by parentheses - # makes it easier to cut+paste inside of gdb. - return '((%s)%s)' % (ptr.dynamic_type, ptr) - - -def yield_fields(val): - """Use this in a printer's children() method to print an object's fields. - - e.g. - def children(): - for result in yield_fields(self.val): - yield result - """ - try: - fields = val.type.target().fields() - except: - fields = val.type.fields() - for field in fields: - if field.is_base_class: - yield (field.name, val.cast(gdb.lookup_type(field.name))) - else: - yield (field.name, val[field.name]) - - -class Printer(object): - def __init__(self, val): - self.val = val - - -class StringPrinter(Printer): - def display_hint(self): - return 'string' - - -class String16Printer(StringPrinter): - def to_string(self): - return webkit.ustring_to_string(self.val['_M_dataplus']['_M_p']) -pp_set.add_printer( - 'string16', - '^string16|std::basic_string<(unsigned short|base::char16).*>$', - String16Printer); - - -class GURLPrinter(StringPrinter): - def to_string(self): - return self.val['spec_'] -pp_set.add_printer('GURL', '^GURL$', GURLPrinter) - - -class FilePathPrinter(StringPrinter): - def to_string(self): - return self.val['path_']['_M_dataplus']['_M_p'] -pp_set.add_printer('FilePath', '^FilePath$', FilePathPrinter) - - -class SizePrinter(Printer): - def to_string(self): - return '%sx%s' % (self.val['width_'], self.val['height_']) -pp_set.add_printer('gfx::Size', '^gfx::(Size|SizeF|SizeBase<.*>)$', SizePrinter) - - -class PointPrinter(Printer): - def to_string(self): - return '%s,%s' % (self.val['x_'], self.val['y_']) -pp_set.add_printer('gfx::Point', '^gfx::(Point|PointF|PointBase<.*>)$', - PointPrinter) - - -class RectPrinter(Printer): - def to_string(self): - return '%s %s' % (self.val['origin_'], self.val['size_']) -pp_set.add_printer('gfx::Rect', '^gfx::(Rect|RectF|RectBase<.*>)$', - RectPrinter) - - -class SmartPtrPrinter(Printer): - def to_string(self): - return '%s%s' % (self.typename, typed_ptr(self.ptr())) - - -class ScopedRefPtrPrinter(SmartPtrPrinter): - typename = 'scoped_refptr' - def ptr(self): - return self.val['ptr_'] -pp_set.add_printer('scoped_refptr', '^scoped_refptr<.*>$', ScopedRefPtrPrinter) - - -class LinkedPtrPrinter(SmartPtrPrinter): - typename = 'linked_ptr' - def ptr(self): - return self.val['value_'] -pp_set.add_printer('linked_ptr', '^linked_ptr<.*>$', LinkedPtrPrinter) - - -class WeakPtrPrinter(SmartPtrPrinter): - typename = 'base::WeakPtr' - def ptr(self): - flag = ScopedRefPtrPrinter(self.val['ref_']['flag_']).ptr() - if flag and flag['is_valid_']: - return self.val['ptr_'] - return gdb.Value(0).cast(self.val['ptr_'].type) -pp_set.add_printer('base::WeakPtr', '^base::WeakPtr<.*>$', WeakPtrPrinter) - - -class CallbackPrinter(Printer): - """Callbacks provide no usable information so reduce the space they take.""" - def to_string(self): - return '...' -pp_set.add_printer('base::Callback', '^base::Callback<.*>$', CallbackPrinter) - - -class LocationPrinter(Printer): - def to_string(self): - return '%s()@%s:%s' % (self.val['function_name_'].string(), - self.val['file_name_'].string(), - self.val['line_number_']) -pp_set.add_printer('tracked_objects::Location', '^tracked_objects::Location$', - LocationPrinter) - - -class PendingTaskPrinter(Printer): - def to_string(self): - return 'From %s' % (self.val['posted_from'],) - - def children(self): - for result in yield_fields(self.val): - if result[0] not in ('task', 'posted_from'): - yield result -pp_set.add_printer('base::PendingTask', '^base::PendingTask$', - PendingTaskPrinter) - - -class LockPrinter(Printer): - def to_string(self): - try: - if self.val['owned_by_thread_']: - return 'Locked by thread %s' % self.val['owning_thread_id_'] - else: - return 'Unlocked' - except gdb.error: - return 'Unknown state' -pp_set.add_printer('base::Lock', '^base::Lock$', LockPrinter) - - -class TimeDeltaPrinter(object): - def __init__(self, val): - self._timedelta = datetime.timedelta(microseconds=int(val['delta_'])) - - def timedelta(self): - return self._timedelta - - def to_string(self): - return str(self._timedelta) -pp_set.add_printer('base::TimeDelta', '^base::TimeDelta$', TimeDeltaPrinter) - - -class TimeTicksPrinter(TimeDeltaPrinter): - def __init__(self, val): - self._timedelta = datetime.timedelta(microseconds=int(val['ticks_'])) -pp_set.add_printer('base::TimeTicks', '^base::TimeTicks$', TimeTicksPrinter) - - -class TimePrinter(object): - def __init__(self, val): - timet_offset = gdb.parse_and_eval( - 'base::Time::kTimeTToMicrosecondsOffset') - self._datetime = (datetime.datetime.fromtimestamp(0) + - datetime.timedelta(microseconds= - int(val['us_'] - timet_offset))) - - def datetime(self): - return self._datetime - - def to_string(self): - return str(self._datetime) -pp_set.add_printer('base::Time', '^base::Time$', TimePrinter) - - -class IpcMessagePrinter(Printer): - def header(self): - return self.val['header_'].cast( - gdb.lookup_type('IPC::Message::Header').pointer()) - - def to_string(self): - message_type = self.header()['type'] - return '%s of kind %s line %s' % ( - self.val.dynamic_type, - (message_type >> 16).cast(gdb.lookup_type('IPCMessageStart')), - message_type & 0xffff) - - def children(self): - yield ('header_', self.header().dereference()) - yield ('capacity_after_header_', self.val['capacity_after_header_']) - for field in self.val.type.fields(): - if field.is_base_class: - continue - yield (field.name, self.val[field.name]) -pp_set.add_printer('IPC::Message', '^IPC::Message$', IpcMessagePrinter) - - -class NotificationRegistrarPrinter(Printer): - def to_string(self): - try: - registrations = self.val['registered_'] - vector_finish = registrations['_M_impl']['_M_finish'] - vector_start = registrations['_M_impl']['_M_start'] - if vector_start == vector_finish: - return 'Not watching notifications' - if vector_start.dereference().type.sizeof == 0: - # Incomplete type: b/8242773 - return 'Watching some notifications' - return ('Watching %s notifications; ' - 'print %s->registered_ for details') % ( - int(vector_finish - vector_start), - typed_ptr(self.val.address)) - except gdb.error: - return 'NotificationRegistrar' -pp_set.add_printer('content::NotificationRegistrar', - '^content::NotificationRegistrar$', - NotificationRegistrarPrinter) - - -class SiteInstanceImplPrinter(object): - def __init__(self, val): - self.val = val.cast(val.dynamic_type) - - def to_string(self): - return 'SiteInstanceImpl@%s for %s' % ( - self.val.address, self.val['site_']) - - def children(self): - yield ('id_', self.val['id_']) - yield ('has_site_', self.val['has_site_']) - if self.val['browsing_instance_']['ptr_']: - yield ('browsing_instance_', self.val['browsing_instance_']['ptr_']) - if self.val['process_']: - yield ('process_', typed_ptr(self.val['process_'])) -pp_set.add_printer('content::SiteInstanceImpl', '^content::SiteInstanceImpl$', - SiteInstanceImplPrinter) - - -class RenderProcessHostImplPrinter(object): - def __init__(self, val): - self.val = val.cast(val.dynamic_type) - - def to_string(self): - pid = '' - try: - child_process_launcher_ptr = ( - self.val['child_process_launcher_']['impl_']['data_']['ptr']) - if child_process_launcher_ptr: - context = (child_process_launcher_ptr['context_']['ptr_']) - if context: - pid = ' PID %s' % str(context['process_']['process_']) - except gdb.error: - # The definition of the Context type may not be available. - # b/8242773 - pass - return 'RenderProcessHostImpl@%s%s' % (self.val.address, pid) - - def children(self): - yield ('id_', self.val['id_']) - yield ('listeners_', - self.val['listeners_']['data_']) - yield ('worker_ref_count_', self.val['worker_ref_count_']) - yield ('fast_shutdown_started_', self.val['fast_shutdown_started_']) - yield ('deleting_soon_', self.val['deleting_soon_']) - yield ('pending_views_', self.val['pending_views_']) - yield ('visible_widgets_', self.val['visible_widgets_']) - yield ('backgrounded_', self.val['backgrounded_']) - yield ('widget_helper_', self.val['widget_helper_']) - yield ('is_initialized_', self.val['is_initialized_']) - yield ('browser_context_', typed_ptr(self.val['browser_context_'])) - yield ('sudden_termination_allowed_', - self.val['sudden_termination_allowed_']) - yield ('ignore_input_events_', self.val['ignore_input_events_']) - yield ('is_guest_', self.val['is_guest_']) -pp_set.add_printer('content::RenderProcessHostImpl', - '^content::RenderProcessHostImpl$', - RenderProcessHostImplPrinter) - - -gdb.printing.register_pretty_printer(gdb, pp_set, replace=_DEBUGGING) diff --git a/engine/src/flutter/tools/generate_library_loader/generate_library_loader.gni b/engine/src/flutter/tools/generate_library_loader/generate_library_loader.gni deleted file mode 100644 index 24f753bac7..0000000000 --- a/engine/src/flutter/tools/generate_library_loader/generate_library_loader.gni +++ /dev/null @@ -1,70 +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. - -# This template makes a stub for a Linux system library that dynamically loads -# it at runtime. - -# name: Name to use for the value of the --name arg. -# output_h/output_cc: Names for the generated header/cc file with no dir. -# header: header file to process. Example: "" -# functions: List of strings for functions to process. -# config: (optional) Label of the config generated by pkgconfig. -# bundled_header: (optional) -template("generate_library_loader") { - output_h = "$root_gen_dir/library_loaders/" + invoker.output_h - output_cc = "$root_gen_dir/library_loaders/" + invoker.output_cc - - action_visibility = [ ":$target_name" ] - action("${target_name}_loader") { - visibility = action_visibility - - script = "//tools/generate_library_loader/generate_library_loader.py" - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - - outputs = [ - output_h, - output_cc, - ] - - args = [ - "--name", - invoker.name, - "--output-h", - rebase_path(output_h), - "--output-cc", - rebase_path(output_cc), - "--header", - invoker.header, - - # Note GYP build exposes a per-target variable to control this, which, if - # manually set to true, will disable dlopen(). Its not clear this is - # needed, so here we just leave off. If this can be done globally, we can - # expose one switch for this value, otherwise we need to add a template - # param for this. - "--link-directly=0", - ] - if (defined(invoker.bundled_header)) { - args += [ - "--bundled-header", - invoker.bundled_header, - ] - } - args += invoker.functions - } - - source_set(target_name) { - if (defined(invoker.config)) { - public_configs = [ invoker.config ] - } - sources = [ - output_cc, - output_h, - ] - deps = [ - ":${target_name}_loader", - ] - } -} diff --git a/engine/src/flutter/tools/generate_library_loader/generate_library_loader.py b/engine/src/flutter/tools/generate_library_loader/generate_library_loader.py deleted file mode 100755 index 5e9da2c8de..0000000000 --- a/engine/src/flutter/tools/generate_library_loader/generate_library_loader.py +++ /dev/null @@ -1,249 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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 library loader (a header and implementation file), -which is a wrapper for dlopen or direct linking with given library. - -The loader makes it possible to have the same client code for both cases, -and also makes it easier to write code using dlopen (and also provides -a standard way to do so, and limits the ugliness just to generated files). - -For more info refer to http://crbug.com/162733 . -""" - - -import optparse -import os.path -import re -import sys - - -HEADER_TEMPLATE = """// This is generated file. Do not modify directly. -// Path to the code generator: %(generator_path)s . - -#ifndef %(unique_prefix)s -#define %(unique_prefix)s - -%(wrapped_header_include)s - -#include - -class %(class_name)s { - public: - %(class_name)s(); - ~%(class_name)s(); - - bool Load(const std::string& library_name) - __attribute__((warn_unused_result)); - - bool loaded() const { return loaded_; } - -%(member_decls)s - - private: - void CleanUp(bool unload); - -#if defined(%(unique_prefix)s_DLOPEN) - void* library_; -#endif - - bool loaded_; - - // Disallow copy constructor and assignment operator. - %(class_name)s(const %(class_name)s&); - void operator=(const %(class_name)s&); -}; - -#endif // %(unique_prefix)s -""" - - -HEADER_MEMBER_TEMPLATE = """ decltype(&::%(function_name)s) %(function_name)s; -""" - - -IMPL_TEMPLATE = """// This is generated file. Do not modify directly. -// Path to the code generator: %(generator_path)s . - -#include "%(generated_header_name)s" - -#include - -// Put these sanity checks here so that they fire at most once -// (to avoid cluttering the build output). -#if !defined(%(unique_prefix)s_DLOPEN) && !defined(%(unique_prefix)s_DT_NEEDED) -#error neither %(unique_prefix)s_DLOPEN nor %(unique_prefix)s_DT_NEEDED defined -#endif -#if defined(%(unique_prefix)s_DLOPEN) && defined(%(unique_prefix)s_DT_NEEDED) -#error both %(unique_prefix)s_DLOPEN and %(unique_prefix)s_DT_NEEDED defined -#endif - -%(class_name)s::%(class_name)s() : loaded_(false) { -} - -%(class_name)s::~%(class_name)s() { - CleanUp(loaded_); -} - -bool %(class_name)s::Load(const std::string& library_name) { - if (loaded_) - return false; - -#if defined(%(unique_prefix)s_DLOPEN) - library_ = dlopen(library_name.c_str(), RTLD_LAZY); - if (!library_) - return false; -#endif - -%(member_init)s - - loaded_ = true; - return true; -} - -void %(class_name)s::CleanUp(bool unload) { -#if defined(%(unique_prefix)s_DLOPEN) - if (unload) { - dlclose(library_); - library_ = NULL; - } -#endif - loaded_ = false; -%(member_cleanup)s -} -""" - -IMPL_MEMBER_INIT_TEMPLATE = """ -#if defined(%(unique_prefix)s_DLOPEN) - %(function_name)s = - reinterpret_cast%(function_name)s)>( - dlsym(library_, "%(function_name)s")); -#endif -#if defined(%(unique_prefix)s_DT_NEEDED) - %(function_name)s = &::%(function_name)s; -#endif - if (!%(function_name)s) { - CleanUp(true); - return false; - } -""" - -IMPL_MEMBER_CLEANUP_TEMPLATE = """ %(function_name)s = NULL; -""" - -def main(): - parser = optparse.OptionParser() - parser.add_option('--name') - parser.add_option('--output-cc') - parser.add_option('--output-h') - parser.add_option('--header') - - parser.add_option('--bundled-header') - parser.add_option('--use-extern-c', action='store_true', default=False) - parser.add_option('--link-directly', type=int, default=0) - - options, args = parser.parse_args() - - if not options.name: - parser.error('Missing --name parameter') - if not options.output_cc: - parser.error('Missing --output-cc parameter') - if not options.output_h: - parser.error('Missing --output-h parameter') - if not options.header: - parser.error('Missing --header paramater') - if not args: - parser.error('No function names specified') - - # Make sure we are always dealing with paths relative to source tree root - # to avoid issues caused by different relative path roots. - source_tree_root = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..', '..')) - options.output_cc = os.path.relpath(options.output_cc, source_tree_root) - options.output_h = os.path.relpath(options.output_h, source_tree_root) - - # Create a unique prefix, e.g. for header guards. - # Stick a known string at the beginning to ensure this doesn't begin - # with an underscore, which is reserved for the C++ implementation. - unique_prefix = ('LIBRARY_LOADER_' + - re.sub(r'[\W]', '_', options.output_h).upper()) - - member_decls = [] - member_init = [] - member_cleanup = [] - for fn in args: - member_decls.append(HEADER_MEMBER_TEMPLATE % { - 'function_name': fn, - 'unique_prefix': unique_prefix - }) - member_init.append(IMPL_MEMBER_INIT_TEMPLATE % { - 'function_name': fn, - 'unique_prefix': unique_prefix - }) - member_cleanup.append(IMPL_MEMBER_CLEANUP_TEMPLATE % { - 'function_name': fn, - 'unique_prefix': unique_prefix - }) - - header = options.header - if options.link_directly == 0 and options.bundled_header: - header = options.bundled_header - wrapped_header_include = '#include %s\n' % header - - # Some libraries (e.g. libpci) have headers that cannot be included - # without extern "C", otherwise they cause the link to fail. - # TODO(phajdan.jr): This is a workaround for broken headers. Remove it. - if options.use_extern_c: - wrapped_header_include = 'extern "C" {\n%s\n}\n' % wrapped_header_include - - # It seems cleaner just to have a single #define here and #ifdefs in bunch - # of places, rather than having a different set of templates, duplicating - # or complicating more code. - if options.link_directly == 0: - wrapped_header_include += '#define %s_DLOPEN\n' % unique_prefix - elif options.link_directly == 1: - wrapped_header_include += '#define %s_DT_NEEDED\n' % unique_prefix - else: - parser.error('Invalid value for --link-directly. Should be 0 or 1.') - - # Make it easier for people to find the code generator just in case. - # Doing it this way is more maintainable, because it's going to work - # even if file gets moved without updating the contents. - generator_path = os.path.relpath(__file__, source_tree_root) - - header_contents = HEADER_TEMPLATE % { - 'generator_path': generator_path, - 'unique_prefix': unique_prefix, - 'wrapped_header_include': wrapped_header_include, - 'class_name': options.name, - 'member_decls': ''.join(member_decls), - } - - impl_contents = IMPL_TEMPLATE % { - 'generator_path': generator_path, - 'unique_prefix': unique_prefix, - 'generated_header_name': options.output_h, - 'class_name': options.name, - 'member_init': ''.join(member_init), - 'member_cleanup': ''.join(member_cleanup), - } - - header_file = open(os.path.join(source_tree_root, options.output_h), 'w') - try: - header_file.write(header_contents) - finally: - header_file.close() - - impl_file = open(os.path.join(source_tree_root, options.output_cc), 'w') - try: - impl_file.write(impl_contents) - finally: - impl_file.close() - - return 0 - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/tools/git/README b/engine/src/flutter/tools/git/README deleted file mode 100644 index 7f8e363dee..0000000000 --- a/engine/src/flutter/tools/git/README +++ /dev/null @@ -1,16 +0,0 @@ -This directory contains some helpful Git tools. - -post-checkout and post-merge -============================ -These hooks warn you about DEPS modifications so you will remember -to run "gclient sync". - -To install these Git hooks, create symlinks like so: - ln -s $(pwd)/post-checkout $(git rev-parse --git-dir)/hooks - ln -s $(pwd)/post-merge $(git rev-parse --git-dir)/hooks - - -git-graph -========= -Create a graph of the recent history of occurences of a grep -expression in the project. diff --git a/engine/src/flutter/tools/git/for-all-touched-files.py b/engine/src/flutter/tools/git/for-all-touched-files.py deleted file mode 100755 index 633fd078cd..0000000000 --- a/engine/src/flutter/tools/git/for-all-touched-files.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# 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. - -""" - Invokes the specified (quoted) command for all files modified - between the current git branch and the specified branch or commit. - - The special token [[FILENAME]] (or whatever you choose using the -t - flag) is replaced with each of the filenames of new or modified files. - - Deleted files are not included. Neither are untracked files. - -Synopsis: - %prog [-b BRANCH] [-d] [-x EXTENSIONS|-c|-g] [-t TOKEN] QUOTED_COMMAND - -Examples: - %prog -x gyp,gypi "tools/format_xml.py [[FILENAME]]" - %prog -c "tools/sort-headers.py [[FILENAME]]" - %prog -g "tools/sort_sources.py [[FILENAME]]" - %prog -t "~~BINGO~~" "echo I modified ~~BINGO~~" -""" - -import optparse -import os -import subprocess -import sys - - -# List of C++-like source file extensions. -_CPP_EXTENSIONS = ('h', 'hh', 'hpp', 'c', 'cc', 'cpp', 'cxx', 'mm',) -# List of build file extensions. -_BUILD_EXTENSIONS = ('gyp', 'gypi', 'gn',) - - -def GitShell(args, ignore_return=False): - """A shell invocation suitable for communicating with git. Returns - output as list of lines, raises exception on error. - """ - job = subprocess.Popen(args, - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - (out, err) = job.communicate() - if job.returncode != 0 and not ignore_return: - print out - raise Exception("Error %d running command %s" % ( - job.returncode, args)) - return out.split('\n') - - -def FilenamesFromGit(branch_name, extensions): - """Provides a list of all new and modified files listed by [git diff - branch_name] where branch_name can be blank to get a diff of the - workspace. - - Excludes deleted files. - - If extensions is not an empty list, include only files with one of - the extensions on the list. - """ - lines = GitShell('git diff --stat=600,500 %s' % branch_name) - filenames = [] - for line in lines: - line = line.lstrip() - # Avoid summary line, and files that have been deleted (no plus). - if line.find('|') != -1 and line.find('+') != -1: - filename = line.split()[0] - if filename: - filename = filename.rstrip() - ext = filename.rsplit('.')[-1] - if not extensions or ext in extensions: - filenames.append(filename) - return filenames - - -def ForAllTouchedFiles(branch_name, extensions, token, command): - """For each new or modified file output by [git diff branch_name], - run command with token replaced with the filename. If extensions is - not empty, do this only for files with one of the extensions in that - list. - """ - filenames = FilenamesFromGit(branch_name, extensions) - for filename in filenames: - os.system(command.replace(token, filename)) - - -def main(): - parser = optparse.OptionParser(usage=__doc__) - parser.add_option('-x', '--extensions', default='', dest='extensions', - help='Limits to files with given extensions ' - '(comma-separated).') - parser.add_option('-c', '--cpp', default=False, action='store_true', - dest='cpp_only', - help='Runs your command only on C++-like source files.') - # -g stands for GYP and GN. - parser.add_option('-g', '--build', default=False, action='store_true', - dest='build_only', - help='Runs your command only on build files.') - parser.add_option('-t', '--token', default='[[FILENAME]]', dest='token', - help='Sets the token to be replaced for each file ' - 'in your command (default [[FILENAME]]).') - parser.add_option('-b', '--branch', default='origin/master', dest='branch', - help='Sets what to diff to (default origin/master). Set ' - 'to empty to diff workspace against HEAD.') - opts, args = parser.parse_args() - - if not args: - parser.print_help() - sys.exit(1) - - if opts.cpp_only and opts.build_only: - parser.error("--cpp and --build are mutually exclusive") - - extensions = opts.extensions - if opts.cpp_only: - extensions = _CPP_EXTENSIONS - if opts.build_only: - extensions = _BUILD_EXTENSIONS - - ForAllTouchedFiles(opts.branch, extensions, opts.token, args[0]) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/tools/git/git-diff-ide.py b/engine/src/flutter/tools/git/git-diff-ide.py deleted file mode 100755 index 405d270eba..0000000000 --- a/engine/src/flutter/tools/git/git-diff-ide.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -""" - Invokes git diff [args...] and inserts file:line in front of each line of diff - output where possible. - - This is useful from an IDE that allows you to double-click lines that begin - with file:line to open and jump to that point in the file. - -Synopsis: - %prog [git diff args...] - -Examples: - %prog - %prog HEAD -""" - -import subprocess -import sys - - -def GitShell(args, ignore_return=False): - """A shell invocation suitable for communicating with git. Returns - output as list of lines, raises exception on error. - """ - job = subprocess.Popen(args, - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - (out, err) = job.communicate() - if job.returncode != 0 and not ignore_return: - print out - raise Exception("Error %d running command %s" % ( - job.returncode, args)) - return out.split('\n') - - -def PrintGitDiff(extra_args): - """Outputs git diff extra_args with file:line inserted into relevant lines.""" - current_file = ''; - line_num = 0; - lines = GitShell('git diff %s' % ' '.join(extra_args)) - for line in lines: - # Pass-through lines: - # diff --git a/file.c b/file.c - # index 0e38c2d..8cd69ae 100644 - # --- a/file.c - if (line.startswith('diff ') or - line.startswith('index ') or - line.startswith('--- ')): - print line - continue - - # Get the filename from the +++ line: - # +++ b/file.c - if line.startswith('+++ '): - # Filename might be /dev/null or a/file or b/file. - # Skip the first two characters unless it starts with /. - current_file = line[4:] if line[4] == '/' else line[6:] - print line - continue - - # Update line number from the @@ lines: - # @@ -41,9 +41,9 @@ def MyFunc(): - # ^^ - if line.startswith('@@ '): - _, old_nr, new_nr, _ = line.split(' ', 3) - line_num = int(new_nr.split(',')[0]) - print line - continue - print current_file + ':' + repr(line_num) + ':' + line - - # Increment line number for lines that start with ' ' or '+': - # @@ -41,4 +41,4 @@ def MyFunc(): - # file.c:41: // existing code - # file.c:42: // existing code - # file.c:43:-// deleted code - # file.c:43:-// deleted code - # file.c:43:+// inserted code - # file.c:44:+// inserted code - if line.startswith(' ') or line.startswith('+'): - line_num += 1 - - -def main(): - PrintGitDiff(sys.argv[1:]) - - -if __name__ == '__main__': - main() diff --git a/engine/src/flutter/tools/git/git-utils.sh b/engine/src/flutter/tools/git/git-utils.sh deleted file mode 100755 index 608d27aa26..0000000000 --- a/engine/src/flutter/tools/git/git-utils.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Copyright (c) 2012 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. - -TPUT=$(which tput 2>/dev/null) -if test -x "$TPUT" && $TPUT setaf 1 >/dev/null ; then - RED="$($TPUT setaf 1)" - NORMAL="$($TPUT op)" -else - RED= - NORMAL= -fi - -warn() { - echo "${RED}WARNING:${NORMAL} $@" -} diff --git a/engine/src/flutter/tools/git/graph.sh b/engine/src/flutter/tools/git/graph.sh deleted file mode 100755 index 800a52b86c..0000000000 --- a/engine/src/flutter/tools/git/graph.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Copyright (c) 2010 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. - -about="Given a grep expression, creates a graph of occurrences of that -expression in the recent history of the tree. - -Prerequisites: git and GNU R (apt-get install r-base). -" - -set -e - -target="$1" - -if [ -z $target ]; then - echo "usage: $0 " - echo - echo "$about" - exit 1 -fi - -datafile=$(mktemp -t tmp.XXXXXXXXXX) -trap "rm -f $datafile" EXIT - -echo 'ago count' > $datafile -for ago in {90..0}; do - commit=$(git rev-list -1 --until="$ago days ago" origin/trunk) - git checkout -q -f $commit - count=$(git grep -E "$target" -- '*.cc' '*.h' '*.m' '*.mm' | wc -l) - echo "-$ago $count" >> $datafile - echo -n '.' -done - -R CMD BATCH <(cat <"])' - replacement: '\1chrome/browser/ui/browser/browser.h\3' - file_globs: ['*.cc', '*.h', '*.m', '*.mm'] - - Returns the list of files modified. - - Raises an exception on error. - """ - # Posix extended regular expressions do not reliably support the "\s" - # shorthand. - posix_ere_original = re.sub(r"\\s", "[[:space:]]", original) - if sys.platform == 'win32': - posix_ere_original = posix_ere_original.replace('"', '""') - out, err = subprocess.Popen( - ['git', 'grep', '-E', '--name-only', posix_ere_original, - '--'] + file_globs, - stdout=subprocess.PIPE, - shell=_USE_SHELL).communicate() - referees = out.splitlines() - - for referee in referees: - with open(referee) as f: - original_contents = f.read() - contents = re.sub(original, replacement, original_contents) - if contents == original_contents: - raise Exception('No change in file %s although matched in grep' % - referee) - with open(referee, 'wb') as f: - f.write(contents) - - return referees - - -def main(): - parser = optparse.OptionParser(usage=''' -(1) %prog REGEXP REPLACEMENT -REGEXP uses full Python regexp syntax. REPLACEMENT can use back-references. - -(2) %prog -i - should contain a list (in Python syntax) of -[REGEXP, REPLACEMENT, [GLOBS]] lists, e.g.: -[ - [r"(foo|bar)", r"\1baz", ["*.cc", "*.h"]], - ["54", "42"], -] -As shown above, [GLOBS] can be omitted for a given search-replace list, in which -case the corresponding search-replace will use the globs specified on the -command line.''') - parser.add_option('-d', action='store_true', - dest='use_default_glob', - help='Perform the change on C++ and Objective-C(++) source ' - 'and header files.') - parser.add_option('-f', action='store_true', - dest='force_unsafe_run', - help='Perform the run even if there are uncommitted local ' - 'changes.') - parser.add_option('-g', action='append', - type='string', - default=[], - metavar="", - dest='user_supplied_globs', - help='Perform the change on the specified glob. Can be ' - 'specified multiple times, in which case the globs are ' - 'unioned.') - parser.add_option('-i', "--input_file", - type='string', - action='store', - default='', - metavar="", - dest='input_filename', - help='Read arguments from rather than the command ' - 'line. NOTE: To be sure of regular expressions being ' - 'interpreted correctly, use raw strings.') - opts, args = parser.parse_args() - if opts.use_default_glob and opts.user_supplied_globs: - print '"-d" and "-g" cannot be used together' - parser.print_help() - return 1 - - from_file = opts.input_filename != "" - if (from_file and len(args) != 0) or (not from_file and len(args) != 2): - parser.print_help() - return 1 - - if not opts.force_unsafe_run: - out, err = subprocess.Popen(['git', 'status', '--porcelain'], - stdout=subprocess.PIPE, - shell=_USE_SHELL).communicate() - if out: - print 'ERROR: This tool does not print any confirmation prompts,' - print 'so you should only run it with a clean staging area and cache' - print 'so that reverting a bad find/replace is as easy as running' - print ' git checkout -- .' - print '' - print 'To override this safeguard, pass the -f flag.' - return 1 - - global_file_globs = ['*.*'] - if opts.use_default_glob: - global_file_globs = ['*.cc', '*.h', '*.m', '*.mm'] - elif opts.user_supplied_globs: - global_file_globs = opts.user_supplied_globs - - # Construct list of search-replace tasks. - search_replace_tasks = [] - if opts.input_filename == '': - original = args[0] - replacement = args[1] - search_replace_tasks.append([original, replacement, global_file_globs]) - else: - f = open(opts.input_filename) - search_replace_tasks = eval("".join(f.readlines())) - for task in search_replace_tasks: - if len(task) == 2: - task.append(global_file_globs) - f.close() - - for (original, replacement, file_globs) in search_replace_tasks: - print 'File globs: %s' % file_globs - print 'Original: %s' % original - print 'Replacement: %s' % replacement - MultiFileFindReplace(original, replacement, file_globs) - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/tools/git/move_source_file.bat b/engine/src/flutter/tools/git/move_source_file.bat deleted file mode 100755 index bc3d7978e0..0000000000 --- a/engine/src/flutter/tools/git/move_source_file.bat +++ /dev/null @@ -1,6 +0,0 @@ -@echo off -setlocal -:: This is required with cygwin only. -PATH=%~dp0;%PATH% -set PYTHONDONTWRITEBYTECODE=1 -call python "%~dp0move_source_file.py" %* diff --git a/engine/src/flutter/tools/git/move_source_file.py b/engine/src/flutter/tools/git/move_source_file.py deleted file mode 100755 index 18ef1ce827..0000000000 --- a/engine/src/flutter/tools/git/move_source_file.py +++ /dev/null @@ -1,235 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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. - -"""Moves C++ files to a new location, updating any include paths that point -to them, and re-ordering headers as needed. If multiple source files are -specified, the destination must be a directory. Updates include guards in -moved header files. Assumes Chromium coding style. - -Attempts to update paths used in .gyp(i) files, but does not reorder -or restructure .gyp(i) files in any way. - -Updates full-path references to files in // comments in source files. - -Must run in a git checkout, as it relies on git grep for a fast way to -find files that reference the moved file. -""" - - -import optparse -import os -import re -import subprocess -import sys - -import mffr - -if __name__ == '__main__': - # Need to add the directory containing sort-headers.py to the Python - # classpath. - sys.path.append(os.path.abspath(os.path.join(sys.path[0], '..'))) -sort_headers = __import__('sort-headers') -import sort_sources - - -HANDLED_EXTENSIONS = ['.cc', '.mm', '.h', '.hh', '.cpp'] - - -def IsHandledFile(path): - return os.path.splitext(path)[1] in HANDLED_EXTENSIONS - - -def MakeDestinationPath(from_path, to_path): - """Given the from and to paths, return a correct destination path. - - The initial destination path may either a full path or a directory. - Also does basic sanity checks. - """ - if not IsHandledFile(from_path): - raise Exception('Only intended to move individual source files ' - '(%s does not have a recognized extension).' % - from_path) - - # Remove '.', '..', etc. - to_path = os.path.normpath(to_path) - - if os.path.isdir(to_path): - to_path = os.path.join(to_path, os.path.basename(from_path)) - else: - dest_extension = os.path.splitext(to_path)[1] - if dest_extension not in HANDLED_EXTENSIONS: - raise Exception('Destination must be either a full path with ' - 'a recognized extension or a directory.') - return to_path - - -def MoveFile(from_path, to_path): - """Performs a git mv command to move a file from |from_path| to |to_path|. - """ - if not os.system('git mv %s %s' % (from_path, to_path)) == 0: - raise Exception('Fatal: Failed to run git mv command.') - - -def UpdatePostMove(from_path, to_path): - """Given a file that has moved from |from_path| to |to_path|, - updates the moved file's include guard to match the new path and - updates all references to the file in other source files. Also tries - to update references in .gyp(i) files using a heuristic. - """ - # Include paths always use forward slashes. - from_path = from_path.replace('\\', '/') - to_path = to_path.replace('\\', '/') - - if os.path.splitext(from_path)[1] in ['.h', '.hh']: - UpdateIncludeGuard(from_path, to_path) - - # Update include/import references. - files_with_changed_includes = mffr.MultiFileFindReplace( - r'(#(include|import)\s*["<])%s([>"])' % re.escape(from_path), - r'\1%s\3' % to_path, - ['*.cc', '*.h', '*.m', '*.mm', '*.cpp']) - - # Reorder headers in files that changed. - for changed_file in files_with_changed_includes: - def AlwaysConfirm(a, b): return True - sort_headers.FixFileWithConfirmFunction(changed_file, AlwaysConfirm, True) - - # Update comments; only supports // comments, which are primarily - # used in our code. - # - # This work takes a bit of time. If this script starts feeling too - # slow, one good way to speed it up is to make the comment handling - # optional under a flag. - mffr.MultiFileFindReplace( - r'(//.*)%s' % re.escape(from_path), - r'\1%s' % to_path, - ['*.cc', '*.h', '*.m', '*.mm', '*.cpp']) - - # Update references in GYP and BUILD.gn files. - # - # GYP files are mostly located under the first level directory (ex. - # chrome/chrome_browser.gypi), but sometimes they are located in - # directories at a deeper level (ex. extensions/shell/app_shell.gypi). On - # the other hand, BUILD.gn files can be placed in any directories. - # - # Paths in a GYP or BUILD.gn file are relative to the directory where the - # file is placed. - # - # For instance, "chrome/browser/chromeos/device_uma.h" is listed as - # "browser/chromeos/device_uma.h" in "chrome/chrome_browser_chromeos.gypi", - # but it's listed as "device_uma.h" in "chrome/browser/chromeos/BUILD.gn". - # - # To handle this, the code here will visit directories from the top level - # src directory to the directory of |from_path| and try to update GYP and - # BUILD.gn files in each directory. - # - # The code only handles files moved/renamed within the same build file. If - # files are moved beyond the same build file, the affected build files - # should be fixed manually. - def SplitByFirstComponent(path): - """'foo/bar/baz' -> ('foo', 'bar/baz') - 'bar' -> ('bar', '') - '' -> ('', '') - """ - parts = re.split(r"[/\\]", path, 1) - if len(parts) == 2: - return (parts[0], parts[1]) - else: - return (parts[0], '') - - visiting_directory = '' - from_rest = from_path - to_rest = to_path - while True: - files_with_changed_sources = mffr.MultiFileFindReplace( - r'([\'"])%s([\'"])' % from_rest, - r'\1%s\2' % to_rest, - [os.path.join(visiting_directory, 'BUILD.gn'), - os.path.join(visiting_directory, '*.gyp*')]) - for changed_file in files_with_changed_sources: - sort_sources.ProcessFile(changed_file, should_confirm=False) - from_first, from_rest = SplitByFirstComponent(from_rest) - to_first, to_rest = SplitByFirstComponent(to_rest) - visiting_directory = os.path.join(visiting_directory, from_first) - if not from_rest or not to_rest: - break - - -def MakeIncludeGuardName(path_from_root): - """Returns an include guard name given a path from root.""" - guard = path_from_root.replace('/', '_') - guard = guard.replace('\\', '_') - guard = guard.replace('.', '_') - guard += '_' - return guard.upper() - - -def UpdateIncludeGuard(old_path, new_path): - """Updates the include guard in a file now residing at |new_path|, - previously residing at |old_path|, with an up-to-date include guard. - - Prints a warning if the update could not be completed successfully (e.g., - because the old include guard was not formatted correctly per Chromium style). - """ - old_guard = MakeIncludeGuardName(old_path) - new_guard = MakeIncludeGuardName(new_path) - - with open(new_path) as f: - contents = f.read() - - new_contents = contents.replace(old_guard, new_guard) - # The file should now have three instances of the new guard: two at the top - # of the file plus one at the bottom for the comment on the #endif. - if new_contents.count(new_guard) != 3: - print ('WARNING: Could not successfully update include guard; perhaps ' - 'old guard is not per style guide? You will have to update the ' - 'include guard manually. (%s)' % new_path) - - with open(new_path, 'w') as f: - f.write(new_contents) - -def main(): - if not os.path.isdir('.git'): - print 'Fatal: You must run from the root of a git checkout.' - return 1 - - parser = optparse.OptionParser(usage='%prog FROM_PATH... TO_PATH') - parser.add_option('--already_moved', action='store_true', - dest='already_moved', - help='Causes the script to skip moving the file.') - parser.add_option('--no_error_for_non_source_file', action='store_false', - default='True', - dest='error_for_non_source_file', - help='Causes the script to simply print a warning on ' - 'encountering a non-source file rather than raising an ' - 'error.') - opts, args = parser.parse_args() - - if len(args) < 2: - parser.print_help() - return 1 - - from_paths = args[:len(args)-1] - orig_to_path = args[-1] - - if len(from_paths) > 1 and not os.path.isdir(orig_to_path): - print 'Target %s is not a directory.' % orig_to_path - print - parser.print_help() - return 1 - - for from_path in from_paths: - if not opts.error_for_non_source_file and not IsHandledFile(from_path): - print '%s does not appear to be a source file, skipping' % (from_path) - continue - to_path = MakeDestinationPath(from_path, orig_to_path) - if not opts.already_moved: - MoveFile(from_path, to_path) - UpdatePostMove(from_path, to_path) - return 0 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/tools/git/post-checkout b/engine/src/flutter/tools/git/post-checkout deleted file mode 100755 index 452eb48eb4..0000000000 --- a/engine/src/flutter/tools/git/post-checkout +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# Copyright (c) 2010 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=$(readlink $0) -source $(dirname ${script:-$0})/git-utils.sh - -old_ref=$1 # Previous HEAD. -new_ref=$2 # Current HEAD. -branch_switch=$3 # Whether we switched branches. - -if [ $old_ref == $new_ref ]; then - if ! git diff-index --quiet HEAD $(git rev-parse --show-cdup)DEPS; then - warn "DEPS has local modifications; do you need to re-run gclient sync?" - fi -else - if git diff-tree $old_ref $new_ref | grep -qs $'\tDEPS$'; then - warn "DEPS has changed; you probably need to re-run gclient sync." - fi -fi - diff --git a/engine/src/flutter/tools/git/post-merge b/engine/src/flutter/tools/git/post-merge deleted file mode 100755 index 8b774ce659..0000000000 --- a/engine/src/flutter/tools/git/post-merge +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# Copyright (c) 2010 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=$(readlink $0) -source $(dirname ${script:-$0})/git-utils.sh - -if git diff-tree ORIG_HEAD HEAD | grep -qs $'\tDEPS$'; then - warn "DEPS has changed; you probably need to re-run gclient sync." -fi - diff --git a/engine/src/flutter/tools/git/update-copyrights.sh b/engine/src/flutter/tools/git/update-copyrights.sh deleted file mode 100755 index ac69bd53e6..0000000000 --- a/engine/src/flutter/tools/git/update-copyrights.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# Copyright (c) 2012 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. - -echo 'Updating copyrights is no longer necessary.' -echo 'See https://groups.google.com/a/chromium.org/d/msg/chromium-dev/8p4JKV76kig/OiFYFjuZ6nAJ' diff --git a/engine/src/flutter/tools/go/VERSION_LINUX b/engine/src/flutter/tools/go/VERSION_LINUX deleted file mode 100644 index 16697bada1..0000000000 --- a/engine/src/flutter/tools/go/VERSION_LINUX +++ /dev/null @@ -1 +0,0 @@ -390daacbfac646491c8ac7469195105ac0ce2c46 diff --git a/engine/src/flutter/tools/go/VERSION_MACOSX b/engine/src/flutter/tools/go/VERSION_MACOSX deleted file mode 100644 index 5c0a98cd20..0000000000 --- a/engine/src/flutter/tools/go/VERSION_MACOSX +++ /dev/null @@ -1 +0,0 @@ -72392dc25aec8d55aa7755c89a281270cdf4ef6d diff --git a/engine/src/flutter/tools/go/download.py b/engine/src/flutter/tools/go/download.py deleted file mode 100755 index 930623b19b..0000000000 --- a/engine/src/flutter/tools/go/download.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/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. - -""" -Downloads Go binaries from Google Cloud Storage and extracts them to -INSTALL_DIR, updating INSTALL_DIR/VERSION stamp file with current version. -Does nothing if INSTALL_DIR/VERSION is already up to date. -""" - -import os -import shutil -import subprocess -import sys -import tarfile - -# Path constants. (All of these should be absolute paths.) -THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -MOJO_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) -# Should be the same as in upload.py. -INSTALL_DIR = os.path.join(MOJO_DIR, 'third_party', 'go', 'tool') - -sys.path.insert(0, os.path.join(MOJO_DIR, 'tools')) -import find_depot_tools - -DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() -GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') - -def RunCommand(command): - """Run command and return success (True) or failure.""" - - print 'Running %s' % (str(command)) - if subprocess.call(command, shell=False) == 0: - return True - print 'Failed.' - return False - -def VersionFileName(): - if sys.platform.startswith('linux'): - platform_suffix = 'LINUX' - elif sys.platform == 'darwin': - platform_suffix = 'MACOSX' - else: - raise Exception('unsupported platform: ' + sys.platform) - return 'VERSION_' + platform_suffix - -def GetInstalledVersion(): - version_file = os.path.join(INSTALL_DIR, VersionFileName()) - if not os.path.exists(version_file): - return None - with open(version_file) as f: - return f.read().strip() - -def InstallGoBinaries(version): - """Downloads zipped go binaries from Google Cloud Storage and extracts them, - stamping current version.""" - - # Remove current installation. - if os.path.exists(INSTALL_DIR): - shutil.rmtree(INSTALL_DIR) - os.mkdir(INSTALL_DIR) - # Download go tool binaries from GCS. - archive_path = os.path.join(INSTALL_DIR, 'go.tar.gz') - download_cmd = ['python', GSUTIL_PATH, '-b', 'cp', - 'gs://mojo/go/tool/%s.tar.gz' % version, - archive_path] - if not RunCommand(download_cmd): - print ('WARNING: Failed to download Go tool binaries.') - return - - print "Extracting Go binaries." - with tarfile.open(archive_path) as arch: - arch.extractall(INSTALL_DIR) - os.remove(archive_path) - # Write version as the last step. - with open(os.path.join(INSTALL_DIR, VersionFileName()), 'w+') as f: - f.write('%s\n' % version) - -def main(): - # Read latest version. - version = '' - with open(os.path.join(THIS_DIR, VersionFileName())) as f: - version = f.read().strip() - # Return if installed binaries are up to date. - if version == GetInstalledVersion(): - return - InstallGoBinaries(version) - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/tools/go/upload.py b/engine/src/flutter/tools/go/upload.py deleted file mode 100755 index 893c79af2c..0000000000 --- a/engine/src/flutter/tools/go/upload.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/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 takes linux Go binaries, builds android binaries with NDK tool chain -configured with NDK_PLATFORM and NDK_TOOLCHAIN parameters, zips the stuff and -uploads it to Google Cloud Storage at gs://mojo/go/tool. It also produces -the VERSION file with the sha1 code of the uploaded archive. - -This script operates in the INSTALL_DIR directory, so it automatically updates -your current installation of the go binaries on success. On failure it -invalidates your current installation; to fix it, run download.py. - -In order to use it, you need: -- depot_tools in your path -- installed android build deps -- WRITE access to GCS - -To update go tool binaries you need to -1) run 'gsutil.py config' to update initialize gsutil's credentials -2) run this script: python upload.py path/to/go/binaries.tar.gz -3) push new version of file 'VERSION' - -This script doesn't check if current version is already up to date, as the -produced tar.gz archive is slightly different every time since it includes -timestamps. -""" - -import hashlib -import os -import shutil -import subprocess -import sys -import tarfile -import tempfile - -NDK_PLATFORM = 'android-14' -NDK_TOOLCHAIN = 'arm-linux-androideabi-4.9' - -# Path constants. (All of these should be absolute paths.) -THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -MOJO_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) -# Should be the same as in download.py. -INSTALL_DIR = os.path.join(MOJO_DIR, 'third_party', 'go', 'tool') - -sys.path.insert(0, os.path.join(MOJO_DIR, 'tools')) -import find_depot_tools - -DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() -GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') - -def RunCommand(command, env=None): - """Run command and return success (True) or failure.""" - - print 'Running %s' % (str(command)) - if subprocess.call(command, shell=False, env=env) == 0: - return True - print 'Failed.' - return False - -def VersionFileName(): - if sys.platform.startswith('linux'): - platform_suffix = 'LINUX' - elif sys.platform == 'darwin': - platform_suffix = 'MACOSX' - else: - raise Exception('unsupported platform: ' + sys.platform) - return 'VERSION_' + platform_suffix - -def HostArchName(): - if sys.platform.startswith('linux'): - arch = 'linux_amd64' - elif sys.platform == 'darwin': - arch = 'darwin_amd64' - else: - raise Exception('unsupported platform: ' + sys.platform) - return arch - -def ExtractBinaries(archive_path): - """Extracts go binaries from the given tar file to INSTALL_DIR.""" - - if os.path.exists(INSTALL_DIR): - shutil.rmtree(INSTALL_DIR) - os.mkdir(INSTALL_DIR) - archive_path = os.path.abspath(archive_path) - with tarfile.open(archive_path) as arch: - arch.extractall(INSTALL_DIR) - os.rename(os.path.join(INSTALL_DIR, 'go'), - os.path.join(INSTALL_DIR, HostArchName())) - -def BuildGoAndroid(): - go_host = os.path.join(INSTALL_DIR, HostArchName()) - go_android = os.path.join(INSTALL_DIR, 'android_arm') - # Copy go sources and remove binaries to keep only that we generate. - shutil.copytree(go_host, go_android) - shutil.rmtree(os.path.join(go_android, 'bin')) - shutil.rmtree(os.path.join(go_android, 'pkg')) - # Prepare the Android NDK tool chain. - os.chdir(os.path.join(MOJO_DIR, 'third_party', 'android_tools', 'ndk')) - ndk_out_dir = tempfile.mkdtemp(prefix='android_ndk') - script_path = os.path.join('build', 'tools', 'make-standalone-toolchain.sh') - make_toolchain_cmd = ['bash', script_path, '--platform=%s' % NDK_PLATFORM, - '--toolchain=%s' % NDK_TOOLCHAIN, - '--install-dir=%s' % ndk_out_dir] - if not RunCommand(make_toolchain_cmd): - print "Faild to build the Android NDK tool chain." - sys.exit(1) - # Configure environment variables. - cc = os.path.join(ndk_out_dir, 'bin', 'arm-linux-androideabi-gcc') - env = os.environ.copy() - env["GOROOT"] = go_host - env["GOROOT_BOOTSTRAP"] = go_host - env["CC_FOR_TARGET"] = '%s' % cc - env["CGO_ENABLED"] = '1' - env["GOOS"] = 'android' - env["GOARCH"] = 'arm' - env["GOARM"] = '7' - # Build go tool. - os.chdir(os.path.join(go_android, 'src')) - make_command = ['bash', 'make.bash'] - if not RunCommand(make_command, env=env): - print "Failed to make go tool for android." - sys.exit(1) - shutil.rmtree(ndk_out_dir) - -def Compress(): - """Compresses the go tool into tar.gz and generates sha1 code, renames the - archive to sha1.tar.gz and returns the sha1 code.""" - - print "Compressing go tool, this may take several minutes." - os.chdir(INSTALL_DIR) - with tarfile.open(os.path.join('a.tar.gz'), 'w|gz') as arch: - arch.add('android_arm') - arch.add(HostArchName()) - - sha1 = '' - with open(os.path.join(INSTALL_DIR, 'a.tar.gz')) as f: - sha1 = hashlib.sha1(f.read()).hexdigest() - os.rename(os.path.join(INSTALL_DIR, 'a.tar.gz'), - os.path.join(INSTALL_DIR, '%s.tar.gz' % sha1)) - return sha1 - -def Upload(sha1): - """Uploads INSTALL_DIR/sha1.tar.gz to Google Cloud Storage under - gs://mojo/go/tool and writes sha1 to THIS_DIR/VERSION.""" - - file_name = '%s.tar.gz' % sha1 - upload_cmd = ['python', GSUTIL_PATH, 'cp', - '-n', # Do not upload if the file already exists. - os.path.join(INSTALL_DIR, file_name), - 'gs://mojo/go/tool/%s' % file_name] - - print "Uploading go tool to GCS." - if not RunCommand(upload_cmd): - print "Failed to upload go tool to GCS." - sys.exit(1) - os.remove(os.path.join(INSTALL_DIR, file_name)) - # Write versions as the last step. - stamp_file = os.path.join(THIS_DIR, VersionFileName()) - with open(stamp_file, 'w+') as stamp: - stamp.write('%s\n' % sha1) - - stamp_file = os.path.join(INSTALL_DIR, VersionFileName()) - with open(stamp_file, 'w+') as stamp: - stamp.write('%s\n' % sha1) - -def main(): - ExtractBinaries(sys.argv[1]) - BuildGoAndroid() - sha1 = Compress() - Upload(sha1) - print "Done." - -if __name__ == '__main__': - sys.exit(main()) diff --git a/engine/src/flutter/tools/gritsettings/resource_ids b/engine/src/flutter/tools/gritsettings/resource_ids deleted file mode 100644 index 49973d10c0..0000000000 --- a/engine/src/flutter/tools/gritsettings/resource_ids +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright (c) 2012 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 file is used to assign starting resource ids for resources and strings -# used by Chromium. This is done to ensure that resource ids are unique -# across all the grd files. If you are adding a new grd file, please add -# a new entry to this file. -# -# The first entry in the file, SRCDIR, is special: It is a relative path from -# this file to the base of your checkout. -# -# The range of ID values, which is used by pak files, is from 0 to 2^16 - 1. -{ - "SRCDIR": "../..", - - "chrome/browser/browser_resources.grd": { - "includes": [400], - "structures": [750], - }, - "chrome/browser/resources/component_extension_resources.grd": { - "includes": [1000], - "structures": [1450], - }, - "chrome/browser/resources/net_internals_resources.grd": { - "includes": [1500], - }, - "ui/webui/resources/webui_resources.grd": { - "includes": [2000], - "structures": [2200], - }, - "chrome/common/common_resources.grd": { - "includes": [3000], - }, - "chrome/renderer/resources/renderer_resources.grd": { - "includes": [3500], - "structures": [3700], - }, - "net/base/net_resources.grd": { - "includes": [4000], - }, - "ui/resources/ui_unscaled_resources.grd": { - "includes": [4500], - }, - "content/app/resources/content_resources.grd": { - "structures": [4700], - }, - "third_party/WebKit/public/blink_image_resources.grd": { - "structures": [4750], - }, - "ui/resources/ui_resources.grd": { - "structures": [5500], - }, - "ui/views/resources/views_resources.grd": { - "structures": [5800], - }, - "ash/resources/ash_resources.grd": { - "includes": [6100], - "structures": [6150], - }, - "chrome/app/theme/theme_resources.grd": { - "structures": [7000], - }, - "chrome/app/theme/chrome_unscaled_resources.grd": { - "includes": [8000], - }, - "ui/strings/app_locale_settings.grd": { - "messages": [9000], - }, - "chrome/app/resources/locale_settings.grd": { - "includes": [9500], - "messages": [10000], - }, - # These each start with the same resource id because we only use one - # file for each build (chromiumos, google_chromeos, linux, mac, or win). - "chrome/app/resources/locale_settings_chromiumos.grd": { - "messages": [10500], - }, - "chrome/app/resources/locale_settings_google_chromeos.grd": { - "messages": [10500], - }, - "chrome/app/resources/locale_settings_linux.grd": { - "messages": [10500], - }, - "chrome/app/resources/locale_settings_mac.grd": { - "messages": [10500], - }, - "chrome/app/resources/locale_settings_win.grd": { - "messages": [10500], - }, - "ui/strings/ui_strings.grd": { - "messages": [11000], - }, - # Chromium strings and Google Chrome strings must start at the same id. - # We only use one file depending on whether we're building Chromium or - # Google Chrome. - "chrome/app/chromium_strings.grd": { - "messages": [11500], - }, - "chrome/app/google_chrome_strings.grd": { - "messages": [11500], - }, - # Leave lots of space for generated_resources since it has most of our - # strings. - "chrome/app/generated_resources.grd": { - "structures": [12000], - "messages": [12500], - }, - "content/app/strings/content_strings.grd": { - "messages": [19000], - }, - "components/policy/resources/policy_templates.grd": { - "structures": [20500], - "messages": [20510], - }, - "chrome/browser/resources/sync_internals_resources.grd": { - "includes": [21500], - }, - "chrome/browser/resources/signin_internals_resources.grd": { - "includes": [21750], - }, - "chrome/browser/resources/invalidations_resources.grd": { - "includes": [21950], - }, - # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd": { - "includes": [22000], - }, - "devtools_resources.grd": { - "includes": [22000], - }, - "chrome/browser/resources/options_resources.grd": { - "includes": [23000], - "structures": [23200], - }, - "chrome/browser/resources/options_test_resources.grd": { - "includes": [23400], - "structures": [23450], - }, - "cloud_print/virtual_driver/win/install/virtual_driver_setup_resources.grd": { - "messages": [23500], - "includes": [23550], - }, - "cloud_print/service/win/service_resources.grd": { - "messages": [23600], - "includes": [23700], - "structures": [23750], - }, - "cloud_print/gcp20/prototype/gcp20_device.grd": { - "messages": [23800], - "includes": [23830], - "structures": [23860], - }, - "chrome/browser/resources/quota_internals_resources.grd": { - "includes": [24000], - }, - "content/content_resources.grd": { - "includes": [25000], - }, - "content/shell/shell_resources.grd": { - "includes": [25500], - }, - # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": { - "includes": [25750], - }, - # iOS resources overlap with ash, chromeos and extensions_api, as these are - # not used on iOS. - "ios/chrome/app/strings/ios_strings_resources.grd": { - "messages": [26000], - }, - "ios/chrome/app/theme/ios_theme_resources.grd": { - "structures": [27000], - }, - "ash/ash_strings.grd": { - "messages": [26000], - }, - "ui/chromeos/resources/ui_chromeos_resources.grd": { - "structures": [26200], - }, - "ui/chromeos/ui_chromeos_strings.grd": { - "messages": [26300], - }, - "chrome/common/extensions_api_resources.grd": { - "includes": [26400], - }, - "extensions/extensions_resources.grd": { - "includes": [26600], - }, - "extensions/browser/resources/extensions_browser_resources.grd": { - "structures": [26800], - }, - "extensions/renderer/resources/extensions_renderer_resources.grd": { - "includes": [26850], - "structures": [26950], - }, - "extensions/extensions_strings.grd": { - "messages": [27000], - }, - "extensions/shell/app_shell_resources.grd": { - "includes": [27400], - }, - "chrome/browser/resources/memory_internals_resources.grd": { - "includes": [27500], - }, - "chrome/browser/resources/password_manager_internals_resources.grd": { - "includes": [27800], - }, - "device/bluetooth/bluetooth_strings.grd": { - "messages": [28000], - }, - "ui/keyboard/keyboard_resources.grd": { - "includes": [28050], - }, - "ui/file_manager/file_manager_resources.grd": { - "includes": [28110], - }, - "components/chrome_apps/chrome_apps_resources.grd": { - "includes": [28290], - }, - "ui/login/login_resources.grd": { - "includes": [28310], - }, - "chrome/browser/resources/translate_internals_resources.grd": { - "includes": [28510], - }, - "chrome/browser/resources/sync_file_system_internals_resources.grd": { - "includes": [29010], - }, - "chrome/app/address_input_strings.grd": { - "messages": [29110], - }, - "remoting/resources/remoting_strings.grd": { - "messages": [29560], - }, - "components/components_strings.grd": { - "messages": [30010], - }, - "components/resources/components_resources.grd": { - "includes": [30260], - }, - "components/resources/components_scaled_resources.grd": { - "structures": [30310], - }, - "third_party/WebKit/public/blink_resources.grd": { - "includes": [30350], - "structures": [30650], - }, - "chrome/browser/devtools/device/webrtc/resources.grd": { - "includes": [30800], - }, - "chrome/browser/resources/settings/settings_resources.grd": { - "structures": [30900], - }, - - # These files don't need to reserve resource ids, but are listed here so that - # translation scripts know of their existence. - "android_webview/java/strings/android_webview_strings.grd": {}, - "chrome/android/java/strings/android_chrome_strings.grd": {}, - "content/public/android/java/strings/android_content_strings.grd": {}, - "ui/accessibility/extensions/strings/accessibility_extensions_strings.grd": {}, - "ui/android/java/strings/android_ui_strings.grd": {}, - - # Resource ids starting at 31000 are reserved for projects built on Chromium. -} diff --git a/engine/src/flutter/tools/gyp/pylib/gyp/mac_tool.py b/engine/src/flutter/tools/gyp/pylib/gyp/mac_tool.py deleted file mode 100755 index eeeaceb0c7..0000000000 --- a/engine/src/flutter/tools/gyp/pylib/gyp/mac_tool.py +++ /dev/null @@ -1,610 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions to perform Xcode-style build steps. - -These functions are executed via gyp-mac-tool when using the Makefile generator. -""" - -import fcntl -import fnmatch -import glob -import json -import os -import plistlib -import re -import shutil -import string -import subprocess -import sys -import tempfile - - -def main(args): - executor = MacTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class MacTool(object): - """This class performs all the Mac tooling steps. The methods can either be - executed directly, or dispatched from an argument list.""" - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like copy-info-plist to CopyInfoPlist""" - return name_string.title().replace('-', '') - - def ExecCopyBundleResource(self, source, dest, convert_to_binary): - """Copies a resource file to the bundle/Resources directory, performing any - necessary compilation on each resource.""" - extension = os.path.splitext(source)[1].lower() - if os.path.isdir(source): - # Copy tree. - # TODO(thakis): This copies file attributes like mtime, while the - # single-file branch below doesn't. This should probably be changed to - # be consistent with the single-file branch. - if os.path.exists(dest): - shutil.rmtree(dest) - shutil.copytree(source, dest) - elif extension == '.xib': - return self._CopyXIBFile(source, dest) - elif extension == '.storyboard': - return self._CopyXIBFile(source, dest) - elif extension == '.strings': - self._CopyStringsFile(source, dest, convert_to_binary) - else: - shutil.copy(source, dest) - - def _CopyXIBFile(self, source, dest): - """Compiles a XIB file with ibtool into a binary plist in the bundle.""" - - # ibtool sometimes crashes with relative paths. See crbug.com/314728. - base = os.path.dirname(os.path.realpath(__file__)) - if os.path.relpath(source): - source = os.path.join(base, source) - if os.path.relpath(dest): - dest = os.path.join(base, dest) - - args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices', - '--output-format', 'human-readable-text', '--compile', dest, source] - ibtool_section_re = re.compile(r'/\*.*\*/') - ibtool_re = re.compile(r'.*note:.*is clipping its content') - ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE) - current_section_header = None - for line in ibtoolout.stdout: - if ibtool_section_re.match(line): - current_section_header = line - elif not ibtool_re.match(line): - if current_section_header: - sys.stdout.write(current_section_header) - current_section_header = None - sys.stdout.write(line) - return ibtoolout.returncode - - def _ConvertToBinary(self, dest): - subprocess.check_call([ - 'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest]) - - def _CopyStringsFile(self, source, dest, convert_to_binary): - """Copies a .strings file using iconv to reconvert the input into UTF-16.""" - input_code = self._DetectInputEncoding(source) or "UTF-8" - - # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call - # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints - # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing - # semicolon in dictionary. - # on invalid files. Do the same kind of validation. - import CoreFoundation - s = open(source, 'rb').read() - d = CoreFoundation.CFDataCreate(None, s, len(s)) - _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) - if error: - return - - fp = open(dest, 'wb') - fp.write(s.decode(input_code).encode('UTF-16')) - fp.close() - - if convert_to_binary == 'True': - self._ConvertToBinary(dest) - - def _DetectInputEncoding(self, file_name): - """Reads the first few bytes from file_name and tries to guess the text - encoding. Returns None as a guess if it can't detect it.""" - fp = open(file_name, 'rb') - try: - header = fp.read(3) - except e: - fp.close() - return None - fp.close() - if header.startswith("\xFE\xFF"): - return "UTF-16" - elif header.startswith("\xFF\xFE"): - return "UTF-16" - elif header.startswith("\xEF\xBB\xBF"): - return "UTF-8" - else: - return None - - def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys): - """Copies the |source| Info.plist to the destination directory |dest|.""" - # Read the source Info.plist into memory. - fd = open(source, 'r') - lines = fd.read() - fd.close() - - # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). - plist = plistlib.readPlistFromString(lines) - if keys: - plist = dict(plist.items() + json.loads(keys[0]).items()) - lines = plistlib.writePlistToString(plist) - - # Go through all the environment variables and replace them as variables in - # the file. - IDENT_RE = re.compile(r'[/\s]') - for key in os.environ: - if key.startswith('_'): - continue - evar = '${%s}' % key - evalue = os.environ[key] - lines = string.replace(lines, evar, evalue) - - # Xcode supports various suffices on environment variables, which are - # all undocumented. :rfc1034identifier is used in the standard project - # template these days, and :identifier was used earlier. They are used to - # convert non-url characters into things that look like valid urls -- - # except that the replacement character for :identifier, '_' isn't valid - # in a URL either -- oops, hence :rfc1034identifier was born. - evar = '${%s:identifier}' % key - evalue = IDENT_RE.sub('_', os.environ[key]) - lines = string.replace(lines, evar, evalue) - - evar = '${%s:rfc1034identifier}' % key - evalue = IDENT_RE.sub('-', os.environ[key]) - lines = string.replace(lines, evar, evalue) - - # Remove any keys with values that haven't been replaced. - lines = lines.split('\n') - for i in range(len(lines)): - if lines[i].strip().startswith("${"): - lines[i] = None - lines[i - 1] = None - lines = '\n'.join(filter(lambda x: x is not None, lines)) - - # Write out the file with variables replaced. - fd = open(dest, 'w') - fd.write(lines) - fd.close() - - # Now write out PkgInfo file now that the Info.plist file has been - # "compiled". - self._WritePkgInfo(dest) - - if convert_to_binary == 'True': - self._ConvertToBinary(dest) - - def _WritePkgInfo(self, info_plist): - """This writes the PkgInfo file from the data stored in Info.plist.""" - plist = plistlib.readPlist(info_plist) - if not plist: - return - - # Only create PkgInfo for executable types. - package_type = plist['CFBundlePackageType'] - if package_type != 'APPL': - return - - # The format of PkgInfo is eight characters, representing the bundle type - # and bundle signature, each four characters. If that is missing, four - # '?' characters are used instead. - signature_code = plist.get('CFBundleSignature', '????') - if len(signature_code) != 4: # Wrong length resets everything, too. - signature_code = '?' * 4 - - dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo') - fp = open(dest, 'w') - fp.write('%s%s' % (package_type, signature_code)) - fp.close() - - def ExecFlock(self, lockfile, *cmd_list): - """Emulates the most basic behavior of Linux's flock(1).""" - # Rely on exception handling to report errors. - fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666) - fcntl.flock(fd, fcntl.LOCK_EX) - return subprocess.call(cmd_list) - - def ExecFilterLibtool(self, *cmd_list): - """Calls libtool and filters out '/path/to/libtool: file: foo.o has no - symbols'.""" - libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$') - libtool_re5 = re.compile( - r'^.*libtool: warning for library: ' + - r'.* the table of contents is empty ' + - r'\(no object file members in the library define global symbols\)$') - env = os.environ.copy() - # Ref: - # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c - # The problem with this flag is that it resets the file mtime on the file to - # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone. - env['ZERO_AR_DATE'] = '1' - libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env) - _, err = libtoolout.communicate() - for line in err.splitlines(): - if not libtool_re.match(line) and not libtool_re5.match(line): - print >>sys.stderr, line - # Unconditionally touch the output .a file on the command line if present - # and the command succeeded. A bit hacky. - if not libtoolout.returncode: - for i in range(len(cmd_list) - 1): - if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'): - os.utime(cmd_list[i+1], None) - break - return libtoolout.returncode - - def ExecPackageFramework(self, framework, version): - """Takes a path to Something.framework and the Current version of that and - sets up all the symlinks.""" - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split('.')[0] - - CURRENT = 'Current' - RESOURCES = 'Resources' - VERSIONS = 'Versions' - - if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): - # Binary-less frameworks don't seem to contain symlinks (see e.g. - # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). - return - - # Move into the framework directory to set the symlinks correctly. - pwd = os.getcwd() - os.chdir(framework) - - # Set up the Current version. - self._Relink(version, os.path.join(VERSIONS, CURRENT)) - - # Set up the root symlinks. - self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) - self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) - - # Back to where we were before! - os.chdir(pwd) - - def _Relink(self, dest, link): - """Creates a symlink to |dest| named |link|. If |link| already exists, - it is overwritten.""" - if os.path.lexists(link): - os.remove(link) - os.symlink(dest, link) - - def ExecCompileXcassets(self, keys, *inputs): - """Compiles multiple .xcassets files into a single .car file. - - This invokes 'actool' to compile all the inputs .xcassets files. The - |keys| arguments is a json-encoded dictionary of extra arguments to - pass to 'actool' when the asset catalogs contains an application icon - or a launch image. - - Note that 'actool' does not create the Assets.car file if the asset - catalogs does not contains imageset. - """ - command_line = [ - 'xcrun', 'actool', '--output-format', 'human-readable-text', - '--compress-pngs', '--notices', '--warnings', '--errors', - ] - is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ - if is_iphone_target: - platform = os.environ['CONFIGURATION'].split('-')[-1] - if platform not in ('iphoneos', 'iphonesimulator'): - platform = 'iphonesimulator' - command_line.extend([ - '--platform', platform, '--target-device', 'iphone', - '--target-device', 'ipad', '--minimum-deployment-target', - os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile', - os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']), - ]) - else: - command_line.extend([ - '--platform', 'macosx', '--target-device', 'mac', - '--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'], - '--compile', - os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']), - ]) - if keys: - keys = json.loads(keys) - for key, value in keys.iteritems(): - arg_name = '--' + key - if isinstance(value, bool): - if value: - command_line.append(arg_name) - elif isinstance(value, list): - for v in value: - command_line.append(arg_name) - command_line.append(str(v)) - else: - command_line.append(arg_name) - command_line.append(str(value)) - # Note: actool crashes if inputs path are relative, so use os.path.abspath - # to get absolute path name for inputs. - command_line.extend(map(os.path.abspath, inputs)) - subprocess.check_call(command_line) - - def ExecMergeInfoPlist(self, output, *inputs): - """Merge multiple .plist files into a single .plist file.""" - merged_plist = {} - for path in inputs: - plist = self._LoadPlistMaybeBinary(path) - self._MergePlist(merged_plist, plist) - plistlib.writePlist(merged_plist, output) - - def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning): - """Code sign a bundle. - - This function tries to code sign an iOS bundle, following the same - algorithm as Xcode: - 1. copy ResourceRules.plist from the user or the SDK into the bundle, - 2. pick the provisioning profile that best match the bundle identifier, - and copy it into the bundle as embedded.mobileprovision, - 3. copy Entitlements.plist from user or SDK next to the bundle, - 4. code sign the bundle. - """ - resource_rules_path = self._InstallResourceRules(resource_rules) - substitutions, overrides = self._InstallProvisioningProfile( - provisioning, self._GetCFBundleIdentifier()) - entitlements_path = self._InstallEntitlements( - entitlements, substitutions, overrides) - subprocess.check_call([ - 'codesign', '--force', '--sign', key, '--resource-rules', - resource_rules_path, '--entitlements', entitlements_path, - os.path.join( - os.environ['TARGET_BUILD_DIR'], - os.environ['FULL_PRODUCT_NAME'])]) - - def _InstallResourceRules(self, resource_rules): - """Installs ResourceRules.plist from user or SDK into the bundle. - - Args: - resource_rules: string, optional, path to the ResourceRules.plist file - to use, default to "${SDKROOT}/ResourceRules.plist" - - Returns: - Path to the copy of ResourceRules.plist into the bundle. - """ - source_path = resource_rules - target_path = os.path.join( - os.environ['BUILT_PRODUCTS_DIR'], - os.environ['CONTENTS_FOLDER_PATH'], - 'ResourceRules.plist') - if not source_path: - source_path = os.path.join( - os.environ['SDKROOT'], 'ResourceRules.plist') - shutil.copy2(source_path, target_path) - return target_path - - def _InstallProvisioningProfile(self, profile, bundle_identifier): - """Installs embedded.mobileprovision into the bundle. - - Args: - profile: string, optional, short name of the .mobileprovision file - to use, if empty or the file is missing, the best file installed - will be used - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - - Returns: - A tuple containing two dictionary: variables substitutions and values - to overrides when generating the entitlements file. - """ - source_path, provisioning_data, team_id = self._FindProvisioningProfile( - profile, bundle_identifier) - target_path = os.path.join( - os.environ['BUILT_PRODUCTS_DIR'], - os.environ['CONTENTS_FOLDER_PATH'], - 'embedded.mobileprovision') - shutil.copy2(source_path, target_path) - substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.') - return substitutions, provisioning_data['Entitlements'] - - def _FindProvisioningProfile(self, profile, bundle_identifier): - """Finds the .mobileprovision file to use for signing the bundle. - - Checks all the installed provisioning profiles (or if the user specified - the PROVISIONING_PROFILE variable, only consult it) and select the most - specific that correspond to the bundle identifier. - - Args: - profile: string, optional, short name of the .mobileprovision file - to use, if empty or the file is missing, the best file installed - will be used - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - - Returns: - A tuple of the path to the selected provisioning profile, the data of - the embedded plist in the provisioning profile and the team identifier - to use for code signing. - - Raises: - SystemExit: if no .mobileprovision can be used to sign the bundle. - """ - profiles_dir = os.path.join( - os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles') - if not os.path.isdir(profiles_dir): - print >>sys.stderr, ( - 'cannot find mobile provisioning for %s' % bundle_identifier) - sys.exit(1) - provisioning_profiles = None - if profile: - profile_path = os.path.join(profiles_dir, profile + '.mobileprovision') - if os.path.exists(profile_path): - provisioning_profiles = [profile_path] - if not provisioning_profiles: - provisioning_profiles = glob.glob( - os.path.join(profiles_dir, '*.mobileprovision')) - valid_provisioning_profiles = {} - for profile_path in provisioning_profiles: - profile_data = self._LoadProvisioningProfile(profile_path) - app_id_pattern = profile_data.get( - 'Entitlements', {}).get('application-identifier', '') - for team_identifier in profile_data.get('TeamIdentifier', []): - app_id = '%s.%s' % (team_identifier, bundle_identifier) - if fnmatch.fnmatch(app_id, app_id_pattern): - valid_provisioning_profiles[app_id_pattern] = ( - profile_path, profile_data, team_identifier) - if not valid_provisioning_profiles: - print >>sys.stderr, ( - 'cannot find mobile provisioning for %s' % bundle_identifier) - sys.exit(1) - # If the user has multiple provisioning profiles installed that can be - # used for ${bundle_identifier}, pick the most specific one (ie. the - # provisioning profile whose pattern is the longest). - selected_key = max(valid_provisioning_profiles, key=lambda v: len(v)) - return valid_provisioning_profiles[selected_key] - - def _LoadProvisioningProfile(self, profile_path): - """Extracts the plist embedded in a provisioning profile. - - Args: - profile_path: string, path to the .mobileprovision file - - Returns: - Content of the plist embedded in the provisioning profile as a dictionary. - """ - with tempfile.NamedTemporaryFile() as temp: - subprocess.check_call([ - 'security', 'cms', '-D', '-i', profile_path, '-o', temp.name]) - return self._LoadPlistMaybeBinary(temp.name) - - def _MergePlist(self, merged_plist, plist): - """Merge |plist| into |merged_plist|.""" - for key, value in plist.iteritems(): - if isinstance(value, dict): - merged_value = merged_plist.get(key, {}) - if isinstance(merged_value, dict): - self._MergePlist(merged_value, value) - merged_plist[key] = merged_value - else: - merged_plist[key] = value - else: - merged_plist[key] = value - - def _LoadPlistMaybeBinary(self, plist_path): - """Loads into a memory a plist possibly encoded in binary format. - - This is a wrapper around plistlib.readPlist that tries to convert the - plist to the XML format if it can't be parsed (assuming that it is in - the binary format). - - Args: - plist_path: string, path to a plist file, in XML or binary format - - Returns: - Content of the plist as a dictionary. - """ - try: - # First, try to read the file using plistlib that only supports XML, - # and if an exception is raised, convert a temporary copy to XML and - # load that copy. - return plistlib.readPlist(plist_path) - except: - pass - with tempfile.NamedTemporaryFile() as temp: - shutil.copy2(plist_path, temp.name) - subprocess.check_call(['plutil', '-convert', 'xml1', temp.name]) - return plistlib.readPlist(temp.name) - - def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix): - """Constructs a dictionary of variable substitutions for Entitlements.plist. - - Args: - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - app_identifier_prefix: string, value for AppIdentifierPrefix - - Returns: - Dictionary of substitutions to apply when generating Entitlements.plist. - """ - return { - 'CFBundleIdentifier': bundle_identifier, - 'AppIdentifierPrefix': app_identifier_prefix, - } - - def _GetCFBundleIdentifier(self): - """Extracts CFBundleIdentifier value from Info.plist in the bundle. - - Returns: - Value of CFBundleIdentifier in the Info.plist located in the bundle. - """ - info_plist_path = os.path.join( - os.environ['TARGET_BUILD_DIR'], - os.environ['INFOPLIST_PATH']) - info_plist_data = self._LoadPlistMaybeBinary(info_plist_path) - return info_plist_data['CFBundleIdentifier'] - - def _InstallEntitlements(self, entitlements, substitutions, overrides): - """Generates and install the ${BundleName}.xcent entitlements file. - - Expands variables "$(variable)" pattern in the source entitlements file, - add extra entitlements defined in the .mobileprovision file and the copy - the generated plist to "${BundlePath}.xcent". - - Args: - entitlements: string, optional, path to the Entitlements.plist template - to use, defaults to "${SDKROOT}/Entitlements.plist" - substitutions: dictionary, variable substitutions - overrides: dictionary, values to add to the entitlements - - Returns: - Path to the generated entitlements file. - """ - source_path = entitlements - target_path = os.path.join( - os.environ['BUILT_PRODUCTS_DIR'], - os.environ['PRODUCT_NAME'] + '.xcent') - if not source_path: - source_path = os.path.join( - os.environ['SDKROOT'], - 'Entitlements.plist') - shutil.copy2(source_path, target_path) - data = self._LoadPlistMaybeBinary(target_path) - data = self._ExpandVariables(data, substitutions) - if overrides: - for key in overrides: - if key not in data: - data[key] = overrides[key] - plistlib.writePlist(data, target_path) - return target_path - - def _ExpandVariables(self, data, substitutions): - """Expands variables "$(variable)" in data. - - Args: - data: object, can be either string, list or dictionary - substitutions: dictionary, variable substitutions to perform - - Returns: - Copy of data where each references to "$(variable)" has been replaced - by the corresponding value found in substitutions, or left intact if - the key was not found. - """ - if isinstance(data, str): - for key, value in substitutions.iteritems(): - data = data.replace('$(%s)' % key, value) - return data - if isinstance(data, list): - return [self._ExpandVariables(v, substitutions) for v in data] - if isinstance(data, dict): - return {k: self._ExpandVariables(data[k], substitutions) for k in data} - return data - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/tools/idl_parser/PRESUBMIT.py b/engine/src/flutter/tools/idl_parser/PRESUBMIT.py deleted file mode 100644 index ff657aa859..0000000000 --- a/engine/src/flutter/tools/idl_parser/PRESUBMIT.py +++ /dev/null @@ -1,15 +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. - - -WHITELIST = [ r'^.+_test\.py$' ] - -def CheckChangeOnUpload(input_api, output_api): - return input_api.canned_checks.RunUnitTestsInDirectory( - input_api, output_api, '.', whitelist=WHITELIST) - - -def CheckChangeOnCommit(input_api, output_api): - return input_api.canned_checks.RunUnitTestsInDirectory( - input_api, output_api, '.', whitelist=WHITELIST) diff --git a/engine/src/flutter/tools/idl_parser/__init__.py b/engine/src/flutter/tools/idl_parser/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/engine/src/flutter/tools/idl_parser/idl_lexer.py b/engine/src/flutter/tools/idl_parser/idl_lexer.py deleted file mode 100755 index abbed37abd..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_lexer.py +++ /dev/null @@ -1,294 +0,0 @@ -#!/usr/bin/env python -# 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. - -""" Lexer for PPAPI IDL - -The lexer uses the PLY library to build a tokenizer which understands both -WebIDL and Pepper tokens. - -WebIDL, and WebIDL regular expressions can be found at: - http://www.w3.org/TR/2012/CR-WebIDL-20120419/ -PLY can be found at: - http://www.dabeaz.com/ply/ -""" - -import os.path -import sys - -# -# Try to load the ply module, if not, then assume it is in the third_party -# directory. -# -try: - # Disable lint check which fails to find the ply module. - # pylint: disable=F0401 - from ply import lex -except ImportError: - module_path, module_name = os.path.split(__file__) - third_party = os.path.join(module_path, '..', '..', 'third_party') - sys.path.append(third_party) - # pylint: disable=F0401 - from ply import lex - -# -# IDL Lexer -# -class IDLLexer(object): - # 'literals' is a value expected by lex which specifies a list of valid - # literal tokens, meaning the token type and token value are identical. - literals = r'"*.(){}[],;:=+-/~|&^?<>' - - # 't_ignore' contains ignored characters (spaces and tabs) - t_ignore = ' \t' - - # 'tokens' is a value required by lex which specifies the complete list - # of valid token types. - tokens = [ - # Data types - 'float', - 'integer', - 'string', - - # Symbol and keywords types - 'COMMENT', - 'identifier', - - # MultiChar operators - 'ELLIPSIS', - ] - - # 'keywords' is a map of string to token type. All tokens matching - # KEYWORD_OR_SYMBOL are matched against keywords dictionary, to determine - # if the token is actually a keyword. - keywords = { - 'any' : 'ANY', - 'attribute' : 'ATTRIBUTE', - 'boolean' : 'BOOLEAN', - 'byte' : 'BYTE', - 'ByteString' : 'BYTESTRING', - 'callback' : 'CALLBACK', - 'const' : 'CONST', - 'creator' : 'CREATOR', - 'Date' : 'DATE', - 'deleter' : 'DELETER', - 'dictionary' : 'DICTIONARY', - 'DOMString' : 'DOMSTRING', - 'double' : 'DOUBLE', - 'enum' : 'ENUM', - 'exception' : 'EXCEPTION', - 'false' : 'FALSE', - 'float' : 'FLOAT', - 'getter': 'GETTER', - 'implements' : 'IMPLEMENTS', - 'Infinity' : 'INFINITY', - 'inherit' : 'INHERIT', - 'interface' : 'INTERFACE', - 'iterable': 'ITERABLE', - 'legacycaller' : 'LEGACYCALLER', - 'legacyiterable' : 'LEGACYITERABLE', - 'long' : 'LONG', - 'maplike': 'MAPLIKE', - 'Nan' : 'NAN', - 'null' : 'NULL', - 'object' : 'OBJECT', - 'octet' : 'OCTET', - 'optional' : 'OPTIONAL', - 'or' : 'OR', - 'partial' : 'PARTIAL', - 'Promise' : 'PROMISE', - 'readonly' : 'READONLY', - 'RegExp' : 'REGEXP', - 'required' : 'REQUIRED', - 'sequence' : 'SEQUENCE', - 'serializer' : 'SERIALIZER', - 'setlike' : 'SETLIKE', - 'setter': 'SETTER', - 'short' : 'SHORT', - 'static' : 'STATIC', - 'stringifier' : 'STRINGIFIER', - 'typedef' : 'TYPEDEF', - 'true' : 'TRUE', - 'unsigned' : 'UNSIGNED', - 'unrestricted' : 'UNRESTRICTED', - 'void' : 'VOID' - } - - # Token definitions - # - # Lex assumes any value or function in the form of 't_' represents a - # regular expression where a match will emit a token of type . In the - # case of a function, the function is called when a match is made. These - # definitions come from WebIDL. - # - # These need to be methods for lexer construction, despite not using self. - # pylint: disable=R0201 - def t_ELLIPSIS(self, t): - r'\.\.\.' - return t - - # Regex needs to be in the docstring - # pylint: disable=C0301 - def t_float(self, t): - r'-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)' - return t - - def t_integer(self, t): - r'-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)' - return t - - - # A line ending '\n', we use this to increment the line number - def t_LINE_END(self, t): - r'\n+' - self.AddLines(len(t.value)) - - # We do not process escapes in the IDL strings. Strings are exclusively - # used for attributes and enums, and not used as typical 'C' constants. - def t_string(self, t): - r'"[^"]*"' - t.value = t.value[1:-1] - self.AddLines(t.value.count('\n')) - return t - - # A C or C++ style comment: /* xxx */ or // - def t_COMMENT(self, t): - r'(/\*(.|\n)*?\*/)|(//.*(\n[ \t]*//.*)*)' - self.AddLines(t.value.count('\n')) - return t - - # A symbol or keyword. - def t_KEYWORD_OR_SYMBOL(self, t): - r'_?[A-Za-z][A-Za-z_0-9]*' - - # All non-keywords are assumed to be symbols - t.type = self.keywords.get(t.value, 'identifier') - - # We strip leading underscores so that you can specify symbols with the same - # value as a keywords (E.g. a dictionary named 'interface'). - if t.value[0] == '_': - t.value = t.value[1:] - return t - - def t_ANY_error(self, t): - msg = 'Unrecognized input' - line = self.Lexer().lineno - - # If that line has not been accounted for, then we must have hit - # EoF, so compute the beginning of the line that caused the problem. - if line >= len(self.index): - # Find the offset in the line of the first word causing the issue - word = t.value.split()[0] - offs = self.lines[line - 1].find(word) - # Add the computed line's starting position - self.index.append(self.Lexer().lexpos - offs) - msg = 'Unexpected EoF reached after' - - pos = self.Lexer().lexpos - self.index[line] - out = self.ErrorMessage(line, pos, msg) - sys.stderr.write(out + '\n') - self._lex_errors += 1 - - - def AddLines(self, count): - # Set the lexer position for the beginning of the next line. In the case - # of multiple lines, tokens can not exist on any of the lines except the - # last one, so the recorded value for previous lines are unused. We still - # fill the array however, to make sure the line count is correct. - self.Lexer().lineno += count - for _ in range(count): - self.index.append(self.Lexer().lexpos) - - def FileLineMsg(self, line, msg): - # Generate a message containing the file and line number of a token. - filename = self.Lexer().filename - if filename: - return "%s(%d) : %s" % (filename, line + 1, msg) - return " : %s" % msg - - def SourceLine(self, line, pos): - # Create a source line marker - caret = ' ' * pos + '^' - # We decrement the line number since the array is 0 based while the - # line numbers are 1 based. - return "%s\n%s" % (self.lines[line - 1], caret) - - def ErrorMessage(self, line, pos, msg): - return "\n%s\n%s" % ( - self.FileLineMsg(line, msg), - self.SourceLine(line, pos)) - -# -# Tokenizer -# -# The token function returns the next token provided by IDLLexer for matching -# against the leaf paterns. -# - def token(self): - tok = self.Lexer().token() - if tok: - self.last = tok - return tok - - - def GetTokens(self): - outlist = [] - while True: - t = self.Lexer().token() - if not t: - break - outlist.append(t) - return outlist - - def Tokenize(self, data, filename='__no_file__'): - lexer = self.Lexer() - lexer.lineno = 1 - lexer.filename = filename - lexer.input(data) - self.lines = data.split('\n') - - def KnownTokens(self): - return self.tokens - - def Lexer(self): - if not self._lexobj: - self._lexobj = lex.lex(object=self, lextab=None, optimize=0) - return self._lexobj - - def _AddToken(self, token): - if token in self.tokens: - raise RuntimeError('Same token: ' + token) - self.tokens.append(token) - - def _AddTokens(self, tokens): - for token in tokens: - self._AddToken(token) - - def _AddKeywords(self, keywords): - for key in keywords: - value = key.upper() - self._AddToken(value) - self.keywords[key] = value - - def _DelKeywords(self, keywords): - for key in keywords: - self.tokens.remove(key.upper()) - del self.keywords[key] - - def __init__(self): - self.index = [0] - self._lex_errors = 0 - self.linex = [] - self.filename = None - self.keywords = {} - self.tokens = [] - self._AddTokens(IDLLexer.tokens) - self._AddKeywords(IDLLexer.keywords) - self._lexobj = None - self.last = None - self.lines = None - -# If run by itself, attempt to build the lexer -if __name__ == '__main__': - lexer_object = IDLLexer() diff --git a/engine/src/flutter/tools/idl_parser/idl_lexer_test.py b/engine/src/flutter/tools/idl_parser/idl_lexer_test.py deleted file mode 100755 index 8b20da85fb..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_lexer_test.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python -# 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. - -import unittest - -from idl_lexer import IDLLexer -from idl_ppapi_lexer import IDLPPAPILexer - -# -# FileToTokens -# -# From a source file generate a list of tokens. -# -def FileToTokens(lexer, filename): - with open(filename, 'rb') as srcfile: - lexer.Tokenize(srcfile.read(), filename) - return lexer.GetTokens() - - -# -# TextToTokens -# -# From a source file generate a list of tokens. -# -def TextToTokens(lexer, text): - lexer.Tokenize(text) - return lexer.GetTokens() - - -class WebIDLLexer(unittest.TestCase): - def setUp(self): - self.lexer = IDLLexer() - self.filenames = [ - 'test_lexer/values.in', - 'test_lexer/keywords.in' - ] - - # - # testRebuildText - # - # From a set of tokens, generate a new source text by joining with a - # single space. The new source is then tokenized and compared against the - # old set. - # - def testRebuildText(self): - for filename in self.filenames: - tokens1 = FileToTokens(self.lexer, filename) - to_text = '\n'.join(['%s' % t.value for t in tokens1]) - tokens2 = TextToTokens(self.lexer, to_text) - - count1 = len(tokens1) - count2 = len(tokens2) - self.assertEqual(count1, count2) - - for i in range(count1): - msg = 'Value %s does not match original %s on line %d of %s.' % ( - tokens2[i].value, tokens1[i].value, tokens1[i].lineno, filename) - self.assertEqual(tokens1[i].value, tokens2[i].value, msg) - - # - # testExpectedType - # - # From a set of tokens pairs, verify the type field of the second matches - # the value of the first, so that: - # integer 123 float 1.1 ... - # will generate a passing test, when the first token has both the type and - # value of the keyword integer and the second has the type of integer and - # value of 123 and so on. - # - def testExpectedType(self): - for filename in self.filenames: - tokens = FileToTokens(self.lexer, filename) - count = len(tokens) - self.assertTrue(count > 0) - self.assertFalse(count & 1) - - index = 0 - while index < count: - expect_type = tokens[index].value - actual_type = tokens[index + 1].type - msg = 'Type %s does not match expected %s on line %d of %s.' % ( - actual_type, expect_type, tokens[index].lineno, filename) - index += 2 - self.assertEqual(expect_type, actual_type, msg) - - -class PepperIDLLexer(WebIDLLexer): - def setUp(self): - self.lexer = IDLPPAPILexer() - self.filenames = [ - 'test_lexer/values_ppapi.in', - 'test_lexer/keywords_ppapi.in' - ] - - -if __name__ == '__main__': - unittest.main() diff --git a/engine/src/flutter/tools/idl_parser/idl_node.py b/engine/src/flutter/tools/idl_parser/idl_node.py deleted file mode 100755 index e50fc4e1ba..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_node.py +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 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 sys - -# -# IDL Node -# -# IDL Node defines the IDLAttribute and IDLNode objects which are constructed -# by the parser as it processes the various 'productions'. The IDLAttribute -# objects are assigned to the IDLNode's property dictionary instead of being -# applied as children of The IDLNodes, so they do not exist in the final tree. -# The AST of IDLNodes is the output from the parsing state and will be used -# as the source data by the various generators. -# - - -# -# CopyToList -# -# Takes an input item, list, or None, and returns a new list of that set. -def CopyToList(item): - # If the item is 'Empty' make it an empty list - if not item: - item = [] - - # If the item is not a list - if type(item) is not type([]): - item = [item] - - # Make a copy we can modify - return list(item) - - -# IDLSearch -# -# A temporary object used by the parsing process to hold an Extended Attribute -# which will be passed as a child to a standard IDLNode. -# -class IDLSearch(object): - def __init__(self): - self.depth = 0 - - def Enter(self, node): - pass - - def Exit(self, node): - pass - - -# IDLAttribute -# -# A temporary object used by the parsing process to hold an Extended Attribute -# which will be passed as a child to a standard IDLNode. -# -class IDLAttribute(object): - def __init__(self, name, value): - self._cls = 'Property' - self.name = name - self.value = value - - def __str__(self): - return '%s=%s' % (self.name, self.value) - - def GetClass(self): - return self._cls - -# -# IDLNode -# -# This class implements the AST tree, providing the associations between -# parents and children. It also contains a namepsace and propertynode to -# allow for look-ups. IDLNode is derived from IDLRelease, so it is -# version aware. -# -class IDLNode(object): - def __init__(self, cls, filename, lineno, pos, children=None): - self._cls = cls - self._properties = { - 'ERRORS' : [], - 'WARNINGS': [], - 'FILENAME': filename, - 'LINENO' : lineno, - 'POSSITION' : pos, - } - - self._children = [] - self._parent = None - self.AddChildren(children) - -# -# -# - # Return a string representation of this node - def __str__(self): - name = self.GetProperty('NAME','') - return '%s(%s)' % (self._cls, name) - - def GetLogLine(self, msg): - filename, lineno = self.GetFileAndLine() - return '%s(%d) : %s\n' % (filename, lineno, msg) - - # Log an error for this object - def Error(self, msg): - self.GetProperty('ERRORS').append(msg) - sys.stderr.write(self.GetLogLine('error: ' + msg)) - - # Log a warning for this object - def Warning(self, msg): - self.GetProperty('WARNINGS').append(msg) - sys.stdout.write(self.GetLogLine('warning:' + msg)) - - # Return file and line number for where node was defined - def GetFileAndLine(self): - return self.GetProperty('FILENAME'), self.GetProperty('LINENO') - - def GetClass(self): - return self._cls - - def GetName(self): - return self.GetProperty('NAME') - - def GetParent(self): - return self._parent - - def Traverse(self, search, filter_nodes): - if self._cls in filter_nodes: - return '' - - search.Enter(self) - search.depth += 1 - for child in self._children: - child.Traverse(search, filter_nodes) - search.depth -= 1 - search.Exit(self) - - - def Tree(self, filter_nodes=None, accept_props=None): - class DumpTreeSearch(IDLSearch): - def __init__(self, props): - IDLSearch.__init__(self) - self.out = [] - self.props = props - - def Enter(self, node): - tab = ''.rjust(self.depth * 2) - self.out.append(tab + str(node)) - if self.props: - proplist = [] - for key, value in node.GetProperties().iteritems(): - if key in self.props: - proplist.append(tab + ' %s: %s' % (key, str(value))) - if proplist: - self.out.append(tab + ' PROPERTIES') - self.out.extend(proplist) - - if filter_nodes == None: - filter_nodes = ['Comment', 'Copyright'] - - search = DumpTreeSearch(accept_props) - self.Traverse(search, filter_nodes) - return search.out - -# -# Search related functions -# - # Check if node is of a given type - def IsA(self, *typelist): - if self._cls in typelist: - return True - return False - - # Get a list of all children - def GetChildren(self): - return self._children - - def GetListOf(self, *keys): - out = [] - for child in self.GetChildren(): - if child.GetClass() in keys: - out.append(child) - return out - - def GetOneOf(self, *keys): - out = self.GetListOf(*keys) - if out: - return out[0] - return None - - def AddChildren(self, children): - children = CopyToList(children) - for child in children: - if not child: - continue - if type(child) == IDLAttribute: - self.SetProperty(child.name, child.value) - continue - if type(child) == IDLNode: - child._parent = self - self._children.append(child) - continue - raise RuntimeError('Adding child of type %s.\n' % type(child).__name__) - - -# -# Property Functions -# - def SetProperty(self, name, val): - self._properties[name] = val - - def GetProperty(self, name, default=None): - return self._properties.get(name, default) - - def GetProperties(self): - return self._properties diff --git a/engine/src/flutter/tools/idl_parser/idl_parser.py b/engine/src/flutter/tools/idl_parser/idl_parser.py deleted file mode 100755 index 27b1914290..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_parser.py +++ /dev/null @@ -1,1285 +0,0 @@ -#!/usr/bin/env python -# 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. - -""" Parser for PPAPI IDL """ - -# -# IDL Parser -# -# The parser is uses the PLY yacc library to build a set of parsing rules based -# on WebIDL. -# -# WebIDL, and WebIDL grammar can be found at: -# http://heycam.github.io/webidl/ -# PLY can be found at: -# http://www.dabeaz.com/ply/ -# -# The parser generates a tree by recursively matching sets of items against -# defined patterns. When a match is made, that set of items is reduced -# to a new item. The new item can provide a match for parent patterns. -# In this way an AST is built (reduced) depth first. -# - -# -# Disable check for line length and Member as Function due to how grammar rules -# are defined with PLY -# -# pylint: disable=R0201 -# pylint: disable=C0301 - -import os.path -import sys -import time - -from idl_lexer import IDLLexer -from idl_node import IDLAttribute, IDLNode - -# -# Try to load the ply module, if not, then assume it is in the third_party -# directory. -# -try: - # Disable lint check which fails to find the ply module. - # pylint: disable=F0401 - from ply import lex - from ply import yacc -except ImportError: - module_path, module_name = os.path.split(__file__) - third_party = os.path.join(module_path, os.par, os.par, 'third_party') - sys.path.append(third_party) - # pylint: disable=F0401 - from ply import lex - from ply import yacc - -# -# ERROR_REMAP -# -# Maps the standard error formula into a more friendly error message. -# -ERROR_REMAP = { - 'Unexpected ")" after "(".' : 'Empty argument list.', - 'Unexpected ")" after ",".' : 'Missing argument.', - 'Unexpected "}" after ",".' : 'Trailing comma in block.', - 'Unexpected "}" after "{".' : 'Unexpected empty block.', - 'Unexpected comment after "}".' : 'Unexpected trailing comment.', - 'Unexpected "{" after keyword "enum".' : 'Enum missing name.', - 'Unexpected "{" after keyword "struct".' : 'Struct missing name.', - 'Unexpected "{" after keyword "interface".' : 'Interface missing name.', -} - - -def Boolean(val): - """Convert to strict boolean type.""" - if val: - return True - return False - - -def ListFromConcat(*items): - """Generate list by concatenating inputs""" - itemsout = [] - for item in items: - if item is None: - continue - if type(item) is not type([]): - itemsout.append(item) - else: - itemsout.extend(item) - - return itemsout - -def ExpandProduction(p): - if type(p) == list: - return '[' + ', '.join([ExpandProduction(x) for x in p]) + ']' - if type(p) == IDLNode: - return 'Node:' + str(p) - if type(p) == IDLAttribute: - return 'Attr:' + str(p) - if type(p) == str: - return 'str:' + p - return '%s:%s' % (p.__class__.__name__, str(p)) - -# TokenTypeName -# -# Generate a string which has the type and value of the token. -# -def TokenTypeName(t): - if t.type == 'SYMBOL': - return 'symbol %s' % t.value - if t.type in ['HEX', 'INT', 'OCT', 'FLOAT']: - return 'value %s' % t.value - if t.type == 'string' : - return 'string "%s"' % t.value - if t.type == 'COMMENT' : - return 'comment' - if t.type == t.value: - return '"%s"' % t.value - if t.type == ',': - return 'Comma' - if t.type == 'identifier': - return 'identifier "%s"' % t.value - return 'keyword "%s"' % t.value - - -# -# IDL Parser -# -# The Parser inherits the from the Lexer to provide PLY with the tokenizing -# definitions. Parsing patterns are encoded as functions where p_ is -# is called any time a patern matching the function documentation is found. -# Paterns are expressed in the form of: -# """ : .... -# | ....""" -# -# Where new item is the result of a match against one or more sets of items -# separated by the "|". -# -# The function is called with an object 'p' where p[0] is the output object -# and p[n] is the set of inputs for positive values of 'n'. Len(p) can be -# used to distinguish between multiple item sets in the pattern. -# -# For more details on parsing refer to the PLY documentation at -# http://www.dabeaz.com/ply/ -# -# The parser is based on the WebIDL standard. See: -# http://heycam.github.io/webidl/#idl-grammar -# -# The various productions are annotated so that the WHOLE number greater than -# zero in the comment denotes the matching WebIDL grammar definition. -# -# Productions with a fractional component in the comment denote additions to -# the WebIDL spec, such as comments. -# - - -class IDLParser(object): -# -# We force all input files to start with two comments. The first comment is a -# Copyright notice followed by a file comment and finally by file level -# productions. -# - # [0] Insert a TOP definition for Copyright and Comments - def p_Top(self, p): - """Top : COMMENT COMMENT Definitions""" - Copyright = self.BuildComment('Copyright', p, 1) - Filedoc = self.BuildComment('Comment', p, 2) - p[0] = ListFromConcat(Copyright, Filedoc, p[3]) - - # [0.1] Add support for Multiple COMMENTS - def p_Comments(self, p): - """Comments : CommentsRest""" - if len(p) > 1: - p[0] = p[1] - - # [0.2] Produce a COMMENT and aggregate sibling comments - def p_CommentsRest(self, p): - """CommentsRest : COMMENT CommentsRest - | """ - if len(p) > 1: - p[0] = ListFromConcat(self.BuildComment('Comment', p, 1), p[2]) - - -# -#The parser is based on the WebIDL standard. See: -# http://heycam.github.io/webidl/#idl-grammar -# - # [1] - def p_Definitions(self, p): - """Definitions : ExtendedAttributeList Definition Definitions - | """ - if len(p) > 1: - p[2].AddChildren(p[1]) - p[0] = ListFromConcat(p[2], p[3]) - - # [2] - def p_Definition(self, p): - """Definition : CallbackOrInterface - | Partial - | Dictionary - | Exception - | Enum - | Typedef - | ImplementsStatement""" - p[0] = p[1] - - # [2.1] Error recovery for definition - def p_DefinitionError(self, p): - """Definition : error ';'""" - p[0] = self.BuildError(p, 'Definition') - - # [3] - def p_CallbackOrInterface(self, p): - """CallbackOrInterface : CALLBACK CallbackRestOrInterface - | Interface""" - if len(p) > 2: - p[0] = p[2] - else: - p[0] = p[1] - - # [4] - def p_CallbackRestOrInterface(self, p): - """CallbackRestOrInterface : CallbackRest - | Interface""" - p[0] = p[1] - - # [5] - def p_Interface(self, p): - """Interface : INTERFACE identifier Inheritance '{' InterfaceMembers '}' ';'""" - p[0] = self.BuildNamed('Interface', p, 2, ListFromConcat(p[3], p[5])) - - # [5.1] Error recovery for interface. - def p_InterfaceError(self, p): - """Interface : INTERFACE identifier Inheritance '{' error""" - p[0] = self.BuildError(p, 'Interface') - - # [6] - def p_Partial(self, p): - """Partial : PARTIAL PartialDefinition""" - p[2].AddChildren(self.BuildTrue('Partial')) - p[0] = p[2] - - # [6.1] Error recovery for Partial - def p_PartialError(self, p): - """Partial : PARTIAL error""" - p[0] = self.BuildError(p, 'Partial') - - # [7] - def p_PartialDefinition(self, p): - """PartialDefinition : PartialDictionary - | PartialInterface""" - p[0] = p[1] - - # [8] - def p_PartialInterface(self, p): - """PartialInterface : INTERFACE identifier '{' InterfaceMembers '}' ';'""" - p[0] = self.BuildNamed('Interface', p, 2, p[4]) - - # [9] - def p_InterfaceMembers(self, p): - """InterfaceMembers : ExtendedAttributeList InterfaceMember InterfaceMembers - |""" - if len(p) > 1: - p[2].AddChildren(p[1]) - p[0] = ListFromConcat(p[2], p[3]) - - # [9.1] Error recovery for InterfaceMembers - def p_InterfaceMembersError(self, p): - """InterfaceMembers : error""" - p[0] = self.BuildError(p, 'InterfaceMembers') - - # [10] Removed unsupported: Serializer - def p_InterfaceMember(self, p): - """InterfaceMember : Const - | Operation - | Serializer - | Stringifier - | StaticMember - | Iterable - | ReadonlyMember - | ReadWriteAttribute - | ReadWriteMaplike - | ReadWriteSetlike""" - p[0] = p[1] - - # [11] - def p_Dictionary(self, p): - """Dictionary : DICTIONARY identifier Inheritance '{' DictionaryMembers '}' ';'""" - p[0] = self.BuildNamed('Dictionary', p, 2, ListFromConcat(p[3], p[5])) - - # [11.1] Error recovery for regular Dictionary - def p_DictionaryError(self, p): - """Dictionary : DICTIONARY error ';'""" - p[0] = self.BuildError(p, 'Dictionary') - - # [11.2] Error recovery for regular Dictionary - # (for errors inside dictionary definition) - def p_DictionaryError2(self, p): - """Dictionary : DICTIONARY identifier Inheritance '{' error""" - p[0] = self.BuildError(p, 'Dictionary') - - # [12] - def p_DictionaryMembers(self, p): - """DictionaryMembers : ExtendedAttributeList DictionaryMember DictionaryMembers - |""" - if len(p) > 1: - p[2].AddChildren(p[1]) - p[0] = ListFromConcat(p[2], p[3]) - - # [13] - def p_DictionaryMember(self, p): - """DictionaryMember : Type identifier Default ';'""" - p[0] = self.BuildNamed('Key', p, 2, ListFromConcat(p[1], p[3])) - - # [14] NOT IMPLEMENTED (Required) - - # [15] - def p_PartialDictionary(self, p): - """PartialDictionary : DICTIONARY identifier '{' DictionaryMembers '}' ';'""" - partial = self.BuildTrue('Partial') - p[0] = self.BuildNamed('Dictionary', p, 2, ListFromConcat(p[4], partial)) - - # [15.1] Error recovery for Partial Dictionary - def p_PartialDictionaryError(self, p): - """PartialDictionary : DICTIONARY error ';'""" - p[0] = self.BuildError(p, 'PartialDictionary') - - # [16] - def p_Default(self, p): - """Default : '=' DefaultValue - |""" - if len(p) > 1: - p[0] = self.BuildProduction('Default', p, 2, p[2]) - - # [17] - def p_DefaultValue(self, p): - """DefaultValue : ConstValue - | string - | '[' ']'""" - if len(p) == 3: - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'sequence'), - self.BuildAttribute('VALUE', '[]')) - elif type(p[1]) == str: - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'DOMString'), - self.BuildAttribute('NAME', p[1])) - else: - p[0] = p[1] - - # [] - Not specified - def p_Exception(self, p): - """Exception : EXCEPTION identifier Inheritance '{' ExceptionMembers '}' ';'""" - p[0] = self.BuildNamed('Exception', p, 2, ListFromConcat(p[3], p[5])) - - # [] - Not specified - def p_ExceptionMembers(self, p): - """ExceptionMembers : ExtendedAttributeList ExceptionMember ExceptionMembers - |""" - if len(p) > 1: - p[2].AddChildren(p[1]) - p[0] = ListFromConcat(p[2], p[3]) - - # [.1] Error recovery for ExceptionMembers - Not specified - def p_ExceptionMembersError(self, p): - """ExceptionMembers : error""" - p[0] = self.BuildError(p, 'ExceptionMembers') - - # [18] - def p_Inheritance(self, p): - """Inheritance : ':' identifier - |""" - if len(p) > 1: - p[0] = self.BuildNamed('Inherit', p, 2) - - # [19] - def p_Enum(self, p): - """Enum : ENUM identifier '{' EnumValueList '}' ';'""" - p[0] = self.BuildNamed('Enum', p, 2, p[4]) - - # [19.1] Error recovery for Enums - def p_EnumError(self, p): - """Enum : ENUM error ';'""" - p[0] = self.BuildError(p, 'Enum') - - # [20] - def p_EnumValueList(self, p): - """EnumValueList : ExtendedAttributeList string EnumValueListComma""" - enum = self.BuildNamed('EnumItem', p, 2, p[1]) - p[0] = ListFromConcat(enum, p[3]) - - # [21] - def p_EnumValueListComma(self, p): - """EnumValueListComma : ',' EnumValueListString - |""" - if len(p) > 1: - p[0] = p[2] - - # [22] - def p_EnumValueListString(self, p): - """EnumValueListString : ExtendedAttributeList string EnumValueListComma - |""" - if len(p) > 1: - enum = self.BuildNamed('EnumItem', p, 2, p[1]) - p[0] = ListFromConcat(enum, p[3]) - - # [23] - def p_CallbackRest(self, p): - """CallbackRest : identifier '=' ReturnType '(' ArgumentList ')' ';'""" - arguments = self.BuildProduction('Arguments', p, 4, p[5]) - p[0] = self.BuildNamed('Callback', p, 1, ListFromConcat(p[3], arguments)) - - # [24] - def p_Typedef(self, p): - """Typedef : TYPEDEF ExtendedAttributeListNoComments Type identifier ';'""" - p[0] = self.BuildNamed('Typedef', p, 4, ListFromConcat(p[2], p[3])) - - # [24.1] Error recovery for Typedefs - def p_TypedefError(self, p): - """Typedef : TYPEDEF error ';'""" - p[0] = self.BuildError(p, 'Typedef') - - # [25] - def p_ImplementsStatement(self, p): - """ImplementsStatement : identifier IMPLEMENTS identifier ';'""" - name = self.BuildAttribute('REFERENCE', p[3]) - p[0] = self.BuildNamed('Implements', p, 1, name) - - # [26] - def p_Const(self, p): - """Const : CONST ConstType identifier '=' ConstValue ';'""" - value = self.BuildProduction('Value', p, 5, p[5]) - p[0] = self.BuildNamed('Const', p, 3, ListFromConcat(p[2], value)) - - # [27] - def p_ConstValue(self, p): - """ConstValue : BooleanLiteral - | FloatLiteral - | integer - | null""" - if type(p[1]) == str: - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'integer'), - self.BuildAttribute('NAME', p[1])) - else: - p[0] = p[1] - - # [27.1] Add definition for NULL - def p_null(self, p): - """null : NULL""" - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'NULL'), - self.BuildAttribute('NAME', 'NULL')) - - # [28] - def p_BooleanLiteral(self, p): - """BooleanLiteral : TRUE - | FALSE""" - value = self.BuildAttribute('VALUE', Boolean(p[1] == 'true')) - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'boolean'), value) - - # [29] - def p_FloatLiteral(self, p): - """FloatLiteral : float - | '-' INFINITY - | INFINITY - | NAN """ - if len(p) > 2: - val = '-Infinity' - else: - val = p[1] - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'float'), - self.BuildAttribute('VALUE', val)) - - # [30] - def p_Serializer(self, p): - """Serializer : SERIALIZER SerializerRest""" - p[0] = self.BuildProduction('Serializer', p, 1, p[2]) - - # [31] - # TODO(jl): This adds ReturnType and ';', missing from the spec's grammar. - # https://www.w3.org/Bugs/Public/show_bug.cgi?id=20361 - def p_SerializerRest(self, p): - """SerializerRest : ReturnType OperationRest - | '=' SerializationPattern ';' - | ';'""" - if len(p) == 3: - p[2].AddChildren(p[1]) - p[0] = p[2] - elif len(p) == 4: - p[0] = p[2] - - # [32] - def p_SerializationPattern(self, p): - """SerializationPattern : '{' SerializationPatternMap '}' - | '[' SerializationPatternList ']' - | identifier""" - if len(p) > 2: - p[0] = p[2] - else: - p[0] = self.BuildAttribute('ATTRIBUTE', p[1]) - - # [33] - # TODO(jl): This adds the "ATTRIBUTE" and "INHERIT ',' ATTRIBUTE" variants, - # missing from the spec's grammar. - # https://www.w3.org/Bugs/Public/show_bug.cgi?id=20361 - def p_SerializationPatternMap(self, p): - """SerializationPatternMap : GETTER - | ATTRIBUTE - | INHERIT ',' ATTRIBUTE - | INHERIT Identifiers - | identifier Identifiers - |""" - p[0] = self.BuildProduction('Map', p, 0) - if len(p) == 4: - p[0].AddChildren(self.BuildTrue('INHERIT')) - p[0].AddChildren(self.BuildTrue('ATTRIBUTE')) - elif len(p) > 1: - if p[1] == 'getter': - p[0].AddChildren(self.BuildTrue('GETTER')) - elif p[1] == 'attribute': - p[0].AddChildren(self.BuildTrue('ATTRIBUTE')) - else: - if p[1] == 'inherit': - p[0].AddChildren(self.BuildTrue('INHERIT')) - attributes = p[2] - else: - attributes = ListFromConcat(p[1], p[2]) - p[0].AddChildren(self.BuildAttribute('ATTRIBUTES', attributes)) - - # [34] - def p_SerializationPatternList(self, p): - """SerializationPatternList : GETTER - | identifier Identifiers - |""" - p[0] = self.BuildProduction('List', p, 0) - if len(p) > 1: - if p[1] == 'getter': - p[0].AddChildren(self.BuildTrue('GETTER')) - else: - attributes = ListFromConcat(p[1], p[2]) - p[0].AddChildren(self.BuildAttribute('ATTRIBUTES', attributes)) - - # [35] - def p_Stringifier(self, p): - """Stringifier : STRINGIFIER StringifierRest""" - p[0] = self.BuildProduction('Stringifier', p, 1, p[2]) - - # [36] - def p_StringifierRest(self, p): - """StringifierRest : AttributeRest - | ReturnType OperationRest - | ';'""" - if len(p) == 3: - p[2].AddChildren(p[1]) - p[0] = p[2] - elif p[1] != ';': - p[0] = p[1] - - # [37] - def p_StaticMember(self, p): - """StaticMember : STATIC StaticMemberRest""" - p[2].AddChildren(self.BuildTrue('STATIC')) - p[0] = p[2] - - # [38] - def p_StaticMemberRest(self, p): - """StaticMemberRest : ReadOnly AttributeRest - | ReturnType OperationRest""" - if len(p) == 2: - p[0] = p[1] - else: - p[2].AddChildren(p[1]) - p[0] = p[2] - - # [39] - def p_ReadonlyMember(self, p): - """ReadonlyMember : READONLY ReadonlyMemberRest""" - p[2].AddChildren(self.BuildTrue('READONLY')) - p[0] = p[2] - - # [40] - def p_ReadonlyMemberRest(self, p): - """ReadonlyMemberRest : AttributeRest - | MaplikeRest - | SetlikeRest""" - p[0] = p[1] - - # [41] - def p_ReadWriteAttribute(self, p): - """ReadWriteAttribute : INHERIT ReadOnly AttributeRest - | AttributeRest""" - if len(p) > 2: - inherit = self.BuildTrue('INHERIT') - p[3].AddChildren(ListFromConcat(inherit, p[2])) - p[0] = p[3] - else: - p[0] = p[1] - - # [42] - def p_AttributeRest(self, p): - """AttributeRest : ATTRIBUTE Type AttributeName ';'""" - p[0] = self.BuildNamed('Attribute', p, 3, p[2]) - - # [43] - def p_AttributeName(self, p): - """AttributeName : AttributeNameKeyword - | identifier""" - p[0] = p[1] - - # [44] - def p_AttributeNameKeyword(self, p): - """AttributeNameKeyword : REQUIRED""" - p[0] = p[1] - - # [45] Unreferenced in the specification - - # [46] - def p_ReadOnly(self, p): - """ReadOnly : READONLY - |""" - if len(p) > 1: - p[0] = self.BuildTrue('READONLY') - - # [47] - def p_Operation(self, p): - """Operation : ReturnType OperationRest - | SpecialOperation""" - if len(p) == 3: - p[2].AddChildren(p[1]) - p[0] = p[2] - else: - p[0] = p[1] - - # [48] - def p_SpecialOperation(self, p): - """SpecialOperation : Special Specials ReturnType OperationRest""" - p[4].AddChildren(ListFromConcat(p[1], p[2], p[3])) - p[0] = p[4] - - # [49] - def p_Specials(self, p): - """Specials : Special Specials - | """ - if len(p) > 1: - p[0] = ListFromConcat(p[1], p[2]) - - # [50] - def p_Special(self, p): - """Special : GETTER - | SETTER - | CREATOR - | DELETER - | LEGACYCALLER""" - p[0] = self.BuildTrue(p[1].upper()) - - # [51] - def p_OperationRest(self, p): - """OperationRest : OptionalIdentifier '(' ArgumentList ')' ';'""" - arguments = self.BuildProduction('Arguments', p, 2, p[3]) - p[0] = self.BuildNamed('Operation', p, 1, arguments) - - # [52] - def p_OptionalIdentifier(self, p): - """OptionalIdentifier : identifier - |""" - if len(p) > 1: - p[0] = p[1] - else: - p[0] = '_unnamed_' - - # [53] - def p_ArgumentList(self, p): - """ArgumentList : Argument Arguments - |""" - if len(p) > 1: - p[0] = ListFromConcat(p[1], p[2]) - - # [53.1] ArgumentList error recovery - def p_ArgumentListError(self, p): - """ArgumentList : error """ - p[0] = self.BuildError(p, 'ArgumentList') - - # [54] - def p_Arguments(self, p): - """Arguments : ',' Argument Arguments - |""" - if len(p) > 1: - p[0] = ListFromConcat(p[2], p[3]) - - # [54.1] Arguments error recovery - def p_ArgumentsError(self, p): - """Arguments : ',' error""" - p[0] = self.BuildError(p, 'Arguments') - - # [55] - def p_Argument(self, p): - """Argument : ExtendedAttributeList OptionalOrRequiredArgument""" - p[2].AddChildren(p[1]) - p[0] = p[2] - - # [56] - def p_OptionalOrRequiredArgument(self, p): - """OptionalOrRequiredArgument : OPTIONAL Type ArgumentName Default - | Type Ellipsis ArgumentName""" - if len(p) > 4: - arg = self.BuildNamed('Argument', p, 3, ListFromConcat(p[2], p[4])) - arg.AddChildren(self.BuildTrue('OPTIONAL')) - else: - arg = self.BuildNamed('Argument', p, 3, ListFromConcat(p[1], p[2])) - p[0] = arg - - # [57] - def p_ArgumentName(self, p): - """ArgumentName : ArgumentNameKeyword - | identifier""" - p[0] = p[1] - - # [58] - def p_Ellipsis(self, p): - """Ellipsis : ELLIPSIS - |""" - if len(p) > 1: - p[0] = self.BuildNamed('Argument', p, 1) - p[0].AddChildren(self.BuildTrue('ELLIPSIS')) - - # [] Unspecified - def p_ExceptionMember(self, p): - """ExceptionMember : Const - | ExceptionField""" - p[0] = p[1] - - # [] Unspecified - def p_ExceptionField(self, p): - """ExceptionField : Type identifier ';'""" - p[0] = self.BuildNamed('ExceptionField', p, 2, p[1]) - - # [] Error recovery for ExceptionMembers - Unspecified - def p_ExceptionFieldError(self, p): - """ExceptionField : error""" - p[0] = self.BuildError(p, 'ExceptionField') - - # [59] - def p_Iterable(self, p): - """Iterable : ITERABLE '<' Type OptionalType '>' ';' - | LEGACYITERABLE '<' Type '>' ';'""" - if len(p) > 6: - childlist = ListFromConcat(p[3], p[4]) - p[0] = self.BuildProduction('Iterable', p, 2, childlist) - else: - p[0] = self.BuildProduction('LegacyIterable', p, 2, p[3]) - - # [60] - def p_OptionalType(self, p): - """OptionalType : ',' Type - |""" - if len(p) > 1: - p[0] = p[2] - - # [61] - def p_ReadWriteMaplike(self, p): - """ReadWriteMaplike : MaplikeRest""" - p[0] = p[1] - - # [62] - def p_ReadWriteSetlike(self, p): - """ReadWriteSetlike : SetlikeRest""" - p[0] = p[1] - - # [63] - def p_MaplikeRest(self, p): - """MaplikeRest : MAPLIKE '<' Type ',' Type '>' ';'""" - childlist = ListFromConcat(p[3], p[5]) - p[0] = self.BuildProduction('Maplike', p, 2, childlist) - - # [64] - def p_SetlikeRest(self, p): - """SetlikeRest : SETLIKE '<' Type '>' ';'""" - p[0] = self.BuildProduction('Setlike', p, 2, p[3]) - - # [65] No comment version for mid statement attributes. - def p_ExtendedAttributeListNoComments(self, p): - """ExtendedAttributeListNoComments : '[' ExtendedAttribute ExtendedAttributes ']' - | """ - if len(p) > 2: - items = ListFromConcat(p[2], p[3]) - p[0] = self.BuildProduction('ExtAttributes', p, 1, items) - - # [65.1] Add optional comment field for start of statements. - def p_ExtendedAttributeList(self, p): - """ExtendedAttributeList : Comments '[' ExtendedAttribute ExtendedAttributes ']' - | Comments """ - if len(p) > 2: - items = ListFromConcat(p[3], p[4]) - attribs = self.BuildProduction('ExtAttributes', p, 2, items) - p[0] = ListFromConcat(p[1], attribs) - else: - p[0] = p[1] - - # [66] - def p_ExtendedAttributes(self, p): - """ExtendedAttributes : ',' ExtendedAttribute ExtendedAttributes - |""" - if len(p) > 1: - p[0] = ListFromConcat(p[2], p[3]) - - # We only support: - # [ identifier ] - # [ identifier ( ArgumentList ) ] - # [ identifier = identifier ] - # [ identifier = ( IdentifierList ) ] - # [ identifier = identifier ( ArgumentList ) ] - # [66] map directly to [91-93, 95] - # [67-69, 71] are unsupported - def p_ExtendedAttribute(self, p): - """ExtendedAttribute : ExtendedAttributeNoArgs - | ExtendedAttributeArgList - | ExtendedAttributeIdent - | ExtendedAttributeIdentList - | ExtendedAttributeNamedArgList""" - p[0] = p[1] - - # [71] - def p_ArgumentNameKeyword(self, p): - """ArgumentNameKeyword : ATTRIBUTE - | CALLBACK - | CONST - | CREATOR - | DELETER - | DICTIONARY - | ENUM - | EXCEPTION - | GETTER - | IMPLEMENTS - | INHERIT - | LEGACYCALLER - | PARTIAL - | SERIALIZER - | SETTER - | STATIC - | STRINGIFIER - | TYPEDEF - | UNRESTRICTED""" - p[0] = p[1] - - # [72] NOT IMPLEMENTED (OtherOrComma) - - # [73] - def p_Type(self, p): - """Type : SingleType - | UnionType TypeSuffix""" - if len(p) == 2: - p[0] = self.BuildProduction('Type', p, 1, p[1]) - else: - p[0] = self.BuildProduction('Type', p, 1, ListFromConcat(p[1], p[2])) - - # [74] - def p_SingleType(self, p): - """SingleType : NonAnyType - | ANY TypeSuffixStartingWithArray""" - if len(p) == 2: - p[0] = p[1] - else: - p[0] = ListFromConcat(self.BuildProduction('Any', p, 1), p[2]) - - # [75] - def p_UnionType(self, p): - """UnionType : '(' UnionMemberType OR UnionMemberType UnionMemberTypes ')'""" - - # [76] - def p_UnionMemberType(self, p): - """UnionMemberType : NonAnyType - | UnionType TypeSuffix - | ANY '[' ']' TypeSuffix""" - # [77] - def p_UnionMemberTypes(self, p): - """UnionMemberTypes : OR UnionMemberType UnionMemberTypes - |""" - - # [78] Moved BYTESTRING, DOMSTRING, OBJECT, DATE, REGEXP to PrimitiveType - # Moving all built-in types into PrimitiveType makes it easier to - # differentiate between them and 'identifier', since p[1] would be a string in - # both cases. - def p_NonAnyType(self, p): - """NonAnyType : PrimitiveType TypeSuffix - | PromiseType Null - | identifier TypeSuffix - | SEQUENCE '<' Type '>' Null""" - if len(p) == 3: - if type(p[1]) == str: - typeref = self.BuildNamed('Typeref', p, 1) - else: - typeref = p[1] - p[0] = ListFromConcat(typeref, p[2]) - - if len(p) == 6: - p[0] = self.BuildProduction('Sequence', p, 1, ListFromConcat(p[3], p[5])) - - # [79] NOT IMPLEMENTED (BufferRelatedType) - - # [80] - def p_ConstType(self, p): - """ConstType : PrimitiveType Null - | identifier Null""" - if type(p[1]) == str: - p[0] = self.BuildNamed('Typeref', p, 1, p[2]) - else: - p[1].AddChildren(p[2]) - p[0] = p[1] - - - # [81] Added BYTESTRING, DOMSTRING, OBJECT, DATE, REGEXP - def p_PrimitiveType(self, p): - """PrimitiveType : UnsignedIntegerType - | UnrestrictedFloatType - | BOOLEAN - | BYTE - | OCTET - | BYTESTRING - | DOMSTRING - | OBJECT - | DATE - | REGEXP""" - if type(p[1]) == str: - p[0] = self.BuildNamed('PrimitiveType', p, 1) - else: - p[0] = p[1] - - - # [82] - def p_UnrestrictedFloatType(self, p): - """UnrestrictedFloatType : UNRESTRICTED FloatType - | FloatType""" - if len(p) == 2: - typeref = self.BuildNamed('PrimitiveType', p, 1) - else: - typeref = self.BuildNamed('PrimitiveType', p, 2) - typeref.AddChildren(self.BuildTrue('UNRESTRICTED')) - p[0] = typeref - - - # [83] - def p_FloatType(self, p): - """FloatType : FLOAT - | DOUBLE""" - p[0] = p[1] - - # [84] - def p_UnsignedIntegerType(self, p): - """UnsignedIntegerType : UNSIGNED IntegerType - | IntegerType""" - if len(p) == 2: - p[0] = p[1] - else: - p[0] = 'unsigned ' + p[2] - - # [85] - def p_IntegerType(self, p): - """IntegerType : SHORT - | LONG OptionalLong""" - if len(p) == 2: - p[0] = p[1] - else: - p[0] = p[1] + p[2] - - # [86] - def p_OptionalLong(self, p): - """OptionalLong : LONG - | """ - if len(p) > 1: - p[0] = ' ' + p[1] - else: - p[0] = '' - - # [87] Add unqualified Promise - def p_PromiseType(self, p): - """PromiseType : PROMISE '<' ReturnType '>' - | PROMISE""" - if len(p) == 2: - # Promise without resolution type is not specified in the Web IDL spec. - # As it is used in some specs and in the blink implementation, - # we allow that here. - resolution_type = self.BuildProduction('Type', p, 1, - self.BuildProduction('Any', p, 1)) - p[0] = self.BuildNamed('Promise', p, 1, resolution_type) - else: - p[0] = self.BuildNamed('Promise', p, 1, p[3]) - - # [88] Add support for sized array - def p_TypeSuffix(self, p): - """TypeSuffix : '[' integer ']' TypeSuffix - | '[' ']' TypeSuffix - | '?' TypeSuffixStartingWithArray - | """ - if len(p) == 5: - p[0] = self.BuildNamed('Array', p, 2, p[4]) - - if len(p) == 4: - p[0] = self.BuildProduction('Array', p, 1, p[3]) - - if len(p) == 3: - p[0] = ListFromConcat(self.BuildTrue('NULLABLE'), p[2]) - - - # [89] - def p_TypeSuffixStartingWithArray(self, p): - """TypeSuffixStartingWithArray : '[' ']' TypeSuffix - | """ - if len(p) > 1: - p[0] = self.BuildProduction('Array', p, 0, p[3]) - - # [90] - def p_Null(self, p): - """Null : '?' - |""" - if len(p) > 1: - p[0] = self.BuildTrue('NULLABLE') - - # [91] - def p_ReturnType(self, p): - """ReturnType : Type - | VOID""" - if p[1] == 'void': - p[0] = self.BuildProduction('Type', p, 1) - p[0].AddChildren(self.BuildNamed('PrimitiveType', p, 1)) - else: - p[0] = p[1] - - # [92] - def p_IdentifierList(self, p): - """IdentifierList : identifier Identifiers""" - p[0] = ListFromConcat(p[1], p[2]) - - # [93] - def p_Identifiers(self, p): - """Identifiers : ',' identifier Identifiers - |""" - if len(p) > 1: - p[0] = ListFromConcat(p[2], p[3]) - - # [94] - def p_ExtendedAttributeNoArgs(self, p): - """ExtendedAttributeNoArgs : identifier""" - p[0] = self.BuildNamed('ExtAttribute', p, 1) - - # [95] - def p_ExtendedAttributeArgList(self, p): - """ExtendedAttributeArgList : identifier '(' ArgumentList ')'""" - arguments = self.BuildProduction('Arguments', p, 2, p[3]) - p[0] = self.BuildNamed('ExtAttribute', p, 1, arguments) - - # [96] - def p_ExtendedAttributeIdent(self, p): - """ExtendedAttributeIdent : identifier '=' identifier""" - value = self.BuildAttribute('VALUE', p[3]) - p[0] = self.BuildNamed('ExtAttribute', p, 1, value) - - # [97] - def p_ExtendedAttributeIdentList(self, p): - """ExtendedAttributeIdentList : identifier '=' '(' IdentifierList ')'""" - value = self.BuildAttribute('VALUE', p[4]) - p[0] = self.BuildNamed('ExtAttribute', p, 1, value) - - # [98] - def p_ExtendedAttributeNamedArgList(self, p): - """ExtendedAttributeNamedArgList : identifier '=' identifier '(' ArgumentList ')'""" - args = self.BuildProduction('Arguments', p, 4, p[5]) - value = self.BuildNamed('Call', p, 3, args) - p[0] = self.BuildNamed('ExtAttribute', p, 1, value) - -# -# Parser Errors -# -# p_error is called whenever the parser can not find a pattern match for -# a set of items from the current state. The p_error function defined here -# is triggered logging an error, and parsing recovery happens as the -# p__error functions defined above are called. This allows the parser -# to continue so as to capture more than one error per file. -# - def p_error(self, t): - if t: - lineno = t.lineno - pos = t.lexpos - prev = self.yaccobj.symstack[-1] - if type(prev) == lex.LexToken: - msg = "Unexpected %s after %s." % ( - TokenTypeName(t), TokenTypeName(prev)) - else: - msg = "Unexpected %s." % (t.value) - else: - last = self.LastToken() - lineno = last.lineno - pos = last.lexpos - msg = "Unexpected end of file after %s." % TokenTypeName(last) - self.yaccobj.restart() - - # Attempt to remap the error to a friendlier form - if msg in ERROR_REMAP: - msg = ERROR_REMAP[msg] - - self._last_error_msg = msg - self._last_error_lineno = lineno - self._last_error_pos = pos - - def Warn(self, node, msg): - sys.stdout.write(node.GetLogLine(msg)) - self.parse_warnings += 1 - - def LastToken(self): - return self.lexer.last - - def __init__(self, lexer, verbose=False, debug=False, mute_error=False): - self.lexer = lexer - self.tokens = lexer.KnownTokens() - self.yaccobj = yacc.yacc(module=self, tabmodule=None, debug=debug, - optimize=0, write_tables=0) - self.parse_debug = debug - self.verbose = verbose - self.mute_error = mute_error - self._parse_errors = 0 - self._parse_warnings = 0 - self._last_error_msg = None - self._last_error_lineno = 0 - self._last_error_pos = 0 - - -# -# BuildProduction -# -# Production is the set of items sent to a grammar rule resulting in a new -# item being returned. -# -# p - Is the Yacc production object containing the stack of items -# index - Index into the production of the name for the item being produced. -# cls - The type of item being producted -# childlist - The children of the new item - def BuildProduction(self, cls, p, index, childlist=None): - try: - if not childlist: - childlist = [] - - filename = self.lexer.Lexer().filename - lineno = p.lineno(index) - pos = p.lexpos(index) - out = IDLNode(cls, filename, lineno, pos, childlist) - return out - except: - print 'Exception while parsing:' - for num, item in enumerate(p): - print ' [%d] %s' % (num, ExpandProduction(item)) - if self.LastToken(): - print 'Last token: %s' % str(self.LastToken()) - raise - - def BuildNamed(self, cls, p, index, childlist=None): - childlist = ListFromConcat(childlist) - childlist.append(self.BuildAttribute('NAME', p[index])) - return self.BuildProduction(cls, p, index, childlist) - - def BuildComment(self, cls, p, index): - name = p[index] - - # Remove comment markers - lines = [] - if name[:2] == '//': - # For C++ style, remove any leading whitespace and the '//' marker from - # each line. - form = 'cc' - for line in name.split('\n'): - start = line.find('//') - lines.append(line[start+2:]) - else: - # For C style, remove ending '*/'' - form = 'c' - for line in name[:-2].split('\n'): - # Remove characters until start marker for this line '*' if found - # otherwise it should be blank. - offs = line.find('*') - if offs >= 0: - line = line[offs + 1:].rstrip() - else: - line = '' - lines.append(line) - name = '\n'.join(lines) - childlist = [self.BuildAttribute('NAME', name), - self.BuildAttribute('FORM', form)] - return self.BuildProduction(cls, p, index, childlist) - -# -# BuildError -# -# Build and Errror node as part of the recovery process. -# -# - def BuildError(self, p, prod): - self._parse_errors += 1 - name = self.BuildAttribute('NAME', self._last_error_msg) - line = self.BuildAttribute('LINE', self._last_error_lineno) - pos = self.BuildAttribute('POS', self._last_error_pos) - prod = self.BuildAttribute('PROD', prod) - - node = self.BuildProduction('Error', p, 1, - ListFromConcat(name, line, pos, prod)) - if not self.mute_error: - node.Error(self._last_error_msg) - - return node - -# -# BuildAttribute -# -# An ExtendedAttribute is a special production that results in a property -# which is applied to the adjacent item. Attributes have no children and -# instead represent key/value pairs. -# - def BuildAttribute(self, key, val): - return IDLAttribute(key, val) - - def BuildFalse(self, key): - return IDLAttribute(key, Boolean(False)) - - def BuildTrue(self, key): - return IDLAttribute(key, Boolean(True)) - - def GetErrors(self): - # Access lexer errors, despite being private - # pylint: disable=W0212 - return self._parse_errors + self.lexer._lex_errors - -# -# ParseData -# -# Attempts to parse the current data loaded in the lexer. -# - def ParseText(self, filename, data): - self._parse_errors = 0 - self._parse_warnings = 0 - self._last_error_msg = None - self._last_error_lineno = 0 - self._last_error_pos = 0 - - try: - self.lexer.Tokenize(data, filename) - nodes = self.yaccobj.parse(lexer=self.lexer) or [] - name = self.BuildAttribute('NAME', filename) - return IDLNode('File', filename, 0, 0, nodes + [name]) - - except lex.LexError as lexError: - sys.stderr.write('Error in token: %s\n' % str(lexError)) - return None - - - -def ParseFile(parser, filename): - """Parse a file and return a File type of node.""" - with open(filename) as fileobject: - try: - out = parser.ParseText(filename, fileobject.read()) - out.SetProperty('DATETIME', time.ctime(os.path.getmtime(filename))) - out.SetProperty('ERRORS', parser.GetErrors()) - return out - - except Exception as e: - last = parser.LastToken() - sys.stderr.write('%s(%d) : Internal parsing error\n\t%s.\n' % ( - filename, last.lineno, str(e))) - - -def main(argv): - nodes = [] - parser = IDLParser(IDLLexer()) - errors = 0 - for filename in argv: - filenode = ParseFile(parser, filename) - if (filenode): - errors += filenode.GetProperty('ERRORS') - nodes.append(filenode) - - ast = IDLNode('AST', '__AST__', 0, 0, nodes) - - print '\n'.join(ast.Tree(accept_props=['PROD'])) - if errors: - print '\nFound %d errors.\n' % errors - - return errors - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/tools/idl_parser/idl_parser_test.py b/engine/src/flutter/tools/idl_parser/idl_parser_test.py deleted file mode 100755 index 76a9571b9d..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_parser_test.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# 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. - -import glob -import unittest - -from idl_lexer import IDLLexer -from idl_parser import IDLParser, ParseFile -from idl_ppapi_lexer import IDLPPAPILexer -from idl_ppapi_parser import IDLPPAPIParser - -def ParseCommentTest(comment): - comment = comment.strip() - comments = comment.split(None, 1) - return comments[0], comments[1] - - -class WebIDLParser(unittest.TestCase): - def setUp(self): - self.parser = IDLParser(IDLLexer(), mute_error=True) - self.filenames = glob.glob('test_parser/*_web.idl') - - def _TestNode(self, node): - comments = node.GetListOf('Comment') - for comment in comments: - check, value = ParseCommentTest(comment.GetName()) - if check == 'BUILD': - msg = 'Expecting %s, but found %s.\n' % (value, str(node)) - self.assertEqual(value, str(node), msg) - - if check == 'ERROR': - msg = node.GetLogLine('Expecting\n\t%s\nbut found \n\t%s\n' % ( - value, str(node))) - self.assertEqual(value, node.GetName(), msg) - - if check == 'PROP': - key, expect = value.split('=') - actual = str(node.GetProperty(key)) - msg = 'Mismatched property %s: %s vs %s.\n' % (key, expect, actual) - self.assertEqual(expect, actual, msg) - - if check == 'TREE': - quick = '\n'.join(node.Tree()) - lineno = node.GetProperty('LINENO') - msg = 'Mismatched tree at line %d:\n%sVS\n%s' % (lineno, value, quick) - self.assertEqual(value, quick, msg) - - def testExpectedNodes(self): - for filename in self.filenames: - filenode = ParseFile(self.parser, filename) - children = filenode.GetChildren() - self.assertTrue(len(children) > 2, 'Expecting children in %s.' % - filename) - - for node in filenode.GetChildren()[2:]: - self._TestNode(node) - - -class PepperIDLParser(unittest.TestCase): - def setUp(self): - self.parser = IDLPPAPIParser(IDLPPAPILexer(), mute_error=True) - self.filenames = glob.glob('test_parser/*_ppapi.idl') - - def _TestNode(self, filename, node): - comments = node.GetListOf('Comment') - for comment in comments: - check, value = ParseCommentTest(comment.GetName()) - if check == 'BUILD': - msg = '%s - Expecting %s, but found %s.\n' % ( - filename, value, str(node)) - self.assertEqual(value, str(node), msg) - - if check == 'ERROR': - msg = node.GetLogLine('%s - Expecting\n\t%s\nbut found \n\t%s\n' % ( - filename, value, str(node))) - self.assertEqual(value, node.GetName(), msg) - - if check == 'PROP': - key, expect = value.split('=') - actual = str(node.GetProperty(key)) - msg = '%s - Mismatched property %s: %s vs %s.\n' % ( - filename, key, expect, actual) - self.assertEqual(expect, actual, msg) - - if check == 'TREE': - quick = '\n'.join(node.Tree()) - lineno = node.GetProperty('LINENO') - msg = '%s - Mismatched tree at line %d:\n%sVS\n%s' % ( - filename, lineno, value, quick) - self.assertEqual(value, quick, msg) - - def testExpectedNodes(self): - for filename in self.filenames: - filenode = ParseFile(self.parser, filename) - children = filenode.GetChildren() - self.assertTrue(len(children) > 2, 'Expecting children in %s.' % - filename) - - for node in filenode.GetChildren()[2:]: - self._TestNode(filename, node) - -if __name__ == '__main__': - unittest.main(verbosity=2) - diff --git a/engine/src/flutter/tools/idl_parser/idl_ppapi_lexer.py b/engine/src/flutter/tools/idl_parser/idl_ppapi_lexer.py deleted file mode 100755 index ac6f42cc2a..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_ppapi_lexer.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python -# 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. - -""" Lexer for PPAPI IDL - -The lexer uses the PLY library to build a tokenizer which understands both -WebIDL and Pepper tokens. - -WebIDL, and WebIDL regular expressions can be found at: - http://www.w3.org/TR/2012/CR-WebIDL-20120419/ -PLY can be found at: - http://www.dabeaz.com/ply/ -""" - -from idl_lexer import IDLLexer - - -# -# IDL PPAPI Lexer -# -class IDLPPAPILexer(IDLLexer): - # Token definitions - # - # These need to be methods for lexer construction, despite not using self. - # pylint: disable=R0201 - - # Special multi-character operators - def t_LSHIFT(self, t): - r'<<' - return t - - def t_RSHIFT(self, t): - r'>>' - return t - - def t_INLINE(self, t): - r'\#inline (.|\n)*?\#endinl.*' - self.AddLines(t.value.count('\n')) - return t - - # Return a "preprocessor" inline block - def __init__(self): - IDLLexer.__init__(self) - self._AddTokens(['INLINE', 'LSHIFT', 'RSHIFT']) - self._AddKeywords(['label', 'struct']) - - # Add number types - self._AddKeywords(['char', 'int8_t', 'int16_t', 'int32_t', 'int64_t']) - self._AddKeywords(['uint8_t', 'uint16_t', 'uint32_t', 'uint64_t']) - self._AddKeywords(['double_t', 'float_t']) - - # Add handle types - self._AddKeywords(['handle_t', 'PP_FileHandle']) - - # Add pointer types (void*, char*, const char*, const void*) - self._AddKeywords(['mem_t', 'str_t', 'cstr_t', 'interface_t']) - - # Remove JS types - self._DelKeywords(['boolean', 'byte', 'ByteString', 'Date', 'DOMString', - 'double', 'float', 'long', 'object', 'octet', 'Promise', - 'RegExp', 'short', 'unsigned']) - - -# If run by itself, attempt to build the lexer -if __name__ == '__main__': - lexer = IDLPPAPILexer() - lexer.Tokenize(open('test_parser/inline_ppapi.idl').read()) - for tok in lexer.GetTokens(): - print '\n' + str(tok) diff --git a/engine/src/flutter/tools/idl_parser/idl_ppapi_parser.py b/engine/src/flutter/tools/idl_parser/idl_ppapi_parser.py deleted file mode 100755 index 8914c84199..0000000000 --- a/engine/src/flutter/tools/idl_parser/idl_ppapi_parser.py +++ /dev/null @@ -1,317 +0,0 @@ -#!/usr/bin/env python -# 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. - -""" Parser for PPAPI IDL """ - -# -# IDL Parser -# -# The parser is uses the PLY yacc library to build a set of parsing rules based -# on WebIDL. -# -# WebIDL, and WebIDL grammar can be found at: -# http://heycam.github.io/webidl/ -# PLY can be found at: -# http://www.dabeaz.com/ply/ -# -# The parser generates a tree by recursively matching sets of items against -# defined patterns. When a match is made, that set of items is reduced -# to a new item. The new item can provide a match for parent patterns. -# In this way an AST is built (reduced) depth first. -# - -# -# Disable check for line length and Member as Function due to how grammar rules -# are defined with PLY -# -# pylint: disable=R0201 -# pylint: disable=C0301 - -import sys - -from idl_ppapi_lexer import IDLPPAPILexer -from idl_parser import IDLParser, ListFromConcat, ParseFile -from idl_node import IDLNode - -class IDLPPAPIParser(IDLParser): -# -# We force all input files to start with two comments. The first comment is a -# Copyright notice followed by a file comment and finally by file level -# productions. -# - # [0] Insert a TOP definition for Copyright and Comments - def p_Top(self, p): - """Top : COMMENT COMMENT Definitions""" - Copyright = self.BuildComment('Copyright', p, 1) - Filedoc = self.BuildComment('Comment', p, 2) - p[0] = ListFromConcat(Copyright, Filedoc, p[3]) - -# -#The parser is based on the WebIDL standard. See: -# http://heycam.github.io/webidl/#idl-grammar -# - # [1] - def p_Definitions(self, p): - """Definitions : ExtendedAttributeList Definition Definitions - | """ - if len(p) > 1: - p[2].AddChildren(p[1]) - p[0] = ListFromConcat(p[2], p[3]) - - # [2] Add INLINE definition - def p_Definition(self, p): - """Definition : CallbackOrInterface - | Struct - | Partial - | Dictionary - | Exception - | Enum - | Typedef - | ImplementsStatement - | Label - | Inline""" - p[0] = p[1] - - def p_Inline(self, p): - """Inline : INLINE""" - words = p[1].split() - name = self.BuildAttribute('NAME', words[1]) - lines = p[1].split('\n') - value = self.BuildAttribute('VALUE', '\n'.join(lines[1:-1]) + '\n') - children = ListFromConcat(name, value) - p[0] = self.BuildProduction('Inline', p, 1, children) - -# -# Label -# -# A label is a special kind of enumeration which allows us to go from a -# set of version numbrs to releases -# - def p_Label(self, p): - """Label : LABEL identifier '{' LabelList '}' ';'""" - p[0] = self.BuildNamed('Label', p, 2, p[4]) - - def p_LabelList(self, p): - """LabelList : identifier '=' float LabelCont""" - val = self.BuildAttribute('VALUE', p[3]) - label = self.BuildNamed('LabelItem', p, 1, val) - p[0] = ListFromConcat(label, p[4]) - - def p_LabelCont(self, p): - """LabelCont : ',' LabelList - |""" - if len(p) > 1: - p[0] = p[2] - - def p_LabelContError(self, p): - """LabelCont : error LabelCont""" - p[0] = p[2] - - # [5.1] Add "struct" style interface - def p_Struct(self, p): - """Struct : STRUCT identifier Inheritance '{' StructMembers '}' ';'""" - p[0] = self.BuildNamed('Struct', p, 2, ListFromConcat(p[3], p[5])) - - def p_StructMembers(self, p): - """StructMembers : StructMember StructMembers - |""" - if len(p) > 1: - p[0] = ListFromConcat(p[1], p[2]) - - def p_StructMember(self, p): - """StructMember : ExtendedAttributeList Type identifier ';'""" - p[0] = self.BuildNamed('Member', p, 3, ListFromConcat(p[1], p[2])) - - def p_Typedef(self, p): - """Typedef : TYPEDEF ExtendedAttributeListNoComments Type identifier ';'""" - p[0] = self.BuildNamed('Typedef', p, 4, ListFromConcat(p[2], p[3])) - - def p_TypedefFunc(self, p): - """Typedef : TYPEDEF ExtendedAttributeListNoComments ReturnType identifier '(' ArgumentList ')' ';'""" - args = self.BuildProduction('Arguments', p, 5, p[6]) - p[0] = self.BuildNamed('Callback', p, 4, ListFromConcat(p[2], p[3], args)) - - def p_ConstValue(self, p): - """ConstValue : integer - | integer LSHIFT integer - | integer RSHIFT integer""" - val = str(p[1]) - if len(p) > 2: - val = "%s %s %s" % (p[1], p[2], p[3]) - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'integer'), - self.BuildAttribute('VALUE', val)) - - def p_ConstValueStr(self, p): - """ConstValue : string""" - p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'string'), - self.BuildAttribute('VALUE', p[1])) - - # Boolean & Float Literals area already BuildAttributes - def p_ConstValueLiteral(self, p): - """ConstValue : FloatLiteral - | BooleanLiteral """ - p[0] = p[1] - - def p_EnumValueList(self, p): - """EnumValueList : EnumValue EnumValues""" - p[0] = ListFromConcat(p[1], p[2]) - - def p_EnumValues(self, p): - """EnumValues : ',' EnumValue EnumValues - |""" - if len(p) > 1: - p[0] = ListFromConcat(p[2], p[3]) - - def p_EnumValue(self, p): - """EnumValue : ExtendedAttributeList identifier - | ExtendedAttributeList identifier '=' ConstValue""" - p[0] = self.BuildNamed('EnumItem', p, 2, p[1]) - if len(p) > 3: - p[0].AddChildren(p[4]) - - # Omit PromiseType, as it is a JS type. - def p_NonAnyType(self, p): - """NonAnyType : PrimitiveType TypeSuffix - | identifier TypeSuffix - | SEQUENCE '<' Type '>' Null""" - IDLParser.p_NonAnyType(self, p) - - def p_PrimitiveType(self, p): - """PrimitiveType : IntegerType - | UnsignedIntegerType - | FloatType - | HandleType - | PointerType""" - if type(p[1]) == str: - p[0] = self.BuildNamed('PrimitiveType', p, 1) - else: - p[0] = p[1] - - def p_PointerType(self, p): - """PointerType : STR_T - | MEM_T - | CSTR_T - | INTERFACE_T - | NULL""" - p[0] = p[1] - - def p_HandleType(self, p): - """HandleType : HANDLE_T - | PP_FILEHANDLE""" - p[0] = p[1] - - def p_FloatType(self, p): - """FloatType : FLOAT_T - | DOUBLE_T""" - p[0] = p[1] - - def p_UnsignedIntegerType(self, p): - """UnsignedIntegerType : UINT8_T - | UINT16_T - | UINT32_T - | UINT64_T""" - p[0] = p[1] - - - def p_IntegerType(self, p): - """IntegerType : CHAR - | INT8_T - | INT16_T - | INT32_T - | INT64_T""" - p[0] = p[1] - - # These targets are no longer used - def p_OptionalLong(self, p): - """ """ - pass - - def p_UnrestrictedFloatType(self, p): - """ """ - pass - - def p_null(self, p): - """ """ - pass - - def p_PromiseType(self, p): - """ """ - pass - - def p_EnumValueListComma(self, p): - """ """ - pass - - def p_EnumValueListString(self, p): - """ """ - pass - - # We only support: - # [ identifier ] - # [ identifier ( ArgumentList )] - # [ identifier ( ValueList )] - # [ identifier = identifier ] - # [ identifier = ( IdentifierList )] - # [ identifier = ConstValue ] - # [ identifier = identifier ( ArgumentList )] - # [51] map directly to 74-77 - # [52-54, 56] are unsupported - def p_ExtendedAttribute(self, p): - """ExtendedAttribute : ExtendedAttributeNoArgs - | ExtendedAttributeArgList - | ExtendedAttributeValList - | ExtendedAttributeIdent - | ExtendedAttributeIdentList - | ExtendedAttributeIdentConst - | ExtendedAttributeNamedArgList""" - p[0] = p[1] - - def p_ExtendedAttributeValList(self, p): - """ExtendedAttributeValList : identifier '(' ValueList ')'""" - arguments = self.BuildProduction('Values', p, 2, p[3]) - p[0] = self.BuildNamed('ExtAttribute', p, 1, arguments) - - def p_ValueList(self, p): - """ValueList : ConstValue ValueListCont""" - p[0] = ListFromConcat(p[1], p[2]) - - def p_ValueListCont(self, p): - """ValueListCont : ValueList - |""" - if len(p) > 1: - p[0] = p[1] - - def p_ExtendedAttributeIdentConst(self, p): - """ExtendedAttributeIdentConst : identifier '=' ConstValue""" - p[0] = self.BuildNamed('ExtAttribute', p, 1, p[3]) - - - def __init__(self, lexer, verbose=False, debug=False, mute_error=False): - IDLParser.__init__(self, lexer, verbose, debug, mute_error) - - -def main(argv): - nodes = [] - parser = IDLPPAPIParser(IDLPPAPILexer()) - errors = 0 - - for filename in argv: - filenode = ParseFile(parser, filename) - if filenode: - errors += filenode.GetProperty('ERRORS') - nodes.append(filenode) - - ast = IDLNode('AST', '__AST__', 0, 0, nodes) - - print '\n'.join(ast.Tree(accept_props=['PROD', 'TYPE', 'VALUE'])) - if errors: - print '\nFound %d errors.\n' % errors - - - return errors - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/engine/src/flutter/tools/idl_parser/run_tests.py b/engine/src/flutter/tools/idl_parser/run_tests.py deleted file mode 100755 index cf26759f7b..0000000000 --- a/engine/src/flutter/tools/idl_parser/run_tests.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -# 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. - -import glob -import sys -import unittest - -if __name__ == '__main__': - suite = unittest.TestSuite() - for testname in glob.glob('*_test.py'): - print 'Adding Test: ' + testname - module = __import__(testname[:-3]) - suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module)) - result = unittest.TextTestRunner(verbosity=2).run(suite) - if result.wasSuccessful(): - sys.exit(0) - else: - sys.exit(1) diff --git a/engine/src/flutter/tools/licenses/README b/engine/src/flutter/tools/licenses/README deleted file mode 100644 index 31198f7bcb..0000000000 --- a/engine/src/flutter/tools/licenses/README +++ /dev/null @@ -1,3 +0,0 @@ -To update the sky_engine LICENSE file, run: - gclient sync && - dart lib/main.dart ../.. > ../../sky/packages/sky_engine/LICENSE diff --git a/engine/src/flutter/tools/licenses/data/README b/engine/src/flutter/tools/licenses/data/README deleted file mode 100644 index 128d95b08a..0000000000 --- a/engine/src/flutter/tools/licenses/data/README +++ /dev/null @@ -1,7 +0,0 @@ -This directory contains canonical text files representing licenses -that are often referenced (by name or URL), so that the license script -doesn't need to actively go out to the network to find the license -files. - -The mapping of URL to these files is in ../lib/license.dart in the -License.fromUrl constructor. diff --git a/engine/src/flutter/tools/licenses/data/academic-3.0 b/engine/src/flutter/tools/licenses/data/academic-3.0 deleted file mode 100644 index 1d366b9455..0000000000 --- a/engine/src/flutter/tools/licenses/data/academic-3.0 +++ /dev/null @@ -1,47 +0,0 @@ -Academic Free License ("AFL") v. 3.0 - -This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: - -Licensed under the Academic Free License version 3.0 - -1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: - -a) to reproduce the Original Work in copies, either alone or as part of a collective work; - -b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; - -c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; - -d) to perform the Original Work publicly; and - -e) to display the Original Work publicly. - -2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. - -3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. - -4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. - -5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). - -6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. - -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. - -8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. - -9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). - -10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. - -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. - -12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. - -13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. - -16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/engine/src/flutter/tools/licenses/data/apache-license-2.0 b/engine/src/flutter/tools/licenses/data/apache-license-2.0 deleted file mode 100644 index d645695673..0000000000 --- a/engine/src/flutter/tools/licenses/data/apache-license-2.0 +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/engine/src/flutter/tools/licenses/data/google-bsd b/engine/src/flutter/tools/licenses/data/google-bsd deleted file mode 100644 index 0c9e304431..0000000000 --- a/engine/src/flutter/tools/licenses/data/google-bsd +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2013, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -* Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/engine/src/flutter/tools/licenses/data/gpl-3.0 b/engine/src/flutter/tools/licenses/data/gpl-3.0 deleted file mode 100644 index 94a9ed024d..0000000000 --- a/engine/src/flutter/tools/licenses/data/gpl-3.0 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/engine/src/flutter/tools/licenses/data/gpl-gcc-exception-3.1 b/engine/src/flutter/tools/licenses/data/gpl-gcc-exception-3.1 deleted file mode 100644 index e86f7fb58a..0000000000 --- a/engine/src/flutter/tools/licenses/data/gpl-gcc-exception-3.1 +++ /dev/null @@ -1,72 +0,0 @@ -GCC RUNTIME LIBRARY EXCEPTION - -Version 3.1, 31 March 2009 - -Copyright (C) 2009 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - -This GCC Runtime Library Exception ("Exception") is an additional -permission under section 7 of the GNU General Public License, version -3 ("GPLv3"). It applies to a given file (the "Runtime Library") that -bears a notice placed by the copyright holder of the file stating that -the file is governed by GPLv3 along with this Exception. - -When you use GCC to compile a program, GCC may combine portions of -certain GCC header files and runtime libraries with the compiled -program. The purpose of this Exception is to allow compilation of -non-GPL (including proprietary) programs to use, in this way, the -header files and runtime libraries covered by this Exception. - -0. Definitions. - -A file is an "Independent Module" if it either requires the Runtime -Library for execution after a Compilation Process, or makes use of an -interface provided by the Runtime Library, but is not otherwise based -on the Runtime Library. - -"GCC" means a version of the GNU Compiler Collection, with or without -modifications, governed by version 3 (or a specified later version) of -the GNU General Public License (GPL) with the option of using any -subsequent versions published by the FSF. - -"GPL-compatible Software" is software whose conditions of propagation, -modification and use would permit combination with GCC in accord with -the license of GCC. - -"Target Code" refers to output from any compiler for a real or virtual -target processor architecture, in executable form or suitable for -input to an assembler, loader, linker and/or execution -phase. Notwithstanding that, Target Code does not include data in any -format that is used as a compiler intermediate representation, or used -for producing a compiler intermediate representation. - -The "Compilation Process" transforms code entirely represented in -non-intermediate languages designed for human-written code, and/or in -Java Virtual Machine byte code, into Target Code. Thus, for example, -use of source code generators and preprocessors need not be considered -part of the Compilation Process, since the Compilation Process can be -understood as starting with the output of the generators or -preprocessors. - -A Compilation Process is "Eligible" if it is done using GCC, alone or -with other GPL-compatible software, or if it is done without using any -work based on GCC. For example, using non-GPL-compatible Software to -optimize any GCC intermediate representations would not qualify as an -Eligible Compilation Process. - -1. Grant of Additional Permission. - -You have permission to propagate a work of Target Code formed by -combining the Runtime Library with Independent Modules, even if such -propagation would otherwise violate the terms of GPLv3, provided that -all Target Code was generated by Eligible Compilation Processes. You -may then convey such a combination under terms of your choice, -consistent with the licensing of the Independent Modules. - -2. No Weakening of GCC Copyleft. - -The availability of this Exception does not imply any general -presumption that third-party software is unaffected by the copyleft -requirements of the license of GCC. diff --git a/engine/src/flutter/tools/licenses/data/lesser-gpl-2.1 b/engine/src/flutter/tools/licenses/data/lesser-gpl-2.1 deleted file mode 100644 index 4362b49151..0000000000 --- a/engine/src/flutter/tools/licenses/data/lesser-gpl-2.1 +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/engine/src/flutter/tools/licenses/data/library-gpl-2.0 b/engine/src/flutter/tools/licenses/data/library-gpl-2.0 deleted file mode 100644 index 12735e6c21..0000000000 --- a/engine/src/flutter/tools/licenses/data/library-gpl-2.0 +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/engine/src/flutter/tools/licenses/data/mozilla-2.0 b/engine/src/flutter/tools/licenses/data/mozilla-2.0 deleted file mode 100644 index 1c226ee1a6..0000000000 --- a/engine/src/flutter/tools/licenses/data/mozilla-2.0 +++ /dev/null @@ -1,194 +0,0 @@ -Mozilla Public License -Version 2.0 - -1. Definitions - -1.1. “Contributor” - -means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. - -1.2. “Contributor Version” - -means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - -means Covered Software of a particular Contributor. - -1.4. “Covered Software” - -means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. - -1.5. “Incompatible With Secondary Licenses” - -means - - a. that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. - -1.6. “Executable Form” - -means any form of the work other than Source Code Form. - -1.7. “Larger Work” - -means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. - -1.8. “License” - -means this document. - -1.9. “Licensable” - -means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. - -1.10. “Modifications” - -means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - -means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. - -1.12. “Secondary License” - -means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - -means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - -means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. License Grants and Conditions - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its Contributions. - -This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. - -3. Responsibilities - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - -Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - -This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. - -10. Versions of the License - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0. diff --git a/engine/src/flutter/tools/licenses/lib/README b/engine/src/flutter/tools/licenses/lib/README deleted file mode 100644 index 3699c766ce..0000000000 --- a/engine/src/flutter/tools/licenses/lib/README +++ /dev/null @@ -1,80 +0,0 @@ -This license collection script is, fundamentally, one giant pile of -special cases. As such, while there is an attempt to model the rules -that apply to licenses and apply some sort of order to the process, -the code is less than clear. This file attempts to provide an overview. - -main.dart is the core of the operation. It first walks the entire -directory tree starting from the root of the repository (which is to -be specified on the command line as the only argument), creating an -in-memory representation of the project (make sure to run this only -after you've run gclient sync, so that all dependencies are on disk). -This is the step that is labeled "Preparing data structures". - -Then, it walks this in-memory representation, attempting to assign to -each file one or more licenses. This is the step labeled "Collecting -licenses", which takes a long time. - -Finally, it prints out these licenses. - -The in-memory representation is a tree of RepositoryEntry objects. -There's three important types of these objects: RepositoryDirectory -objects, which represent directories; RepositoryLicensedFile, which -represents source files and resources that might end up in the binary, -and RepositoryLicenseFile, which represents license files that do not -themselves end up in the binary other than as a side-effect of this -script. - -RepositoryDirectory objects contain three lists, the list of -RepositoryDirectory subdirectories, the list of RepositoryLicensedFile -children, and the list of RepositoryLicenseFile children. - -RepositoryDirectory objects are the objects that crawl the filesystem. - -While the script is pretty conservative (including probably more -licenses than strictly necessary), it tries to avoid including -material that isn't actually used. To do this, RepositoryDirectory -objects only crawl directories and files for which shouldRecurse -returns true. For example, shouldRecurse returns false for ".git" -files. - -Some directories and files require special handling, and have specific -subclasses of the above classes. To create the appropriate objects, -RepositoryDirectory calls createSubdirectory and createFile to create -the nodes of the tree. - - -The low-level handling of files is done by classes in filesystem.dart. -This code supports transparently crawling into archives (e.g. .jar -files), as well as handling UTF-8 vs latin1. It contains much magic -and hard-coded file names and so on to handle distinguishing binary -files from text files, and so forth. - -This code uses the cache described in cache.dart to try to avoid -having to repeatedly reopen the same file many times in a row. - - -In the case of a binary file, the license is found by crawling around -the directory structure looking for a "default" license file. In the -case of text files, though, it's often the case that the file itself -mentions the license and therefore the file itself is inspected -looking for copyright or license text. This scanning is done by -determineLicensesFor() in licenses.dart. - -This function uses patterns that are themselves in patterns.dart. In -this file we find all manner of long complicated and somewhat crazy -regular expressions. This is where you see quite how absurd this work -can actually be. It is left as an exercise to the reader to look for -the implications of many of the regular expressions; as one example, -though, consider the case of the pattern that matches the AFL/LGPL -dual license statement: there is one file in which the ZIP code for -the Free Software Foundation is off by one, for no clear reason, -leading to the pattern ending with "MA 0211[01]-1307, USA". - - -The license.dart file also contains the License object, the currently -simplistic normalizer (_reformat) for license text (which mostly just -removes comment syntax), the code that attempts to determine what -copyrights apply to which licenses, and the code that attempts to -identify the licenses themselves (at a high level), to make sure that -appropriate clauses are followed (e.g. including the copyright with a -BSD notice). diff --git a/engine/src/flutter/tools/licenses/lib/cache.dart b/engine/src/flutter/tools/licenses/lib/cache.dart deleted file mode 100644 index 929250c4b1..0000000000 --- a/engine/src/flutter/tools/licenses/lib/cache.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2016 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 'dart:collection'; - -Map _cache = new LinkedHashMap(); -const int _maxSize = 10; - -dynamic/*=T*/ cache/**/(Key key, dynamic/*=T*/ getter()) { - dynamic/*=T*/ result = _cache[key]; - if (result != null) { - _cache.remove(key); - } else { - if (_cache.length == _maxSize) - _cache.remove(_cache.keys.first); - result = getter(); - assert(result is! Function); - } - _cache[key] = result; - return result; -} - -abstract class Key { - Key(this._value); - - final dynamic _value; - - @override - bool operator ==(dynamic other) { - if (identical(this, other)) - return true; - if (runtimeType != other.runtimeType) - return false; - final Key typedOther = other; - return _value == typedOther._value; - } - - @override - int get hashCode => runtimeType.hashCode ^ _value.hashCode; - - @override - String toString() => '$runtimeType($_value)'; -} diff --git a/engine/src/flutter/tools/licenses/lib/filesystem.dart b/engine/src/flutter/tools/licenses/lib/filesystem.dart deleted file mode 100644 index f2aa44680d..0000000000 --- a/engine/src/flutter/tools/licenses/lib/filesystem.dart +++ /dev/null @@ -1,645 +0,0 @@ -// Copyright 2016 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 'dart:convert'; -import 'dart:io' as io; - -import 'package:path/path.dart' as path; -import 'package:archive/archive.dart' as a; - -import 'cache.dart'; - -enum FileType { - binary, // won't have its own license block - text, // might have its own UTF-8 license block - latin1Text, // might have its own Windows-1252 license block - zip, // should be parsed as an archive and drilled into - tar, // should be parsed as an archive and drilled into - gz, // should be parsed as a single compressed file and exposed - bzip2, // should be parsed as a single compressed file and exposed -} - -typedef List Reader(); - -class BytesOf extends Key { BytesOf(dynamic value) : super(value); } -class UTF8Of extends Key { UTF8Of(dynamic value) : super(value); } -class Latin1Of extends Key { Latin1Of(dynamic value) : super(value); } - -bool matchesSignature(List bytes, List signature) { - if (bytes.length < signature.length) - return false; - for (int index = 0; index < signature.length; index += 1) { - if (signature[index] != -1 && bytes[index] != signature[index]) - return false; - } - return true; -} - -const String kMultiLicenseFileHeader = 'Notices for files contained in'; - -bool isMultiLicenseNotice(Reader reader) { - List bytes = reader(); - return (ASCII.decode(bytes.take(kMultiLicenseFileHeader.length).toList(), allowInvalid: true) == kMultiLicenseFileHeader); -} - -FileType identifyFile(String name, Reader reader) { - if ((path.split(name).reversed.take(6).toList().reversed.join('/') == 'third_party/icu/source/extra/uconv/README') || // This specific ICU README isn't in UTF-8. - (path.split(name).reversed.take(6).toList().reversed.join('/') == 'third_party/icu/source/samples/uresb/sr.txt') || // This specific sample contains non-UTF-8 data (unlike other sr.txt files). - (path.split(name).reversed.take(4).toList().reversed.join('/') == 'freetype-android/src/builds/detect.mk') || // This specific sample contains non-UTF-8 data (unlike other .mk files). - (path.split(name).reversed.take(5).toList().reversed.join('/') == 'third_party/skia/src/sfnt/SkOTTable_name.cpp') || // This specific make file contains a single non-UTF-8 character in a comment - (path.split(name).reversed.take(5).toList().reversed.join('/') == 'third_party/freetype-android/src/docs/FTL.TXT')) // This file has a copyright symbol in Latin1 in it - return FileType.latin1Text; - if (path.split(name).reversed.take(6).toList().reversed.join('/') == 'dart/runtime/tests/vm/dart/bad_snapshot' || // Not any particular format - path.split(name).reversed.take(8).toList().reversed.join('/') == 'third_party/android_tools/ndk/sources/cxx-stl/stlport/src/stlport.rc') // uses the word "copyright" but doesn't have a copyright header - return FileType.binary; - switch (path.basename(name)) { - // Build files - case 'DEPS': return FileType.text; - case 'MANIFEST': return FileType.text; - // Licenses - case 'COPYING': return FileType.text; - case 'LICENSE': return FileType.text; - case 'NOTICE.txt': return isMultiLicenseNotice(reader) ? FileType.binary : FileType.text; - case 'NOTICE': return FileType.text; - // Documentation - case 'Changes': return FileType.text; - case 'change.log': return FileType.text; - case 'ChangeLog': return FileType.text; - case 'README': return FileType.text; - case 'TODO': return FileType.text; - case 'NEWS': return FileType.text; - case 'README.chromium': return FileType.text; - case 'README.flutter': return FileType.text; - case 'README.tests': return FileType.text; - case 'OWNERS': return FileType.text; - case 'AUTHORS': return FileType.text; - // Signatures (found in .jar files typically) - case 'CERT.RSA': return FileType.binary; - case 'ECLIPSE_.RSA': return FileType.binary; - // Binary data files - case 'tzdata': return FileType.binary; - // Source files that don't use UTF-8 - case 'Messages_de_DE.properties': // has a few non-ASCII characters they forgot to escape (from gnu-libstdc++) - case 'bool_set': // has latin1 in a person's name in a comment - case 'mmx_blendtmp.h': // author name in comment contains latin1 (mesa) - case 'calling_convention.txt': // contains a soft hyphen instead of a real hyphen for some reason (mesa) - // Boring SSL files - have latin1 in comments - case 'aes-586.pl': - case 'rc4-x86_64.pl': - case 'sha1-586.pl': - case 'sha512-586.pl': - case 'sha256-586.pl': - case 'ghash-x86_64.pl': - case 'ghash-x86.pl': - case 'ghash-armv4.pl': - case 'ghashv8-armx.pl': - case 'ghashv8-armx32.S': - case 'ghashv8-armx64.S': - // Character encoding data files - case 'danish-ISO-8859-1.txt': - case 'eucJP.txt': - case 'hangul-eucKR.txt': - case 'hania-eucKR.txt': - case 'ibm-37-test.txt': - case 'iso8859-1.txt': - case 'ISO-8859-2.txt': - case 'ISO-8859-3.txt': - case 'koi8r.txt': - return FileType.latin1Text; - // Giant data files - case 'icudtl_dat.S': - case 'icudtl.dat': - return FileType.binary; - } - switch (path.extension(name)) { - // C/C++ code - case '.h': return FileType.text; - case '.c': return FileType.text; - case '.cc': return FileType.text; - case '.cpp': return FileType.text; - case '.inc': return FileType.text; - // ObjectiveC code - case '.m': return FileType.text; - // Assembler - case '.asm': return FileType.text; - // Shell - case '.sh': return FileType.text; - case '.bat': return FileType.text; - // Build files - case '.in': return FileType.text; - case '.ac': return FileType.text; - case '.am': return FileType.text; - case '.gn': return FileType.text; - case '.gni': return FileType.text; - case '.gyp': return FileType.text; - case '.gypi': return FileType.text; - // Java code - case '.java': return FileType.text; - case '.jar': return FileType.zip; // Java package - case '.class': return FileType.binary; // compiled Java bytecode (usually found inside .jar archives) - case '.dex': return FileType.binary; // Dalvik Executable (usually found inside .jar archives) - // Dart code - case '.dart': return FileType.text; - // LLVM bitcode - case '.bc': return FileType.binary; - // Python code - case '.py': return FileType.text; - case '.pyc': return FileType.binary; // compiled Python bytecode - // Machine code - case '.so': return FileType.binary; // ELF shared object - case '.xpt': return FileType.binary; // XPCOM Type Library - // Documentation - case '.md': return FileType.text; - case '.txt': return FileType.text; - case '.diff': return FileType.text; - case '.html': return FileType.text; - // Fonts - case '.ttf': return FileType.binary; // TrueType Font - case '.ttcf': // (mac) - case '.ttc': return FileType.binary; // TrueType Collection (windows) - case '.otf': return FileType.binary; // OpenType Font - // Graphics formats - case '.gif': return FileType.binary; // GIF - case '.png': return FileType.binary; // PNG - case '.tga': return FileType.binary; // Truevision TGA (TARGA) - case '.dng': return FileType.binary; // Digial Negative (Adobe RAW format) - case '.jpg': - case '.jpeg': return FileType.binary; // JPEG - case '.ico': return FileType.binary; // Windows icon format - case '.bmp': return FileType.binary; // Windows bitmap format - case '.wbmp': return FileType.binary; // Wireless bitmap format - case '.webp': return FileType.binary; // WEBP - case '.pdf': return FileType.binary; // PDF - // Videos - case '.ogg': return FileType.binary; // Ogg media - case '.mp4': return FileType.binary; // MPEG media - case '.ts': return FileType.binary; // MPEG2 transport stream - // Other binary files - case '.raw': return FileType.binary; // raw audio or graphical data - case '.bin': return FileType.binary; // some sort of binary data - case '.dat': return FileType.binary; // some sort of binary data - case '.rsc': return FileType.binary; // some sort of resource data - case '.arsc': return FileType.binary; // Android compiled resources - case '.apk': return FileType.zip; // Android Package - case '.crx': return FileType.binary; // Chrome extension - case '.keystore': return FileType.binary; - // Archives - case '.zip': return FileType.zip; // ZIP - case '.tar': return FileType.tar; // Tar - case '.gz': return FileType.gz; // GZip - case '.bzip2': return FileType.bzip2; // BZip2 - // Special cases - case '.patch': - case '.diff': - // Don't try to read the copyright out of patch files, since there'll be fragments. - return FileType.binary; - case '.plist': - // These commonly include the word "copyright" but in a way that isn't necessarily a copyright statement that applies to the file. - // Since there's so few of them, and none have their own copyright statement, we just treat them as binary files. - return FileType.binary; - } - List bytes = reader(); - assert(bytes.length > 0); - if (matchesSignature(bytes, [0x1F, 0x8B])) - return FileType.gz; // GZip archive - if (matchesSignature(bytes, [0x42, 0x5A])) - return FileType.bzip2; // BZip2 archive - if (matchesSignature(bytes, [0x42, 0x43])) - return FileType.binary; // LLVM Bitcode - if (matchesSignature(bytes, [0xAC, 0xED])) - return FileType.binary; // Java serialized object - if (matchesSignature(bytes, [0x4D, 0x5A])) - return FileType.binary; // MZ executable (DOS, Windows PEs, etc) - if (matchesSignature(bytes, [0xFF, 0xD8, 0xFF])) - return FileType.binary; // JPEG - if (matchesSignature(bytes, [-1, -1, 0xda, 0x27])) // -1 is a wildcard - return FileType.binary; // ICU data files (.brk, .dict, etc) - if (matchesSignature(bytes, [0x03, 0x00, 0x08, 0x00])) - return FileType.binary; // Android Binary XML - if (matchesSignature(bytes, [0x25, 0x50, 0x44, 0x46])) - return FileType.binary; // PDF - if (matchesSignature(bytes, [0x43, 0x72, 0x32, 0x34])) - return FileType.binary; // Chrome extension - if (matchesSignature(bytes, [0x4F, 0x67, 0x67, 0x53])) - return FileType.binary; // Ogg media - if (matchesSignature(bytes, [0x50, 0x4B, 0x03, 0x04])) - return FileType.zip; // ZIP archive - if (matchesSignature(bytes, [0x7F, 0x45, 0x4C, 0x46])) - return FileType.binary; // ELF - if (matchesSignature(bytes, [0xCA, 0xFE, 0xBA, 0xBE])) - return FileType.binary; // compiled Java bytecode (usually found inside .jar archives) - if (matchesSignature(bytes, [0xCE, 0xFA, 0xED, 0xFE])) - return FileType.binary; // Mach-O binary, 32 bit, reverse byte ordering scheme - if (matchesSignature(bytes, [0xCF, 0xFA, 0xED, 0xFE])) - return FileType.binary; // Mach-O binary, 64 bit, reverse byte ordering scheme - if (matchesSignature(bytes, [0xFE, 0xED, 0xFA, 0xCE])) - return FileType.binary; // Mach-O binary, 32 bit - if (matchesSignature(bytes, [0xFE, 0xED, 0xFA, 0xCF])) - return FileType.binary; // Mach-O binary, 64 bit - if (matchesSignature(bytes, [0x75, 0x73, 0x74, 0x61, 0x72])) - return FileType.bzip2; // Tar - if (matchesSignature(bytes, [0x47, 0x49, 0x46, 0x38, 0x37, 0x61])) - return FileType.binary; // GIF87a - if (matchesSignature(bytes, [0x47, 0x49, 0x46, 0x38, 0x39, 0x61])) - return FileType.binary; // GIF89a - if (matchesSignature(bytes, [0x64, 0x65, 0x78, 0x0A, 0x30, 0x33, 0x35, 0x00])) - return FileType.binary; // Dalvik Executable - if (matchesSignature(bytes, [0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A])) - return FileType.binary; // Unix archiver (ar) // TODO(ianh): implement .ar parser - if (matchesSignature(bytes, [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0a])) - return FileType.binary; // PNG - if (matchesSignature(bytes, [0x58, 0x50, 0x43, 0x4f, 0x4d, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x62, 0x0d, 0x0a, 0x1a])) - return FileType.binary; // XPCOM Type Library - return FileType.text; -} - - -// INTERFACE - -// base class -abstract class IoNode { - // Subclasses of IoNode are not mutually exclusive. - // For example, a ZIP file is represented as a File that also implements Directory. - String get name; - String get fullName; - - @override - String toString() => fullName; -} - -// interface -abstract class File extends IoNode { - List readBytes(); -} - -// interface -abstract class TextFile extends File { - String readString(); -} - -// mixin -abstract class UTF8TextFile extends TextFile { - @override - String readString() { - try { - return cache(new UTF8Of(this), () => UTF8.decode(readBytes())); - } on FormatException { - print(fullName); - rethrow; - } - } -} - -// mixin -abstract class Latin1TextFile extends TextFile { - @override - String readString() { - return cache(new Latin1Of(this), () { - final List bytes = readBytes(); - if (bytes.any((int byte) => byte == 0x00)) - throw '$fullName contains a U+0000 NULL and is probably not actually encoded as Win1252'; - bool isUTF8 = false; - try { - cache(new UTF8Of(this), () => UTF8.decode(readBytes())); - isUTF8 = true; - } on FormatException { - } - if (isUTF8) - throw '$fullName contains valid UTF-8 and is probably not actually encoded as Win1252'; - return LATIN1.decode(bytes); - }); - } -} - -// interface -abstract class Directory extends IoNode { - Iterable get walk; -} - -// interface -abstract class Link extends IoNode { } - -// mixin -abstract class ZipFile extends File implements Directory { - ArchiveDirectory _root; - - @override - Iterable get walk { - try { - _root ??= ArchiveDirectory.parseArchive(new a.ZipDecoder().decodeBytes(readBytes()), fullName); - return _root.walk; - } catch (exception) { - print('failed to parse archive:\n$fullName'); - rethrow; - } - } -} - -// mixin -abstract class TarFile extends File implements Directory { - ArchiveDirectory _root; - - @override - Iterable get walk { - try { - _root ??= ArchiveDirectory.parseArchive(new a.TarDecoder().decodeBytes(readBytes()), fullName); - return _root.walk; - } catch (exception) { - print('failed to parse archive:\n$fullName'); - rethrow; - } - } -} - -// mixin -abstract class GZipFile extends File implements Directory { - InMemoryFile _data; - - @override - Iterable get walk sync* { - try { - String innerName = path.basenameWithoutExtension(fullName); - _data ??= InMemoryFile.parse(fullName + '!' + innerName, new a.GZipDecoder().decodeBytes(readBytes())); - if (_data != null) - yield _data; - } catch (exception) { - print('failed to parse archive:\n$fullName'); - rethrow; - } - } -} - -// mixin -abstract class BZip2File extends File implements Directory { - InMemoryFile _data; - - @override - Iterable get walk sync* { - try { - String innerName = path.basenameWithoutExtension(fullName); - _data ??= InMemoryFile.parse(fullName + '!' + innerName, new a.BZip2Decoder().decodeBytes(readBytes())); - if (_data != null) - yield _data; - } catch (exception) { - print('failed to parse archive:\n$fullName'); - rethrow; - } - } -} - - -// FILESYSTEM IMPLEMENTATIoN - -class FileSystemDirectory extends IoNode implements Directory { - FileSystemDirectory(this._directory); - - factory FileSystemDirectory.fromPath(String name) { - return new FileSystemDirectory(new io.Directory(name)); - } - - final io.Directory _directory; - - @override - String get name => path.basename(_directory.path); - - @override - String get fullName => _directory.path; - - List _readBytes(io.File file) { - return cache/*List*/(new BytesOf(file), () => file.readAsBytesSync()); - } - - @override - Iterable get walk sync* { - for (io.FileSystemEntity entity in _directory.listSync()) { - if (entity is io.Directory) { - yield new FileSystemDirectory(entity); - } else if (entity is io.Link) { - yield new FileSystemLink(entity); - } else { - assert(entity is io.File); - io.File fileEntity = entity; - if (fileEntity.lengthSync() > 0) { - switch (identifyFile(fileEntity.path, () => _readBytes(fileEntity))) { - case FileType.binary: yield new FileSystemFile(fileEntity); break; - case FileType.zip: yield new FileSystemZipFile(fileEntity); break; - case FileType.tar: yield new FileSystemTarFile(fileEntity); break; - case FileType.gz: yield new FileSystemGZipFile(fileEntity); break; - case FileType.bzip2: yield new FileSystemBZip2File(fileEntity); break; - case FileType.text: yield new FileSystemUTF8TextFile(fileEntity); break; - case FileType.latin1Text: yield new FileSystemLatin1TextFile(fileEntity); break; - } - } - } - } - } -} - -class FileSystemLink extends IoNode implements Link { - FileSystemLink(this._link); - - final io.Link _link; - - @override - String get name => path.basename(_link.path); - - @override - String get fullName => _link.path; -} - -class FileSystemFile extends IoNode implements File { - FileSystemFile(this._file); - - final io.File _file; - - @override - String get name => path.basename(_file.path); - - @override - String get fullName => _file.path; - - @override - List readBytes() { - return cache(new BytesOf(_file), () => _file.readAsBytesSync()); - } -} - -class FileSystemUTF8TextFile extends FileSystemFile with UTF8TextFile { - FileSystemUTF8TextFile(io.File file) : super(file); -} - -class FileSystemLatin1TextFile extends FileSystemFile with Latin1TextFile { - FileSystemLatin1TextFile(io.File file) : super(file); -} - -class FileSystemZipFile extends FileSystemFile with ZipFile { - FileSystemZipFile(io.File file) : super(file); -} - -class FileSystemTarFile extends FileSystemFile with TarFile { - FileSystemTarFile(io.File file) : super(file); -} - -class FileSystemGZipFile extends FileSystemFile with GZipFile { - FileSystemGZipFile(io.File file) : super(file); -} - -class FileSystemBZip2File extends FileSystemFile with BZip2File { - FileSystemBZip2File(io.File file) : super(file); -} - - -// ARCHIVES - -class ArchiveDirectory extends IoNode implements Directory { - ArchiveDirectory(this.fullName, this.name); - - @override - final String fullName; - - @override - final String name; - - Map _subdirectories = {}; - List _files = []; - - void _add(a.ArchiveFile entry, List remainingPath) { - if (remainingPath.length > 1) { - final String subdirectoryName = remainingPath.removeAt(0); - _subdirectories.putIfAbsent( - subdirectoryName, - () => new ArchiveDirectory('$fullName/$subdirectoryName', subdirectoryName) - )._add(entry, remainingPath); - } else { - if (entry.size > 0) { - final String entryFullName = fullName + '/' + path.basename(entry.name); - switch (identifyFile(entry.name, () => entry.content)) { - case FileType.binary: _files.add(new ArchiveFile(entryFullName, entry)); break; - case FileType.zip: _files.add(new ArchiveZipFile(entryFullName, entry)); break; - case FileType.tar: _files.add(new ArchiveTarFile(entryFullName, entry)); break; - case FileType.gz: _files.add(new ArchiveGZipFile(entryFullName, entry)); break; - case FileType.bzip2: _files.add(new ArchiveBZip2File(entryFullName, entry)); break; - case FileType.text: _files.add(new ArchiveUTF8TextFile(entryFullName, entry)); break; - case FileType.latin1Text: _files.add(new ArchiveLatin1TextFile(entryFullName, entry)); break; - } - } - } - } - - static ArchiveDirectory parseArchive(a.Archive archive, String ownerPath) { - final ArchiveDirectory root = new ArchiveDirectory('$ownerPath!', ''); - for (a.ArchiveFile file in archive.files) { - if (file.size > 0) - root._add(file, file.name.split('/')); - } - return root; - } - - @override - Iterable get walk sync* { - yield* _subdirectories.values; - yield* _files; - } -} - -class ArchiveFile extends IoNode implements File { - ArchiveFile(this.fullName, this._file); - - final a.ArchiveFile _file; - - @override - String get name => path.basename(_file.name); - - @override - final String fullName; - - @override - List readBytes() { - return _file.content; - } -} - -class ArchiveUTF8TextFile extends ArchiveFile with UTF8TextFile { - ArchiveUTF8TextFile(String fullName, a.ArchiveFile file) : super(fullName, file); -} - -class ArchiveLatin1TextFile extends ArchiveFile with Latin1TextFile { - ArchiveLatin1TextFile(String fullName, a.ArchiveFile file) : super(fullName, file); -} - -class ArchiveZipFile extends ArchiveFile with ZipFile { - ArchiveZipFile(String fullName, a.ArchiveFile file) : super(fullName, file); -} - -class ArchiveTarFile extends ArchiveFile with TarFile { - ArchiveTarFile(String fullName, a.ArchiveFile file) : super(fullName, file); -} - -class ArchiveGZipFile extends ArchiveFile with GZipFile { - ArchiveGZipFile(String fullName, a.ArchiveFile file) : super(fullName, file); -} - -class ArchiveBZip2File extends ArchiveFile with BZip2File { - ArchiveBZip2File(String fullName, a.ArchiveFile file) : super(fullName, file); -} - - -// IN-MEMORY FILES (e.g. contents of GZipped files) - -class InMemoryFile extends IoNode implements File { - InMemoryFile(this.fullName, this._bytes); - - static InMemoryFile parse(String fullName, List bytes) { - if (bytes.isEmpty) - return null; - switch (identifyFile(fullName, () => bytes)) { - case FileType.binary: return new InMemoryFile(fullName, bytes); break; - case FileType.zip: return new InMemoryZipFile(fullName, bytes); break; - case FileType.tar: return new InMemoryTarFile(fullName, bytes); break; - case FileType.gz: return new InMemoryGZipFile(fullName, bytes); break; - case FileType.bzip2: return new InMemoryBZip2File(fullName, bytes); break; - case FileType.text: return new InMemoryUTF8TextFile(fullName, bytes); break; - case FileType.latin1Text: return new InMemoryLatin1TextFile(fullName, bytes); break; - } - assert(false); - return null; - } - - @override - final List _bytes; - - - @override - String get name => ''; - - @override - final String fullName; - - @override - List readBytes() => _bytes; -} - -class InMemoryUTF8TextFile extends InMemoryFile with UTF8TextFile { - InMemoryUTF8TextFile(String fullName, List file) : super(fullName, file); -} - -class InMemoryLatin1TextFile extends InMemoryFile with Latin1TextFile { - InMemoryLatin1TextFile(String fullName, List file) : super(fullName, file); -} - -class InMemoryZipFile extends InMemoryFile with ZipFile { - InMemoryZipFile(String fullName, List file) : super(fullName, file); -} - -class InMemoryTarFile extends InMemoryFile with TarFile { - InMemoryTarFile(String fullName, List file) : super(fullName, file); -} - -class InMemoryGZipFile extends InMemoryFile with GZipFile { - InMemoryGZipFile(String fullName, List file) : super(fullName, file); -} - -class InMemoryBZip2File extends InMemoryFile with BZip2File { - InMemoryBZip2File(String fullName, List file) : super(fullName, file); -} diff --git a/engine/src/flutter/tools/licenses/lib/licenses.dart b/engine/src/flutter/tools/licenses/lib/licenses.dart deleted file mode 100644 index 2595540c39..0000000000 --- a/engine/src/flutter/tools/licenses/lib/licenses.dart +++ /dev/null @@ -1,858 +0,0 @@ -// Copyright 2016 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 'dart:convert'; -import 'dart:io' as system; - -import 'cache.dart'; -import 'patterns.dart'; - -// TODO(ianh): vastly increase this before checkin -const int kMaxSize = 5 * 1024; // only look for copyrights and licenses at the top of the file - -class FetchedContentsOf extends Key { FetchedContentsOf(dynamic value) : super(value); } - -enum LicenseType { unknown, bsd, gpl, lgpl, mpl, afl, mit, freetype, apache, apacheNotice, eclipse, ijg, zlib, icu, apsl, libpng } - -LicenseType convertLicenseNameToType(String name) { - switch (name) { - case 'Apache': - case 'apache-license-2.0': - return LicenseType.apache; - case 'BSD': - case 'BSD.txt': - return LicenseType.bsd; - case 'LICENSE-LGPL-2': - case 'LICENSE-LGPL-2.1': - return LicenseType.lgpl; - case 'FTL.TXT': - return LicenseType.freetype; - case 'zlib.h': - return LicenseType.zlib; - case 'png.h': - return LicenseType.libpng; - case 'ICU': - return LicenseType.icu; - case 'Apple Public Source License': - return LicenseType.apsl; - // common file names that don't say what the type is - case 'COPYING': - case 'COPYING.txt': - case 'COPYING.LIB': // lgpl usually - case 'COPYING.RUNTIME': // gcc exception usually - case 'LICENSE': - case 'LICENSE.md': - case 'license.html': - case 'LICENSE.txt': - case 'LICENSE.TXT': - case 'NOTICE': - case 'NOTICE.txt': - case 'Copyright': - case 'copyright': - return LicenseType.unknown; - // particularly weird file names - case 'LICENSE-APPLE': - case 'extreme.indiana.edu.license.TXT': - case 'extreme.indiana.edu.license.txt': - case 'javolution.license.TXT': - case 'javolution.license.txt': - case 'libyaml-license.txt': - case 'license.patch': - case 'mh-bsd-gcc': - case 'pivotal.labs.license.txt': - return LicenseType.unknown; - } - throw 'unknown license type: $name'; -} - -LicenseType convertBodyToType(String body) { - if (body.startsWith(lrApache)) - return LicenseType.apache; - if (body.startsWith(lrMPL)) - return LicenseType.mpl; - if (body.startsWith(lrGPL)) - return LicenseType.gpl; - if (body.startsWith(lrAPSL)) - return LicenseType.apsl; - if (body.contains(lrBSD)) - return LicenseType.bsd; - if (body.contains(lrMIT)) - return LicenseType.mit; - if (body.contains(lrZlib)) - return LicenseType.zlib; - return LicenseType.unknown; -} - -abstract class LicenseSource { - List nearestLicensesFor(String name); - License nearestLicenseOfType(LicenseType type); - License nearestLicenseWithName(String name, { String authors }); -} - -abstract class License { - factory License.unique(String body, LicenseType type, { bool reformatted: false, String origin }) { - if (!reformatted) - body = _reformat(body); - License result = _registry.putIfAbsent(body, () => new UniqueLicense._(body, type, origin: origin)); - assert(() { - if (result is! UniqueLicense || result.type != type) - throw 'tried to add a UniqueLicense $type, but it was a duplicate of a ${result.runtimeType} ${result.type}'; - return true; - }); - return result; - } - - factory License.template(String body, LicenseType type, { bool reformatted: false, String origin }) { - if (!reformatted) - body = _reformat(body); - License result = _registry.putIfAbsent(body, () => new TemplateLicense._(body, type, origin: origin)); - assert(() { - if (result is! TemplateLicense || result.type != type) - throw 'tried to add a TemplateLicense $type, but it was a duplicate of a ${result.runtimeType} ${result.type}'; - return true; - }); - return result; - } - - factory License.message(String body, LicenseType type, { bool reformatted: false, String origin }) { - if (!reformatted) - body = _reformat(body); - License result = _registry.putIfAbsent(body, () => new MessageLicense._(body, type, origin: origin)); - assert(() { - if (result is! MessageLicense || result.type != type) - throw 'tried to add a MessageLicense $type, but it was a duplicate of a ${result.runtimeType} ${result.type}'; - return true; - }); - return result; - } - - factory License.fromMultipleBlocks(List bodies, LicenseType type) { - final String body = bodies.map((String s) => _reformat(s)).join('\n\n'); - return _registry.putIfAbsent(body, () => new UniqueLicense._(body, type)); - } - - factory License.fromBodyAndType(String body, LicenseType type, { bool reformatted: false, String origin }) { - if (!reformatted) - body = _reformat(body); - License result = _registry.putIfAbsent(body, () { - switch (type) { - case LicenseType.bsd: - case LicenseType.mit: - case LicenseType.zlib: - case LicenseType.icu: - return new TemplateLicense._(body, type, origin: origin); - case LicenseType.unknown: - case LicenseType.apacheNotice: - return new UniqueLicense._(body, type, origin: origin); - case LicenseType.afl: - case LicenseType.mpl: - case LicenseType.gpl: - case LicenseType.lgpl: - case LicenseType.freetype: - case LicenseType.apache: - case LicenseType.eclipse: - case LicenseType.ijg: - case LicenseType.apsl: - case LicenseType.libpng: - return new MessageLicense._(body, type, origin: origin); - } - }); - assert(result.type == type); - return result; - } - - factory License.fromBodyAndName(String body, String name, { String origin }) { - body = _reformat(body); - LicenseType type = convertLicenseNameToType(name); - if (type == LicenseType.unknown) - type = convertBodyToType(body); - return new License.fromBodyAndType(body, type, origin: origin); - } - - factory License.fromBody(String body, { String origin }) { - body = _reformat(body); - LicenseType type = convertBodyToType(body); - return new License.fromBodyAndType(body, type, reformatted: true, origin: origin); - } - - factory License.fromCopyrightAndLicense(String copyright, String template, LicenseType type, { String origin }) { - String body = '$copyright\n\n$template'; - return _registry.putIfAbsent(body, () => new TemplateLicense._(body, type, origin: origin)); - } - - factory License.fromUrl(String url, { String origin }) { - String body; - LicenseType type = LicenseType.unknown; - switch (url) { - case 'Apache:2.0': - case 'http://www.apache.org/licenses/LICENSE-2.0': - body = new system.File('data/apache-license-2.0').readAsStringSync(); - type = LicenseType.apache; - break; - case 'https://developers.google.com/open-source/licenses/bsd': - body = new system.File('data/google-bsd').readAsStringSync(); - type = LicenseType.bsd; - break; - case 'http://polymer.github.io/LICENSE.txt': - body = new system.File('data/polymer-bsd').readAsStringSync(); - type = LicenseType.bsd; - break; - case 'http://www.eclipse.org/legal/epl-v10.html': - body = new system.File('data/eclipse-1.0').readAsStringSync(); - type = LicenseType.eclipse; - break; - case 'COPYING3:3': - body = new system.File('data/gpl-3.0').readAsStringSync(); - type = LicenseType.gpl; - break; - case 'COPYING.LIB:2': - case 'COPYING.LIother.m_:2': // blame hyatt - body = new system.File('data/library-gpl-2.0').readAsStringSync(); - type = LicenseType.lgpl; - break; - case 'GNU Lesser:2': - // there has never been such a license, but the authors said they meant the LGPL2.1 - case 'GNU Lesser:2.1': - body = new system.File('data/lesser-gpl-2.1').readAsStringSync(); - type = LicenseType.lgpl; - break; - case 'COPYING.RUNTIME:3.1': - case 'GCC Runtime Library Exception:3.1': - body = new system.File('data/gpl-gcc-exception-3.1').readAsStringSync(); - break; - case 'Academic Free License:3.0': - body = new system.File('data/academic-3.0').readAsStringSync(); - type = LicenseType.afl; - break; - case 'http://mozilla.org/MPL/2.0/:2.0': - body = new system.File('data/mozilla-2.0').readAsStringSync(); - type = LicenseType.mpl; - break; - default: throw 'unknown url $url'; - } - return _registry.putIfAbsent(body, () => new License.fromBodyAndType(body, type, origin: origin)); - } - - License._(String body, this.type, { this.origin }) : body = body, authors = _readAuthors(body) { - assert(_reformat(body) == body); - assert(() { - try { - switch (type) { - case LicenseType.bsd: - case LicenseType.mit: - case LicenseType.zlib: - case LicenseType.icu: - assert(this is TemplateLicense); - break; - case LicenseType.unknown: - case LicenseType.apacheNotice: - assert(this is UniqueLicense); - break; - case LicenseType.afl: - case LicenseType.mpl: - case LicenseType.gpl: - case LicenseType.lgpl: - case LicenseType.freetype: - case LicenseType.apache: - case LicenseType.eclipse: - case LicenseType.ijg: - case LicenseType.apsl: - case LicenseType.libpng: - assert(this is MessageLicense); - break; - } - } on AssertionError { - throw 'incorrectly created a $runtimeType for a $type'; - } - return true; - }); - final LicenseType detectedType = convertBodyToType(body); - if (detectedType != LicenseType.unknown && detectedType != type) - throw 'Created a license of type $type but it looks like $detectedType\.'; - if (type != LicenseType.apache && type != LicenseType.apacheNotice) { - if (body.contains('Apache')) - throw 'Non-Apache license (type=$type, detectedType=$detectedType) contains the word "Apache"; maybe it\'s a notice?:\n---\n$body\n---'; - } - if (body.contains(trailingColon)) - throw 'incomplete license detected:\n---\n$body\n---'; - // if (type == LicenseType.unknown) - // print('need detector for:\n----\n$body\n----'); - bool isUTF8 = true; - List latin1Encoded; - try { - latin1Encoded = LATIN1.encode(body); - isUTF8 = false; - } on ArgumentError { } - if (!isUTF8) { - bool isAscii = false; - try { - ASCII.decode(latin1Encoded); - isAscii = true; - } on FormatException { } - if (isAscii) - return; - try { - UTF8.decode(latin1Encoded); - isUTF8 = true; - } on FormatException { } - if (isUTF8) - throw 'tried to create a License object with text that appears to have been misdecoded as Latin1 instead of as UTF-8:\n$body'; - } - } - - final String body; - final String authors; - final String origin; - final LicenseType type; - - Iterable get licensees => _licensees; - List _licensees = []; - Set _libraries = new Set(); - - bool get isUsed => _licensees.isNotEmpty; - - void markUsed(String filename, String libraryName) { - assert(libraryName != null); - assert(libraryName != ''); - filename != null; - _licensees.add(filename); - _libraries.add(libraryName); - } - - Iterable expandTemplate(String copyright, { String origin }); - - @override - String toString() { - final List prefixes = _libraries.toList(); - prefixes.sort(); - _licensees.sort(); - final List header = []; - header.addAll(prefixes.map((String s) => 'LIBRARY: $s')); - header.add('ORIGIN: $origin'); - header.addAll(licensees.map((String s) => 'FILE: $s')); - return ('=' * 100) + '\n' + - header.join('\n') + - '\n' + - ('-' * 100) + '\n' + - body + '\n' + - ('=' * 100); - } - - String toStringFormal() { - final List prefixes = _libraries.toList(); - prefixes.sort(); - return prefixes.join('\n') + '\n\n' + body; - } - - static final RegExp _copyrightForAuthors = new RegExp( - r'Copyright [-0-9 ,(cC)©]+\b(The .+ Authors)\.', - caseSensitive: false - ); - - static String _readAuthors(String body) { - final List matches = _copyrightForAuthors.allMatches(body).toList(); - if (matches.isEmpty) - return null; - if (matches.length > 1) - throw 'found too many authors for this copyright:\n$body'; - return matches[0].group(1); - } -} - - -final Map _registry = {}; - -final License missingLicense = new UniqueLicense._('', LicenseType.unknown); - -String _reformat(String body) { - // TODO(ianh): ensure that we're stripping the same amount of leading text on each line - final List lines = body.split('\n'); - while (lines.isNotEmpty && lines.first == '') - lines.removeAt(0); - while (lines.isNotEmpty && lines.last == '') - lines.removeLast(); - if (lines.length > 2) { - if (lines[0].startsWith(beginLicenseBlock) && lines.last.startsWith(endLicenseBlock)) { - lines.removeAt(0); - lines.removeLast(); - } - } else if (lines.isEmpty) { - return ''; - } - final List output = []; - int lastGood; - String previousPrefix; - bool lastWasEmpty = true; - for (String line in lines) { - final Match match = stripDecorations.firstMatch(line); - final String prefix = match.group(1); - String s = match.group(2); - if (!lastWasEmpty || s != '') { - if (s != '') { - if (previousPrefix != null) { - if (previousPrefix.length > prefix.length) { - // TODO(ianh): Spot check files that hit this. At least one just - // has a corrupt license block, which is why this is commented out. - //if (previousPrefix.substring(prefix.length).contains(nonSpace)) - // throw 'inconsistent line prefix: was "$previousPrefix", now "$prefix"\nfull body was:\n---8<---\n$body\n---8<---'; - previousPrefix = prefix; - } else if (previousPrefix.length < prefix.length) { - s = '${prefix.substring(previousPrefix.length)}$s'; - } - } else { - previousPrefix = prefix; - } - lastWasEmpty = false; - lastGood = output.length + 1; - } else { - lastWasEmpty = true; - } - output.add(s); - } - } - if (lastGood == null) { - print('_reformatted to nothing:\n----\n|${body.split("\n").join("|\n|")}|\n----'); - assert(lastGood != null); - throw 'reformatted to nothing:\n$body'; - } - return output.take(lastGood).join('\n'); -} - -class _LineRange { - _LineRange(this.start, this.end, this._body); - final int start; - final int end; - final String _body; - String _value; - String get value { - _value ??= _body.substring(start, end); - return _value; - } -} - -Iterable<_LineRange> _walkLinesBackwards(String body, int start) sync* { - int end; - while (start > 0) { - start -= 1; - if (body[start] == '\n') { - if (end != null) - yield new _LineRange(start + 1, end, body); - end = start; - } - } - if (end != null) - yield new _LineRange(start, end, body); -} - -Iterable<_LineRange> _walkLinesForwards(String body, { int start: 0, int end }) sync* { - int startIndex = start == 0 || body[start-1] == '\n' ? start : null; - int endIndex = startIndex ?? start; - end ??= body.length; - while (endIndex < end) { - if (body[endIndex] == '\n') { - if (startIndex != null) - yield new _LineRange(startIndex, endIndex, body); - startIndex = endIndex + 1; - } - endIndex += 1; - } - if (startIndex != null) - yield new _LineRange(startIndex, endIndex, body); -} - -class _SplitLicense { - _SplitLicense(this._body, this._split) { - assert(this._split == 0 || this._split == this._body.length || this._body[this._split] == '\n'); - } - final String _body; - final int _split; - String getCopyright() => _body.substring(0, _split); - String getConditions() => _split >= _body.length ? '' : _body.substring(_split == 0 ? 0 : _split + 1); -} - -_SplitLicense _splitLicense(String body, { bool verifyResults: true }) { - Iterator<_LineRange> lines = _walkLinesForwards(body).iterator; - if (!lines.moveNext()) - throw 'tried to split empty license'; - int end = 0; - while (true) { - final String line = lines.current.value; - if (line == 'Author:' || - line == 'This code is derived from software contributed to Berkeley by' || - line == 'The Initial Developer of the Original Code is') { - if (!lines.moveNext()) - throw 'unexpected end of block instead of author when looking for copyright'; - if (lines.current.value.trim() == '') - throw 'unexpectedly blank line instead of author when looking for copyright'; - end = lines.current.end; - if (!lines.moveNext()) - break; - } else if (line.startsWith('Authors:') || line == 'Other contributors:') { - if (line != 'Authors:') { - // assume this line contained an author as well - end = lines.current.end; - } - if (!lines.moveNext()) - throw 'unexpected end of license when reading list of authors while looking for copyright'; - final String firstAuthor = lines.current.value; - int subindex = 0; - while (subindex < firstAuthor.length && (firstAuthor[subindex] == ' ' || - firstAuthor[subindex] == '\t')) - subindex += 1; - if (subindex == 0 || subindex > firstAuthor.length) - throw 'unexpected blank line instead of authors found when looking for copyright'; - end = lines.current.end; - final String prefix = firstAuthor.substring(0, subindex); - while (lines.moveNext() && lines.current.value.startsWith(prefix)) { - final String nextAuthor = lines.current.value.substring(prefix.length); - if (nextAuthor == '' || nextAuthor[0] == ' ' || nextAuthor[0] == '\t') - throw 'unexpectedly ragged author list when looking for copyright'; - end = lines.current.end; - } - if (lines.current == null) - break; - } else if (line.contains(halfCopyrightPattern)) { - do { - if (!lines.moveNext()) - throw 'unexpected end of block instead of copyright holder when looking for copyright'; - if (lines.current.value.trim() == '') - throw 'unexpectedly blank line instead of copyright holder when looking for copyright'; - end = lines.current.end; - } while (lines.current.value.contains(trailingComma)); - if (!lines.moveNext()) - break; - } else if (copyrightStatementPatterns.every((RegExp pattern) => !line.contains(pattern))) { - break; - } else { - end = lines.current.end; - if (!lines.moveNext()) - break; - } - } - if (verifyResults && 'Copyright ('.allMatches(body, end).isNotEmpty && !body.startsWith('If you modify libpng')) - throw 'the license seems to contain a copyright:\n===copyright===\n${body.substring(0, end)}\n===license===\n${body.substring(end)}\n========='; - return new _SplitLicense(body, end); -} - -class _PartialLicenseMatch { - _PartialLicenseMatch(this._body, this.start, this.split, this.end, this._match, { this.hasCopyrights }) { - assert(split >= start); - assert(split == start || _body[split] == '\n'); - } - final String _body; - final int start; - final int split; - final int end; - final Match _match; - String group(int index) => _match.group(index); - String getAuthors() { - final Match match = authorPattern.firstMatch(getCopyrights()); - if (match != null) - return match.group(1); - return null; - } - String getCopyrights() => _body.substring(start, split); - String getConditions() => _body.substring(split + 1, end); - String getEntireLicense() => _body.substring(start, end); - final bool hasCopyrights; -} - -Iterable<_PartialLicenseMatch> _findLicenseBlocks(String body, RegExp pattern, int firstPrefixIndex, int indentPrefixIndex, { bool needsCopyright: true }) sync* { - // I tried doing this with one big RegExp initially, but that way lay madness. - for (Match match in pattern.allMatches(body)) { - assert(match.groupCount >= firstPrefixIndex); - assert(match.groupCount >= indentPrefixIndex); - int start = match.start; - final String fullPrefix = '${match.group(firstPrefixIndex)}${match.group(indentPrefixIndex)}'; - // first we walk back to the start of the block that has the same prefix (e.g. - // the start of this comment block) - bool firstLineSpecialComment = false; - bool lastWasBlank = false; - bool foundNonBlank = false; - for (_LineRange range in _walkLinesBackwards(body, start)) { - String line = range.value; - bool isBlockCommentLine; - if (line.length > 3 && line.endsWith('*/')) { - int index = line.length - 3; - while (line[index] == ' ') - index -= 1; - line = line.substring(0, index + 1); - isBlockCommentLine = true; - } else { - isBlockCommentLine = false; - } - if (line.isEmpty || fullPrefix.startsWith(line)) { - // this is blank line - if (lastWasBlank && (foundNonBlank || !needsCopyright)) - break; - lastWasBlank = true; - } else if (((!isBlockCommentLine && line.startsWith('/*')) || - line.startsWith('