[go: nahoru, domu]

blob: cc9224a29b19fbca0866b81889e0ec007413f8ca [file] [log] [blame]
# 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/nacl/config.gni")
import("//services/catalog/public/tools/catalog.gni")
import("//services/service_manager/public/service_manifest.gni")
import("//testing/test.gni")
# Target that builders build.
group("all") {
testonly = true
deps = [
":mash_catalog",
"//components/leveldb",
"//mash/catalog_viewer",
"//mash/example",
"//mash/quick_launch",
"//mash/runner",
"//mash/session",
"//mash/simple_wm",
"//mash/task_viewer",
]
# Build on platforms that support ash.
if (is_chromeos) {
deps += [
"//ash/autoclick/mus:accessibility_autoclick",
"//ash/touch_hud/mus:touch_hud",
"//mash:mash_unittests",
]
}
}
# This is the catalog of services available to a standalone mash environment.
# Build //mash/runner to generate the runner executable.
catalog("catalog") {
testonly = true
standalone_services = [
"//components/leveldb:manifest",
"//mash/catalog_viewer:manifest",
"//mash/quick_launch:manifest",
"//mash/session:manifest",
"//mash/task_viewer:manifest",
"//services/tracing:manifest",
"//services/ui:manifest",
"//services/ui/demo:manifest",
"//services/ui/ime/test_ime_driver:manifest",
# TODO(rockot): It seems like a layering violation to have these service
# names referenced here, but it's the most convenient thing to do for now,
# and this is only for developers.
#
# Note that there are no build-time dependencies on the actual Chrome
# binary implied by mash:all or other targets here. This only ensures that
# if you have such a binary built, the runner will be able to locate it.
"//chrome/app:chrome_content_browser_manifest",
"//chrome/app:chrome_content_gpu_manifest",
"//chrome/app:chrome_content_packaged_services_manifest_for_mash",
"//chrome/app:chrome_content_plugin_manifest",
"//chrome/app:chrome_content_renderer_manifest",
"//chrome/app:chrome_content_utility_manifest",
]
executable_overrides = [ "content_packaged_services:@EXE_DIR/chrome" ]
catalog_deps = [ "//mash/example:catalog" ]
if (is_chromeos) {
standalone_services += [ "//ash/mus:manifest" ]
}
if (is_linux && !is_android) {
standalone_services += [ "//components/font_service:manifest" ]
}
if (enable_nacl) {
standalone_services += [ "//components/nacl/loader:nacl_loader_manifest" ]
if (is_win && target_cpu == "x86") {
standalone_services += [ "//components/nacl/broker:nacl_broker_manifest" ]
}
}
}
copy("mash_catalog") {
testonly = true
sources = get_target_outputs(":catalog")
outputs = [
"$root_out_dir/mash_catalog.json",
]
deps = [
":catalog",
]
}
group("browser") {
testonly = true
deps = [
":all",
"//mash/browser",
"//mash/webtest",
]
}
if (is_chromeos) {
# TODO(jamescook): Move these tests into //ash/mus.
test("mash_unittests") {
sources = [
"test/mash_test_suite.cc",
"test/mash_test_suite.h",
"test/mash_unittests.cc",
]
deps = [
"//ash:common_unittests",
"//ash/mus:resources",
"//ash/mus:unittests",
"//ash/public/cpp:ash_public_cpp",
"//base",
"//base/test:test_support",
"//cc",
"//cc:test_support",
"//cc/surfaces",
"//mojo/edk/system",
"//services/catalog:lib",
"//ui/aura",
"//ui/base",
"//ui/compositor:test_support",
"//ui/gl:test_support",
]
data_deps = [
":mash_unittests_catalog_copy",
"//ash/mus:resources",
]
}
service_manifest("unittests_manifest") {
name = "mash_unittests"
source = "unittests_manifest.json"
}
catalog("mash_unittests_catalog") {
testonly = true
embedded_services = [ ":unittests_manifest" ]
catalog_deps = [ ":catalog" ]
}
copy("mash_unittests_catalog_copy") {
testonly = true
sources = get_target_outputs(":mash_unittests_catalog")
outputs = [
"${root_out_dir}/mash_unittests_catalog.json",
]
deps = [
":mash_unittests_catalog",
]
}
}