summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn2
-rw-r--r--mandoline/BUILD.gn11
-rw-r--r--mandoline/app/BUILD.gn29
-rw-r--r--mandoline/app/android/BUILD.gn37
-rw-r--r--mandoline/app/android/apk/AndroidManifest.xml31
-rw-r--r--mandoline/app/desktop/BUILD.gn29
-rwxr-xr-xmandoline/tools/android_run_mandoline.py54
-rwxr-xr-xmojo/tools/android_mojo_shell.py3
-rw-r--r--mojo/tools/mopy/config.py8
-rw-r--r--mojo/tools/mopy/paths.py2
-rw-r--r--testing/buildbot/chromium.linux.json4
-rw-r--r--testing/buildbot/chromium.win.json6
12 files changed, 34 insertions, 182 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 560f3a7..7f497fa 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -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",