diff options
author | Dan Beam <dbeam@chromium.org> | 2015-05-01 10:59:49 -0700 |
---|---|---|
committer | Dan Beam <dbeam@chromium.org> | 2015-05-01 18:01:12 +0000 |
commit | 565d7e3762e2f7c667d87a2766cae3435d846e00 (patch) | |
tree | 10a2d56b9e616221376cc41dba0bed9158b51c55 | |
parent | b1b09b7962fe68bfb5df60a68e96b6b2f9bd1dcc (diff) | |
download | chromium_src-565d7e3762e2f7c667d87a2766cae3435d846e00.zip chromium_src-565d7e3762e2f7c667d87a2766cae3435d846e00.tar.gz chromium_src-565d7e3762e2f7c667d87a2766cae3435d846e00.tar.bz2 |
Revert "Add Mandoline.apk, reusing a bunch of stuff from MojoRunner.apk to begin with."
This reverts commit dbadf07493f72cfdc90dc28b066e70121d15f4ff.
Revert "Rename mandoline_all -> mandoline."
This reverts commit 827acb62b9181ac3b45ba866e059e6bf590b4e29.
TBR=ben@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1117263003
Cr-Commit-Position: refs/heads/master@{#327936}
-rw-r--r-- | BUILD.gn | 2 | ||||
-rw-r--r-- | mandoline/BUILD.gn | 11 | ||||
-rw-r--r-- | mandoline/app/BUILD.gn | 29 | ||||
-rw-r--r-- | mandoline/app/android/BUILD.gn | 37 | ||||
-rw-r--r-- | mandoline/app/android/apk/AndroidManifest.xml | 31 | ||||
-rw-r--r-- | mandoline/app/desktop/BUILD.gn | 29 | ||||
-rwxr-xr-x | mandoline/tools/android_run_mandoline.py | 54 | ||||
-rwxr-xr-x | mojo/tools/android_mojo_shell.py | 3 | ||||
-rw-r--r-- | mojo/tools/mopy/config.py | 8 | ||||
-rw-r--r-- | mojo/tools/mopy/paths.py | 2 | ||||
-rw-r--r-- | testing/buildbot/chromium.linux.json | 4 | ||||
-rw-r--r-- | testing/buildbot/chromium.win.json | 6 |
12 files changed, 34 insertions, 182 deletions
@@ -578,7 +578,7 @@ group("gn_only") { testonly = true deps = [ - "//mandoline", + "//mandoline:mandoline_all", ] if (!is_android && !is_ios) { diff --git a/mandoline/BUILD.gn b/mandoline/BUILD.gn index 29c18c5..a675d33 100644 --- a/mandoline/BUILD.gn +++ b/mandoline/BUILD.gn @@ -2,17 +2,14 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -group("mandoline") { +group("mandoline_all") { # Meta-target, don't link into production code. testonly = true - - # TODO(beng): should be able to remove this in favor of explicit dependencies - # from subdirs. deps = [ - "//mojo", + "//mojo:mojo", ] - if (!is_component_build) { - deps += [ "//mandoline/app" ] + if (!is_android && !is_component_build) { + deps += [ "//mandoline/app:mandoline" ] } } diff --git a/mandoline/app/BUILD.gn b/mandoline/app/BUILD.gn index a786e8e..998659c 100644 --- a/mandoline/app/BUILD.gn +++ b/mandoline/app/BUILD.gn @@ -4,14 +4,27 @@ import("//third_party/mojo/src/mojo/public/mojo.gni") -group("app") { - if (is_android) { - deps = [ - "//mandoline/app/android", - ] - } else { - deps = [ - "//mandoline/app/desktop", +if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +} + +executable("mandoline") { + sources = [] + + deps = [ + "//base", + "//build/config/sanitizers:deps", + "//mojo/common", + "//mojo/environment:chromium", + "//mojo/runner:lib", + ] + + if (!is_android) { + sources += [ + "desktop/launcher_process.cc", + "desktop/launcher_process.h", + "desktop/main.cc", ] } } diff --git a/mandoline/app/android/BUILD.gn b/mandoline/app/android/BUILD.gn deleted file mode 100644 index 78e7c45..0000000 --- a/mandoline/app/android/BUILD.gn +++ /dev/null @@ -1,37 +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. - -assert(is_android) - -import("//third_party/mojo/src/mojo/public/mojo.gni") -import("//build/config/android/config.gni") -import("//build/config/android/rules.gni") - -mojo_runner_assets_dir = "$root_build_dir/mojo_runner_assets" - -group("android") { - deps = [ - ":mandoline_apk", - ] -} - -android_apk("mandoline_apk") { - apk_name = "Mandoline" - - android_manifest = "apk/AndroidManifest.xml" - - native_libs = [ "libmojo_runner.so" ] - - asset_location = mojo_runner_assets_dir - - deps = [ - "//mojo/runner:copy_mojo_runner", - "//mojo/runner:copy_mojo_runner_assets", - "//mojo/runner:java", - "//mojo/runner:resources", - "//base:base_java", - "//components/native_viewport:native_viewport_java", - "//third_party/android_tools:google_play_services_default_resources", - ] -} diff --git a/mandoline/app/android/apk/AndroidManifest.xml b/mandoline/app/android/apk/AndroidManifest.xml deleted file mode 100644 index b9ceeab..0000000 --- a/mandoline/app/android/apk/AndroidManifest.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- 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. - --> - -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="org.chromium.mandoline"> - - <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" /> - <uses-permission android:name="android.permission.INTERNET"/> - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> - - <application android:name="MojoShellApplication" - android:label="Mandoline"> - <meta-data android:name="com.google.android.gms.version" - android:value="@integer/google_play_services_version" /> - <activity android:name="MojoShellActivity" - android:launchMode="singleTask" - android:theme="@android:style/Theme.Holo.Light.NoActionBar" - android:configChanges="orientation|keyboardHidden|keyboard|screenSize" - android:hardwareAccelerated="true"> - <intent-filter> - <action android:name="android.intent.action.VIEW"/> - </intent-filter> - </activity> - </application> - -</manifest> diff --git a/mandoline/app/desktop/BUILD.gn b/mandoline/app/desktop/BUILD.gn deleted file mode 100644 index ac11b68..0000000 --- a/mandoline/app/desktop/BUILD.gn +++ /dev/null @@ -1,29 +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("//third_party/mojo/src/mojo/public/mojo.gni") - -group("desktop") { - deps = [ - ":mandoline_exe", - ] -} - -executable("mandoline_exe") { - output_name = "mandoline" - - sources = [ - "launcher_process.cc", - "launcher_process.h", - "main.cc", - ] - - deps = [ - "//base", - "//build/config/sanitizers:deps", - "//mojo/common", - "//mojo/environment:chromium", - "//mojo/runner:lib", - ] -} diff --git a/mandoline/tools/android_run_mandoline.py b/mandoline/tools/android_run_mandoline.py deleted file mode 100755 index bcfae95..0000000 --- a/mandoline/tools/android_run_mandoline.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. - -import argparse -import logging -import os -import sys - -sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(__file__)), - '../../mojo/tools')) - -from mopy.android import AndroidShell -from mopy.config import Config -from mopy.paths import Paths - -USAGE = ("android_run_mandoline.py [<shell-and-app-args>] [<mojo-app>]") - -def main(): - logging.basicConfig() - - parser = argparse.ArgumentParser(usage=USAGE) - - debug_group = parser.add_mutually_exclusive_group() - debug_group.add_argument('--debug', help='Debug build (default)', - default=True, action='store_true') - debug_group.add_argument('--release', help='Release build', default=False, - dest='debug', action='store_false') - parser.add_argument('--target-cpu', help='CPU architecture to run for.', - choices=['x64', 'x86', 'arm']) - parser.add_argument('--origin', help='Origin for mojo: URLs.') - parser.add_argument('--target-device', help='Device to run on.') - launcher_args, args = parser.parse_known_args() - - config = Config(target_os=Config.OS_ANDROID, - target_cpu=launcher_args.target_cpu, - is_debug=launcher_args.debug, - apk_name="Mandoline.apk") - paths = Paths(config) - shell = AndroidShell(paths.target_mojo_shell_path, paths.build_dir, - paths.adb_path, launcher_args.target_device) - - extra_shell_args = shell.PrepareShellRun(launcher_args.origin) - args.extend(extra_shell_args) - - shell.CleanLogs() - p = shell.ShowLogs() - shell.StartShell(args, sys.stdout, p.terminate) - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/mojo/tools/android_mojo_shell.py b/mojo/tools/android_mojo_shell.py index 020fe1f..ca86672 100755 --- a/mojo/tools/android_mojo_shell.py +++ b/mojo/tools/android_mojo_shell.py @@ -31,8 +31,7 @@ def main(): config = Config(target_os=Config.OS_ANDROID, target_cpu=launcher_args.target_cpu, - is_debug=launcher_args.debug, - apk_name="MojoRunner.apk") + is_debug=launcher_args.debug) paths = Paths(config) shell = AndroidShell(paths.target_mojo_shell_path, paths.build_dir, paths.adb_path, launcher_args.target_device) diff --git a/mojo/tools/mopy/config.py b/mojo/tools/mopy/config.py index ba43bd0..796a328 100644 --- a/mojo/tools/mopy/config.py +++ b/mojo/tools/mopy/config.py @@ -39,7 +39,7 @@ class Config(object): def __init__(self, target_os=None, target_cpu=None, is_debug=True, is_clang=None, sanitizer=None, dcheck_always_on=False, - apk_name="MojoRunner.apk", **kwargs): + **kwargs): """Constructs a Config with key-value pairs specified via keyword arguments. If target_os is not specified, it will be set to the host OS.""" @@ -68,7 +68,6 @@ class Config(object): self.values["is_clang"] = is_clang self.values["sanitizer"] = sanitizer self.values["dcheck_always_on"] = dcheck_always_on - self.values["apk_name"] = apk_name self.values.update(kwargs) @@ -118,11 +117,6 @@ class Config(object): return self.values["dcheck_always_on"] @property - def apk_name(self): - """Name of the APK file to run""" - return self.values["apk_name"] - - @property def is_clang(self): """Should use clang?""" return self.values["is_clang"] diff --git a/mojo/tools/mopy/paths.py b/mojo/tools/mopy/paths.py index 751629a..508305c 100644 --- a/mojo/tools/mopy/paths.py +++ b/mojo/tools/mopy/paths.py @@ -36,7 +36,7 @@ class Paths(object): if config and config.target_os == Config.OS_ANDROID: self.target_mojo_shell_path = os.path.join(self.build_dir, "apks", - config.apk_name) + "MojoRunner.apk") else: self.target_mojo_shell_path = self.mojo_shell_path else: diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json index d512029..1dce914 100644 --- a/testing/buildbot/chromium.linux.json +++ b/testing/buildbot/chromium.linux.json @@ -145,7 +145,7 @@ "ipc_mojo_unittests", "ipc_tests", "jingle_unittests", - "mandoline", + "mandoline_all", "media_unittests", "nacl_loader_unittests", "net_unittests", @@ -197,7 +197,7 @@ "ipc_mojo_unittests", "ipc_tests", "jingle_unittests", - "mandoline", + "mandoline_all", "media_unittests", "net_unittests", "ppapi_unittests", diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json index 8364d23..f3c664e 100644 --- a/testing/buildbot/chromium.win.json +++ b/testing/buildbot/chromium.win.json @@ -512,7 +512,7 @@ "ipc_tests", "jingle_unittests", "keyboard_unittests", - "mandoline", + "mandoline_all", "media_unittests", "message_center_unittests", "ppapi_unittests", @@ -569,7 +569,7 @@ "ipc_tests", "jingle_unittests", "keyboard_unittests", - "mandoline", + "mandoline_all", "media_unittests", "message_center_unittests", "ppapi_unittests", @@ -1145,7 +1145,7 @@ "ipc_tests", "jingle_unittests", "keyboard_unittests", - "mandoline", + "mandoline_all", "media_unittests", "message_center_unittests", "ppapi_unittests", |