Update from https://crrev.com/333737
* Cherrypick crrev.com/333293 (freetype -> freetype-android).
* Update mojo/go/go.py to use android-16 (NDK API level 16), which is
4.1 (first Jelly Bean). Chromium dropped support for 14.
* TODO (separately): also update tools/go/upload.py and upload new
binaries?
* Roll android_tools (to match Chromium).
* Small fixes to match //base changes: base::ObserverList, TraceConfig,
ThreadTicks, etc.
* Restore build/ls.py (and add it to the list of files to not roll).
* Remove the dependency on third_party/instrumented_libraries.
* Add "enable_topchrome_md = false" to build/config/ui.gni.
* Add build/config/ui.gni to files_not_to_roll in
update_from_chromium.py. (We should probably get rid of the use_glib
variable/argument, and others as well.)
* Remove mojo/tools/roll/{roll_network_service.py,
roll_network_service_patches/network_service.patch}. These are for
rolling from Chromium, whereas we now have/use monet.
* Roll buildtools (to match Chromium).
* Modify sanitizer gn/gni files to make it work (patch included).
(Maybe the patch even works -- I haven't checked.)
TBR=rockot@chromium.org,jamesr@chromium.org,rogulenko@google.com
Review URL: https://codereview.chromium.org/1180693002.
diff --git a/testing/scripts/gn_check.py b/testing/scripts/gn_check.py
new file mode 100755
index 0000000..5feb166
--- /dev/null
+++ b/testing/scripts/gn_check.py
@@ -0,0 +1,57 @@
+#!/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/testing/scripts/gyp_flag_compare.py b/testing/scripts/gyp_flag_compare.py
new file mode 100755
index 0000000..0b777d9
--- /dev/null
+++ b/testing/scripts/gyp_flag_compare.py
@@ -0,0 +1,49 @@
+#!/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/testing/scripts/mojo_apptest.py b/testing/scripts/mojo_apptest.py
new file mode 100755
index 0000000..09e3f23
--- /dev/null
+++ b/testing/scripts/mojo_apptest.py
@@ -0,0 +1,46 @@
+#!/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')
+ tests = os.path.join(common.SRC_DIR, 'mojo', 'tools', 'data', 'apptests')
+ build_dir = os.path.join(common.SRC_DIR, 'out', args.build_config_fs)
+
+ with common.temporary_file() as tempfile_path:
+ rc = common.run_command([runner, tests, build_dir, '--verbose',
+ '--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))